-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
|
||
|
||
def handler_analysis(image_name, context): | ||
print ("Hello world "+ image_name) | ||
print (context.get_images()) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
from .client_software import ClientSoftware | ||
from .consumer_rabbit import ConsumerRabbit | ||
from pyfinder.model.image import Image | ||
from pyfinder.analysis import handler_analysis | ||
import logging | ||
import datetime | ||
import sys | ||
|
@@ -21,6 +22,8 @@ def __init__(self, amqp_url='amqp://guest:[email protected]:5672', exchange=None, | |
rmi=True): | ||
|
||
|
||
|
||
|
||
self.rmi = rmi # remove an image after it is scanned | ||
|
||
self.logger = logging.getLogger(__class__.__name__) | ||
|
@@ -29,6 +32,8 @@ def __init__(self, amqp_url='amqp://guest:[email protected]:5672', exchange=None, | |
# client of Software service: the service that return the software to search in the images. | ||
self.client_software = ClientSoftware(api_url=software_url) | ||
|
||
|
||
|
||
# client of Docker daemon running on the local host | ||
#self.client_daemon = ClientDaemon(base_url='unix://var/run/docker.sock') | ||
self.client_daemon = docker.Client(base_url='unix://var/run/docker.sock') | ||
|
@@ -44,6 +49,8 @@ def __init__(self, amqp_url='amqp://guest:[email protected]:5672', exchange=None, | |
# client of Images Service: in order to add and update the image description. | ||
self.client_images = ClientImages(images_url=images_url) | ||
|
||
handler_analysis("ciao", self.client_images) | ||
|
||
# client of Docker Hub. | ||
self.client_hub = ClientHub(docker_hub_endpoint=hub_url) | ||
|
||
|