+ 'RevokeCredentials': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'UpdateCredentials': {'properties': {'Params': {'$ref': '#/definitions/UpdateCloudCredentials'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'UserCredentials': {'properties': {'Params': {'$ref': '#/definitions/UserClouds'},
+ 'Result': {'$ref': '#/definitions/StringsResults'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(CloudResults)
+ async def Cloud(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~CloudResult]<~CloudResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='Cloud', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(CloudsResult)
+ async def Clouds(self):
+ '''
+
+ Returns -> typing.Mapping<~KT, +VT_co>[str, ~Cloud]<~Cloud>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='Clouds', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(CloudCredentialResults)
+ async def Credential(self, entities):
+ '''
+ entities : typing.Sequence<+T_co>[~Entity]<~Entity>
+ Returns -> typing.Sequence<+T_co>[~CloudCredentialResult]<~CloudCredentialResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='Credential', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringResult)
+ async def DefaultCloud(self):
+ '''
+
+ Returns -> typing.Union[_ForwardRef('Error'), str]
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='DefaultCloud', version=1, params=params)
+
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def RevokeCredentials(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='Cloud', request='RevokeCredentials', version=1, params=params)
+ params['entities'] = entities
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(ErrorResults)
+ async def UpdateCredentials(self, credentials):
+ '''
+ credentials : typing.Sequence<+T_co>[~UpdateCloudCredential]<~UpdateCloudCredential>
+ Returns -> typing.Sequence<+T_co>[~ErrorResult]<~ErrorResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='UpdateCredentials', version=1, params=params)
+ params['credentials'] = credentials
+ reply = await self.rpc(msg)
+ return reply
+
+
+
+ @ReturnMapping(StringsResults)
+ async def UserCredentials(self, user_clouds):
+ '''
+ user_clouds : typing.Sequence<+T_co>[~UserCloud]<~UserCloud>
+ Returns -> typing.Sequence<+T_co>[~StringsResult]<~StringsResult>
+ '''
+ # map input types to rpc msg
+ params = dict()
+ msg = dict(type='Cloud', request='UserCredentials', version=1, params=params)
+ params['user-clouds'] = user_clouds
+ reply = await self.rpc(msg)
+ return reply
+
+
+class ControllerFacade(Type):
+ name = 'Controller'
+ version = 3
+ schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
+ 'properties': {'watcher-id': {'type': 'string'}},
+ 'required': ['watcher-id'],
+ 'type': 'object'},
+ 'CloudCredential': {'additionalProperties': False,
+ 'properties': {'attrs': {'patternProperties': {'.*': {'type': 'string'}},
+ 'type': 'object'},
+ 'auth-type': {'type': 'string'},
+ 'redacted': {'items': {'type': 'string'},
+ 'type': 'array'}},
+ 'required': ['auth-type'],
+ 'type': 'object'},
+ 'CloudSpec': {'additionalProperties': False,
+ 'properties': {'credential': {'$ref': '#/definitions/CloudCredential'},
+ 'endpoint': {'type': 'string'},
+ 'identity-endpoint': {'type': 'string'},
+ 'name': {'type': 'string'},
+ 'region': {'type': 'string'},
+ 'storage-endpoint': {'type': 'string'},
+ 'type': {'type': 'string'}},
+ 'required': ['type', 'name'],
+ 'type': 'object'},
+ 'CloudSpecResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'$ref': '#/definitions/CloudSpec'}},
+ 'type': 'object'},
+ 'CloudSpecResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/CloudSpecResult'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ConfigValue': {'additionalProperties': False,
+ 'properties': {'source': {'type': 'string'},
+ 'value': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'required': ['value', 'source'],
+ 'type': 'object'},
+ 'ControllerConfigResult': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True,
+ 'type': 'object'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'DestroyControllerArgs': {'additionalProperties': False,
+ 'properties': {'destroy-models': {'type': 'boolean'}},
+ 'required': ['destroy-models'],
+ 'type': 'object'},
+ 'Entities': {'additionalProperties': False,
+ 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
+ 'type': 'array'}},
+ 'required': ['entities'],
+ 'type': 'object'},
+ 'Entity': {'additionalProperties': False,
+ 'properties': {'tag': {'type': 'string'}},
+ 'required': ['tag'],
+ 'type': 'object'},
+ 'Error': {'additionalProperties': False,
+ 'properties': {'code': {'type': 'string'},
+ 'info': {'$ref': '#/definitions/ErrorInfo'},
+ 'message': {'type': 'string'}},
+ 'required': ['message', 'code'],
+ 'type': 'object'},
+ 'ErrorInfo': {'additionalProperties': False,
+ 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'},
+ 'macaroon-path': {'type': 'string'}},
+ 'type': 'object'},
+ 'ErrorResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'}},
+ 'type': 'object'},
+ 'ErrorResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'},
+ 'type': 'array'}},
+ 'required': ['results'],
+ 'type': 'object'},
+ 'InitiateMigrationArgs': {'additionalProperties': False,
+ 'properties': {'specs': {'items': {'$ref': '#/definitions/MigrationSpec'},
+ 'type': 'array'}},
+ 'required': ['specs'],
+ 'type': 'object'},
+ 'InitiateMigrationResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'migration-id': {'type': 'string'},
+ 'model-tag': {'type': 'string'}},
+ 'required': ['model-tag',
+ 'migration-id'],
+ 'type': 'object'},
+ 'InitiateMigrationResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateMigrationResult'},
+ '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'},
+ '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'},
+ 'Model': {'additionalProperties': False,
+ 'properties': {'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'},
+ 'uuid': {'type': 'string'}},
+ 'required': ['name', 'uuid', 'owner-tag'],
+ 'type': 'object'},
+ 'ModelBlockInfo': {'additionalProperties': False,
+ 'properties': {'blocks': {'items': {'type': 'string'},
+ 'type': 'array'},
+ 'model-uuid': {'type': 'string'},
+ 'name': {'type': 'string'},
+ 'owner-tag': {'type': 'string'}},
+ 'required': ['name',
+ 'model-uuid',
+ 'owner-tag',
+ 'blocks'],
+ 'type': 'object'},
+ 'ModelBlockInfoList': {'additionalProperties': False,
+ 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
+ 'type': 'array'}},
+ 'type': 'object'},
+ 'ModelConfigResults': {'additionalProperties': False,
+ 'properties': {'config': {'patternProperties': {'.*': {'$ref': '#/definitions/ConfigValue'}},
+ 'type': 'object'}},
+ 'required': ['config'],
+ 'type': 'object'},
+ 'ModelMachineInfo': {'additionalProperties': False,
+ 'properties': {'hardware': {'$ref': '#/definitions/MachineHardware'},
+ 'id': {'type': 'string'}},
+ 'required': ['id'],
+ 'type': 'object'},
+ 'ModelStatus': {'additionalProperties': False,
+ 'properties': {'application-count': {'type': 'integer'},
+ 'hosted-machine-count': {'type': 'integer'},
+ 'life': {'type': 'string'},
+ 'machines': {'items': {'$ref': '#/definitions/ModelMachineInfo'},
+ 'type': 'array'},
+ 'model-tag': {'type': 'string'},
+ 'owner-tag': {'type': 'string'}},
+ 'required': ['model-tag',
+ 'life',
+ 'hosted-machine-count',
+ 'application-count',
+ 'owner-tag'],
+ 'type': 'object'},
+ 'ModelStatusResults': {'additionalProperties': False,
+ 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
+ 'type': 'array'}},
+ 'required': ['models'],
+ 'type': 'object'},
+ 'ModifyControllerAccess': {'additionalProperties': False,
+ 'properties': {'access': {'type': 'string'},
+ 'action': {'type': 'string'},
+ 'user-tag': {'type': 'string'}},
+ 'required': ['user-tag',
+ 'action',
+ 'access'],
+ 'type': 'object'},
+ 'ModifyControllerAccessRequest': {'additionalProperties': False,
+ 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyControllerAccess'},
+ 'type': 'array'}},
+ 'required': ['changes'],
+ 'type': 'object'},
+ 'RemoveBlocksArgs': {'additionalProperties': False,
+ 'properties': {'all': {'type': 'boolean'}},
+ 'required': ['all'],
+ 'type': 'object'},
+ 'UserAccess': {'additionalProperties': False,
+ 'properties': {'access': {'type': 'string'},
+ 'user-tag': {'type': 'string'}},
+ 'required': ['user-tag', 'access'],
+ 'type': 'object'},
+ 'UserAccessResult': {'additionalProperties': False,
+ 'properties': {'error': {'$ref': '#/definitions/Error'},
+ 'result': {'$ref': '#/definitions/UserAccess'}},
+ 'type': 'object'},
+ 'UserAccessResults': {'additionalProperties': False,
+ 'properties': {'results': {'items': {'$ref': '#/definitions/UserAccessResult'},
+ 'type': 'array'}},
+ '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': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
+ 'type': 'object'},
+ 'CloudSpec': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/CloudSpecResults'}},
+ 'type': 'object'},
+ 'ControllerConfig': {'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
+ 'type': 'object'},
+ 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
+ 'type': 'object'},
+ 'GetControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/UserAccessResults'}},
+ 'type': 'object'},
+ 'InitiateMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateMigrationArgs'},
+ 'Result': {'$ref': '#/definitions/InitiateMigrationResults'}},
+ 'type': 'object'},
+ 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
+ 'type': 'object'},
+ 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
+ 'type': 'object'},
+ 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
+ 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
+ 'type': 'object'},
+ 'ModifyControllerAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyControllerAccessRequest'},
+ 'Result': {'$ref': '#/definitions/ErrorResults'}},
+ 'type': 'object'},
+ 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
+ 'type': 'object'},
+ 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
+ 'type': 'object'}},
+ 'type': 'object'}
+
+
+ @ReturnMapping(UserModelList)