+class HighAvailabilityFacade(Type):
+ name = 'HighAvailability'
+ version = 2
+ schema = {'definitions': {'Address': {'additionalProperties': False,
+ 'properties': {'Scope': {'type': 'string'},
+ 'SpaceName': {'type': 'string'},
+ 'SpaceProviderId': {'type': 'string'},
+ 'Type': {'type': 'string'},
+ 'Value': {'type': 'string'}},
+ 'required': ['Value',
+ 'Type',
+ 'Scope',
+ 'SpaceName',
+ 'SpaceProviderId'],
+ 'type': 'object'},
+ 'ControllersChangeResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'$ref': '#/definitions/ControllersChanges'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'ControllersChangeResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ControllersChanges': {'additionalProperties': False,
+ 'properties': {'added': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'converted': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'demoted': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'maintained': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'promoted': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'removed': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ControllersSpec': {'additionalProperties': False,
+ 'properties': {'constraints': {'$ref': '#/definitions/Value'},
+ 'model-tag': {'type': 'string'},
+ 'num-controllers': {'type': 'integer'},
+ 'placement': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'series': {'type': 'string'}},
+ 'required': ['model-tag',
+ 'num-controllers'],
+ 'type': 'object'},
+ 'ControllersSpecs': {'additionalProperties': False,
+ 'properties': {'specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
+ 'type': 'array'}},
+ 'required': ['specs'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'HAMember': {'additionalProperties': False,
+ 'properties': {'public-address': {'$ref': '#/definitions/Address'},
+ 'series': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'public-address', 'series'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'Member': {'additionalProperties': False,
+ 'properties': {'Address': {'type': 'string'},
+ 'Arbiter': {'type': 'boolean'},
+ 'BuildIndexes': {'type': 'boolean'},
+ 'Hidden': {'type': 'boolean'},
+ 'Id': {'type': 'integer'},
+ 'Priority': {'type': 'number'},
+ 'SlaveDelay': {'type': 'integer'},
+ 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'},
+ 'Votes': {'type': 'integer'}},
+ 'required': ['Id',
+ 'Address',
+ 'Arbiter',
+ 'BuildIndexes',
+ 'Hidden',
+ 'Priority',
+ 'Tags',
+ 'SlaveDelay',
+ 'Votes'],
+ 'type': 'object'},
+ 'MongoUpgradeResults': {'additionalProperties': False,
+ 'properties': {'ha-members': {'items': {'$ref': '#/definitions/HAMember'},
+ 'type': 'array'},
+ 'master': {'$ref': '#/definitions/HAMember'},
+ 'rs-members': {'items': {'$ref': '#/definitions/Member'},
+ 'type': 'array'}},
+ 'required': ['rs-members',
+ 'master',
+ 'ha-members'],
+ 'type': 'object'},
+ 'ResumeReplicationParams': {'additionalProperties': False,
+ 'properties': {'members': {'items': {'$ref': '#/definitions/Member'},
+ 'type': 'array'}},
+ 'required': ['members'],
+ 'type': 'object'},
+ 'UpgradeMongoParams': {'additionalProperties': False,
+ 'properties': {'target': {'$ref': '#/definitions/Version'}},
+ 'required': ['target'],
+ 'type': 'object'},
+ 'Value': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'container': {'type': 'string'},
+ 'cpu-cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'instance-type': {'type': 'string'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'spaces': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'virt-type': {'type': 'string'}},
+ 'type': 'object'},
+ 'Version': {'additionalProperties': False,
+ 'properties': {'Major': {'type': 'integer'},
+ 'Minor': {'type': 'integer'},
+ 'Patch': {'type': 'string'},
+ 'StorageEngine': {'type': 'string'}},
+ 'required': ['Major',
+ 'Minor',
+ 'Patch',
+ 'StorageEngine'],
+ 'type': 'object'}},
+ 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
+ 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
+ 'type': 'object'},
+ 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
+ 'type': 'object'},
+ 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
+ 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ControllersChangeResults)
+ async def EnableHA(self, specs):
+ '''
+ specs : typing.Sequence<+T_co>[~ControllersSpec]<~ControllersSpec>
+ Returns -> typing.Sequence<+T_co>[~ControllersChangeResult]<~ControllersChangeResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='HighAvailability', request='EnableHA', version=2, params=params)
+ params['specs'] = specs
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def ResumeHAReplicationAfterUpgrade(self, members):
+ '''
+ members : typing.Sequence<+T_co>[~Member]<~Member>
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='HighAvailability', request='ResumeHAReplicationAfterUpgrade', version=2, params=params)
+ params['members'] = members
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MongoUpgradeResults)
+ async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine):
+ '''
+ major : int
+ minor : int
+ patch : str
+ storageengine : str
+ Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence<+T_co>[~Member]<~Member>]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='HighAvailability', request='StopHAReplicationForUpgrade', version=2, params=params)
+ params['Major'] = major
+ params['Minor'] = minor
+ params['Patch'] = patch
+ params['StorageEngine'] = storageengine
+ reply = await self.rpc(msg)
+ return reply
+
+
+class HostKeyReporterFacade(Type):
+ name = 'HostKeyReporter'
+ version = 1
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'SSHHostKeySet': {'additionalProperties': False,
+ 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
+ 'type': 'array'}},
+ 'required': ['entity-keys'],
+ 'type': 'object'},
+ 'SSHHostKeys': {'additionalProperties': False,
+ 'properties': {'public-keys': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'public-keys'],
+ 'type': 'object'}},
+ 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def ReportKeys(self, entity_keys):
+ '''
+ entity_keys : typing.Sequence<+T_co>[~SSHHostKeys]<~SSHHostKeys>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='HostKeyReporter', request='ReportKeys', version=1, params=params)
+ params['entity-keys'] = entity_keys
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ImageManagerFacade(Type):
+ name = 'ImageManager'
+ version = 2
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ImageFilterParams': {'additionalProperties': False,
+ 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
+ 'type': 'array'}},
+ 'required': ['images'],
+ 'type': 'object'},
+ 'ImageMetadata': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'created': {'format': 'date-time',
+ 'type': 'string'},
+ 'kind': {'type': 'string'},
+ 'series': {'type': 'string'},
+ 'url': {'type': 'string'}},
+ 'required': ['kind',
+ 'arch',
+ 'series',
+ 'url',
+ 'created'],
+ 'type': 'object'},
+ 'ImageSpec': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'kind': {'type': 'string'},
+ 'series': {'type': 'string'}},
+ 'required': ['kind', 'arch', 'series'],
+ 'type': 'object'},
+ 'ListImageResult': {'additionalProperties': False,
+ 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
+ 'type': 'array'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
+ 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
+ 'Result': {'$ref': '#/definitions/ListImageResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def DeleteImages(self, images):
+ '''
+ images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageManager', request='DeleteImages', version=2, params=params)
+ params['images'] = images
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ListImageResult)
+ async def ListImages(self, images):
+ '''
+ images : typing.Sequence<+T_co>[~ImageSpec]<~ImageSpec>
+ Returns -> typing.Sequence<+T_co>[~ImageMetadata]<~ImageMetadata>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageManager', request='ListImages', version=2, params=params)
+ params['images'] = images
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ImageMetadataFacade(Type):
+ name = 'ImageMetadata'
+ version = 2
+ schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'image-id': {'type': 'string'},
+ 'priority': {'type': 'integer'},
+ 'region': {'type': 'string'},
+ 'root-storage-size': {'type': 'integer'},
+ 'root-storage-type': {'type': 'string'},
+ 'series': {'type': 'string'},
+ 'source': {'type': 'string'},
+ 'stream': {'type': 'string'},
+ 'version': {'type': 'string'},
+ 'virt-type': {'type': 'string'}},
+ 'required': ['image-id',
+ 'region',
+ 'version',
+ 'series',
+ 'arch',
+ 'source',
+ 'priority'],
+ 'type': 'object'},
+ 'CloudImageMetadataList': {'additionalProperties': False,
+ 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ImageMetadataFilter': {'additionalProperties': False,
+ 'properties': {'arches': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'region': {'type': 'string'},
+ 'root-storage-type': {'type': 'string'},
+ 'series': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'stream': {'type': 'string'},
+ 'virt-type': {'type': 'string'}},
+ 'type': 'object'},
+ 'ListCloudImageMetadataResult': {'additionalProperties': False,
+ 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
+ 'type': 'array'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MetadataImageIds': {'additionalProperties': False,
+ 'properties': {'image-ids': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['image-ids'],
+ 'type': 'object'},
+ 'MetadataSaveParams': {'additionalProperties': False,
+ 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
+ 'type': 'array'}},
+ 'type': 'object'}},
+ 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
+ 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
+ 'type': 'object'},
+ 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'UpdateFromPublishedImages': {'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def Delete(self, image_ids):
+ '''
+ image_ids : typing.Sequence<+T_co>[str]
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageMetadata', request='Delete', version=2, params=params)
+ params['image-ids'] = image_ids
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ListCloudImageMetadataResult)
+ async def List(self, arches, region, root_storage_type, series, stream, virt_type):
+ '''
+ arches : typing.Sequence<+T_co>[str]
+ region : str
+ root_storage_type : str
+ series : typing.Sequence<+T_co>[str]
+ stream : str
+ virt_type : str
+ Returns -> typing.Sequence<+T_co>[~CloudImageMetadata]<~CloudImageMetadata>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageMetadata', request='List', version=2, params=params)
+ params['arches'] = arches
+ params['region'] = region
+ params['root-storage-type'] = root_storage_type
+ params['series'] = series
+ params['stream'] = stream
+ params['virt-type'] = virt_type
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def Save(self, metadata):
+ '''
+ metadata : typing.Sequence<+T_co>[~CloudImageMetadataList]<~CloudImageMetadataList>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageMetadata', request='Save', version=2, params=params)
+ params['metadata'] = metadata
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def UpdateFromPublishedImages(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ImageMetadata', request='UpdateFromPublishedImages', version=2, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class InstancePollerFacade(Type):
+ name = 'InstancePoller'
+ version = 3
+ schema = {'definitions': {'Address': {'additionalProperties': False,
+ 'properties': {'scope': {'type': 'string'},
+ 'space-name': {'type': 'string'},
+ 'type': {'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['value', 'type', 'scope'],
+ 'type': 'object'},
+ 'BoolResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'type': 'boolean'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'BoolResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'EntityStatusArgs': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'info': {'type': 'string'},
+ 'status': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag',
+ 'status',
+ 'info',
+ 'data'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'LifeResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'life': {'type': 'string'}},
+ 'required': ['life'],
+ 'type': 'object'},
+ 'LifeResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MachineAddresses': {'additionalProperties': False,
+ 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
+ 'type': 'array'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'addresses'],
+ 'type': 'object'},
+ 'MachineAddressesResult': {'additionalProperties': False,
+ 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['addresses'],
+ 'type': 'object'},
+ 'MachineAddressesResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ModelConfigResult': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'SetMachinesAddresses': {'additionalProperties': False,
+ 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
+ 'type': 'array'}},
+ 'required': ['machine-addresses'],
+ 'type': 'object'},
+ 'SetStatus': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'StatusResult': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'id': {'type': 'string'},
+ 'info': {'type': 'string'},
+ 'life': {'type': 'string'},
+ 'since': {'format': 'date-time',
+ 'type': 'string'},
+ 'status': {'type': 'string'}},
+ 'required': ['id',
+ 'life',
+ 'status',
+ 'info',
+ 'data',
+ 'since'],
+ 'type': 'object'},
+ 'StatusResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'type': 'string'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'StringResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringsWatchResult': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'watcher-id': {'type': 'string'}},
+ 'required': ['watcher-id'],
+ 'type': 'object'}},
+ 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/BoolResults'}},
+ 'type': 'object'},
+ 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringResults'}},
+ 'type': 'object'},
+ 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StatusResults'}},
+ 'type': 'object'},
+ 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/LifeResults'}},
+ 'type': 'object'},
+ 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
+ 'type': 'object'},
+ 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
+ 'type': 'object'},
+ 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StatusResults'}},
+ 'type': 'object'},
+ 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'},
+ 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(BoolResults)
+ async def AreManuallyProvisioned(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~BoolResult]<~BoolResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='AreManuallyProvisioned', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringResults)
+ async def InstanceId(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='InstanceId', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StatusResults)
+ async def InstanceStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='InstanceStatus', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(LifeResults)
+ async def Life(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='Life', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ModelConfigResult)
+ async def ModelConfig(self):
+ '''
+
+ Returns -> typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='ModelConfig', version=3, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MachineAddressesResults)
+ async def ProviderAddresses(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~MachineAddressesResult]<~MachineAddressesResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='ProviderAddresses', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetInstanceStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='SetInstanceStatus', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetProviderAddresses(self, machine_addresses):
+ '''
+ machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='SetProviderAddresses', version=3, params=params)
+ params['machine-addresses'] = machine_addresses
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StatusResults)
+ async def Status(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StatusResult]<~StatusResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='Status', version=3, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResult)
+ async def WatchForModelConfigChanges(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='WatchForModelConfigChanges', version=3, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringsWatchResult)
+ async def WatchModelMachines(self):
+ '''
+
+ Returns -> typing.Union[typing.Sequence<+T_co>[str], _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='InstancePoller', request='WatchModelMachines', version=3, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class KeyManagerFacade(Type):
+ name = 'KeyManager'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ListSSHKeys': {'additionalProperties': False,
+ 'properties': {'entities': {'$ref': '#/definitions/Entities'},
+ 'mode': {'type': 'boolean'}},
+ 'required': ['entities', 'mode'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'ModifyUserSSHKeys': {'additionalProperties': False,
+ 'properties': {'ssh-keys': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'user': {'type': 'string'}},
+ 'required': ['user', 'ssh-keys'],
+ 'type': 'object'},
+ 'StringsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'StringsResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
+ 'Result': {'$ref': '#/definitions/StringsResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def AddKeys(self, ssh_keys, user):
+ '''
+ ssh_keys : typing.Sequence<+T_co>[str]
+ user : str
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyManager', request='AddKeys', version=1, params=params)
+ params['ssh-keys'] = ssh_keys
+ params['user'] = user
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def DeleteKeys(self, ssh_keys, user):
+ '''
+ ssh_keys : typing.Sequence<+T_co>[str]
+ user : str
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyManager', request='DeleteKeys', version=1, params=params)
+ params['ssh-keys'] = ssh_keys
+ params['user'] = user
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def ImportKeys(self, ssh_keys, user):
+ '''
+ ssh_keys : typing.Sequence<+T_co>[str]
+ user : str
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyManager', request='ImportKeys', version=1, params=params)
+ params['ssh-keys'] = ssh_keys
+ params['user'] = user
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringsResults)
+ async def ListKeys(self, entities, mode):
+ '''
+ entities : Entities
+ mode : bool
+ Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyManager', request='ListKeys', version=1, params=params)
+ params['entities'] = entities
+ params['mode'] = mode
+ reply = await self.rpc(msg)
+ return reply
+
+
+class KeyUpdaterFacade(Type):
+ name = 'KeyUpdater'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'StringsResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringsResults'}},
+ 'type': 'object'},
+ 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(StringsResults)
+ async def AuthorisedKeys(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyUpdater', request='AuthorisedKeys', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def WatchAuthorisedKeys(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='KeyUpdater', request='WatchAuthorisedKeys', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class LeadershipServiceFacade(Type):
+ name = 'LeadershipService'
+ version = 2
+ schema = {'definitions': {'ApplicationTag': {'additionalProperties': False,
+ 'properties': {'Name': {'type': 'string'}},
+ 'required': ['Name'],
+ 'type': 'object'},
+ 'ClaimLeadershipBulkParams': {'additionalProperties': False,
+ 'properties': {'params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
+ 'type': 'array'}},
+ 'required': ['params'],
+ 'type': 'object'},
+ 'ClaimLeadershipBulkResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ClaimLeadershipParams': {'additionalProperties': False,
+ 'properties': {'application-tag': {'type': 'string'},
+ 'duration': {'type': 'number'},
+ 'unit-tag': {'type': 'string'}},
+ 'required': ['application-tag',
+ 'unit-tag',
+ 'duration'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
+ 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ApplicationTag'},
+ 'Result': {'$ref': '#/definitions/ErrorResult'}},
+ 'type': 'object'},
+ 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
+ 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResult)
+ async def BlockUntilLeadershipReleased(self, name):
+ '''
+ name : str
+ Returns -> Error
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LeadershipService', request='BlockUntilLeadershipReleased', version=2, params=params)
+ params['Name'] = name
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ClaimLeadershipBulkResults)
+ async def ClaimLeadership(self, params):
+ '''
+ params : typing.Sequence<+T_co>[~ClaimLeadershipParams]<~ClaimLeadershipParams>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LeadershipService', request='ClaimLeadership', version=2, params=params)
+ params['params'] = params
+ reply = await self.rpc(msg)
+ return reply
+
+
+class LifeFlagFacade(Type):
+ name = 'LifeFlag'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'LifeResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'life': {'type': 'string'}},
+ 'required': ['life'],
+ 'type': 'object'},
+ 'LifeResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/LifeResults'}},
+ 'type': 'object'},
+ 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(LifeResults)
+ async def Life(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LifeFlag', request='Life', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def Watch(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LifeFlag', request='Watch', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class LogForwardingFacade(Type):
+ name = 'LogForwarding'
+ version = 1
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'LogForwardingGetLastSentParams': {'additionalProperties': False,
+ 'properties': {'ids': {'items': {'$ref': '#/definitions/LogForwardingID'},
+ 'type': 'array'}},
+ 'required': ['ids'],
+ 'type': 'object'},
+ 'LogForwardingGetLastSentResult': {'additionalProperties': False,
+ 'properties': {'err': {'$ref': '#/definitions/Error'},
+ 'record-id': {'type': 'integer'},
+ 'record-timestamp': {'type': 'integer'}},
+ 'required': ['record-id',
+ 'record-timestamp',
+ 'err'],
+ 'type': 'object'},
+ 'LogForwardingGetLastSentResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/LogForwardingGetLastSentResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'LogForwardingID': {'additionalProperties': False,
+ 'properties': {'model': {'type': 'string'},
+ 'sink': {'type': 'string'}},
+ 'required': ['model', 'sink'],
+ 'type': 'object'},
+ 'LogForwardingSetLastSentParam': {'additionalProperties': False,
+ 'properties': {'LogForwardingID': {'$ref': '#/definitions/LogForwardingID'},
+ 'record-id': {'type': 'integer'},
+ 'record-timestamp': {'type': 'integer'}},
+ 'required': ['LogForwardingID',
+ 'record-id',
+ 'record-timestamp'],
+ 'type': 'object'},
+ 'LogForwardingSetLastSentParams': {'additionalProperties': False,
+ 'properties': {'params': {'items': {'$ref': '#/definitions/LogForwardingSetLastSentParam'},
+ 'type': 'array'}},
+ 'required': ['params'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
+ 'properties': {'GetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingGetLastSentParams'},
+ 'Result': {'$ref': '#/definitions/LogForwardingGetLastSentResults'}},
+ 'type': 'object'},
+ 'SetLastSent': {'properties': {'Params': {'$ref': '#/definitions/LogForwardingSetLastSentParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(LogForwardingGetLastSentResults)
+ async def GetLastSent(self, ids):
+ '''
+ ids : typing.Sequence<+T_co>[~LogForwardingID]<~LogForwardingID>
+ Returns -> typing.Sequence<+T_co>[~LogForwardingGetLastSentResult]<~LogForwardingGetLastSentResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LogForwarding', request='GetLastSent', version=1, params=params)
+ params['ids'] = ids
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetLastSent(self, params):
+ '''
+ params : typing.Sequence<+T_co>[~LogForwardingSetLastSentParam]<~LogForwardingSetLastSentParam>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='LogForwarding', request='SetLastSent', version=1, params=params)
+ params['params'] = params
+ reply = await self.rpc(msg)
+ return reply
+
+
+class LoggerFacade(Type):
+ name = 'Logger'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'type': 'string'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'StringResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringResults'}},
+ 'type': 'object'},
+ 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(StringResults)
+ async def LoggingConfig(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StringResult]<~StringResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Logger', request='LoggingConfig', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def WatchLoggingConfig(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Logger', request='WatchLoggingConfig', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MachineActionsFacade(Type):
+ name = 'MachineActions'
+ version = 1
+ schema = {'definitions': {'Action': {'additionalProperties': False,
+ 'properties': {'name': {'type': 'string'},
+ 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'receiver': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'receiver', 'name'],
+ 'type': 'object'},
+ 'ActionExecutionResult': {'additionalProperties': False,
+ 'properties': {'action-tag': {'type': 'string'},
+ 'message': {'type': 'string'},
+ 'results': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'status': {'type': 'string'}},
+ 'required': ['action-tag', 'status'],
+ 'type': 'object'},
+ 'ActionExecutionResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ActionResult': {'additionalProperties': False,
+ 'properties': {'action': {'$ref': '#/definitions/Action'},
+ 'completed': {'format': 'date-time',
+ 'type': 'string'},
+ 'enqueued': {'format': 'date-time',
+ 'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'message': {'type': 'string'},
+ 'output': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'started': {'format': 'date-time',
+ 'type': 'string'},
+ 'status': {'type': 'string'}},
+ 'type': 'object'},
+ 'ActionResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ActionsByReceiver': {'additionalProperties': False,
+ 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'receiver': {'type': 'string'}},
+ 'type': 'object'},
+ 'ActionsByReceivers': {'additionalProperties': False,
+ 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'StringsWatchResult': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'watcher-id': {'type': 'string'}},
+ 'required': ['watcher-id'],
+ 'type': 'object'},
+ 'StringsWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ActionResults'}},
+ 'type': 'object'},
+ 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
+ 'type': 'object'},
+ 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ActionResults)
+ async def Actions(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ActionResult]<~ActionResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineActions', request='Actions', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def BeginActions(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineActions', request='BeginActions', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def FinishActions(self, results):
+ '''
+ results : typing.Sequence<+T_co>[~ActionExecutionResult]<~ActionExecutionResult>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineActions', request='FinishActions', version=1, params=params)
+ params['results'] = results
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ActionsByReceivers)
+ async def RunningActions(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ActionsByReceiver]<~ActionsByReceiver>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineActions', request='RunningActions', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringsWatchResults)
+ async def WatchActionNotifications(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~StringsWatchResult]<~StringsWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineActions', request='WatchActionNotifications', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MachineManagerFacade(Type):
+ name = 'MachineManager'
+ version = 2
+ schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
+ 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
+ 'type': 'array'},
+ 'constraints': {'$ref': '#/definitions/Value'},
+ 'container-type': {'type': 'string'},
+ 'disks': {'items': {'$ref': '#/definitions/Constraints'},
+ 'type': 'array'},
+ 'hardware-characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
+ 'instance-id': {'type': 'string'},
+ 'jobs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'nonce': {'type': 'string'},
+ 'parent-id': {'type': 'string'},
+ 'placement': {'$ref': '#/definitions/Placement'},
+ 'series': {'type': 'string'}},
+ 'required': ['series',
+ 'constraints',
+ 'jobs',
+ 'parent-id',
+ 'container-type',
+ 'instance-id',
+ 'nonce',
+ 'hardware-characteristics',
+ 'addresses'],
+ 'type': 'object'},
+ 'AddMachines': {'additionalProperties': False,
+ 'properties': {'params': {'items': {'$ref': '#/definitions/AddMachineParams'},
+ 'type': 'array'}},
+ 'required': ['params'],
+ 'type': 'object'},
+ 'AddMachinesResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'machine': {'type': 'string'}},
+ 'required': ['machine'],
+ 'type': 'object'},
+ 'AddMachinesResults': {'additionalProperties': False,
+ 'properties': {'machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
+ 'type': 'array'}},
+ 'required': ['machines'],
+ 'type': 'object'},
+ 'Address': {'additionalProperties': False,
+ 'properties': {'scope': {'type': 'string'},
+ 'space-name': {'type': 'string'},
+ 'type': {'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['value', 'type', 'scope'],
+ 'type': 'object'},
+ 'Constraints': {'additionalProperties': False,
+ 'properties': {'Count': {'type': 'integer'},
+ 'Pool': {'type': 'string'},
+ 'Size': {'type': 'integer'}},
+ 'required': ['Pool', 'Size', 'Count'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'HardwareCharacteristics': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'availability-zone': {'type': 'string'},
+ 'cpu-cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'Placement': {'additionalProperties': False,
+ 'properties': {'directive': {'type': 'string'},
+ 'scope': {'type': 'string'}},
+ 'required': ['scope', 'directive'],
+ 'type': 'object'},
+ 'Value': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'container': {'type': 'string'},
+ 'cpu-cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'instance-type': {'type': 'string'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'spaces': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'virt-type': {'type': 'string'}},
+ 'type': 'object'}},
+ 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
+ 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(AddMachinesResults)
+ async def AddMachines(self, params):
+ '''
+ params : typing.Sequence<+T_co>[~AddMachineParams]<~AddMachineParams>
+ Returns -> typing.Sequence<+T_co>[~AddMachinesResult]<~AddMachinesResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineManager', request='AddMachines', version=2, params=params)
+ params['params'] = params
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MachineUndertakerFacade(Type):
+ name = 'MachineUndertaker'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'EntitiesResult': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'EntitiesResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/EntitiesResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ProviderInterfaceInfo': {'additionalProperties': False,
+ 'properties': {'interface-name': {'type': 'string'},
+ 'mac-address': {'type': 'string'},
+ 'provider-id': {'type': 'string'}},
+ 'required': ['interface-name',
+ 'mac-address',
+ 'provider-id'],
+ 'type': 'object'},
+ 'ProviderInterfaceInfoResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'interfaces': {'items': {'$ref': '#/definitions/ProviderInterfaceInfo'},
+ 'type': 'array'},
+ 'machine-tag': {'type': 'string'}},
+ 'required': ['machine-tag',
+ 'interfaces'],
+ 'type': 'object'},
+ 'ProviderInterfaceInfoResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ProviderInterfaceInfoResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'AllMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/EntitiesResults'}},
+ 'type': 'object'},
+ 'CompleteMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'}},
+ 'type': 'object'},
+ 'GetMachineProviderInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ProviderInterfaceInfoResults'}},
+ 'type': 'object'},
+ 'WatchMachineRemovals': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(EntitiesResults)
+ async def AllMachineRemovals(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~EntitiesResult]<~EntitiesResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineUndertaker', request='AllMachineRemovals', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def CompleteMachineRemovals(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineUndertaker', request='CompleteMachineRemovals', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ProviderInterfaceInfoResults)
+ async def GetMachineProviderInterfaceInfo(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ProviderInterfaceInfoResult]<~ProviderInterfaceInfoResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineUndertaker', request='GetMachineProviderInterfaceInfo', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def WatchMachineRemovals(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MachineUndertaker', request='WatchMachineRemovals', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MachinerFacade(Type):
+ name = 'Machiner'
+ version = 1
+ schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
+ 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
+ 'type': 'array'},
+ 'type': 'array'}},
+ 'required': ['servers'],
+ 'type': 'object'},
+ 'Address': {'additionalProperties': False,
+ 'properties': {'scope': {'type': 'string'},
+ 'space-name': {'type': 'string'},
+ 'type': {'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['value', 'type', 'scope'],
+ 'type': 'object'},
+ 'BytesResult': {'additionalProperties': False,
+ 'properties': {'result': {'items': {'type': 'integer'},
+ 'type': 'array'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'EntityStatusArgs': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'info': {'type': 'string'},
+ 'status': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag',
+ 'status',
+ 'info',
+ 'data'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'HostPort': {'additionalProperties': False,
+ 'properties': {'Address': {'$ref': '#/definitions/Address'},
+ 'port': {'type': 'integer'}},
+ 'required': ['Address', 'port'],
+ 'type': 'object'},
+ 'JobsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'jobs': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['jobs'],
+ 'type': 'object'},
+ 'JobsResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/JobsResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'LifeResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'life': {'type': 'string'}},
+ 'required': ['life'],
+ 'type': 'object'},
+ 'LifeResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MachineAddresses': {'additionalProperties': False,
+ 'properties': {'addresses': {'items': {'$ref': '#/definitions/Address'},
+ 'type': 'array'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'addresses'],
+ 'type': 'object'},
+ 'NetworkConfig': {'additionalProperties': False,
+ 'properties': {'address': {'type': 'string'},
+ 'cidr': {'type': 'string'},
+ 'config-type': {'type': 'string'},
+ 'device-index': {'type': 'integer'},
+ 'disabled': {'type': 'boolean'},
+ 'dns-search-domains': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'dns-servers': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'gateway-address': {'type': 'string'},
+ 'interface-name': {'type': 'string'},
+ 'interface-type': {'type': 'string'},
+ 'mac-address': {'type': 'string'},
+ 'mtu': {'type': 'integer'},
+ 'no-auto-start': {'type': 'boolean'},
+ 'parent-interface-name': {'type': 'string'},
+ 'provider-address-id': {'type': 'string'},
+ 'provider-id': {'type': 'string'},
+ 'provider-space-id': {'type': 'string'},
+ 'provider-subnet-id': {'type': 'string'},
+ 'provider-vlan-id': {'type': 'string'},
+ 'vlan-tag': {'type': 'integer'}},
+ 'required': ['device-index',
+ 'mac-address',
+ 'cidr',
+ 'mtu',
+ 'provider-id',
+ 'provider-subnet-id',
+ 'provider-space-id',
+ 'provider-address-id',
+ 'provider-vlan-id',
+ 'vlan-tag',
+ 'interface-name',
+ 'parent-interface-name',
+ 'interface-type',
+ 'disabled'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'SetMachineNetworkConfig': {'additionalProperties': False,
+ 'properties': {'config': {'items': {'$ref': '#/definitions/NetworkConfig'},
+ 'type': 'array'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'config'],
+ 'type': 'object'},
+ 'SetMachinesAddresses': {'additionalProperties': False,
+ 'properties': {'machine-addresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
+ 'type': 'array'}},
+ 'required': ['machine-addresses'],
+ 'type': 'object'},
+ 'SetStatus': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'StringResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'type': 'string'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'StringsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'}},
+ 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
+ 'type': 'object'},
+ 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
+ 'type': 'object'},
+ 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
+ 'type': 'object'},
+ 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/JobsResults'}},
+ 'type': 'object'},
+ 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/LifeResults'}},
+ 'type': 'object'},
+ 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
+ 'type': 'object'},
+ 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
+ 'type': 'object'},
+ 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'},
+ 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(StringsResult)
+ async def APIAddresses(self):
+ '''
+
+ Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence<+T_co>[str]]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='APIAddresses', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(APIHostPortsResult)
+ async def APIHostPorts(self):
+ '''
+
+ Returns -> typing.Sequence<+T_co>[~HostPort]<~HostPort>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='APIHostPorts', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(BytesResult)
+ async def CACert(self):
+ '''
+
+ Returns -> typing.Sequence<+T_co>[int]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='CACert', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def EnsureDead(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='EnsureDead', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(JobsResults)
+ async def Jobs(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~JobsResult]<~JobsResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='Jobs', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(LifeResults)
+ async def Life(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~LifeResult]<~LifeResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='Life', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringResult)
+ async def ModelUUID(self):
+ '''
+
+ Returns -> typing.Union[_ForwardRef('Error'), str]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='ModelUUID', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetMachineAddresses(self, machine_addresses):
+ '''
+ machine_addresses : typing.Sequence<+T_co>[~MachineAddresses]<~MachineAddresses>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='SetMachineAddresses', version=1, params=params)
+ params['machine-addresses'] = machine_addresses
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def SetObservedNetworkConfig(self, config, tag):
+ '''
+ config : typing.Sequence<+T_co>[~NetworkConfig]<~NetworkConfig>
+ tag : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='SetObservedNetworkConfig', version=1, params=params)
+ params['config'] = config
+ params['tag'] = tag
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetProviderNetworkConfig(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='SetProviderNetworkConfig', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='SetStatus', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def UpdateStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~EntityStatusArgs]<~EntityStatusArgs>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='UpdateStatus', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def Watch(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='Watch', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResult)
+ async def WatchAPIHostPorts(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Machiner', request='WatchAPIHostPorts', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MeterStatusFacade(Type):
+ name = 'MeterStatus'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MeterStatusResult': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'info': {'type': 'string'}},
+ 'required': ['code', 'info'],
+ 'type': 'object'},
+ 'MeterStatusResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
+ 'type': 'object'},
+ 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(MeterStatusResults)
+ async def GetMeterStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~MeterStatusResult]<~MeterStatusResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MeterStatus', request='GetMeterStatus', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def WatchMeterStatus(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MeterStatus', request='WatchMeterStatus', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MetricsAdderFacade(Type):
+ name = 'MetricsAdder'
+ version = 2
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'Metric': {'additionalProperties': False,
+ 'properties': {'key': {'type': 'string'},
+ 'time': {'format': 'date-time',
+ 'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['key', 'value', 'time'],
+ 'type': 'object'},
+ 'MetricBatch': {'additionalProperties': False,
+ 'properties': {'charm-url': {'type': 'string'},
+ 'created': {'format': 'date-time',
+ 'type': 'string'},
+ 'metrics': {'items': {'$ref': '#/definitions/Metric'},
+ 'type': 'array'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['uuid',
+ 'charm-url',
+ 'created',
+ 'metrics'],
+ 'type': 'object'},
+ 'MetricBatchParam': {'additionalProperties': False,
+ 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'batch'],
+ 'type': 'object'},
+ 'MetricBatchParams': {'additionalProperties': False,
+ 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
+ 'type': 'array'}},
+ 'required': ['batches'],
+ 'type': 'object'}},
+ 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def AddMetricBatches(self, batches):
+ '''
+ batches : typing.Sequence<+T_co>[~MetricBatchParam]<~MetricBatchParam>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MetricsAdder', request='AddMetricBatches', version=2, params=params)
+ params['batches'] = batches
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MetricsDebugFacade(Type):
+ name = 'MetricsDebug'
+ version = 2
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'EntityMetrics': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MeterStatusParam': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'code', 'info'],
+ 'type': 'object'},
+ 'MeterStatusParams': {'additionalProperties': False,
+ 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
+ 'type': 'array'}},
+ 'required': ['statues'],
+ 'type': 'object'},
+ 'MetricResult': {'additionalProperties': False,
+ 'properties': {'key': {'type': 'string'},
+ 'time': {'format': 'date-time',
+ 'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['time', 'key', 'value'],
+ 'type': 'object'},
+ 'MetricResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MetricResults'}},
+ 'type': 'object'},
+ 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(MetricResults)
+ async def GetMetrics(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~EntityMetrics]<~EntityMetrics>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MetricsDebug', request='GetMetrics', version=2, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetMeterStatus(self, statues):
+ '''
+ statues : typing.Sequence<+T_co>[~MeterStatusParam]<~MeterStatusParam>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MetricsDebug', request='SetMeterStatus', version=2, params=params)
+ params['statues'] = statues
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MetricsManagerFacade(Type):
+ name = 'MetricsManager'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'}},
+ 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ErrorResults)
+ async def CleanupOldMetrics(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MetricsManager', request='CleanupOldMetrics', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SendMetrics(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MetricsManager', request='SendMetrics', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MigrationFlagFacade(Type):
+ name = 'MigrationFlag'
+ version = 1
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'NotifyWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'PhaseResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'phase': {'type': 'string'}},
+ 'type': 'object'},
+ 'PhaseResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/PhaseResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'}},
+ 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/PhaseResults'}},
+ 'type': 'object'},
+ 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(PhaseResults)
+ async def Phase(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~PhaseResult]<~PhaseResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationFlag', request='Phase', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResults)
+ async def Watch(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~NotifyWatchResult]<~NotifyWatchResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationFlag', request='Watch', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MigrationMasterFacade(Type):
+ name = 'MigrationMaster'
+ version = 1
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MasterMigrationStatus': {'additionalProperties': False,
+ 'properties': {'migration-id': {'type': 'string'},
+ 'phase': {'type': 'string'},
+ 'phase-changed-time': {'format': 'date-time',
+ 'type': 'string'},
+ 'spec': {'$ref': '#/definitions/MigrationSpec'}},
+ 'required': ['spec',
+ 'migration-id',
+ 'phase',
+ 'phase-changed-time'],
+ 'type': 'object'},
+ 'MigrationModelInfo': {'additionalProperties': False,
+ 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
+ 'name': {'type': 'string'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['uuid',
+ 'name',
+ 'agent-version'],
+ 'type': 'object'},
+ 'MigrationSpec': {'additionalProperties': False,
+ 'properties': {'model-tag': {'type': 'string'},
+ 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
+ 'required': ['model-tag', 'target-info'],
+ 'type': 'object'},
+ 'MigrationTargetInfo': {'additionalProperties': False,
+ 'properties': {'addrs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'auth-tag': {'type': 'string'},
+ 'ca-cert': {'type': 'string'},
+ 'controller-tag': {'type': 'string'},
+ 'macaroon': {'type': 'string'},
+ 'password': {'type': 'string'}},
+ 'required': ['controller-tag',
+ 'addrs',
+ 'ca-cert',
+ 'auth-tag'],
+ 'type': 'object'},
+ 'MinionReports': {'additionalProperties': False,
+ 'properties': {'failed': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'migration-id': {'type': 'string'},
+ 'phase': {'type': 'string'},
+ 'success-count': {'type': 'integer'},
+ 'unknown-count': {'type': 'integer'},
+ 'unknown-sample': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['migration-id',
+ 'phase',
+ 'success-count',
+ 'unknown-count',
+ 'unknown-sample',
+ 'failed'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'Number': {'additionalProperties': False,
+ 'properties': {'Build': {'type': 'integer'},
+ 'Major': {'type': 'integer'},
+ 'Minor': {'type': 'integer'},
+ 'Patch': {'type': 'integer'},
+ 'Tag': {'type': 'string'}},
+ 'required': ['Major',
+ 'Minor',
+ 'Tag',
+ 'Patch',
+ 'Build'],
+ 'type': 'object'},
+ 'SerializedModel': {'additionalProperties': False,
+ 'properties': {'bytes': {'items': {'type': 'integer'},
+ 'type': 'array'},
+ 'charms': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
+ 'type': 'array'}},
+ 'required': ['bytes', 'charms', 'tools'],
+ 'type': 'object'},
+ 'SerializedModelTools': {'additionalProperties': False,
+ 'properties': {'uri': {'type': 'string'},
+ 'version': {'type': 'string'}},
+ 'required': ['version', 'uri'],
+ 'type': 'object'},
+ 'SetMigrationPhaseArgs': {'additionalProperties': False,
+ 'properties': {'phase': {'type': 'string'}},
+ 'required': ['phase'],
+ 'type': 'object'},
+ 'SetMigrationStatusMessageArgs': {'additionalProperties': False,
+ 'properties': {'message': {'type': 'string'}},
+ 'required': ['message'],
+ 'type': 'object'}},
+ 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
+ 'type': 'object'},
+ 'MigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/MasterMigrationStatus'}},
+ 'type': 'object'},
+ 'MinionReports': {'properties': {'Result': {'$ref': '#/definitions/MinionReports'}},
+ 'type': 'object'},
+ 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/MigrationModelInfo'}},
+ 'type': 'object'},
+ 'Prechecks': {'type': 'object'},
+ 'Reap': {'type': 'object'},
+ 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
+ 'type': 'object'},
+ 'SetStatusMessage': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
+ 'type': 'object'},
+ 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'},
+ 'WatchMinionReports': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(SerializedModel)
+ async def Export(self):
+ '''
+
+ Returns -> typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='Export', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MasterMigrationStatus)
+ async def MigrationStatus(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('MigrationSpec')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='MigrationStatus', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MinionReports)
+ async def MinionReports(self):
+ '''
+
+ Returns -> typing.Union[typing.Sequence<+T_co>[str], int]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='MinionReports', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MigrationModelInfo)
+ async def ModelInfo(self):
+ '''
+
+ Returns -> typing.Union[_ForwardRef('Number'), str]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='ModelInfo', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Prechecks(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='Prechecks', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Reap(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='Reap', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def SetPhase(self, phase):
+ '''
+ phase : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='SetPhase', version=1, params=params)
+ params['phase'] = phase
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def SetStatusMessage(self, message):
+ '''
+ message : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='SetStatusMessage', version=1, params=params)
+ params['message'] = message
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResult)
+ async def Watch(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='Watch', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResult)
+ async def WatchMinionReports(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMaster', request='WatchMinionReports', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MigrationMinionFacade(Type):
+ name = 'MigrationMinion'
+ version = 1
+ schema = {'definitions': {'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MinionReport': {'additionalProperties': False,
+ 'properties': {'migration-id': {'type': 'string'},
+ 'phase': {'type': 'string'},
+ 'success': {'type': 'boolean'}},
+ 'required': ['migration-id',
+ 'phase',
+ 'success'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'}},
+ 'properties': {'Report': {'properties': {'Params': {'$ref': '#/definitions/MinionReport'}},
+ 'type': 'object'},
+ 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(None)
+ async def Report(self, migration_id, phase, success):
+ '''
+ migration_id : str
+ phase : str
+ success : bool
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMinion', request='Report', version=1, params=params)
+ params['migration-id'] = migration_id
+ params['phase'] = phase
+ params['success'] = success
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(NotifyWatchResult)
+ async def Watch(self):
+ '''
+
+ Returns -> typing.Union[str, _ForwardRef('Error')]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationMinion', request='Watch', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MigrationStatusWatcherFacade(Type):
+ name = 'MigrationStatusWatcher'
+ version = 1
+ schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
+ 'properties': {'attempt': {'type': 'integer'},
+ 'migration-id': {'type': 'string'},
+ 'phase': {'type': 'string'},
+ 'source-api-addrs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'source-ca-cert': {'type': 'string'},
+ 'target-api-addrs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'target-ca-cert': {'type': 'string'}},
+ 'required': ['migration-id',
+ 'attempt',
+ 'phase',
+ 'source-api-addrs',
+ 'source-ca-cert',
+ 'target-api-addrs',
+ 'target-ca-cert'],
+ 'type': 'object'}},
+ 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
+ 'type': 'object'},
+ 'Stop': {'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(MigrationStatus)
+ async def Next(self):
+ '''
+
+ Returns -> typing.Union[int, typing.Sequence<+T_co>[str]]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationStatusWatcher', request='Next', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Stop(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationStatusWatcher', request='Stop', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class MigrationTargetFacade(Type):
+ name = 'MigrationTarget'
+ version = 1
+ schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
+ 'properties': {'model-tag': {'type': 'string'}},
+ 'required': ['model-tag'],
+ 'type': 'object'},
+ 'Number': {'additionalProperties': False,
+ 'properties': {'Build': {'type': 'integer'},
+ 'Major': {'type': 'integer'},
+ 'Minor': {'type': 'integer'},
+ 'Patch': {'type': 'integer'},
+ 'Tag': {'type': 'string'}},
+ 'required': ['Major',
+ 'Minor',
+ 'Tag',
+ 'Patch',
+ 'Build'],
+ 'type': 'object'},
+ 'SerializedModel': {'additionalProperties': False,
+ 'properties': {'bytes': {'items': {'type': 'integer'},
+ 'type': 'array'},
+ 'charms': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tools': {'items': {'$ref': '#/definitions/SerializedModelTools'},
+ 'type': 'array'}},
+ 'required': ['bytes', 'charms', 'tools'],
+ 'type': 'object'},
+ 'SerializedModelTools': {'additionalProperties': False,
+ 'properties': {'uri': {'type': 'string'},
+ 'version': {'type': 'string'}},
+ 'required': ['version', 'uri'],
+ 'type': 'object'},
+ 'TargetPrechecksArgs': {'additionalProperties': False,
+ 'properties': {'agent-version': {'$ref': '#/definitions/Number'}},
+ 'required': ['agent-version'],
+ 'type': 'object'}},
+ 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
+ 'type': 'object'},
+ 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
+ 'type': 'object'},
+ 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
+ 'type': 'object'},
+ 'Prechecks': {'properties': {'Params': {'$ref': '#/definitions/TargetPrechecksArgs'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(None)
+ async def Abort(self, model_tag):
+ '''
+ model_tag : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationTarget', request='Abort', version=1, params=params)
+ params['model-tag'] = model_tag
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Activate(self, model_tag):
+ '''
+ model_tag : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationTarget', request='Activate', version=1, params=params)
+ params['model-tag'] = model_tag
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Import(self, bytes_, charms, tools):
+ '''
+ bytes_ : typing.Sequence<+T_co>[int]
+ charms : typing.Sequence<+T_co>[str]
+ tools : typing.Sequence<+T_co>[~SerializedModelTools]<~SerializedModelTools>
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationTarget', request='Import', version=1, params=params)
+ params['bytes'] = bytes_
+ params['charms'] = charms
+ params['tools'] = tools
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Prechecks(self, build, major, minor, patch, tag):
+ '''
+ build : int
+ major : int
+ minor : int
+ patch : int
+ tag : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=params)
+ params['Build'] = build
+ params['Major'] = major
+ params['Minor'] = minor
+ params['Patch'] = patch
+ params['Tag'] = tag
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ModelConfigFacade(Type):
+ name = 'ModelConfig'
+ version = 1
+ schema = {'definitions': {'ConfigValue': {'additionalProperties': False,
+ 'properties': {'source': {'type': 'string'},
+ 'value': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'required': ['value', 'source'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'ModelConfigResults': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ModelDefaultValues': {'additionalProperties': False,
+ 'properties': {'cloud-region': {'type': 'string'},
+ 'cloud-tag': {'type': 'string'},
+ 'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ModelDefaults': {'additionalProperties': False,
+ 'properties': {'controller': {'additionalProperties': True,
+ 'type': 'object'},
+ 'default': {'additionalProperties': True,
+ 'type': 'object'},
+ 'regions': {'items': {'$ref': '#/definitions/RegionDefaults'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ModelDefaultsResult': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ModelDefaults'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ModelSet': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ModelUnset': {'additionalProperties': False,
+ 'properties': {'keys': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['keys'],
+ 'type': 'object'},
+ 'ModelUnsetKeys': {'additionalProperties': False,
+ 'properties': {'cloud-region': {'type': 'string'},
+ 'cloud-tag': {'type': 'string'},
+ 'keys': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['keys'],
+ 'type': 'object'},
+ 'RegionDefaults': {'additionalProperties': False,
+ 'properties': {'region-name': {'type': 'string'},
+ 'value': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'required': ['region-name', 'value'],
+ 'type': 'object'},
+ 'SetModelDefaults': {'additionalProperties': False,
+ 'properties': {'config': {'items': {'$ref': '#/definitions/ModelDefaultValues'},
+ 'type': 'array'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'UnsetModelDefaults': {'additionalProperties': False,
+ 'properties': {'keys': {'items': {'$ref': '#/definitions/ModelUnsetKeys'},
+ 'type': 'array'}},
+ 'required': ['keys'],
+ 'type': 'object'}},
+ 'properties': {'ModelDefaults': {'properties': {'Result': {'$ref': '#/definitions/ModelDefaultsResult'}},
+ 'type': 'object'},
+ 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
+ 'type': 'object'},
+ 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
+ 'type': 'object'},
+ 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
+ 'type': 'object'},
+ 'SetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/SetModelDefaults'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'UnsetModelDefaults': {'properties': {'Params': {'$ref': '#/definitions/UnsetModelDefaults'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ModelDefaultsResult)
+ async def ModelDefaults(self):
+ '''
+
+ Returns -> typing.Mapping<~KT, +VT_co>[str, ~ModelDefaults]<~ModelDefaults>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='ModelDefaults', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ModelConfigResults)
+ async def ModelGet(self):
+ '''
+
+ Returns -> typing.Mapping<~KT, +VT_co>[str, ~ConfigValue]<~ConfigValue>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='ModelGet', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def ModelSet(self, config):
+ '''
+ config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='ModelSet', version=1, params=params)
+ params['config'] = config
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def ModelUnset(self, keys):
+ '''
+ keys : typing.Sequence<+T_co>[str]
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='ModelUnset', version=1, params=params)
+ params['keys'] = keys
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def SetModelDefaults(self, config):
+ '''
+ config : typing.Sequence<+T_co>[~ModelDefaultValues]<~ModelDefaultValues>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='SetModelDefaults', version=1, params=params)
+ params['config'] = config
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def UnsetModelDefaults(self, keys):
+ '''
+ keys : typing.Sequence<+T_co>[~ModelUnsetKeys]<~ModelUnsetKeys>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelConfig', request='UnsetModelDefaults', version=1, params=params)
+ params['keys'] = keys
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ModelManagerFacade(Type):
+ name = 'ModelManager'
+ version = 2
+ schema = {'definitions': {'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'EntityStatus': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'info': {'type': 'string'},
+ 'since': {'format': 'date-time',
+ 'type': 'string'},
+ 'status': {'type': 'string'}},
+ 'required': ['status', 'info', 'since'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MapResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'MapResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/MapResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Model': {'additionalProperties': False,
+ 'properties': {'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['name', 'uuid', 'owner-tag'],
+ 'type': 'object'},
+ 'ModelCreateArgs': {'additionalProperties': False,
+ 'properties': {'cloud-tag': {'type': 'string'},
+ 'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'credential': {'type': 'string'},
+ 'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'},
+ 'region': {'type': 'string'}},
+ 'required': ['name', 'owner-tag'],
+ 'type': 'object'},
+ 'ModelInfo': {'additionalProperties': False,
+ 'properties': {'cloud': {'type': 'string'},
+ 'cloud-credential-tag': {'type': 'string'},
+ 'cloud-region': {'type': 'string'},
+ 'controller-uuid': {'type': 'string'},
+ 'default-series': {'type': 'string'},
+ 'life': {'type': 'string'},
+ 'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'},
+ 'provider-type': {'type': 'string'},
+ 'status': {'$ref': '#/definitions/EntityStatus'},
+ 'users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
+ 'type': 'array'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['name',
+ 'uuid',
+ 'controller-uuid',
+ 'provider-type',
+ 'default-series',
+ 'cloud',
+ 'owner-tag',
+ 'life',
+ 'status',
+ 'users'],
+ 'type': 'object'},
+ 'ModelInfoResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'$ref': '#/definitions/ModelInfo'}},
+ 'type': 'object'},
+ 'ModelInfoResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ModelUserInfo': {'additionalProperties': False,
+ 'properties': {'access': {'type': 'string'},
+ 'display-name': {'type': 'string'},
+ 'last-connection': {'format': 'date-time',
+ 'type': 'string'},
+ 'user': {'type': 'string'}},
+ 'required': ['user',
+ 'display-name',
+ 'last-connection',
+ 'access'],
+ 'type': 'object'},
+ 'ModifyModelAccess': {'additionalProperties': False,
+ 'properties': {'access': {'type': 'string'},
+ 'action': {'type': 'string'},
+ 'model-tag': {'type': 'string'},
+ 'user-tag': {'type': 'string'}},
+ 'required': ['user-tag',
+ 'action',
+ 'access',
+ 'model-tag'],
+ 'type': 'object'},
+ 'ModifyModelAccessRequest': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
+ 'type': 'array'}},
+ 'required': ['changes'],
+ 'type': 'object'},
+ 'UserModel': {'additionalProperties': False,
+ 'properties': {'last-connection': {'format': 'date-time',
+ 'type': 'string'},
+ 'model': {'$ref': '#/definitions/Model'}},
+ 'required': ['model', 'last-connection'],
+ 'type': 'object'},
+ 'UserModelList': {'additionalProperties': False,
+ 'properties': {'user-models': {'items': {'$ref': '#/definitions/UserModel'},
+ 'type': 'array'}},
+ 'required': ['user-models'],
+ 'type': 'object'}},
+ 'properties': {'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
+ 'Result': {'$ref': '#/definitions/ModelInfo'}},
+ 'type': 'object'},
+ 'DestroyModel': {'type': 'object'},
+ 'DestroyModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'DumpModels': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MapResults'}},
+ 'type': 'object'},
+ 'DumpModelsDB': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MapResults'}},
+ 'type': 'object'},
+ 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
+ 'Result': {'$ref': '#/definitions/UserModelList'}},
+ 'type': 'object'},
+ 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
+ 'type': 'object'},
+ 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(ModelInfo)
+ async def CreateModel(self, cloud_tag, config, credential, name, owner_tag, region):
+ '''
+ cloud_tag : str
+ config : typing.Mapping<~KT, +VT_co>[str, typing.Any]
+ credential : str
+ name : str
+ owner_tag : str
+ region : str
+ Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence<+T_co>[~ModelUserInfo]<~ModelUserInfo>]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='CreateModel', version=2, params=params)
+ params['cloud-tag'] = cloud_tag
+ params['config'] = config
+ params['credential'] = credential
+ params['name'] = name
+ params['owner-tag'] = owner_tag
+ params['region'] = region
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def DestroyModel(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='DestroyModel', version=2, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def DestroyModels(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='DestroyModels', version=2, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MapResults)
+ async def DumpModels(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='DumpModels', version=2, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(MapResults)
+ async def DumpModelsDB(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~MapResult]<~MapResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='DumpModelsDB', version=2, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(UserModelList)
+ async def ListModels(self, tag):
+ '''
+ tag : str
+ Returns -> typing.Sequence<+T_co>[~UserModel]<~UserModel>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='ListModels', version=2, params=params)
+ params['tag'] = tag
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ModelInfoResults)
+ async def ModelInfo(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~ModelInfoResult]<~ModelInfoResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='ModelInfo', version=2, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def ModifyModelAccess(self, changes):
+ '''
+ changes : typing.Sequence<+T_co>[~ModifyModelAccess]<~ModifyModelAccess>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='ModelManager', request='ModifyModelAccess', version=2, params=params)
+ params['changes'] = changes
+ reply = await self.rpc(msg)
+ return reply
+
+
+class NotifyWatcherFacade(Type):
+ name = 'NotifyWatcher'
+ version = 1
+ schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(None)
+ async def Next(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='NotifyWatcher', request='Next', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Stop(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='NotifyWatcher', request='Stop', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class PingerFacade(Type):
+ name = 'Pinger'
+ version = 1
+ schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(None)
+ async def Ping(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Pinger', request='Ping', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(None)
+ async def Stop(self):
+ '''
+
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Pinger', request='Stop', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ProvisionerFacade(Type):
+ name = 'Provisioner'
+ version = 3
+ schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
+ 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
+ 'type': 'array'},
+ 'type': 'array'}},
+ 'required': ['servers'],
+ 'type': 'object'},
+ 'Address': {'additionalProperties': False,
+ 'properties': {'scope': {'type': 'string'},
+ 'space-name': {'type': 'string'},
+ 'type': {'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['value', 'type', 'scope'],
+ 'type': 'object'},
+ 'Binary': {'additionalProperties': False,
+ 'properties': {'Arch': {'type': 'string'},
+ 'Number': {'$ref': '#/definitions/Number'},
+ 'Series': {'type': 'string'}},
+ 'required': ['Number', 'Series', 'Arch'],
+ 'type': 'object'},
+ 'BytesResult': {'additionalProperties': False,
+ 'properties': {'result': {'items': {'type': 'integer'},
+ 'type': 'array'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'CloudImageMetadata': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'image-id': {'type': 'string'},
+ 'priority': {'type': 'integer'},
+ 'region': {'type': 'string'},
+ 'root-storage-size': {'type': 'integer'},
+ 'root-storage-type': {'type': 'string'},
+ 'series': {'type': 'string'},
+ 'source': {'type': 'string'},
+ 'stream': {'type': 'string'},
+ 'version': {'type': 'string'},
+ 'virt-type': {'type': 'string'}},
+ 'required': ['image-id',
+ 'region',
+ 'version',
+ 'series',
+ 'arch',
+ 'source',
+ 'priority'],
+ 'type': 'object'},
+ 'ConstraintsResult': {'additionalProperties': False,
+ 'properties': {'constraints': {'$ref': '#/definitions/Value'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['constraints'],
+ 'type': 'object'},
+ 'ConstraintsResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ContainerConfig': {'additionalProperties': False,
+ 'properties': {'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'},
+ 'apt-mirror': {'type': 'string'},
+ 'apt-proxy': {'$ref': '#/definitions/Settings'},
+ 'authorized-keys': {'type': 'string'},
+ 'provider-type': {'type': 'string'},
+ 'proxy': {'$ref': '#/definitions/Settings'},
+ 'ssl-hostname-verification': {'type': 'boolean'}},
+ 'required': ['provider-type',
+ 'authorized-keys',
+ 'ssl-hostname-verification',
+ 'proxy',
+ 'apt-proxy',
+ 'apt-mirror',
+ 'UpdateBehavior'],
+ 'type': 'object'},
+ 'ContainerManagerConfig': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ContainerManagerConfigParams': {'additionalProperties': False,
+ 'properties': {'type': {'type': 'string'}},
+ 'required': ['type'],
+ 'type': 'object'},
+ 'ControllerConfigResult': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'DistributionGroupResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'DistributionGroupResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'EntityPassword': {'additionalProperties': False,
+ 'properties': {'password': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag', 'password'],
+ 'type': 'object'},
+ 'EntityPasswords': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'$ref': '#/definitions/EntityPassword'},
+ 'type': 'array'}},
+ 'required': ['changes'],
+ 'type': 'object'},
+ 'EntityStatusArgs': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'info': {'type': 'string'},
+ 'status': {'type': 'string'},
+ 'tag': {'type': 'string'}},
+ 'required': ['tag',
+ 'status',
+ 'info',
+ 'data'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'FindToolsParams': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'major': {'type': 'integer'},
+ 'minor': {'type': 'integer'},
+ 'number': {'$ref': '#/definitions/Number'},
+ 'series': {'type': 'string'}},
+ 'required': ['number',
+ 'major',
+ 'minor',
+ 'arch',
+ 'series'],
+ 'type': 'object'},
+ 'FindToolsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'list': {'items': {'$ref': '#/definitions/Tools'},
+ 'type': 'array'}},
+ 'required': ['list'],
+ 'type': 'object'},
+ 'HardwareCharacteristics': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'availability-zone': {'type': 'string'},
+ 'cpu-cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'HostPort': {'additionalProperties': False,
+ 'properties': {'Address': {'$ref': '#/definitions/Address'},
+ 'port': {'type': 'integer'}},
+ 'required': ['Address', 'port'],
+ 'type': 'object'},
+ 'InstanceInfo': {'additionalProperties': False,
+ 'properties': {'characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
+ 'instance-id': {'type': 'string'},
+ 'network-config': {'items': {'$ref': '#/definitions/NetworkConfig'},
+ 'type': 'array'},
+ 'nonce': {'type': 'string'},
+ 'tag': {'type': 'string'},
+ 'volume-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
+ 'type': 'object'},
+ 'volumes': {'items': {'$ref': '#/definitions/Volume'},
+ 'type': 'array'}},
+ 'required': ['tag',
+ 'instance-id',
+ 'nonce',
+ 'characteristics',
+ 'volumes',
+ 'volume-attachments',
+ 'network-config'],
+ 'type': 'object'},
+ 'InstancesInfo': {'additionalProperties': False,
+ 'properties': {'machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
+ 'type': 'array'}},
+ 'required': ['machines'],
+ 'type': 'object'},
+ 'LifeResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'life': {'type': 'string'}},
+ 'required': ['life'],
+ 'type': 'object'},
+ 'LifeResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Macaroon': {'additionalProperties': False, 'type': 'object'},
+ 'MachineContainers': {'additionalProperties': False,
+ 'properties': {'container-types': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'machine-tag': {'type': 'string'}},
+ 'required': ['machine-tag',
+ 'container-types'],
+ 'type': 'object'},
+ 'MachineContainersParams': {'additionalProperties': False,
+ 'properties': {'params': {'items': {'$ref': '#/definitions/MachineContainers'},
+ 'type': 'array'}},
+ 'required': ['params'],
+ 'type': 'object'},
+ 'MachineNetworkConfigResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'info': {'items': {'$ref': '#/definitions/NetworkConfig'},
+ 'type': 'array'}},
+ 'required': ['info'],
+ 'type': 'object'},
+ 'MachineNetworkConfigResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'ModelConfigResult': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'NetworkConfig': {'additionalProperties': False,
+ 'properties': {'address': {'type': 'string'},
+ 'cidr': {'type': 'string'},
+ 'config-type': {'type': 'string'},
+ 'device-index': {'type': 'integer'},
+ 'disabled': {'type': 'boolean'},
+ 'dns-search-domains': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'dns-servers': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'gateway-address': {'type': 'string'},
+ 'interface-name': {'type': 'string'},
+ 'interface-type': {'type': 'string'},
+ 'mac-address': {'type': 'string'},
+ 'mtu': {'type': 'integer'},
+ 'no-auto-start': {'type': 'boolean'},
+ 'parent-interface-name': {'type': 'string'},
+ 'provider-address-id': {'type': 'string'},
+ 'provider-id': {'type': 'string'},
+ 'provider-space-id': {'type': 'string'},
+ 'provider-subnet-id': {'type': 'string'},
+ 'provider-vlan-id': {'type': 'string'},
+ 'vlan-tag': {'type': 'integer'}},
+ 'required': ['device-index',
+ 'mac-address',
+ 'cidr',
+ 'mtu',
+ 'provider-id',
+ 'provider-subnet-id',
+ 'provider-space-id',
+ 'provider-address-id',
+ 'provider-vlan-id',
+ 'vlan-tag',
+ 'interface-name',
+ 'parent-interface-name',
+ 'interface-type',
+ 'disabled'],
+ 'type': 'object'},
+ 'NotifyWatchResult': {'additionalProperties': False,
+ 'properties': {'NotifyWatcherId': {'type': 'string'},
+ 'error': {'$ref': '#/definitions/Error'}},
+ 'required': ['NotifyWatcherId'],
+ 'type': 'object'},
+ 'Number': {'additionalProperties': False,
+ 'properties': {'Build': {'type': 'integer'},
+ 'Major': {'type': 'integer'},
+ 'Minor': {'type': 'integer'},
+ 'Patch': {'type': 'integer'},
+ 'Tag': {'type': 'string'}},
+ 'required': ['Major',
+ 'Minor',
+ 'Tag',
+ 'Patch',
+ 'Build'],
+ 'type': 'object'},
+ 'ProvisioningInfo': {'additionalProperties': False,
+ 'properties': {'constraints': {'$ref': '#/definitions/Value'},
+ 'controller-config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'},
+ 'image-metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
+ 'type': 'array'},
+ 'jobs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'placement': {'type': 'string'},
+ 'series': {'type': 'string'},
+ 'subnets-to-zones': {'patternProperties': {'.*': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'tags': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'},
+ 'volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
+ 'type': 'array'}},
+ 'required': ['constraints',
+ 'series',
+ 'placement',
+ 'jobs'],
+ 'type': 'object'},
+ 'ProvisioningInfoResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'$ref': '#/definitions/ProvisioningInfo'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'ProvisioningInfoResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'SetStatus': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Settings': {'additionalProperties': False,
+ 'properties': {'Ftp': {'type': 'string'},
+ 'Http': {'type': 'string'},
+ 'Https': {'type': 'string'},
+ 'NoProxy': {'type': 'string'}},
+ 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
+ 'type': 'object'},
+ 'StatusResult': {'additionalProperties': False,
+ 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'id': {'type': 'string'},
+ 'info': {'type': 'string'},
+ 'life': {'type': 'string'},
+ 'since': {'format': 'date-time',
+ 'type': 'string'},
+ 'status': {'type': 'string'}},
+ 'required': ['id',
+ 'life',
+ 'status',
+ 'info',
+ 'data',
+ 'since'],
+ 'type': 'object'},
+ 'StatusResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'type': 'string'}},
+ 'required': ['result'],
+ 'type': 'object'},
+ 'StringResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'StringsResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'StringsWatchResult': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'watcher-id': {'type': 'string'}},
+ 'required': ['watcher-id'],
+ 'type': 'object'},
+ 'StringsWatchResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'Tools': {'additionalProperties': False,
+ 'properties': {'sha256': {'type': 'string'},
+ 'size': {'type': 'integer'},
+ 'url': {'type': 'string'},
+ 'version': {'$ref': '#/definitions/Binary'}},
+ 'required': ['version', 'url', 'size'],
+ 'type': 'object'},
+ 'ToolsResult': {'additionalProperties': False,
+ 'properties': {'disable-ssl-hostname-verification': {'type': 'boolean'},
+ 'error': {'$ref': '#/definitions/Error'},
+ 'tools': {'items': {'$ref': '#/definitions/Tools'},
+ 'type': 'array'}},
+ 'required': ['tools',
+ 'disable-ssl-hostname-verification'],
+ 'type': 'object'},
+ 'ToolsResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ToolsResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'UpdateBehavior': {'additionalProperties': False,
+ 'properties': {'enable-os-refresh-update': {'type': 'boolean'},
+ 'enable-os-upgrade': {'type': 'boolean'}},
+ 'required': ['enable-os-refresh-update',
+ 'enable-os-upgrade'],
+ 'type': 'object'},
+ 'Value': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'container': {'type': 'string'},
+ 'cpu-cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'instance-type': {'type': 'string'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'spaces': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'virt-type': {'type': 'string'}},
+ 'type': 'object'},
+ 'Volume': {'additionalProperties': False,
+ 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
+ 'volume-tag': {'type': 'string'}},
+ 'required': ['volume-tag', 'info'],
+ 'type': 'object'},
+ 'VolumeAttachmentInfo': {'additionalProperties': False,
+ 'properties': {'bus-address': {'type': 'string'},
+ 'device-link': {'type': 'string'},
+ 'device-name': {'type': 'string'},
+ 'read-only': {'type': 'boolean'}},
+ 'type': 'object'},
+ 'VolumeAttachmentParams': {'additionalProperties': False,
+ 'properties': {'instance-id': {'type': 'string'},
+ 'machine-tag': {'type': 'string'},
+ 'provider': {'type': 'string'},
+ 'read-only': {'type': 'boolean'},
+ 'volume-id': {'type': 'string'},
+ 'volume-tag': {'type': 'string'}},
+ 'required': ['volume-tag',
+ 'machine-tag',
+ 'provider'],
+ 'type': 'object'},
+ 'VolumeInfo': {'additionalProperties': False,
+ 'properties': {'hardware-id': {'type': 'string'},
+ 'persistent': {'type': 'boolean'},
+ 'size': {'type': 'integer'},
+ 'volume-id': {'type': 'string'}},
+ 'required': ['volume-id', 'size', 'persistent'],
+ 'type': 'object'},
+ 'VolumeParams': {'additionalProperties': False,
+ 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
+ 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'},
+ 'provider': {'type': 'string'},
+ 'size': {'type': 'integer'},
+ 'tags': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'},
+ 'volume-tag': {'type': 'string'}},
+ 'required': ['volume-tag',
+ 'size',
+ 'provider'],
+ 'type': 'object'},
+ 'WatchContainer': {'additionalProperties': False,
+ 'properties': {'container-type': {'type': 'string'},
+ 'machine-tag': {'type': 'string'}},
+ 'required': ['machine-tag',
+ 'container-type'],
+ 'type': 'object'},
+ 'WatchContainers': {'additionalProperties': False,
+ 'properties': {'params': {'items': {'$ref': '#/definitions/WatchContainer'},
+ 'type': 'array'}},
+ 'required': ['params'],
+ 'type': 'object'}},
+ 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
+ 'type': 'object'},
+ 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
+ 'type': 'object'},
+ 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
+ 'type': 'object'},
+ 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
+ 'type': 'object'},
+ 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
+ 'type': 'object'},
+ 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
+ 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
+ 'type': 'object'},
+ 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
+ 'type': 'object'},
+ 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
+ 'type': 'object'},
+ 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
+ 'Result': {'$ref': '#/definitions/FindToolsResult'}},
+ 'type': 'object'},
+ 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
+ 'type': 'object'},
+ 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringResults'}},
+ 'type': 'object'},
+ 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StatusResults'}},
+ 'type': 'object'},
+ 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/LifeResults'}},
+ 'type': 'object'},
+ 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
+ 'type': 'object'},
+ 'MarkMachinesForRemoval': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
+ 'type': 'object'},
+ 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
+ 'type': 'object'},
+ 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
+ 'type': 'object'},
+ 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
+ 'type': 'object'},
+ 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StringResults'}},
+ 'type': 'object'},
+ 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
+ 'type': 'object'},
+ 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/StatusResults'}},
+ 'type': 'object'},
+ 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ToolsResults'}},
+ 'type': 'object'},
+ 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'},
+ 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
+ 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
+ 'type': 'object'},
+ 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
+ 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
+ 'type': 'object'},
+ 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'},
+ 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
+ 'type': 'object'},
+ 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+