Following my post I have been trying to use the events
API to get information regarding the creation of containers. However I could not find much documentation regarding this API call in particular and the example given in the pylxd documentation seems to not be working.
My test.py
file:
from pylxd import Client
from pylxd import EventType
client = Client()
filter = set([EventType.Operation, EventType.Logging])
ws_client = client.events(event_filter=filter)
ws_client.connect()
ws_client.run()
The output:
$ python3 test.py
Traceback (most recent call last):
File "test.py", line 6, in <module>
ws_client = client.events(event_filter=filter)
TypeError: events() got an unexpected keyword argument 'event_filter'
Without the event_filter
keyword the script runs fine and I’m guessing the socket will then be used to monitor events. However I have been unable to find the location of the socket to get the output.
Are there any examples of using the events
API for monitoring container creation?