+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'},
+ 'unit': {'type': 'string'},
+ 'value': {'type': 'string'}},
+ 'required': ['time', 'key', 'value', 'unit'],
+ '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'},
+ 'owner-tag': {'type': 'string'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['uuid',
+ 'name',
+ 'owner-tag',
+ 'agent-version'],
+ 'type': 'object'},
+ 'MigrationSpec': {'additionalProperties': False,
+ 'properties': {'external-control': {'type': 'boolean'},
+ 'model-tag': {'type': 'string'},
+ 'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
+ 'required': ['model-tag',
+ 'target-info',
+ 'external-control'],
+ 'type': 'object'},
+ 'MigrationTargetInfo': {'additionalProperties': False,
+ 'properties': {'addrs': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'auth-tag': {'type': 'string'},
+ 'ca-cert': {'type': 'string'},
+ 'controller-tag': {'type': 'string'},
+ 'macaroons': {'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': {'MigrationModelInfo': {'additionalProperties': False,
+ 'properties': {'agent-version': {'$ref': '#/definitions/Number'},
+ 'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['uuid',
+ 'name',
+ 'owner-tag',
+ 'agent-version'],
+ 'type': 'object'},
+ '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'}},
+ '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/MigrationModelInfo'}},
+ '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, agent_version, name, owner_tag, uuid):
+ '''
+ agent_version : Number
+ name : str
+ owner_tag : str
+ uuid : str
+ Returns -> None
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='MigrationTarget', request='Prechecks', version=1, params=params)
+ params['agent-version'] = agent_version
+ params['name'] = name
+ params['owner-tag'] = owner_tag
+ params['uuid'] = uuid
+ 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'},
+ 'MachineHardware': {'additionalProperties': False,
+ 'properties': {'arch': {'type': 'string'},
+ 'availability-zone': {'type': 'string'},
+ 'cores': {'type': 'integer'},
+ 'cpu-power': {'type': 'integer'},
+ 'mem': {'type': 'integer'},
+ 'root-disk': {'type': 'integer'},
+ 'tags': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ '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'},
+ 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
+ 'type': 'array'},
+ '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',
+ 'machines'],
+ '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'},
+ 'ModelMachineInfo': {'additionalProperties': False,
+ 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
+ 'id': {'type': 'string'}},
+ 'required': ['id'],
+ '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'}
+