2 from juju
.client
.facade
import Type
, ReturnMapping
5 _toSchema
= {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
6 _toPy
= {'name': 'name', 'receiver': 'receiver', 'parameters': 'parameters', 'tag': 'tag'}
7 def __init__(self
, name
, receiver
, parameters
, tag
):
11 parameters : typing.Mapping[str, typing.Any]
15 self
.receiver
= receiver
16 self
.parameters
= parameters
20 class ActionResult(Type
):
21 _toSchema
= {'action': 'action', 'output': 'output', 'enqueued': 'enqueued', 'status': 'status', 'message': 'message', 'started': 'started', 'completed': 'completed', 'error': 'error'}
22 _toPy
= {'action': 'action', 'output': 'output', 'enqueued': 'enqueued', 'status': 'status', 'message': 'message', 'started': 'started', 'completed': 'completed', 'error': 'error'}
23 def __init__(self
, action
, output
, enqueued
, status
, message
, started
, completed
, error
):
26 output : typing.Mapping[str, typing.Any]
36 self
.enqueued
= enqueued
38 self
.message
= message
39 self
.started
= started
40 self
.completed
= completed
45 _toSchema
= {'actions': 'actions'}
46 _toPy
= {'actions': 'actions'}
47 def __init__(self
, actions
):
49 actions : typing.Sequence[~Action]
51 self
.actions
= actions
54 class ActionsByName(Type
):
55 _toSchema
= {'name': 'name', 'actions': 'actions', 'error': 'error'}
56 _toPy
= {'name': 'name', 'actions': 'actions', 'error': 'error'}
57 def __init__(self
, name
, actions
, error
):
60 actions : typing.Sequence[~ActionResult]
64 self
.actions
= actions
68 class ActionsByReceiver(Type
):
69 _toSchema
= {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
70 _toPy
= {'receiver': 'receiver', 'actions': 'actions', 'error': 'error'}
71 def __init__(self
, receiver
, actions
, error
):
74 actions : typing.Sequence[~ActionResult]
77 self
.receiver
= receiver
78 self
.actions
= actions
83 _toSchema
= {'tag': 'Tag'}
84 _toPy
= {'Tag': 'tag'}
85 def __init__(self
, tag
):
93 _toSchema
= {'info': 'Info', 'code': 'Code', 'message': 'Message'}
94 _toPy
= {'Info': 'info', 'Code': 'code', 'Message': 'message'}
95 def __init__(self
, info
, code
, message
):
103 self
.message
= message
106 class ErrorInfo(Type
):
107 _toSchema
= {'macaroonpath': 'MacaroonPath', 'macaroon': 'Macaroon'}
108 _toPy
= {'Macaroon': 'macaroon', 'MacaroonPath': 'macaroonpath'}
109 def __init__(self
, macaroon
, macaroonpath
):
114 self
.macaroon
= macaroon
115 self
.macaroonpath
= macaroonpath
118 class Macaroon(Type
):
119 _toSchema
= {'caveats': 'caveats', 'id_': 'id', 'data': 'data', 'location': 'location', 'sig': 'sig'}
120 _toPy
= {'caveats': 'caveats', 'id': 'id_', 'data': 'data', 'location': 'location', 'sig': 'sig'}
121 def __init__(self
, caveats
, id_
, data
, location
, sig
):
123 caveats : typing.Sequence[~caveat]
125 data : typing.Sequence[int]
127 sig : typing.Sequence[int]
129 self
.caveats
= caveats
132 self
.location
= location
136 class ServiceCharmActionsResult(Type
):
137 _toSchema
= {'servicetag': 'servicetag', 'actions': 'actions', 'error': 'error'}
138 _toPy
= {'servicetag': 'servicetag', 'actions': 'actions', 'error': 'error'}
139 def __init__(self
, servicetag
, actions
, error
):
145 self
.servicetag
= servicetag
146 self
.actions
= actions
151 _toSchema
= {'location': 'location', 'caveatid': 'caveatId', 'verificationid': 'verificationId'}
152 _toPy
= {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'}
153 def __init__(self
, verificationid
, location
, caveatid
):
155 verificationid : ~packet
159 self
.verificationid
= verificationid
160 self
.location
= location
161 self
.caveatid
= caveatid
165 _toSchema
= {'start': 'start', 'totallen': 'totalLen', 'headerlen': 'headerLen'}
166 _toPy
= {'start': 'start', 'headerLen': 'headerlen', 'totalLen': 'totallen'}
167 def __init__(self
, start
, headerlen
, totallen
):
174 self
.headerlen
= headerlen
175 self
.totallen
= totallen
178 class AgentGetEntitiesResult(Type
):
179 _toSchema
= {'containertype': 'ContainerType', 'life': 'Life', 'error': 'Error', 'jobs': 'Jobs'}
180 _toPy
= {'Life': 'life', 'Error': 'error', 'ContainerType': 'containertype', 'Jobs': 'jobs'}
181 def __init__(self
, life
, error
, containertype
, jobs
):
186 jobs : typing.Sequence[str]
190 self
.containertype
= containertype
194 class EntityPassword(Type
):
195 _toSchema
= {'password': 'Password', 'tag': 'Tag'}
196 _toPy
= {'Tag': 'tag', 'Password': 'password'}
197 def __init__(self
, tag
, password
):
203 self
.password
= password
206 class ErrorResult(Type
):
207 _toSchema
= {'info': 'Info', 'code': 'Code', 'message': 'Message'}
208 _toPy
= {'Info': 'info', 'Code': 'code', 'Message': 'message'}
209 def __init__(self
, info
, code
, message
):
217 self
.message
= message
221 _toSchema
= {'removed': 'Removed'}
222 _toPy
= {'Removed': 'removed'}
223 def __init__(self
, removed
):
227 self
.removed
= removed
230 class AnnotationsGetResult(Type
):
231 _toSchema
= {'error': 'Error', 'entitytag': 'EntityTag', 'annotations': 'Annotations'}
232 _toPy
= {'Error': 'error', 'Annotations': 'annotations', 'EntityTag': 'entitytag'}
233 def __init__(self
, error
, entitytag
, annotations
):
237 annotations : typing.Mapping[str, str]
240 self
.entitytag
= entitytag
241 self
.annotations
= annotations
244 class EntityAnnotations(Type
):
245 _toSchema
= {'annotations': 'Annotations', 'entitytag': 'EntityTag'}
246 _toPy
= {'Annotations': 'annotations', 'EntityTag': 'entitytag'}
247 def __init__(self
, entitytag
, annotations
):
250 annotations : typing.Mapping[str, str]
252 self
.entitytag
= entitytag
253 self
.annotations
= annotations
256 class BackupsMetadataResult(Type
):
257 _toSchema
= {'version': 'Version', 'started': 'Started', 'notes': 'Notes', 'finished': 'Finished', 'machine': 'Machine', 'hostname': 'Hostname', 'caprivatekey': 'CAPrivateKey', 'checksumformat': 'ChecksumFormat', 'id_': 'ID', 'size': 'Size', 'stored': 'Stored', 'checksum': 'Checksum', 'model': 'Model', 'cacert': 'CACert'}
258 _toPy
= {'Hostname': 'hostname', 'Model': 'model', 'Version': 'version', 'Checksum': 'checksum', 'Stored': 'stored', 'ID': 'id_', 'Machine': 'machine', 'Size': 'size', 'Started': 'started', 'Notes': 'notes', 'Finished': 'finished', 'CACert': 'cacert', 'ChecksumFormat': 'checksumformat', 'CAPrivateKey': 'caprivatekey'}
259 def __init__(self
, hostname
, model
, version
, checksum
, stored
, id_
, machine
, size
, started
, notes
, finished
, cacert
, checksumformat
, caprivatekey
):
276 self
.hostname
= hostname
278 self
.version
= version
279 self
.checksum
= checksum
282 self
.machine
= machine
284 self
.started
= started
286 self
.finished
= finished
288 self
.checksumformat
= checksumformat
289 self
.caprivatekey
= caprivatekey
293 _toSchema
= {'major': 'Major', 'patch': 'Patch', 'build': 'Build', 'minor': 'Minor', 'tag': 'Tag'}
294 _toPy
= {'Build': 'build', 'Minor': 'minor', 'Tag': 'tag', 'Patch': 'patch', 'Major': 'major'}
295 def __init__(self
, build
, minor
, tag
, patch
, major
):
311 _toSchema
= {'tag': 'tag', 'id_': 'id', 'message': 'message', 'type_': 'type'}
312 _toPy
= {'id': 'id_', 'message': 'message', 'type': 'type_', 'tag': 'tag'}
313 def __init__(self
, id_
, message
, type_
, tag
):
321 self
.message
= message
326 class BlockResult(Type
):
327 _toSchema
= {'error': 'error', 'result': 'result'}
328 _toPy
= {'error': 'error', 'result': 'result'}
329 def __init__(self
, error
, result
):
338 class AddMachineParams(Type
):
339 _toSchema
= {'nonce': 'Nonce', 'placement': 'Placement', 'constraints': 'Constraints', 'addrs': 'Addrs', 'disks': 'Disks', 'jobs': 'Jobs', 'instanceid': 'InstanceId', 'series': 'Series', 'containertype': 'ContainerType', 'parentid': 'ParentId', 'hardwarecharacteristics': 'HardwareCharacteristics'}
340 _toPy
= {'InstanceId': 'instanceid', 'ParentId': 'parentid', 'ContainerType': 'containertype', 'Constraints': 'constraints', 'Nonce': 'nonce', 'Series': 'series', 'Disks': 'disks', 'HardwareCharacteristics': 'hardwarecharacteristics', 'Placement': 'placement', 'Jobs': 'jobs', 'Addrs': 'addrs'}
341 def __init__(self
, constraints
, parentid
, containertype
, addrs
, nonce
, series
, instanceid
, disks
, placement
, jobs
, hardwarecharacteristics
):
346 addrs : typing.Sequence[~Address]
350 disks : typing.Sequence[~Constraints]
351 placement : ~Placement
352 jobs : typing.Sequence[str]
353 hardwarecharacteristics : ~HardwareCharacteristics
355 self
.constraints
= constraints
356 self
.parentid
= parentid
357 self
.containertype
= containertype
361 self
.instanceid
= instanceid
363 self
.placement
= placement
365 self
.hardwarecharacteristics
= hardwarecharacteristics
368 class AddMachinesResult(Type
):
369 _toSchema
= {'machine': 'Machine', 'error': 'Error'}
370 _toPy
= {'Error': 'error', 'Machine': 'machine'}
371 def __init__(self
, error
, machine
):
377 self
.machine
= machine
381 _toSchema
= {'spacename': 'SpaceName', 'value': 'Value', 'scope': 'Scope', 'type_': 'Type'}
382 _toPy
= {'Type': 'type_', 'Value': 'value', 'Scope': 'scope', 'SpaceName': 'spacename'}
383 def __init__(self
, type_
, value
, scope
, spacename
):
393 self
.spacename
= spacename
397 _toSchema
= {'number': 'Number', 'arch': 'Arch', 'series': 'Series'}
398 _toPy
= {'Series': 'series', 'Arch': 'arch', 'Number': 'number'}
399 def __init__(self
, series
, number
, arch
):
410 class BundleChangesChange(Type
):
411 _toSchema
= {'requires': 'requires', 'id_': 'id', 'method': 'method', 'args': 'args'}
412 _toPy
= {'requires': 'requires', 'id': 'id_', 'method': 'method', 'args': 'args'}
413 def __init__(self
, requires
, id_
, method
, args
):
415 requires : typing.Sequence[str]
418 args : typing.Sequence[typing.Any]
420 self
.requires
= requires
426 class Constraints(Type
):
427 _toSchema
= {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
428 _toPy
= {'Count': 'count', 'Pool': 'pool', 'Size': 'size'}
429 def __init__(self
, count
, pool
, size
):
440 class DetailedStatus(Type
):
441 _toSchema
= {'info': 'Info', 'version': 'Version', 'status': 'Status', 'since': 'Since', 'kind': 'Kind', 'data': 'Data', 'life': 'Life'}
442 _toPy
= {'Info': 'info', 'Data': 'data', 'Kind': 'kind', 'Version': 'version', 'Life': 'life', 'Status': 'status', 'Since': 'since'}
443 def __init__(self
, data
, kind
, version
, life
, info
, status
, since
):
445 data : typing.Mapping[str, typing.Any]
455 self
.version
= version
462 class EndpointStatus(Type
):
463 _toSchema
= {'servicename': 'ServiceName', 'name': 'Name', 'subordinate': 'Subordinate', 'role': 'Role'}
464 _toPy
= {'Name': 'name', 'Role': 'role', 'ServiceName': 'servicename', 'Subordinate': 'subordinate'}
465 def __init__(self
, name
, role
, servicename
, subordinate
):
474 self
.servicename
= servicename
475 self
.subordinate
= subordinate
478 class EntityStatus(Type
):
479 _toSchema
= {'info': 'Info', 'status': 'Status', 'data': 'Data', 'since': 'Since'}
480 _toPy
= {'Info': 'info', 'Data': 'data', 'Status': 'status', 'Since': 'since'}
481 def __init__(self
, info
, data
, status
, since
):
484 data : typing.Mapping[str, typing.Any]
494 class HardwareCharacteristics(Type
):
495 _toSchema
= {'arch': 'Arch', 'mem': 'Mem', 'cpucores': 'CpuCores', 'availabilityzone': 'AvailabilityZone', 'rootdisk': 'RootDisk', 'cpupower': 'CpuPower', 'tags': 'Tags'}
496 _toPy
= {'Mem': 'mem', 'CpuCores': 'cpucores', 'CpuPower': 'cpupower', 'RootDisk': 'rootdisk', 'Tags': 'tags', 'Arch': 'arch', 'AvailabilityZone': 'availabilityzone'}
497 def __init__(self
, mem
, cpucores
, cpupower
, rootdisk
, tags
, arch
, availabilityzone
):
503 tags : typing.Sequence[str]
505 availabilityzone : str
508 self
.cpucores
= cpucores
509 self
.cpupower
= cpupower
510 self
.rootdisk
= rootdisk
513 self
.availabilityzone
= availabilityzone
516 class HostPort(Type
):
517 _toSchema
= {'port': 'Port', 'address': 'Address'}
518 _toPy
= {'Port': 'port', 'Address': 'address'}
519 def __init__(self
, port
, address
):
525 self
.address
= address
528 class MachineStatus(Type
):
529 _toSchema
= {'agentstatus': 'AgentStatus', 'id_': 'Id', 'instancestatus': 'InstanceStatus', 'jobs': 'Jobs', 'hardware': 'Hardware', 'instanceid': 'InstanceId', 'series': 'Series', 'dnsname': 'DNSName', 'containers': 'Containers', 'wantsvote': 'WantsVote', 'hasvote': 'HasVote'}
530 _toPy
= {'Id': 'id_', 'HasVote': 'hasvote', 'Series': 'series', 'AgentStatus': 'agentstatus', 'Containers': 'containers', 'InstanceId': 'instanceid', 'WantsVote': 'wantsvote', 'Hardware': 'hardware', 'InstanceStatus': 'instancestatus', 'Jobs': 'jobs', 'DNSName': 'dnsname'}
531 def __init__(self
, id_
, hardware
, series
, instancestatus
, instanceid
, containers
, wantsvote
, hasvote
, dnsname
, jobs
, agentstatus
):
536 instancestatus : ~DetailedStatus
538 containers : typing.Mapping[str, ~MachineStatus]
542 jobs : typing.Sequence[str]
543 agentstatus : ~DetailedStatus
546 self
.hardware
= hardware
548 self
.instancestatus
= instancestatus
549 self
.instanceid
= instanceid
550 self
.containers
= containers
551 self
.wantsvote
= wantsvote
552 self
.hasvote
= hasvote
553 self
.dnsname
= dnsname
555 self
.agentstatus
= agentstatus
558 class MeterStatus(Type
):
559 _toSchema
= {'message': 'Message', 'color': 'Color'}
560 _toPy
= {'Color': 'color', 'Message': 'message'}
561 def __init__(self
, color
, message
):
567 self
.message
= message
570 class ModelUserInfo(Type
):
571 _toSchema
= {'lastconnection': 'lastconnection', 'displayname': 'displayname', 'access': 'access', 'user': 'user'}
572 _toPy
= {'lastconnection': 'lastconnection', 'displayname': 'displayname', 'access': 'access', 'user': 'user'}
573 def __init__(self
, lastconnection
, displayname
, access
, user
):
580 self
.lastconnection
= lastconnection
581 self
.displayname
= displayname
586 class ModelUserInfoResult(Type
):
587 _toSchema
= {'error': 'error', 'result': 'result'}
588 _toPy
= {'error': 'error', 'result': 'result'}
589 def __init__(self
, error
, result
):
592 result : ~ModelUserInfo
598 class Placement(Type
):
599 _toSchema
= {'directive': 'Directive', 'scope': 'Scope'}
600 _toPy
= {'Scope': 'scope', 'Directive': 'directive'}
601 def __init__(self
, scope
, directive
):
607 self
.directive
= directive
610 class RelationStatus(Type
):
611 _toSchema
= {'endpoints': 'Endpoints', 'key': 'Key', 'id_': 'Id', 'scope': 'Scope', 'interface': 'Interface'}
612 _toPy
= {'Interface': 'interface', 'Key': 'key', 'Id': 'id_', 'Scope': 'scope', 'Endpoints': 'endpoints'}
613 def __init__(self
, interface
, scope
, id_
, key
, endpoints
):
619 endpoints : typing.Sequence[~EndpointStatus]
621 self
.interface
= interface
625 self
.endpoints
= endpoints
628 class ResolveCharmResult(Type
):
629 _toSchema
= {'url': 'URL', 'error': 'Error'}
630 _toPy
= {'Error': 'error', 'URL': 'url'}
631 def __init__(self
, error
, url
):
640 class ServiceStatus(Type
):
641 _toSchema
= {'relations': 'Relations', 'units': 'Units', 'status': 'Status', 'life': 'Life', 'canupgradeto': 'CanUpgradeTo', 'exposed': 'Exposed', 'meterstatuses': 'MeterStatuses', 'charm': 'Charm', 'subordinateto': 'SubordinateTo'}
642 _toPy
= {'Exposed': 'exposed', 'MeterStatuses': 'meterstatuses', 'Status': 'status', 'Life': 'life', 'CanUpgradeTo': 'canupgradeto', 'Charm': 'charm', 'Relations': 'relations', 'Units': 'units', 'SubordinateTo': 'subordinateto'}
643 def __init__(self
, exposed
, meterstatuses
, units
, life
, canupgradeto
, charm
, relations
, status
, subordinateto
):
646 meterstatuses : typing.Mapping[str, ~MeterStatus]
647 units : typing.Mapping[str, ~UnitStatus]
651 relations : typing.Sequence[str]
652 status : ~DetailedStatus
653 subordinateto : typing.Sequence[str]
655 self
.exposed
= exposed
656 self
.meterstatuses
= meterstatuses
659 self
.canupgradeto
= canupgradeto
661 self
.relations
= relations
663 self
.subordinateto
= subordinateto
667 _toSchema
= {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'}
668 _toPy
= {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'}
669 def __init__(self
, url
, version
, size
, sha256
):
677 self
.version
= version
683 _toSchema
= {'name': 'Name', 'schema': 'Schema', 'revision': 'Revision', 'series': 'Series', 'user': 'User', 'channel': 'Channel'}
684 _toPy
= {'User': 'user', 'Channel': 'channel', 'Name': 'name', 'Revision': 'revision', 'Schema': 'schema', 'Series': 'series'}
685 def __init__(self
, user
, channel
, name
, revision
, schema
, series
):
695 self
.channel
= channel
697 self
.revision
= revision
702 class UnitStatus(Type
):
703 _toSchema
= {'subordinates': 'Subordinates', 'openedports': 'OpenedPorts', 'agentstatus': 'AgentStatus', 'workloadstatus': 'WorkloadStatus', 'machine': 'Machine', 'publicaddress': 'PublicAddress', 'charm': 'Charm'}
704 _toPy
= {'OpenedPorts': 'openedports', 'Subordinates': 'subordinates', 'WorkloadStatus': 'workloadstatus', 'Charm': 'charm', 'PublicAddress': 'publicaddress', 'Machine': 'machine', 'AgentStatus': 'agentstatus'}
705 def __init__(self
, openedports
, subordinates
, workloadstatus
, charm
, publicaddress
, machine
, agentstatus
):
707 openedports : typing.Sequence[str]
708 subordinates : typing.Mapping[str, ~UnitStatus]
709 workloadstatus : ~DetailedStatus
713 agentstatus : ~DetailedStatus
715 self
.openedports
= openedports
716 self
.subordinates
= subordinates
717 self
.workloadstatus
= workloadstatus
719 self
.publicaddress
= publicaddress
720 self
.machine
= machine
721 self
.agentstatus
= agentstatus
725 _toSchema
= {'mem': 'mem', 'arch': 'arch', 'container': 'container', 'spaces': 'spaces', 'root_disk': 'root-disk', 'virt_type': 'virt-type', 'cpu_power': 'cpu-power', 'tags': 'tags', 'instance_type': 'instance-type', 'cpu_cores': 'cpu-cores'}
726 _toPy
= {'arch': 'arch', 'root-disk': 'root_disk', 'container': 'container', 'cpu-power': 'cpu_power', 'spaces': 'spaces', 'mem': 'mem', 'virt-type': 'virt_type', 'cpu-cores': 'cpu_cores', 'instance-type': 'instance_type', 'tags': 'tags'}
727 def __init__(self
, arch
, root_disk
, container
, cpu_power
, virt_type
, mem
, spaces
, cpu_cores
, instance_type
, tags
):
735 spaces : typing.Sequence[str]
738 tags : typing.Sequence[str]
741 self
.root_disk
= root_disk
742 self
.container
= container
743 self
.cpu_power
= cpu_power
744 self
.virt_type
= virt_type
747 self
.cpu_cores
= cpu_cores
748 self
.instance_type
= instance_type
752 class InitiateModelMigrationResult(Type
):
753 _toSchema
= {'id_': 'id', 'error': 'error', 'model_tag': 'model-tag'}
754 _toPy
= {'id': 'id_', 'error': 'error', 'model-tag': 'model_tag'}
755 def __init__(self
, id_
, error
, model_tag
):
763 self
.model_tag
= model_tag
767 _toSchema
= {'uuid': 'UUID', 'name': 'Name', 'ownertag': 'OwnerTag'}
768 _toPy
= {'Name': 'name', 'OwnerTag': 'ownertag', 'UUID': 'uuid'}
769 def __init__(self
, name
, ownertag
, uuid
):
776 self
.ownertag
= ownertag
780 class ModelBlockInfo(Type
):
781 _toSchema
= {'blocks': 'blocks', 'name': 'name', 'owner_tag': 'owner-tag', 'model_uuid': 'model-uuid'}
782 _toPy
= {'blocks': 'blocks', 'model-uuid': 'model_uuid', 'owner-tag': 'owner_tag', 'name': 'name'}
783 def __init__(self
, blocks
, model_uuid
, owner_tag
, name
):
785 blocks : typing.Sequence[str]
791 self
.model_uuid
= model_uuid
792 self
.owner_tag
= owner_tag
796 class ModelMigrationSpec(Type
):
797 _toSchema
= {'target_info': 'target-info', 'model_tag': 'model-tag'}
798 _toPy
= {'model-tag': 'model_tag', 'target-info': 'target_info'}
799 def __init__(self
, model_tag
, target_info
):
802 target_info : ~ModelMigrationTargetInfo
804 self
.model_tag
= model_tag
805 self
.target_info
= target_info
808 class ModelMigrationTargetInfo(Type
):
809 _toSchema
= {'controller_tag': 'controller-tag', 'addrs': 'addrs', 'password': 'password', 'auth_tag': 'auth-tag', 'ca_cert': 'ca-cert'}
810 _toPy
= {'auth-tag': 'auth_tag', 'controller-tag': 'controller_tag', 'addrs': 'addrs', 'ca-cert': 'ca_cert', 'password': 'password'}
811 def __init__(self
, auth_tag
, controller_tag
, addrs
, ca_cert
, password
):
815 addrs : typing.Sequence[str]
819 self
.auth_tag
= auth_tag
820 self
.controller_tag
= controller_tag
822 self
.ca_cert
= ca_cert
823 self
.password
= password
826 class ModelStatus(Type
):
827 _toSchema
= {'hosted_machine_count': 'hosted-machine-count', 'model_tag': 'model-tag', 'life': 'life', 'owner_tag': 'owner-tag', 'service_count': 'service-count'}
828 _toPy
= {'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag', 'life': 'life', 'model-tag': 'model_tag', 'service-count': 'service_count'}
829 def __init__(self
, service_count
, owner_tag
, life
, model_tag
, hosted_machine_count
):
835 hosted_machine_count : int
837 self
.service_count
= service_count
838 self
.owner_tag
= owner_tag
840 self
.model_tag
= model_tag
841 self
.hosted_machine_count
= hosted_machine_count
844 class UserModel(Type
):
845 _toSchema
= {'model': 'Model', 'lastconnection': 'LastConnection'}
846 _toPy
= {'Model': 'model', 'LastConnection': 'lastconnection'}
847 def __init__(self
, model
, lastconnection
):
853 self
.lastconnection
= lastconnection
856 class LifeResult(Type
):
857 _toSchema
= {'life': 'Life', 'error': 'Error'}
858 _toPy
= {'Life': 'life', 'Error': 'error'}
859 def __init__(self
, life
, error
):
868 class StringsWatchResult(Type
):
869 _toSchema
= {'changes': 'Changes', 'error': 'Error', 'stringswatcherid': 'StringsWatcherId'}
870 _toPy
= {'Error': 'error', 'Changes': 'changes', 'StringsWatcherId': 'stringswatcherid'}
871 def __init__(self
, error
, changes
, stringswatcherid
):
874 changes : typing.Sequence[str]
875 stringswatcherid : str
878 self
.changes
= changes
879 self
.stringswatcherid
= stringswatcherid
882 class AddSubnetParams(Type
):
883 _toSchema
= {'subnetproviderid': 'SubnetProviderId', 'spacetag': 'SpaceTag', 'zones': 'Zones', 'subnettag': 'SubnetTag'}
884 _toPy
= {'SpaceTag': 'spacetag', 'SubnetProviderId': 'subnetproviderid', 'SubnetTag': 'subnettag', 'Zones': 'zones'}
885 def __init__(self
, spacetag
, subnettag
, zones
, subnetproviderid
):
889 zones : typing.Sequence[str]
890 subnetproviderid : str
892 self
.spacetag
= spacetag
893 self
.subnettag
= subnettag
895 self
.subnetproviderid
= subnetproviderid
898 class CreateSpaceParams(Type
):
899 _toSchema
= {'spacetag': 'SpaceTag', 'subnettags': 'SubnetTags', 'providerid': 'ProviderId', 'public': 'Public'}
900 _toPy
= {'SpaceTag': 'spacetag', 'Public': 'public', 'ProviderId': 'providerid', 'SubnetTags': 'subnettags'}
901 def __init__(self
, spacetag
, public
, providerid
, subnettags
):
906 subnettags : typing.Sequence[str]
908 self
.spacetag
= spacetag
910 self
.providerid
= providerid
911 self
.subnettags
= subnettags
914 class ProviderSpace(Type
):
915 _toSchema
= {'name': 'Name', 'error': 'Error', 'providerid': 'ProviderId', 'subnets': 'Subnets'}
916 _toPy
= {'Name': 'name', 'Error': 'error', 'ProviderId': 'providerid', 'Subnets': 'subnets'}
917 def __init__(self
, name
, error
, providerid
, subnets
):
922 subnets : typing.Sequence[~Subnet]
926 self
.providerid
= providerid
927 self
.subnets
= subnets
931 _toSchema
= {'staticrangehighip': 'StaticRangeHighIP', 'status': 'Status', 'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'cidr': 'CIDR', 'spacetag': 'SpaceTag', 'zones': 'Zones', 'life': 'Life', 'providerid': 'ProviderId'}
932 _toPy
= {'SpaceTag': 'spacetag', 'ProviderId': 'providerid', 'CIDR': 'cidr', 'StaticRangeHighIP': 'staticrangehighip', 'Life': 'life', 'StaticRangeLowIP': 'staticrangelowip', 'Zones': 'zones', 'VLANTag': 'vlantag', 'Status': 'status'}
933 def __init__(self
, spacetag
, providerid
, life
, staticrangehighip
, cidr
, staticrangelowip
, zones
, vlantag
, status
):
938 staticrangehighip : typing.Sequence[int]
940 staticrangelowip : typing.Sequence[int]
941 zones : typing.Sequence[str]
945 self
.spacetag
= spacetag
946 self
.providerid
= providerid
948 self
.staticrangehighip
= staticrangehighip
950 self
.staticrangelowip
= staticrangelowip
952 self
.vlantag
= vlantag
956 class BlockDevice(Type
):
957 _toSchema
= {'busaddress': 'BusAddress', 'uuid': 'UUID', 'devicelinks': 'DeviceLinks', 'size': 'Size', 'inuse': 'InUse', 'hardwareid': 'HardwareId', 'devicename': 'DeviceName', 'label': 'Label', 'mountpoint': 'MountPoint', 'filesystemtype': 'FilesystemType'}
958 _toPy
= {'InUse': 'inuse', 'BusAddress': 'busaddress', 'Label': 'label', 'DeviceName': 'devicename', 'UUID': 'uuid', 'MountPoint': 'mountpoint', 'HardwareId': 'hardwareid', 'DeviceLinks': 'devicelinks', 'FilesystemType': 'filesystemtype', 'Size': 'size'}
959 def __init__(self
, inuse
, busaddress
, mountpoint
, uuid
, devicename
, filesystemtype
, hardwareid
, label
, devicelinks
, size
):
969 devicelinks : typing.Sequence[str]
973 self
.busaddress
= busaddress
974 self
.mountpoint
= mountpoint
976 self
.devicename
= devicename
977 self
.filesystemtype
= filesystemtype
978 self
.hardwareid
= hardwareid
980 self
.devicelinks
= devicelinks
984 class MachineBlockDevices(Type
):
985 _toSchema
= {'machine': 'machine', 'blockdevices': 'blockdevices'}
986 _toPy
= {'machine': 'machine', 'blockdevices': 'blockdevices'}
987 def __init__(self
, machine
, blockdevices
):
990 blockdevices : typing.Sequence[~BlockDevice]
992 self
.machine
= machine
993 self
.blockdevices
= blockdevices
996 class MachineStorageId(Type
):
997 _toSchema
= {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
998 _toPy
= {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
999 def __init__(self
, attachmenttag
, machinetag
):
1004 self
.attachmenttag
= attachmenttag
1005 self
.machinetag
= machinetag
1008 class BoolResult(Type
):
1009 _toSchema
= {'error': 'Error', 'result': 'Result'}
1010 _toPy
= {'Error': 'error', 'Result': 'result'}
1011 def __init__(self
, error
, result
):
1017 self
.result
= result
1020 class MachinePortRange(Type
):
1021 _toSchema
= {'relationtag': 'RelationTag', 'portrange': 'PortRange', 'unittag': 'UnitTag'}
1022 _toPy
= {'RelationTag': 'relationtag', 'PortRange': 'portrange', 'UnitTag': 'unittag'}
1023 def __init__(self
, relationtag
, unittag
, portrange
):
1027 portrange : ~PortRange
1029 self
.relationtag
= relationtag
1030 self
.unittag
= unittag
1031 self
.portrange
= portrange
1034 class MachinePorts(Type
):
1035 _toSchema
= {'subnettag': 'SubnetTag', 'machinetag': 'MachineTag'}
1036 _toPy
= {'SubnetTag': 'subnettag', 'MachineTag': 'machinetag'}
1037 def __init__(self
, subnettag
, machinetag
):
1042 self
.subnettag
= subnettag
1043 self
.machinetag
= machinetag
1046 class MachinePortsResult(Type
):
1047 _toSchema
= {'ports': 'Ports', 'error': 'Error'}
1048 _toPy
= {'Error': 'error', 'Ports': 'ports'}
1049 def __init__(self
, error
, ports
):
1052 ports : typing.Sequence[~MachinePortRange]
1058 class NotifyWatchResult(Type
):
1059 _toSchema
= {'error': 'Error', 'notifywatcherid': 'NotifyWatcherId'}
1060 _toPy
= {'Error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
1061 def __init__(self
, error
, notifywatcherid
):
1064 notifywatcherid : str
1067 self
.notifywatcherid
= notifywatcherid
1070 class PortRange(Type
):
1071 _toSchema
= {'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort'}
1072 _toPy
= {'FromPort': 'fromport', 'ToPort': 'toport', 'Protocol': 'protocol'}
1073 def __init__(self
, fromport
, toport
, protocol
):
1079 self
.fromport
= fromport
1080 self
.toport
= toport
1081 self
.protocol
= protocol
1084 class StringResult(Type
):
1085 _toSchema
= {'error': 'Error', 'result': 'Result'}
1086 _toPy
= {'Error': 'error', 'Result': 'result'}
1087 def __init__(self
, error
, result
):
1093 self
.result
= result
1096 class StringsResult(Type
):
1097 _toSchema
= {'error': 'Error', 'result': 'Result'}
1098 _toPy
= {'Error': 'error', 'Result': 'result'}
1099 def __init__(self
, error
, result
):
1102 result : typing.Sequence[str]
1105 self
.result
= result
1108 class ControllersChangeResult(Type
):
1109 _toSchema
= {'error': 'Error', 'result': 'Result'}
1110 _toPy
= {'Error': 'error', 'Result': 'result'}
1111 def __init__(self
, error
, result
):
1114 result : ~ControllersChanges
1117 self
.result
= result
1120 class ControllersChanges(Type
):
1121 _toSchema
= {'added': 'added', 'removed': 'removed', 'promoted': 'promoted', 'maintained': 'maintained', 'demoted': 'demoted', 'converted': 'converted'}
1122 _toPy
= {'added': 'added', 'removed': 'removed', 'promoted': 'promoted', 'maintained': 'maintained', 'demoted': 'demoted', 'converted': 'converted'}
1123 def __init__(self
, added
, removed
, promoted
, maintained
, demoted
, converted
):
1125 added : typing.Sequence[str]
1126 removed : typing.Sequence[str]
1127 promoted : typing.Sequence[str]
1128 maintained : typing.Sequence[str]
1129 demoted : typing.Sequence[str]
1130 converted : typing.Sequence[str]
1133 self
.removed
= removed
1134 self
.promoted
= promoted
1135 self
.maintained
= maintained
1136 self
.demoted
= demoted
1137 self
.converted
= converted
1140 class ControllersSpec(Type
):
1141 _toSchema
= {'placement': 'placement', 'constraints': 'constraints', 'series': 'series', 'num_controllers': 'num-controllers', 'modeltag': 'ModelTag'}
1142 _toPy
= {'ModelTag': 'modeltag', 'num-controllers': 'num_controllers', 'constraints': 'constraints', 'series': 'series', 'placement': 'placement'}
1143 def __init__(self
, modeltag
, num_controllers
, constraints
, series
, placement
):
1146 num_controllers : int
1147 constraints : ~Value
1149 placement : typing.Sequence[str]
1151 self
.modeltag
= modeltag
1152 self
.num_controllers
= num_controllers
1153 self
.constraints
= constraints
1154 self
.series
= series
1155 self
.placement
= placement
1158 class HAMember(Type
):
1159 _toSchema
= {'series': 'Series', 'publicaddress': 'PublicAddress', 'tag': 'Tag'}
1160 _toPy
= {'Tag': 'tag', 'PublicAddress': 'publicaddress', 'Series': 'series'}
1161 def __init__(self
, tag
, series
, publicaddress
):
1165 publicaddress : ~Address
1168 self
.series
= series
1169 self
.publicaddress
= publicaddress
1173 _toSchema
= {'address': 'Address', 'id_': 'Id', 'priority': 'Priority', 'buildindexes': 'BuildIndexes', 'slavedelay': 'SlaveDelay', 'arbiter': 'Arbiter', 'hidden': 'Hidden', 'votes': 'Votes', 'tags': 'Tags'}
1174 _toPy
= {'Id': 'id_', 'Hidden': 'hidden', 'Votes': 'votes', 'SlaveDelay': 'slavedelay', 'Tags': 'tags', 'Address': 'address', 'Arbiter': 'arbiter', 'Priority': 'priority', 'BuildIndexes': 'buildindexes'}
1175 def __init__(self
, id_
, hidden
, votes
, slavedelay
, tags
, priority
, arbiter
, buildindexes
, address
):
1181 tags : typing.Mapping[str, str]
1188 self
.hidden
= hidden
1190 self
.slavedelay
= slavedelay
1192 self
.priority
= priority
1193 self
.arbiter
= arbiter
1194 self
.buildindexes
= buildindexes
1195 self
.address
= address
1198 class Version(Type
):
1199 _toSchema
= {'major': 'Major', 'minor': 'Minor', 'storageengine': 'StorageEngine', 'patch': 'Patch'}
1200 _toPy
= {'Minor': 'minor', 'Patch': 'patch', 'Major': 'major', 'StorageEngine': 'storageengine'}
1201 def __init__(self
, minor
, patch
, major
, storageengine
):
1211 self
.storageengine
= storageengine
1214 class SSHHostKeys(Type
):
1215 _toSchema
= {'public_keys': 'public-keys', 'tag': 'tag'}
1216 _toPy
= {'public-keys': 'public_keys', 'tag': 'tag'}
1217 def __init__(self
, tag
, public_keys
):
1220 public_keys : typing.Sequence[str]
1223 self
.public_keys
= public_keys
1226 class ImageMetadata(Type
):
1227 _toSchema
= {'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series', 'created': 'created'}
1228 _toPy
= {'kind': 'kind', 'url': 'url', 'arch': 'arch', 'series': 'series', 'created': 'created'}
1229 def __init__(self
, kind
, url
, arch
, series
, created
):
1240 self
.series
= series
1241 self
.created
= created
1244 class ImageSpec(Type
):
1245 _toSchema
= {'kind': 'kind', 'arch': 'arch', 'series': 'series'}
1246 _toPy
= {'kind': 'kind', 'arch': 'arch', 'series': 'series'}
1247 def __init__(self
, kind
, arch
, series
):
1255 self
.series
= series
1258 class CloudImageMetadata(Type
):
1259 _toSchema
= {'source': 'source', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_size': 'root_storage_size', 'priority': 'priority', 'virt_type': 'virt_type', 'version': 'version', 'series': 'series', 'stream': 'stream', 'root_storage_type': 'root_storage_type', 'region': 'region'}
1260 _toPy
= {'source': 'source', 'arch': 'arch', 'image_id': 'image_id', 'root_storage_size': 'root_storage_size', 'priority': 'priority', 'virt_type': 'virt_type', 'version': 'version', 'series': 'series', 'stream': 'stream', 'root_storage_type': 'root_storage_type', 'region': 'region'}
1261 def __init__(self
, root_storage_type
, source
, arch
, image_id
, priority
, virt_type
, version
, series
, stream
, region
, root_storage_size
):
1263 root_storage_type : str
1273 root_storage_size : int
1275 self
.root_storage_type
= root_storage_type
1276 self
.source
= source
1278 self
.image_id
= image_id
1279 self
.priority
= priority
1280 self
.virt_type
= virt_type
1281 self
.version
= version
1282 self
.series
= series
1283 self
.stream
= stream
1284 self
.region
= region
1285 self
.root_storage_size
= root_storage_size
1288 class CloudImageMetadataList(Type
):
1289 _toSchema
= {'metadata': 'metadata'}
1290 _toPy
= {'metadata': 'metadata'}
1291 def __init__(self
, metadata
):
1293 metadata : typing.Sequence[~CloudImageMetadata]
1295 self
.metadata
= metadata
1298 class EntityStatusArgs(Type
):
1299 _toSchema
= {'info': 'Info', 'status': 'Status', 'data': 'Data', 'tag': 'Tag'}
1300 _toPy
= {'Tag': 'tag', 'Info': 'info', 'Data': 'data', 'Status': 'status'}
1301 def __init__(self
, tag
, info
, data
, status
):
1305 data : typing.Mapping[str, typing.Any]
1311 self
.status
= status
1314 class MachineAddresses(Type
):
1315 _toSchema
= {'addresses': 'Addresses', 'tag': 'Tag'}
1316 _toPy
= {'Tag': 'tag', 'Addresses': 'addresses'}
1317 def __init__(self
, tag
, addresses
):
1320 addresses : typing.Sequence[~Address]
1323 self
.addresses
= addresses
1326 class MachineAddressesResult(Type
):
1327 _toSchema
= {'addresses': 'Addresses', 'error': 'Error'}
1328 _toPy
= {'Addresses': 'addresses', 'Error': 'error'}
1329 def __init__(self
, addresses
, error
):
1331 addresses : typing.Sequence[~Address]
1334 self
.addresses
= addresses
1338 class StatusResult(Type
):
1339 _toSchema
= {'info': 'Info', 'id_': 'Id', 'status': 'Status', 'since': 'Since', 'life': 'Life', 'data': 'Data', 'error': 'Error'}
1340 _toPy
= {'Id': 'id_', 'Data': 'data', 'Life': 'life', 'Error': 'error', 'Info': 'info', 'Status': 'status', 'Since': 'since'}
1341 def __init__(self
, info
, data
, life
, error
, id_
, status
, since
):
1344 data : typing.Mapping[str, typing.Any]
1356 self
.status
= status
1360 class Entities(Type
):
1361 _toSchema
= {'entities': 'Entities'}
1362 _toPy
= {'Entities': 'entities'}
1363 def __init__(self
, entities
):
1365 entities : typing.Sequence[~Entity]
1367 self
.entities
= entities
1370 class ClaimLeadershipParams(Type
):
1371 _toSchema
= {'durationseconds': 'DurationSeconds', 'unittag': 'UnitTag', 'servicetag': 'ServiceTag'}
1372 _toPy
= {'DurationSeconds': 'durationseconds', 'ServiceTag': 'servicetag', 'UnitTag': 'unittag'}
1373 def __init__(self
, durationseconds
, servicetag
, unittag
):
1375 durationseconds : float
1379 self
.durationseconds
= durationseconds
1380 self
.servicetag
= servicetag
1381 self
.unittag
= unittag
1384 class ActionExecutionResult(Type
):
1385 _toSchema
= {'actiontag': 'actiontag', 'results': 'results', 'status': 'status', 'message': 'message'}
1386 _toPy
= {'actiontag': 'actiontag', 'results': 'results', 'status': 'status', 'message': 'message'}
1387 def __init__(self
, status
, results
, actiontag
, message
):
1390 results : typing.Mapping[str, typing.Any]
1394 self
.status
= status
1395 self
.results
= results
1396 self
.actiontag
= actiontag
1397 self
.message
= message
1400 class JobsResult(Type
):
1401 _toSchema
= {'error': 'Error', 'jobs': 'Jobs'}
1402 _toPy
= {'Error': 'error', 'Jobs': 'jobs'}
1403 def __init__(self
, error
, jobs
):
1406 jobs : typing.Sequence[str]
1412 class NetworkConfig(Type
):
1413 _toSchema
= {'disabled': 'Disabled', 'mtu': 'MTU', 'configtype': 'ConfigType', 'provideraddressid': 'ProviderAddressId', 'interfacename': 'InterfaceName', 'parentinterfacename': 'ParentInterfaceName', 'deviceindex': 'DeviceIndex', 'noautostart': 'NoAutoStart', 'providerid': 'ProviderId', 'address': 'Address', 'providersubnetid': 'ProviderSubnetId', 'providervlanid': 'ProviderVLANId', 'macaddress': 'MACAddress', 'providerspaceid': 'ProviderSpaceId', 'vlantag': 'VLANTag', 'interfacetype': 'InterfaceType', 'cidr': 'CIDR', 'dnsservers': 'DNSServers', 'gatewayaddress': 'GatewayAddress', 'dnssearchdomains': 'DNSSearchDomains'}
1414 _toPy
= {'DeviceIndex': 'deviceindex', 'MACAddress': 'macaddress', 'ProviderAddressId': 'provideraddressid', 'MTU': 'mtu', 'DNSSearchDomains': 'dnssearchdomains', 'CIDR': 'cidr', 'ProviderVLANId': 'providervlanid', 'DNSServers': 'dnsservers', 'NoAutoStart': 'noautostart', 'InterfaceType': 'interfacetype', 'Address': 'address', 'ConfigType': 'configtype', 'GatewayAddress': 'gatewayaddress', 'ProviderSpaceId': 'providerspaceid', 'ProviderSubnetId': 'providersubnetid', 'Disabled': 'disabled', 'ProviderId': 'providerid', 'InterfaceName': 'interfacename', 'ParentInterfaceName': 'parentinterfacename', 'VLANTag': 'vlantag'}
1415 def __init__(self
, deviceindex
, provideraddressid
, mtu
, vlantag
, dnssearchdomains
, cidr
, providervlanid
, dnsservers
, noautostart
, interfacetype
, address
, parentinterfacename
, configtype
, gatewayaddress
, providerspaceid
, providersubnetid
, disabled
, interfacename
, macaddress
, providerid
):
1418 provideraddressid : str
1421 dnssearchdomains : typing.Sequence[str]
1423 providervlanid : str
1424 dnsservers : typing.Sequence[str]
1428 parentinterfacename : str
1430 gatewayaddress : str
1431 providerspaceid : str
1432 providersubnetid : str
1438 self
.deviceindex
= deviceindex
1439 self
.provideraddressid
= provideraddressid
1441 self
.vlantag
= vlantag
1442 self
.dnssearchdomains
= dnssearchdomains
1444 self
.providervlanid
= providervlanid
1445 self
.dnsservers
= dnsservers
1446 self
.noautostart
= noautostart
1447 self
.interfacetype
= interfacetype
1448 self
.address
= address
1449 self
.parentinterfacename
= parentinterfacename
1450 self
.configtype
= configtype
1451 self
.gatewayaddress
= gatewayaddress
1452 self
.providerspaceid
= providerspaceid
1453 self
.providersubnetid
= providersubnetid
1454 self
.disabled
= disabled
1455 self
.interfacename
= interfacename
1456 self
.macaddress
= macaddress
1457 self
.providerid
= providerid
1460 class MeterStatusResult(Type
):
1461 _toSchema
= {'info': 'Info', 'code': 'Code', 'error': 'Error'}
1462 _toPy
= {'Info': 'info', 'Error': 'error', 'Code': 'code'}
1463 def __init__(self
, info
, error
, code
):
1475 _toSchema
= {'key': 'Key', 'value': 'Value', 'time': 'Time'}
1476 _toPy
= {'Value': 'value', 'Key': 'key', 'Time': 'time'}
1477 def __init__(self
, value
, key
, time
):
1488 class MetricBatch(Type
):
1489 _toSchema
= {'metrics': 'Metrics', 'uuid': 'UUID', 'charmurl': 'CharmURL', 'created': 'Created'}
1490 _toPy
= {'Created': 'created', 'CharmURL': 'charmurl', 'Metrics': 'metrics', 'UUID': 'uuid'}
1491 def __init__(self
, created
, charmurl
, metrics
, uuid
):
1495 metrics : typing.Sequence[~Metric]
1498 self
.created
= created
1499 self
.charmurl
= charmurl
1500 self
.metrics
= metrics
1504 class MetricBatchParam(Type
):
1505 _toSchema
= {'batch': 'Batch', 'tag': 'Tag'}
1506 _toPy
= {'Tag': 'tag', 'Batch': 'batch'}
1507 def __init__(self
, tag
, batch
):
1510 batch : ~MetricBatch
1516 class EntityMetrics(Type
):
1517 _toSchema
= {'metrics': 'metrics', 'error': 'error'}
1518 _toPy
= {'metrics': 'metrics', 'error': 'error'}
1519 def __init__(self
, metrics
, error
):
1521 metrics : typing.Sequence[~MetricResult]
1524 self
.metrics
= metrics
1528 class MeterStatusParam(Type
):
1529 _toSchema
= {'info': 'info', 'code': 'code', 'tag': 'tag'}
1530 _toPy
= {'info': 'info', 'code': 'code', 'tag': 'tag'}
1531 def __init__(self
, info
, code
, tag
):
1542 class MetricResult(Type
):
1543 _toSchema
= {'key': 'key', 'value': 'value', 'time': 'time'}
1544 _toPy
= {'key': 'key', 'value': 'value', 'time': 'time'}
1545 def __init__(self
, key
, value
, time
):
1556 class PhaseResult(Type
):
1557 _toSchema
= {'phase': 'phase', 'error': 'Error'}
1558 _toPy
= {'Error': 'error', 'phase': 'phase'}
1559 def __init__(self
, error
, phase
):
1568 class ModelInfo(Type
):
1569 _toSchema
= {'uuid': 'UUID', 'name': 'Name', 'ownertag': 'OwnerTag', 'serveruuid': 'ServerUUID', 'providertype': 'ProviderType', 'defaultseries': 'DefaultSeries', 'users': 'Users', 'life': 'Life', 'status': 'Status'}
1570 _toPy
= {'DefaultSeries': 'defaultseries', 'ProviderType': 'providertype', 'Status': 'status', 'UUID': 'uuid', 'Name': 'name', 'ServerUUID': 'serveruuid', 'Life': 'life', 'OwnerTag': 'ownertag', 'Users': 'users'}
1571 def __init__(self
, defaultseries
, providertype
, serveruuid
, users
, uuid
, name
, life
, ownertag
, status
):
1576 users : typing.Sequence[~ModelUserInfo]
1581 status : ~EntityStatus
1583 self
.defaultseries
= defaultseries
1584 self
.providertype
= providertype
1585 self
.serveruuid
= serveruuid
1590 self
.ownertag
= ownertag
1591 self
.status
= status
1594 class ModelInfoResult(Type
):
1595 _toSchema
= {'error': 'error', 'result': 'result'}
1596 _toPy
= {'error': 'error', 'result': 'result'}
1597 def __init__(self
, error
, result
):
1603 self
.result
= result
1606 class ModifyModelAccess(Type
):
1607 _toSchema
= {'action': 'action', 'user_tag': 'user-tag', 'access': 'access', 'model_tag': 'model-tag'}
1608 _toPy
= {'action': 'action', 'model-tag': 'model_tag', 'user-tag': 'user_tag', 'access': 'access'}
1609 def __init__(self
, action
, user_tag
, access
, model_tag
):
1616 self
.action
= action
1617 self
.user_tag
= user_tag
1618 self
.access
= access
1619 self
.model_tag
= model_tag
1622 class ConstraintsResult(Type
):
1623 _toSchema
= {'constraints': 'Constraints', 'error': 'Error'}
1624 _toPy
= {'Error': 'error', 'Constraints': 'constraints'}
1625 def __init__(self
, error
, constraints
):
1628 constraints : ~Value
1631 self
.constraints
= constraints
1634 class DistributionGroupResult(Type
):
1635 _toSchema
= {'error': 'Error', 'result': 'Result'}
1636 _toPy
= {'Error': 'error', 'Result': 'result'}
1637 def __init__(self
, error
, result
):
1640 result : typing.Sequence[str]
1643 self
.result
= result
1646 class InstanceInfo(Type
):
1647 _toSchema
= {'nonce': 'Nonce', 'tag': 'Tag', 'instanceid': 'InstanceId', 'characteristics': 'Characteristics', 'volumes': 'Volumes', 'networkconfig': 'NetworkConfig', 'volumeattachments': 'VolumeAttachments'}
1648 _toPy
= {'Characteristics': 'characteristics', 'InstanceId': 'instanceid', 'Tag': 'tag', 'Volumes': 'volumes', 'NetworkConfig': 'networkconfig', 'Nonce': 'nonce', 'VolumeAttachments': 'volumeattachments'}
1649 def __init__(self
, volumes
, characteristics
, nonce
, tag
, instanceid
, networkconfig
, volumeattachments
):
1651 volumes : typing.Sequence[~Volume]
1652 characteristics : ~HardwareCharacteristics
1656 networkconfig : typing.Sequence[~NetworkConfig]
1657 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
1659 self
.volumes
= volumes
1660 self
.characteristics
= characteristics
1663 self
.instanceid
= instanceid
1664 self
.networkconfig
= networkconfig
1665 self
.volumeattachments
= volumeattachments
1668 class MachineContainers(Type
):
1669 _toSchema
= {'containertypes': 'ContainerTypes', 'machinetag': 'MachineTag'}
1670 _toPy
= {'ContainerTypes': 'containertypes', 'MachineTag': 'machinetag'}
1671 def __init__(self
, containertypes
, machinetag
):
1673 containertypes : typing.Sequence[str]
1676 self
.containertypes
= containertypes
1677 self
.machinetag
= machinetag
1680 class MachineNetworkConfigResult(Type
):
1681 _toSchema
= {'info': 'Info', 'error': 'Error'}
1682 _toPy
= {'Error': 'error', 'Info': 'info'}
1683 def __init__(self
, error
, info
):
1686 info : typing.Sequence[~NetworkConfig]
1692 class ProvisioningInfo(Type
):
1693 _toSchema
= {'endpointbindings': 'EndpointBindings', 'constraints': 'Constraints', 'imagemetadata': 'ImageMetadata', 'jobs': 'Jobs', 'subnetstozones': 'SubnetsToZones', 'series': 'Series', 'volumes': 'Volumes', 'placement': 'Placement', 'tags': 'Tags'}
1694 _toPy
= {'Series': 'series', 'Constraints': 'constraints', 'ImageMetadata': 'imagemetadata', 'Volumes': 'volumes', 'Tags': 'tags', 'Jobs': 'jobs', 'SubnetsToZones': 'subnetstozones', 'EndpointBindings': 'endpointbindings', 'Placement': 'placement'}
1695 def __init__(self
, series
, constraints
, subnetstozones
, tags
, volumes
, endpointbindings
, placement
, jobs
, imagemetadata
):
1698 constraints : ~Value
1699 subnetstozones : typing.Sequence[str]
1700 tags : typing.Mapping[str, str]
1701 volumes : typing.Sequence[~VolumeParams]
1702 endpointbindings : typing.Mapping[str, str]
1704 jobs : typing.Sequence[str]
1705 imagemetadata : typing.Sequence[~CloudImageMetadata]
1707 self
.series
= series
1708 self
.constraints
= constraints
1709 self
.subnetstozones
= subnetstozones
1711 self
.volumes
= volumes
1712 self
.endpointbindings
= endpointbindings
1713 self
.placement
= placement
1715 self
.imagemetadata
= imagemetadata
1718 class ProvisioningInfoResult(Type
):
1719 _toSchema
= {'error': 'Error', 'result': 'Result'}
1720 _toPy
= {'Error': 'error', 'Result': 'result'}
1721 def __init__(self
, error
, result
):
1724 result : ~ProvisioningInfo
1727 self
.result
= result
1730 class Settings(Type
):
1731 _toSchema
= {'http': 'Http', 'noproxy': 'NoProxy', 'ftp': 'Ftp', 'https': 'Https'}
1732 _toPy
= {'Https': 'https', 'Http': 'http', 'NoProxy': 'noproxy', 'Ftp': 'ftp'}
1733 def __init__(self
, https
, ftp
, noproxy
, http
):
1742 self
.noproxy
= noproxy
1746 class ToolsResult(Type
):
1747 _toSchema
= {'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'toolslist': 'ToolsList', 'error': 'Error'}
1748 _toPy
= {'DisableSSLHostnameVerification': 'disablesslhostnameverification', 'Error': 'error', 'ToolsList': 'toolslist'}
1749 def __init__(self
, disablesslhostnameverification
, error
, toolslist
):
1751 disablesslhostnameverification : bool
1753 toolslist : typing.Sequence[~Tools]
1755 self
.disablesslhostnameverification
= disablesslhostnameverification
1757 self
.toolslist
= toolslist
1760 class UpdateBehavior(Type
):
1761 _toSchema
= {'enableosupgrade': 'EnableOSUpgrade', 'enableosrefreshupdate': 'EnableOSRefreshUpdate'}
1762 _toPy
= {'EnableOSUpgrade': 'enableosupgrade', 'EnableOSRefreshUpdate': 'enableosrefreshupdate'}
1763 def __init__(self
, enableosupgrade
, enableosrefreshupdate
):
1765 enableosupgrade : bool
1766 enableosrefreshupdate : bool
1768 self
.enableosupgrade
= enableosupgrade
1769 self
.enableosrefreshupdate
= enableosrefreshupdate
1773 _toSchema
= {'info': 'info', 'volumetag': 'volumetag'}
1774 _toPy
= {'info': 'info', 'volumetag': 'volumetag'}
1775 def __init__(self
, info
, volumetag
):
1781 self
.volumetag
= volumetag
1784 class VolumeAttachmentInfo(Type
):
1785 _toSchema
= {'busaddress': 'busaddress', 'devicelink': 'devicelink', 'read_only': 'read-only', 'devicename': 'devicename'}
1786 _toPy
= {'busaddress': 'busaddress', 'devicelink': 'devicelink', 'read-only': 'read_only', 'devicename': 'devicename'}
1787 def __init__(self
, busaddress
, devicelink
, read_only
, devicename
):
1794 self
.busaddress
= busaddress
1795 self
.devicelink
= devicelink
1796 self
.read_only
= read_only
1797 self
.devicename
= devicename
1800 class VolumeAttachmentParams(Type
):
1801 _toSchema
= {'provider': 'provider', 'instanceid': 'instanceid', 'read_only': 'read-only', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'volumeid': 'volumeid'}
1802 _toPy
= {'provider': 'provider', 'instanceid': 'instanceid', 'read-only': 'read_only', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'volumeid': 'volumeid'}
1803 def __init__(self
, volumetag
, provider
, instanceid
, read_only
, volumeid
, machinetag
):
1812 self
.volumetag
= volumetag
1813 self
.provider
= provider
1814 self
.instanceid
= instanceid
1815 self
.read_only
= read_only
1816 self
.volumeid
= volumeid
1817 self
.machinetag
= machinetag
1820 class VolumeInfo(Type
):
1821 _toSchema
= {'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size', 'volumeid': 'volumeid'}
1822 _toPy
= {'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size', 'volumeid': 'volumeid'}
1823 def __init__(self
, hardwareid
, persistent
, size
, volumeid
):
1830 self
.hardwareid
= hardwareid
1831 self
.persistent
= persistent
1833 self
.volumeid
= volumeid
1836 class VolumeParams(Type
):
1837 _toSchema
= {'provider': 'provider', 'size': 'size', 'volumetag': 'volumetag', 'attachment': 'attachment', 'attributes': 'attributes', 'tags': 'tags'}
1838 _toPy
= {'provider': 'provider', 'size': 'size', 'volumetag': 'volumetag', 'attachment': 'attachment', 'attributes': 'attributes', 'tags': 'tags'}
1839 def __init__(self
, provider
, size
, volumetag
, attachment
, attributes
, tags
):
1844 attachment : ~VolumeAttachmentParams
1845 attributes : typing.Mapping[str, typing.Any]
1846 tags : typing.Mapping[str, str]
1848 self
.provider
= provider
1850 self
.volumetag
= volumetag
1851 self
.attachment
= attachment
1852 self
.attributes
= attributes
1856 class WatchContainer(Type
):
1857 _toSchema
= {'containertype': 'ContainerType', 'machinetag': 'MachineTag'}
1858 _toPy
= {'ContainerType': 'containertype', 'MachineTag': 'machinetag'}
1859 def __init__(self
, machinetag
, containertype
):
1864 self
.machinetag
= machinetag
1865 self
.containertype
= containertype
1868 class ProxyConfig(Type
):
1869 _toSchema
= {'http': 'HTTP', 'noproxy': 'NoProxy', 'ftp': 'FTP', 'https': 'HTTPS'}
1870 _toPy
= {'HTTP': 'http', 'FTP': 'ftp', 'NoProxy': 'noproxy', 'HTTPS': 'https'}
1871 def __init__(self
, http
, ftp
, noproxy
, https
):
1880 self
.noproxy
= noproxy
1884 class ProxyConfigResult(Type
):
1885 _toSchema
= {'proxysettings': 'ProxySettings', 'aptproxysettings': 'APTProxySettings', 'error': 'Error'}
1886 _toPy
= {'APTProxySettings': 'aptproxysettings', 'Error': 'error', 'ProxySettings': 'proxysettings'}
1887 def __init__(self
, aptproxysettings
, error
, proxysettings
):
1889 aptproxysettings : ~ProxyConfig
1891 proxysettings : ~ProxyConfig
1893 self
.aptproxysettings
= aptproxysettings
1895 self
.proxysettings
= proxysettings
1898 class RebootActionResult(Type
):
1899 _toSchema
= {'error': 'error', 'result': 'result'}
1900 _toPy
= {'error': 'error', 'result': 'result'}
1901 def __init__(self
, error
, result
):
1907 self
.result
= result
1910 class RelationUnitsChange(Type
):
1911 _toSchema
= {'departed': 'Departed', 'changed': 'Changed'}
1912 _toPy
= {'Departed': 'departed', 'Changed': 'changed'}
1913 def __init__(self
, departed
, changed
):
1915 departed : typing.Sequence[str]
1916 changed : typing.Mapping[str, ~UnitSettings]
1918 self
.departed
= departed
1919 self
.changed
= changed
1922 class UnitSettings(Type
):
1923 _toSchema
= {'version': 'Version'}
1924 _toPy
= {'Version': 'version'}
1925 def __init__(self
, version
):
1929 self
.version
= version
1932 class RetryStrategy(Type
):
1933 _toSchema
= {'shouldretry': 'ShouldRetry', 'minretrytime': 'MinRetryTime', 'jitterretrytime': 'JitterRetryTime', 'retrytimefactor': 'RetryTimeFactor', 'maxretrytime': 'MaxRetryTime'}
1934 _toPy
= {'JitterRetryTime': 'jitterretrytime', 'MinRetryTime': 'minretrytime', 'ShouldRetry': 'shouldretry', 'RetryTimeFactor': 'retrytimefactor', 'MaxRetryTime': 'maxretrytime'}
1935 def __init__(self
, jitterretrytime
, minretrytime
, shouldretry
, retrytimefactor
, maxretrytime
):
1937 jitterretrytime : bool
1940 retrytimefactor : int
1943 self
.jitterretrytime
= jitterretrytime
1944 self
.minretrytime
= minretrytime
1945 self
.shouldretry
= shouldretry
1946 self
.retrytimefactor
= retrytimefactor
1947 self
.maxretrytime
= maxretrytime
1950 class RetryStrategyResult(Type
):
1951 _toSchema
= {'error': 'Error', 'result': 'Result'}
1952 _toPy
= {'Error': 'error', 'Result': 'result'}
1953 def __init__(self
, error
, result
):
1956 result : ~RetryStrategy
1959 self
.result
= result
1962 class SSHAddressResult(Type
):
1963 _toSchema
= {'error': 'error', 'address': 'address'}
1964 _toPy
= {'error': 'error', 'address': 'address'}
1965 def __init__(self
, error
, address
):
1971 self
.address
= address
1974 class SSHPublicKeysResult(Type
):
1975 _toSchema
= {'error': 'error', 'public_keys': 'public-keys'}
1976 _toPy
= {'error': 'error', 'public-keys': 'public_keys'}
1977 def __init__(self
, error
, public_keys
):
1980 public_keys : typing.Sequence[str]
1983 self
.public_keys
= public_keys
1986 class Relation(Type
):
1987 _toSchema
= {'name': 'Name', 'optional': 'Optional', 'role': 'Role', 'interface': 'Interface', 'scope': 'Scope', 'limit': 'Limit'}
1988 _toPy
= {'Interface': 'interface', 'Limit': 'limit', 'Role': 'role', 'Name': 'name', 'Optional': 'optional', 'Scope': 'scope'}
1989 def __init__(self
, interface
, limit
, role
, name
, scope
, optional
):
1998 self
.interface
= interface
2003 self
.optional
= optional
2006 class ServiceDeploy(Type
):
2007 _toSchema
= {'endpointbindings': 'EndpointBindings', 'placement': 'Placement', 'series': 'Series', 'resources': 'Resources', 'config': 'Config', 'constraints': 'Constraints', 'channel': 'Channel', 'configyaml': 'ConfigYAML', 'charmurl': 'CharmUrl', 'storage': 'Storage', 'servicename': 'ServiceName', 'numunits': 'NumUnits'}
2008 _toPy
= {'CharmUrl': 'charmurl', 'Resources': 'resources', 'Channel': 'channel', 'Constraints': 'constraints', 'Placement': 'placement', 'EndpointBindings': 'endpointbindings', 'ConfigYAML': 'configyaml', 'ServiceName': 'servicename', 'Series': 'series', 'Config': 'config', 'NumUnits': 'numunits', 'Storage': 'storage'}
2009 def __init__(self
, charmurl
, resources
, channel
, constraints
, placement
, endpointbindings
, configyaml
, servicename
, series
, config
, numunits
, storage
):
2012 resources : typing.Mapping[str, str]
2014 constraints : ~Value
2015 placement : typing.Sequence[~Placement]
2016 endpointbindings : typing.Mapping[str, str]
2020 config : typing.Mapping[str, str]
2022 storage : typing.Mapping[str, ~Constraints]
2024 self
.charmurl
= charmurl
2025 self
.resources
= resources
2026 self
.channel
= channel
2027 self
.constraints
= constraints
2028 self
.placement
= placement
2029 self
.endpointbindings
= endpointbindings
2030 self
.configyaml
= configyaml
2031 self
.servicename
= servicename
2032 self
.series
= series
2033 self
.config
= config
2034 self
.numunits
= numunits
2035 self
.storage
= storage
2038 class ServiceMetricCredential(Type
):
2039 _toSchema
= {'servicename': 'ServiceName', 'metriccredentials': 'MetricCredentials'}
2040 _toPy
= {'MetricCredentials': 'metriccredentials', 'ServiceName': 'servicename'}
2041 def __init__(self
, metriccredentials
, servicename
):
2043 metriccredentials : typing.Sequence[int]
2046 self
.metriccredentials
= metriccredentials
2047 self
.servicename
= servicename
2050 class SingularClaim(Type
):
2051 _toSchema
= {'duration': 'Duration', 'modeltag': 'ModelTag', 'controllertag': 'ControllerTag'}
2052 _toPy
= {'ModelTag': 'modeltag', 'ControllerTag': 'controllertag', 'Duration': 'duration'}
2053 def __init__(self
, modeltag
, controllertag
, duration
):
2059 self
.modeltag
= modeltag
2060 self
.controllertag
= controllertag
2061 self
.duration
= duration
2065 _toSchema
= {'name': 'Name', 'error': 'Error', 'subnets': 'Subnets'}
2066 _toPy
= {'Name': 'name', 'Error': 'error', 'Subnets': 'subnets'}
2067 def __init__(self
, name
, error
, subnets
):
2071 subnets : typing.Sequence[~Subnet]
2075 self
.subnets
= subnets
2078 class FilesystemAttachmentInfo(Type
):
2079 _toSchema
= {'read_only': 'read-only', 'mountpoint': 'mountpoint'}
2080 _toPy
= {'read-only': 'read_only', 'mountpoint': 'mountpoint'}
2081 def __init__(self
, read_only
, mountpoint
):
2086 self
.read_only
= read_only
2087 self
.mountpoint
= mountpoint
2090 class FilesystemDetails(Type
):
2091 _toSchema
= {'info': 'info', 'status': 'status', 'machineattachments': 'machineattachments', 'storage': 'storage', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
2092 _toPy
= {'info': 'info', 'status': 'status', 'machineattachments': 'machineattachments', 'storage': 'storage', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
2093 def __init__(self
, info
, status
, filesystemtag
, storage
, volumetag
, machineattachments
):
2095 info : ~FilesystemInfo
2096 status : ~EntityStatus
2098 storage : ~StorageDetails
2100 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
2103 self
.status
= status
2104 self
.filesystemtag
= filesystemtag
2105 self
.storage
= storage
2106 self
.volumetag
= volumetag
2107 self
.machineattachments
= machineattachments
2110 class FilesystemDetailsListResult(Type
):
2111 _toSchema
= {'error': 'error', 'result': 'result'}
2112 _toPy
= {'error': 'error', 'result': 'result'}
2113 def __init__(self
, error
, result
):
2116 result : typing.Sequence[~FilesystemDetails]
2119 self
.result
= result
2122 class FilesystemFilter(Type
):
2123 _toSchema
= {'machines': 'machines'}
2124 _toPy
= {'machines': 'machines'}
2125 def __init__(self
, machines
):
2127 machines : typing.Sequence[str]
2129 self
.machines
= machines
2132 class FilesystemInfo(Type
):
2133 _toSchema
= {'filesystemid': 'filesystemid', 'size': 'size'}
2134 _toPy
= {'filesystemid': 'filesystemid', 'size': 'size'}
2135 def __init__(self
, filesystemid
, size
):
2140 self
.filesystemid
= filesystemid
2144 class StorageAddParams(Type
):
2145 _toSchema
= {'storage': 'storage', 'unit': 'unit', 'storagename': 'StorageName'}
2146 _toPy
= {'StorageName': 'storagename', 'unit': 'unit', 'storage': 'storage'}
2147 def __init__(self
, storagename
, unit
, storage
):
2151 storage : ~StorageConstraints
2153 self
.storagename
= storagename
2155 self
.storage
= storage
2158 class StorageAttachmentDetails(Type
):
2159 _toSchema
= {'unittag': 'unittag', 'location': 'location', 'storagetag': 'storagetag', 'machinetag': 'machinetag'}
2160 _toPy
= {'unittag': 'unittag', 'location': 'location', 'storagetag': 'storagetag', 'machinetag': 'machinetag'}
2161 def __init__(self
, unittag
, location
, storagetag
, machinetag
):
2168 self
.unittag
= unittag
2169 self
.location
= location
2170 self
.storagetag
= storagetag
2171 self
.machinetag
= machinetag
2174 class StorageConstraints(Type
):
2175 _toSchema
= {'size': 'Size', 'pool': 'Pool', 'count': 'Count'}
2176 _toPy
= {'Count': 'count', 'Pool': 'pool', 'Size': 'size'}
2177 def __init__(self
, count
, pool
, size
):
2188 class StorageDetails(Type
):
2189 _toSchema
= {'persistent': 'Persistent', 'status': 'status', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag', 'attachments': 'attachments'}
2190 _toPy
= {'status': 'status', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag', 'Persistent': 'persistent', 'attachments': 'attachments'}
2191 def __init__(self
, ownertag
, kind
, status
, storagetag
, attachments
, persistent
):
2195 status : ~EntityStatus
2197 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
2200 self
.ownertag
= ownertag
2202 self
.status
= status
2203 self
.storagetag
= storagetag
2204 self
.attachments
= attachments
2205 self
.persistent
= persistent
2208 class StorageDetailsListResult(Type
):
2209 _toSchema
= {'error': 'error', 'result': 'result'}
2210 _toPy
= {'error': 'error', 'result': 'result'}
2211 def __init__(self
, error
, result
):
2214 result : typing.Sequence[~StorageDetails]
2217 self
.result
= result
2220 class StorageDetailsResult(Type
):
2221 _toSchema
= {'error': 'error', 'result': 'result'}
2222 _toPy
= {'error': 'error', 'result': 'result'}
2223 def __init__(self
, error
, result
):
2226 result : ~StorageDetails
2229 self
.result
= result
2232 class StorageFilter(Type
):
2242 class StoragePool(Type
):
2243 _toSchema
= {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
2244 _toPy
= {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
2245 def __init__(self
, name
, provider
, attrs
):
2249 attrs : typing.Mapping[str, typing.Any]
2252 self
.provider
= provider
2256 class StoragePoolFilter(Type
):
2257 _toSchema
= {'names': 'names', 'providers': 'providers'}
2258 _toPy
= {'names': 'names', 'providers': 'providers'}
2259 def __init__(self
, names
, providers
):
2261 names : typing.Sequence[str]
2262 providers : typing.Sequence[str]
2265 self
.providers
= providers
2268 class StoragePoolsResult(Type
):
2269 _toSchema
= {'storagepools': 'storagepools', 'error': 'error'}
2270 _toPy
= {'storagepools': 'storagepools', 'error': 'error'}
2271 def __init__(self
, storagepools
, error
):
2273 storagepools : typing.Sequence[~StoragePool]
2276 self
.storagepools
= storagepools
2280 class VolumeDetails(Type
):
2281 _toSchema
= {'info': 'info', 'volumetag': 'volumetag', 'status': 'status', 'machineattachments': 'machineattachments', 'storage': 'storage'}
2282 _toPy
= {'info': 'info', 'volumetag': 'volumetag', 'status': 'status', 'machineattachments': 'machineattachments', 'storage': 'storage'}
2283 def __init__(self
, info
, volumetag
, status
, storage
, machineattachments
):
2287 status : ~EntityStatus
2288 storage : ~StorageDetails
2289 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
2292 self
.volumetag
= volumetag
2293 self
.status
= status
2294 self
.storage
= storage
2295 self
.machineattachments
= machineattachments
2298 class VolumeDetailsListResult(Type
):
2299 _toSchema
= {'error': 'error', 'result': 'result'}
2300 _toPy
= {'error': 'error', 'result': 'result'}
2301 def __init__(self
, error
, result
):
2304 result : typing.Sequence[~VolumeDetails]
2307 self
.result
= result
2310 class VolumeFilter(Type
):
2311 _toSchema
= {'machines': 'machines'}
2312 _toPy
= {'machines': 'machines'}
2313 def __init__(self
, machines
):
2315 machines : typing.Sequence[str]
2317 self
.machines
= machines
2320 class BlockDeviceResult(Type
):
2321 _toSchema
= {'error': 'error', 'result': 'result'}
2322 _toPy
= {'error': 'error', 'result': 'result'}
2323 def __init__(self
, error
, result
):
2326 result : ~BlockDevice
2329 self
.result
= result
2332 class Filesystem(Type
):
2333 _toSchema
= {'info': 'info', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
2334 _toPy
= {'info': 'info', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
2335 def __init__(self
, info
, volumetag
, filesystemtag
):
2337 info : ~FilesystemInfo
2342 self
.volumetag
= volumetag
2343 self
.filesystemtag
= filesystemtag
2346 class FilesystemAttachment(Type
):
2347 _toSchema
= {'info': 'info', 'filesystemtag': 'filesystemtag', 'machinetag': 'machinetag'}
2348 _toPy
= {'info': 'info', 'filesystemtag': 'filesystemtag', 'machinetag': 'machinetag'}
2349 def __init__(self
, info
, machinetag
, filesystemtag
):
2351 info : ~FilesystemAttachmentInfo
2356 self
.machinetag
= machinetag
2357 self
.filesystemtag
= filesystemtag
2360 class FilesystemAttachmentParams(Type
):
2361 _toSchema
= {'provider': 'provider', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'instanceid': 'instanceid', 'read_only': 'read-only', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'}
2362 _toPy
= {'provider': 'provider', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'instanceid': 'instanceid', 'read-only': 'read_only', 'mountpoint': 'mountpoint', 'filesystemtag': 'filesystemtag'}
2363 def __init__(self
, provider
, filesystemtag
, filesystemid
, instanceid
, read_only
, mountpoint
, machinetag
):
2373 self
.provider
= provider
2374 self
.filesystemtag
= filesystemtag
2375 self
.filesystemid
= filesystemid
2376 self
.instanceid
= instanceid
2377 self
.read_only
= read_only
2378 self
.mountpoint
= mountpoint
2379 self
.machinetag
= machinetag
2382 class FilesystemAttachmentParamsResult(Type
):
2383 _toSchema
= {'error': 'error', 'result': 'result'}
2384 _toPy
= {'error': 'error', 'result': 'result'}
2385 def __init__(self
, error
, result
):
2388 result : ~FilesystemAttachmentParams
2391 self
.result
= result
2394 class FilesystemAttachmentResult(Type
):
2395 _toSchema
= {'error': 'error', 'result': 'result'}
2396 _toPy
= {'error': 'error', 'result': 'result'}
2397 def __init__(self
, error
, result
):
2400 result : ~FilesystemAttachment
2403 self
.result
= result
2406 class FilesystemParams(Type
):
2407 _toSchema
= {'provider': 'provider', 'size': 'size', 'volumetag': 'volumetag', 'attachment': 'attachment', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'tags': 'tags'}
2408 _toPy
= {'provider': 'provider', 'size': 'size', 'volumetag': 'volumetag', 'attachment': 'attachment', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'tags': 'tags'}
2409 def __init__(self
, provider
, size
, volumetag
, attachment
, attributes
, filesystemtag
, tags
):
2414 attachment : ~FilesystemAttachmentParams
2415 attributes : typing.Mapping[str, typing.Any]
2417 tags : typing.Mapping[str, str]
2419 self
.provider
= provider
2421 self
.volumetag
= volumetag
2422 self
.attachment
= attachment
2423 self
.attributes
= attributes
2424 self
.filesystemtag
= filesystemtag
2428 class FilesystemParamsResult(Type
):
2429 _toSchema
= {'error': 'error', 'result': 'result'}
2430 _toPy
= {'error': 'error', 'result': 'result'}
2431 def __init__(self
, error
, result
):
2434 result : ~FilesystemParams
2437 self
.result
= result
2440 class FilesystemResult(Type
):
2441 _toSchema
= {'error': 'error', 'result': 'result'}
2442 _toPy
= {'error': 'error', 'result': 'result'}
2443 def __init__(self
, error
, result
):
2446 result : ~Filesystem
2449 self
.result
= result
2452 class MachineStorageIdsWatchResult(Type
):
2453 _toSchema
= {'changes': 'Changes', 'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'error': 'Error'}
2454 _toPy
= {'Error': 'error', 'Changes': 'changes', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid'}
2455 def __init__(self
, error
, changes
, machinestorageidswatcherid
):
2458 changes : typing.Sequence[~MachineStorageId]
2459 machinestorageidswatcherid : str
2462 self
.changes
= changes
2463 self
.machinestorageidswatcherid
= machinestorageidswatcherid
2466 class VolumeAttachment(Type
):
2467 _toSchema
= {'info': 'info', 'volumetag': 'volumetag', 'machinetag': 'machinetag'}
2468 _toPy
= {'info': 'info', 'volumetag': 'volumetag', 'machinetag': 'machinetag'}
2469 def __init__(self
, info
, volumetag
, machinetag
):
2471 info : ~VolumeAttachmentInfo
2476 self
.volumetag
= volumetag
2477 self
.machinetag
= machinetag
2480 class VolumeAttachmentParamsResult(Type
):
2481 _toSchema
= {'error': 'error', 'result': 'result'}
2482 _toPy
= {'error': 'error', 'result': 'result'}
2483 def __init__(self
, error
, result
):
2486 result : ~VolumeAttachmentParams
2489 self
.result
= result
2492 class VolumeAttachmentResult(Type
):
2493 _toSchema
= {'error': 'error', 'result': 'result'}
2494 _toPy
= {'error': 'error', 'result': 'result'}
2495 def __init__(self
, error
, result
):
2498 result : ~VolumeAttachment
2501 self
.result
= result
2504 class VolumeParamsResult(Type
):
2505 _toSchema
= {'error': 'error', 'result': 'result'}
2506 _toPy
= {'error': 'error', 'result': 'result'}
2507 def __init__(self
, error
, result
):
2510 result : ~VolumeParams
2513 self
.result
= result
2516 class VolumeResult(Type
):
2517 _toSchema
= {'error': 'error', 'result': 'result'}
2518 _toPy
= {'error': 'error', 'result': 'result'}
2519 def __init__(self
, error
, result
):
2525 self
.result
= result
2528 class SpaceResult(Type
):
2529 _toSchema
= {'error': 'Error', 'tag': 'Tag'}
2530 _toPy
= {'Tag': 'tag', 'Error': 'error'}
2531 def __init__(self
, tag
, error
):
2540 class ZoneResult(Type
):
2541 _toSchema
= {'available': 'Available', 'name': 'Name', 'error': 'Error'}
2542 _toPy
= {'Name': 'name', 'Error': 'error', 'Available': 'available'}
2543 def __init__(self
, name
, error
, available
):
2551 self
.available
= available
2554 class UndertakerModelInfo(Type
):
2555 _toSchema
= {'uuid': 'UUID', 'name': 'Name', 'issystem': 'IsSystem', 'life': 'Life', 'globalname': 'GlobalName'}
2556 _toPy
= {'Name': 'name', 'GlobalName': 'globalname', 'IsSystem': 'issystem', 'UUID': 'uuid', 'Life': 'life'}
2557 def __init__(self
, name
, life
, globalname
, uuid
, issystem
):
2567 self
.globalname
= globalname
2569 self
.issystem
= issystem
2572 class CharmURL(Type
):
2573 _toSchema
= {'url': 'URL'}
2574 _toPy
= {'URL': 'url'}
2575 def __init__(self
, url
):
2582 class ConfigSettingsResult(Type
):
2583 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
2584 _toPy
= {'Error': 'error', 'Settings': 'settings'}
2585 def __init__(self
, error
, settings
):
2588 settings : typing.Mapping[str, typing.Any]
2591 self
.settings
= settings
2594 class Endpoint(Type
):
2595 _toSchema
= {'servicename': 'ServiceName', 'relation': 'Relation'}
2596 _toPy
= {'Relation': 'relation', 'ServiceName': 'servicename'}
2597 def __init__(self
, relation
, servicename
):
2599 relation : ~Relation
2602 self
.relation
= relation
2603 self
.servicename
= servicename
2606 class EntityCharmURL(Type
):
2607 _toSchema
= {'charmurl': 'CharmURL', 'tag': 'Tag'}
2608 _toPy
= {'Tag': 'tag', 'CharmURL': 'charmurl'}
2609 def __init__(self
, tag
, charmurl
):
2615 self
.charmurl
= charmurl
2618 class EntityPortRange(Type
):
2619 _toSchema
= {'toport': 'ToPort', 'protocol': 'Protocol', 'fromport': 'FromPort', 'tag': 'Tag'}
2620 _toPy
= {'Tag': 'tag', 'FromPort': 'fromport', 'ToPort': 'toport', 'Protocol': 'protocol'}
2621 def __init__(self
, tag
, fromport
, toport
, protocol
):
2629 self
.fromport
= fromport
2630 self
.toport
= toport
2631 self
.protocol
= protocol
2634 class GetLeadershipSettingsResult(Type
):
2635 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
2636 _toPy
= {'Error': 'error', 'Settings': 'settings'}
2637 def __init__(self
, error
, settings
):
2640 settings : typing.Mapping[str, str]
2643 self
.settings
= settings
2646 class IntResult(Type
):
2647 _toSchema
= {'error': 'Error', 'result': 'Result'}
2648 _toPy
= {'Error': 'error', 'Result': 'result'}
2649 def __init__(self
, error
, result
):
2655 self
.result
= result
2658 class MergeLeadershipSettingsParam(Type
):
2659 _toSchema
= {'servicetag': 'ServiceTag', 'settings': 'Settings'}
2660 _toPy
= {'ServiceTag': 'servicetag', 'Settings': 'settings'}
2661 def __init__(self
, servicetag
, settings
):
2664 settings : typing.Mapping[str, str]
2666 self
.servicetag
= servicetag
2667 self
.settings
= settings
2670 class RelationResult(Type
):
2671 _toSchema
= {'key': 'Key', 'id_': 'Id', 'life': 'Life', 'error': 'Error', 'endpoint': 'Endpoint'}
2672 _toPy
= {'Life': 'life', 'Error': 'error', 'Endpoint': 'endpoint', 'Key': 'key', 'Id': 'id_'}
2673 def __init__(self
, life
, error
, endpoint
, key
, id_
):
2677 endpoint : ~Endpoint
2683 self
.endpoint
= endpoint
2688 class RelationUnit(Type
):
2689 _toSchema
= {'relation': 'Relation', 'unit': 'Unit'}
2690 _toPy
= {'Relation': 'relation', 'Unit': 'unit'}
2691 def __init__(self
, relation
, unit
):
2696 self
.relation
= relation
2700 class RelationUnitPair(Type
):
2701 _toSchema
= {'relation': 'Relation', 'remoteunit': 'RemoteUnit', 'localunit': 'LocalUnit'}
2702 _toPy
= {'LocalUnit': 'localunit', 'RemoteUnit': 'remoteunit', 'Relation': 'relation'}
2703 def __init__(self
, localunit
, remoteunit
, relation
):
2709 self
.localunit
= localunit
2710 self
.remoteunit
= remoteunit
2711 self
.relation
= relation
2714 class RelationUnitSettings(Type
):
2715 _toSchema
= {'settings': 'Settings', 'relation': 'Relation', 'unit': 'Unit'}
2716 _toPy
= {'Relation': 'relation', 'Unit': 'unit', 'Settings': 'settings'}
2717 def __init__(self
, relation
, unit
, settings
):
2721 settings : typing.Mapping[str, str]
2723 self
.relation
= relation
2725 self
.settings
= settings
2728 class RelationUnitsWatchResult(Type
):
2729 _toSchema
= {'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId', 'error': 'Error'}
2730 _toPy
= {'Error': 'error', 'RelationUnitsWatcherId': 'relationunitswatcherid', 'Changes': 'changes'}
2731 def __init__(self
, error
, relationunitswatcherid
, changes
):
2734 relationunitswatcherid : str
2735 changes : ~RelationUnitsChange
2738 self
.relationunitswatcherid
= relationunitswatcherid
2739 self
.changes
= changes
2742 class ResolvedModeResult(Type
):
2743 _toSchema
= {'mode': 'Mode', 'error': 'Error'}
2744 _toPy
= {'Error': 'error', 'Mode': 'mode'}
2745 def __init__(self
, error
, mode
):
2754 class ServiceStatusResult(Type
):
2755 _toSchema
= {'units': 'Units', 'service': 'Service', 'error': 'Error'}
2756 _toPy
= {'Units': 'units', 'Error': 'error', 'Service': 'service'}
2757 def __init__(self
, units
, error
, service
):
2759 units : typing.Mapping[str, ~StatusResult]
2761 service : ~StatusResult
2765 self
.service
= service
2768 class SettingsResult(Type
):
2769 _toSchema
= {'settings': 'Settings', 'error': 'Error'}
2770 _toPy
= {'Error': 'error', 'Settings': 'settings'}
2771 def __init__(self
, error
, settings
):
2774 settings : typing.Mapping[str, str]
2777 self
.settings
= settings
2780 class StorageAttachment(Type
):
2781 _toSchema
= {'unittag': 'UnitTag', 'ownertag': 'OwnerTag', 'kind': 'Kind', 'storagetag': 'StorageTag', 'location': 'Location', 'life': 'Life'}
2782 _toPy
= {'Kind': 'kind', 'StorageTag': 'storagetag', 'Location': 'location', 'Life': 'life', 'OwnerTag': 'ownertag', 'UnitTag': 'unittag'}
2783 def __init__(self
, kind
, storagetag
, location
, life
, ownertag
, unittag
):
2793 self
.storagetag
= storagetag
2794 self
.location
= location
2796 self
.ownertag
= ownertag
2797 self
.unittag
= unittag
2800 class StorageAttachmentId(Type
):
2801 _toSchema
= {'unittag': 'unittag', 'storagetag': 'storagetag'}
2802 _toPy
= {'unittag': 'unittag', 'storagetag': 'storagetag'}
2803 def __init__(self
, unittag
, storagetag
):
2808 self
.unittag
= unittag
2809 self
.storagetag
= storagetag
2812 class StorageAttachmentIds(Type
):
2813 _toSchema
= {'ids': 'ids'}
2814 _toPy
= {'ids': 'ids'}
2815 def __init__(self
, ids
):
2817 ids : typing.Sequence[~StorageAttachmentId]
2822 class StorageAttachmentIdsResult(Type
):
2823 _toSchema
= {'error': 'error', 'result': 'result'}
2824 _toPy
= {'error': 'error', 'result': 'result'}
2825 def __init__(self
, error
, result
):
2828 result : ~StorageAttachmentIds
2831 self
.result
= result
2834 class StorageAttachmentResult(Type
):
2835 _toSchema
= {'error': 'error', 'result': 'result'}
2836 _toPy
= {'error': 'error', 'result': 'result'}
2837 def __init__(self
, error
, result
):
2840 result : ~StorageAttachment
2843 self
.result
= result
2846 class StringBoolResult(Type
):
2847 _toSchema
= {'ok': 'Ok', 'error': 'Error', 'result': 'Result'}
2848 _toPy
= {'Error': 'error', 'Ok': 'ok', 'Result': 'result'}
2849 def __init__(self
, error
, ok
, result
):
2857 self
.result
= result
2860 class UnitNetworkConfig(Type
):
2861 _toSchema
= {'unittag': 'UnitTag', 'bindingname': 'BindingName'}
2862 _toPy
= {'BindingName': 'bindingname', 'UnitTag': 'unittag'}
2863 def __init__(self
, bindingname
, unittag
):
2868 self
.bindingname
= bindingname
2869 self
.unittag
= unittag
2872 class UnitNetworkConfigResult(Type
):
2873 _toSchema
= {'info': 'Info', 'error': 'Error'}
2874 _toPy
= {'Error': 'error', 'Info': 'info'}
2875 def __init__(self
, error
, info
):
2878 info : typing.Sequence[~NetworkConfig]
2884 class EntityVersion(Type
):
2885 _toSchema
= {'tools': 'Tools', 'tag': 'Tag'}
2886 _toPy
= {'Tag': 'tag', 'Tools': 'tools'}
2887 def __init__(self
, tag
, tools
):
2896 class VersionResult(Type
):
2897 _toSchema
= {'version': 'Version', 'error': 'Error'}
2898 _toPy
= {'Error': 'error', 'Version': 'version'}
2899 def __init__(self
, error
, version
):
2905 self
.version
= version
2908 class AddUser(Type
):
2909 _toSchema
= {'password': 'password', 'username': 'username', 'shared_model_tags': 'shared-model-tags', 'display_name': 'display-name', 'model_access_permission': 'model-access-permission'}
2910 _toPy
= {'password': 'password', 'username': 'username', 'model-access-permission': 'model_access_permission', 'display-name': 'display_name', 'shared-model-tags': 'shared_model_tags'}
2911 def __init__(self
, username
, password
, shared_model_tags
, model_access_permission
, display_name
):
2915 shared_model_tags : typing.Sequence[str]
2916 model_access_permission : str
2919 self
.username
= username
2920 self
.password
= password
2921 self
.shared_model_tags
= shared_model_tags
2922 self
.model_access_permission
= model_access_permission
2923 self
.display_name
= display_name
2926 class AddUserResult(Type
):
2927 _toSchema
= {'tag': 'tag', 'error': 'error', 'secret_key': 'secret-key'}
2928 _toPy
= {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'}
2929 def __init__(self
, error
, secret_key
, tag
):
2932 secret_key : typing.Sequence[int]
2936 self
.secret_key
= secret_key
2940 class MacaroonResult(Type
):
2941 _toSchema
= {'error': 'error', 'result': 'result'}
2942 _toPy
= {'error': 'error', 'result': 'result'}
2943 def __init__(self
, error
, result
):
2949 self
.result
= result
2952 class UserInfo(Type
):
2953 _toSchema
= {'disabled': 'disabled', 'date_created': 'date-created', 'created_by': 'created-by', 'last_connection': 'last-connection', 'username': 'username', 'display_name': 'display-name'}
2954 _toPy
= {'disabled': 'disabled', 'created-by': 'created_by', 'username': 'username', 'last-connection': 'last_connection', 'date-created': 'date_created', 'display-name': 'display_name'}
2955 def __init__(self
, disabled
, username
, created_by
, last_connection
, date_created
, display_name
):
2960 last_connection : str
2964 self
.disabled
= disabled
2965 self
.username
= username
2966 self
.created_by
= created_by
2967 self
.last_connection
= last_connection
2968 self
.date_created
= date_created
2969 self
.display_name
= display_name
2972 class UserInfoResult(Type
):
2973 _toSchema
= {'error': 'error', 'result': 'result'}
2974 _toPy
= {'error': 'error', 'result': 'result'}
2975 def __init__(self
, error
, result
):
2981 self
.result
= result
2987 schema
= {'definitions': {'Action': {'additionalProperties': False,
2988 'properties': {'name': {'type': 'string'},
2989 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
2992 'receiver': {'type': 'string'},
2993 'tag': {'type': 'string'}},
2994 'required': ['tag', 'receiver', 'name'],
2996 'ActionResult': {'additionalProperties': False,
2997 'properties': {'action': {'$ref': '#/definitions/Action'},
2998 'completed': {'format': 'date-time',
3000 'enqueued': {'format': 'date-time',
3002 'error': {'$ref': '#/definitions/Error'},
3003 'message': {'type': 'string'},
3004 'output': {'patternProperties': {'.*': {'additionalProperties': True,
3007 'started': {'format': 'date-time',
3009 'status': {'type': 'string'}},
3011 'ActionResults': {'additionalProperties': False,
3012 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
3015 'Actions': {'additionalProperties': False,
3016 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
3019 'ActionsByName': {'additionalProperties': False,
3020 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
3022 'error': {'$ref': '#/definitions/Error'},
3023 'name': {'type': 'string'}},
3025 'ActionsByNames': {'additionalProperties': False,
3026 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
3029 'ActionsByReceiver': {'additionalProperties': False,
3030 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
3032 'error': {'$ref': '#/definitions/Error'},
3033 'receiver': {'type': 'string'}},
3035 'ActionsByReceivers': {'additionalProperties': False,
3036 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
3039 'Entities': {'additionalProperties': False,
3040 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3042 'required': ['Entities'],
3044 'Entity': {'additionalProperties': False,
3045 'properties': {'Tag': {'type': 'string'}},
3046 'required': ['Tag'],
3048 'Error': {'additionalProperties': False,
3049 'properties': {'Code': {'type': 'string'},
3050 'Info': {'$ref': '#/definitions/ErrorInfo'},
3051 'Message': {'type': 'string'}},
3052 'required': ['Message', 'Code'],
3054 'ErrorInfo': {'additionalProperties': False,
3055 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3056 'MacaroonPath': {'type': 'string'}},
3058 'FindActionsByNames': {'additionalProperties': False,
3059 'properties': {'names': {'items': {'type': 'string'},
3062 'FindTags': {'additionalProperties': False,
3063 'properties': {'prefixes': {'items': {'type': 'string'},
3065 'required': ['prefixes'],
3067 'FindTagsResults': {'additionalProperties': False,
3068 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
3071 'required': ['matches'],
3073 'Macaroon': {'additionalProperties': False,
3074 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3076 'data': {'items': {'type': 'integer'},
3078 'id': {'$ref': '#/definitions/packet'},
3079 'location': {'$ref': '#/definitions/packet'},
3080 'sig': {'items': {'type': 'integer'},
3082 'required': ['data',
3088 'RunParams': {'additionalProperties': False,
3089 'properties': {'Commands': {'type': 'string'},
3090 'Machines': {'items': {'type': 'string'},
3092 'Services': {'items': {'type': 'string'},
3094 'Timeout': {'type': 'integer'},
3095 'Units': {'items': {'type': 'string'},
3097 'required': ['Commands',
3103 'ServiceCharmActionsResult': {'additionalProperties': False,
3104 'properties': {'actions': {'$ref': '#/definitions/Actions'},
3105 'error': {'$ref': '#/definitions/Error'},
3106 'servicetag': {'type': 'string'}},
3108 'ServicesCharmActionsResults': {'additionalProperties': False,
3109 'properties': {'results': {'items': {'$ref': '#/definitions/ServiceCharmActionsResult'},
3112 'caveat': {'additionalProperties': False,
3113 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3114 'location': {'$ref': '#/definitions/packet'},
3115 'verificationId': {'$ref': '#/definitions/packet'}},
3116 'required': ['location',
3120 'packet': {'additionalProperties': False,
3121 'properties': {'headerLen': {'type': 'integer'},
3122 'start': {'type': 'integer'},
3123 'totalLen': {'type': 'integer'}},
3124 'required': ['start', 'totalLen', 'headerLen'],
3126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3127 'Result': {'$ref': '#/definitions/ActionResults'}},
3129 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3130 'Result': {'$ref': '#/definitions/ActionResults'}},
3132 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
3133 'Result': {'$ref': '#/definitions/ActionResults'}},
3135 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
3136 'Result': {'$ref': '#/definitions/FindTagsResults'}},
3138 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
3139 'Result': {'$ref': '#/definitions/ActionsByNames'}},
3141 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3142 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3144 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3147 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3150 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3153 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
3154 'Result': {'$ref': '#/definitions/ActionResults'}},
3156 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
3157 'Result': {'$ref': '#/definitions/ActionResults'}},
3159 'ServicesCharmActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3160 'Result': {'$ref': '#/definitions/ServicesCharmActionsResults'}},
3165 #@ReturnMapping(ActionResults)
3166 async def Actions(self
, entities
):
3168 entities : typing.Sequence[~Entity]
3169 Returns -> typing.Sequence[~ActionResult]
3171 # map input types to rpc msg
3173 msg
= dict(Type
='Action', Request
='Actions', Version
=1, Params
=params
)
3174 params
['Entities'] = entities
3175 reply
= await self
.rpc(msg
)
3176 return self
._map
(reply
, Actions
)
3180 #@ReturnMapping(ActionResults)
3181 async def Cancel(self
, entities
):
3183 entities : typing.Sequence[~Entity]
3184 Returns -> typing.Sequence[~ActionResult]
3186 # map input types to rpc msg
3188 msg
= dict(Type
='Action', Request
='Cancel', Version
=1, Params
=params
)
3189 params
['Entities'] = entities
3190 reply
= await self
.rpc(msg
)
3191 return self
._map
(reply
, Cancel
)
3195 #@ReturnMapping(ActionResults)
3196 async def Enqueue(self
, actions
):
3198 actions : typing.Sequence[~Action]
3199 Returns -> typing.Sequence[~ActionResult]
3201 # map input types to rpc msg
3203 msg
= dict(Type
='Action', Request
='Enqueue', Version
=1, Params
=params
)
3204 params
['actions'] = actions
3205 reply
= await self
.rpc(msg
)
3206 return self
._map
(reply
, Enqueue
)
3210 #@ReturnMapping(FindTagsResults)
3211 async def FindActionTagsByPrefix(self
, prefixes
):
3213 prefixes : typing.Sequence[str]
3214 Returns -> typing.Sequence[~Entity]
3216 # map input types to rpc msg
3218 msg
= dict(Type
='Action', Request
='FindActionTagsByPrefix', Version
=1, Params
=params
)
3219 params
['prefixes'] = prefixes
3220 reply
= await self
.rpc(msg
)
3221 return self
._map
(reply
, FindActionTagsByPrefix
)
3225 #@ReturnMapping(ActionsByNames)
3226 async def FindActionsByNames(self
, names
):
3228 names : typing.Sequence[str]
3229 Returns -> typing.Sequence[~ActionsByName]
3231 # map input types to rpc msg
3233 msg
= dict(Type
='Action', Request
='FindActionsByNames', Version
=1, Params
=params
)
3234 params
['names'] = names
3235 reply
= await self
.rpc(msg
)
3236 return self
._map
(reply
, FindActionsByNames
)
3240 #@ReturnMapping(ActionsByReceivers)
3241 async def ListAll(self
, entities
):
3243 entities : typing.Sequence[~Entity]
3244 Returns -> typing.Sequence[~ActionsByReceiver]
3246 # map input types to rpc msg
3248 msg
= dict(Type
='Action', Request
='ListAll', Version
=1, Params
=params
)
3249 params
['Entities'] = entities
3250 reply
= await self
.rpc(msg
)
3251 return self
._map
(reply
, ListAll
)
3255 #@ReturnMapping(ActionsByReceivers)
3256 async def ListCompleted(self
, entities
):
3258 entities : typing.Sequence[~Entity]
3259 Returns -> typing.Sequence[~ActionsByReceiver]
3261 # map input types to rpc msg
3263 msg
= dict(Type
='Action', Request
='ListCompleted', Version
=1, Params
=params
)
3264 params
['Entities'] = entities
3265 reply
= await self
.rpc(msg
)
3266 return self
._map
(reply
, ListCompleted
)
3270 #@ReturnMapping(ActionsByReceivers)
3271 async def ListPending(self
, entities
):
3273 entities : typing.Sequence[~Entity]
3274 Returns -> typing.Sequence[~ActionsByReceiver]
3276 # map input types to rpc msg
3278 msg
= dict(Type
='Action', Request
='ListPending', Version
=1, Params
=params
)
3279 params
['Entities'] = entities
3280 reply
= await self
.rpc(msg
)
3281 return self
._map
(reply
, ListPending
)
3285 #@ReturnMapping(ActionsByReceivers)
3286 async def ListRunning(self
, entities
):
3288 entities : typing.Sequence[~Entity]
3289 Returns -> typing.Sequence[~ActionsByReceiver]
3291 # map input types to rpc msg
3293 msg
= dict(Type
='Action', Request
='ListRunning', Version
=1, Params
=params
)
3294 params
['Entities'] = entities
3295 reply
= await self
.rpc(msg
)
3296 return self
._map
(reply
, ListRunning
)
3300 #@ReturnMapping(ActionResults)
3301 async def Run(self
, services
, timeout
, units
, commands
, machines
):
3303 services : typing.Sequence[str]
3305 units : typing.Sequence[str]
3307 machines : typing.Sequence[str]
3308 Returns -> typing.Sequence[~ActionResult]
3310 # map input types to rpc msg
3312 msg
= dict(Type
='Action', Request
='Run', Version
=1, Params
=params
)
3313 params
['Services'] = services
3314 params
['Timeout'] = timeout
3315 params
['Units'] = units
3316 params
['Commands'] = commands
3317 params
['Machines'] = machines
3318 reply
= await self
.rpc(msg
)
3319 return self
._map
(reply
, Run
)
3323 #@ReturnMapping(ActionResults)
3324 async def RunOnAllMachines(self
, services
, timeout
, units
, commands
, machines
):
3326 services : typing.Sequence[str]
3328 units : typing.Sequence[str]
3330 machines : typing.Sequence[str]
3331 Returns -> typing.Sequence[~ActionResult]
3333 # map input types to rpc msg
3335 msg
= dict(Type
='Action', Request
='RunOnAllMachines', Version
=1, Params
=params
)
3336 params
['Services'] = services
3337 params
['Timeout'] = timeout
3338 params
['Units'] = units
3339 params
['Commands'] = commands
3340 params
['Machines'] = machines
3341 reply
= await self
.rpc(msg
)
3342 return self
._map
(reply
, RunOnAllMachines
)
3346 #@ReturnMapping(ServicesCharmActionsResults)
3347 async def ServicesCharmActions(self
, entities
):
3349 entities : typing.Sequence[~Entity]
3350 Returns -> typing.Sequence[~ServiceCharmActionsResult]
3352 # map input types to rpc msg
3354 msg
= dict(Type
='Action', Request
='ServicesCharmActions', Version
=1, Params
=params
)
3355 params
['Entities'] = entities
3356 reply
= await self
.rpc(msg
)
3357 return self
._map
(reply
, ServicesCharmActions
)
3360 class Addresser(Type
):
3363 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
3364 'properties': {'Error': {'$ref': '#/definitions/Error'},
3365 'Result': {'type': 'boolean'}},
3366 'required': ['Error', 'Result'],
3368 'EntitiesWatchResult': {'additionalProperties': False,
3369 'properties': {'Changes': {'items': {'type': 'string'},
3371 'EntityWatcherId': {'type': 'string'},
3372 'Error': {'$ref': '#/definitions/Error'}},
3373 'required': ['EntityWatcherId',
3377 'Error': {'additionalProperties': False,
3378 'properties': {'Code': {'type': 'string'},
3379 'Info': {'$ref': '#/definitions/ErrorInfo'},
3380 'Message': {'type': 'string'}},
3381 'required': ['Message', 'Code'],
3383 'ErrorInfo': {'additionalProperties': False,
3384 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3385 'MacaroonPath': {'type': 'string'}},
3387 'ErrorResult': {'additionalProperties': False,
3388 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3389 'required': ['Error'],
3391 'Macaroon': {'additionalProperties': False,
3392 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3394 'data': {'items': {'type': 'integer'},
3396 'id': {'$ref': '#/definitions/packet'},
3397 'location': {'$ref': '#/definitions/packet'},
3398 'sig': {'items': {'type': 'integer'},
3400 'required': ['data',
3406 'caveat': {'additionalProperties': False,
3407 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3408 'location': {'$ref': '#/definitions/packet'},
3409 'verificationId': {'$ref': '#/definitions/packet'}},
3410 'required': ['location',
3414 'packet': {'additionalProperties': False,
3415 'properties': {'headerLen': {'type': 'integer'},
3416 'start': {'type': 'integer'},
3417 'totalLen': {'type': 'integer'}},
3418 'required': ['start', 'totalLen', 'headerLen'],
3420 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
3422 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
3424 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
3429 #@ReturnMapping(BoolResult)
3430 async def CanDeallocateAddresses(self
):
3433 Returns -> typing.Union[~Error, bool]
3435 # map input types to rpc msg
3437 msg
= dict(Type
='Addresser', Request
='CanDeallocateAddresses', Version
=2, Params
=params
)
3439 reply
= await self
.rpc(msg
)
3440 return self
._map
(reply
, CanDeallocateAddresses
)
3444 #@ReturnMapping(ErrorResult)
3445 async def CleanupIPAddresses(self
):
3450 # map input types to rpc msg
3452 msg
= dict(Type
='Addresser', Request
='CleanupIPAddresses', Version
=2, Params
=params
)
3454 reply
= await self
.rpc(msg
)
3455 return self
._map
(reply
, CleanupIPAddresses
)
3459 #@ReturnMapping(EntitiesWatchResult)
3460 async def WatchIPAddresses(self
):
3463 Returns -> typing.Union[~Error, typing.Sequence[str]]
3465 # map input types to rpc msg
3467 msg
= dict(Type
='Addresser', Request
='WatchIPAddresses', Version
=2, Params
=params
)
3469 reply
= await self
.rpc(msg
)
3470 return self
._map
(reply
, WatchIPAddresses
)
3476 schema
= {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
3477 'properties': {'ContainerType': {'type': 'string'},
3478 'Error': {'$ref': '#/definitions/Error'},
3479 'Jobs': {'items': {'type': 'string'},
3481 'Life': {'type': 'string'}},
3482 'required': ['Life',
3487 'AgentGetEntitiesResults': {'additionalProperties': False,
3488 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
3490 'required': ['Entities'],
3492 'Entities': {'additionalProperties': False,
3493 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3495 'required': ['Entities'],
3497 'Entity': {'additionalProperties': False,
3498 'properties': {'Tag': {'type': 'string'}},
3499 'required': ['Tag'],
3501 'EntityPassword': {'additionalProperties': False,
3502 'properties': {'Password': {'type': 'string'},
3503 'Tag': {'type': 'string'}},
3504 'required': ['Tag', 'Password'],
3506 'EntityPasswords': {'additionalProperties': False,
3507 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
3509 'required': ['Changes'],
3511 'Error': {'additionalProperties': False,
3512 'properties': {'Code': {'type': 'string'},
3513 'Info': {'$ref': '#/definitions/ErrorInfo'},
3514 'Message': {'type': 'string'}},
3515 'required': ['Message', 'Code'],
3517 'ErrorInfo': {'additionalProperties': False,
3518 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3519 'MacaroonPath': {'type': 'string'}},
3521 'ErrorResult': {'additionalProperties': False,
3522 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3523 'required': ['Error'],
3525 'ErrorResults': {'additionalProperties': False,
3526 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
3528 'required': ['Results'],
3530 'IsMasterResult': {'additionalProperties': False,
3531 'properties': {'Master': {'type': 'boolean'}},
3532 'required': ['Master'],
3534 'Macaroon': {'additionalProperties': False,
3535 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3537 'data': {'items': {'type': 'integer'},
3539 'id': {'$ref': '#/definitions/packet'},
3540 'location': {'$ref': '#/definitions/packet'},
3541 'sig': {'items': {'type': 'integer'},
3543 'required': ['data',
3549 'ModelConfigResult': {'additionalProperties': False,
3550 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
3553 'required': ['Config'],
3555 'NotifyWatchResult': {'additionalProperties': False,
3556 'properties': {'Error': {'$ref': '#/definitions/Error'},
3557 'NotifyWatcherId': {'type': 'string'}},
3558 'required': ['NotifyWatcherId', 'Error'],
3560 'StateServingInfo': {'additionalProperties': False,
3561 'properties': {'APIPort': {'type': 'integer'},
3562 'CAPrivateKey': {'type': 'string'},
3563 'Cert': {'type': 'string'},
3564 'PrivateKey': {'type': 'string'},
3565 'SharedSecret': {'type': 'string'},
3566 'StatePort': {'type': 'integer'},
3567 'SystemIdentity': {'type': 'string'}},
3568 'required': ['APIPort',
3576 'caveat': {'additionalProperties': False,
3577 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3578 'location': {'$ref': '#/definitions/packet'},
3579 'verificationId': {'$ref': '#/definitions/packet'}},
3580 'required': ['location',
3584 'packet': {'additionalProperties': False,
3585 'properties': {'headerLen': {'type': 'integer'},
3586 'start': {'type': 'integer'},
3587 'totalLen': {'type': 'integer'}},
3588 'required': ['start', 'totalLen', 'headerLen'],
3590 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3591 'Result': {'$ref': '#/definitions/ErrorResults'}},
3593 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3594 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
3596 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
3598 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3600 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
3601 'Result': {'$ref': '#/definitions/ErrorResults'}},
3603 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
3605 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3610 #@ReturnMapping(ErrorResults)
3611 async def ClearReboot(self
, entities
):
3613 entities : typing.Sequence[~Entity]
3614 Returns -> typing.Sequence[~ErrorResult]
3616 # map input types to rpc msg
3618 msg
= dict(Type
='Agent', Request
='ClearReboot', Version
=2, Params
=params
)
3619 params
['Entities'] = entities
3620 reply
= await self
.rpc(msg
)
3621 return self
._map
(reply
, ClearReboot
)
3625 #@ReturnMapping(AgentGetEntitiesResults)
3626 async def GetEntities(self
, entities
):
3628 entities : typing.Sequence[~Entity]
3629 Returns -> typing.Sequence[~AgentGetEntitiesResult]
3631 # map input types to rpc msg
3633 msg
= dict(Type
='Agent', Request
='GetEntities', Version
=2, Params
=params
)
3634 params
['Entities'] = entities
3635 reply
= await self
.rpc(msg
)
3636 return self
._map
(reply
, GetEntities
)
3640 #@ReturnMapping(IsMasterResult)
3641 async def IsMaster(self
):
3646 # map input types to rpc msg
3648 msg
= dict(Type
='Agent', Request
='IsMaster', Version
=2, Params
=params
)
3650 reply
= await self
.rpc(msg
)
3651 return self
._map
(reply
, IsMaster
)
3655 #@ReturnMapping(ModelConfigResult)
3656 async def ModelConfig(self
):
3659 Returns -> typing.Mapping[str, typing.Any]
3661 # map input types to rpc msg
3663 msg
= dict(Type
='Agent', Request
='ModelConfig', Version
=2, Params
=params
)
3665 reply
= await self
.rpc(msg
)
3666 return self
._map
(reply
, ModelConfig
)
3670 #@ReturnMapping(ErrorResults)
3671 async def SetPasswords(self
, changes
):
3673 changes : typing.Sequence[~EntityPassword]
3674 Returns -> typing.Sequence[~ErrorResult]
3676 # map input types to rpc msg
3678 msg
= dict(Type
='Agent', Request
='SetPasswords', Version
=2, Params
=params
)
3679 params
['Changes'] = changes
3680 reply
= await self
.rpc(msg
)
3681 return self
._map
(reply
, SetPasswords
)
3685 #@ReturnMapping(StateServingInfo)
3686 async def StateServingInfo(self
):
3689 Returns -> typing.Union[int, str]
3691 # map input types to rpc msg
3693 msg
= dict(Type
='Agent', Request
='StateServingInfo', Version
=2, Params
=params
)
3695 reply
= await self
.rpc(msg
)
3696 return self
._map
(reply
, StateServingInfo
)
3700 #@ReturnMapping(NotifyWatchResult)
3701 async def WatchForModelConfigChanges(self
):
3704 Returns -> typing.Union[~Error, str]
3706 # map input types to rpc msg
3708 msg
= dict(Type
='Agent', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
3710 reply
= await self
.rpc(msg
)
3711 return self
._map
(reply
, WatchForModelConfigChanges
)
3714 class AgentTools(Type
):
3717 schema
= {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
3720 #@ReturnMapping(None)
3721 async def UpdateToolsAvailable(self
):
3726 # map input types to rpc msg
3728 msg
= dict(Type
='AgentTools', Request
='UpdateToolsAvailable', Version
=1, Params
=params
)
3730 reply
= await self
.rpc(msg
)
3731 return self
._map
(reply
, UpdateToolsAvailable
)
3734 class AllModelWatcher(Type
):
3735 name
= 'AllModelWatcher'
3737 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
3738 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
3740 'required': ['Deltas'],
3742 'Delta': {'additionalProperties': False,
3743 'properties': {'Entity': {'additionalProperties': True,
3745 'Removed': {'type': 'boolean'}},
3746 'required': ['Removed', 'Entity'],
3748 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
3750 'Stop': {'type': 'object'}},
3754 #@ReturnMapping(AllWatcherNextResults)
3755 async def Next(self
):
3758 Returns -> typing.Sequence[~Delta]
3760 # map input types to rpc msg
3762 msg
= dict(Type
='AllModelWatcher', Request
='Next', Version
=2, Params
=params
)
3764 reply
= await self
.rpc(msg
)
3765 return self
._map
(reply
, Next
)
3769 #@ReturnMapping(None)
3770 async def Stop(self
):
3775 # map input types to rpc msg
3777 msg
= dict(Type
='AllModelWatcher', Request
='Stop', Version
=2, Params
=params
)
3779 reply
= await self
.rpc(msg
)
3780 return self
._map
(reply
, Stop
)
3783 class AllWatcher(Type
):
3786 schema
= {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
3787 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
3789 'required': ['Deltas'],
3791 'Delta': {'additionalProperties': False,
3792 'properties': {'Entity': {'additionalProperties': True,
3794 'Removed': {'type': 'boolean'}},
3795 'required': ['Removed', 'Entity'],
3797 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
3799 'Stop': {'type': 'object'}},
3803 #@ReturnMapping(AllWatcherNextResults)
3804 async def Next(self
):
3807 Returns -> typing.Sequence[~Delta]
3809 # map input types to rpc msg
3811 msg
= dict(Type
='AllWatcher', Request
='Next', Version
=1, Params
=params
)
3813 reply
= await self
.rpc(msg
)
3814 return self
._map
(reply
, Next
)
3818 #@ReturnMapping(None)
3819 async def Stop(self
):
3824 # map input types to rpc msg
3826 msg
= dict(Type
='AllWatcher', Request
='Stop', Version
=1, Params
=params
)
3828 reply
= await self
.rpc(msg
)
3829 return self
._map
(reply
, Stop
)
3832 class Annotations(Type
):
3833 name
= 'Annotations'
3835 schema
= {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
3836 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
3838 'EntityTag': {'type': 'string'},
3839 'Error': {'$ref': '#/definitions/ErrorResult'}},
3840 'required': ['EntityTag',
3844 'AnnotationsGetResults': {'additionalProperties': False,
3845 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
3847 'required': ['Results'],
3849 'AnnotationsSet': {'additionalProperties': False,
3850 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
3852 'required': ['Annotations'],
3854 'Entities': {'additionalProperties': False,
3855 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3857 'required': ['Entities'],
3859 'Entity': {'additionalProperties': False,
3860 'properties': {'Tag': {'type': 'string'}},
3861 'required': ['Tag'],
3863 'EntityAnnotations': {'additionalProperties': False,
3864 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
3866 'EntityTag': {'type': 'string'}},
3867 'required': ['EntityTag', 'Annotations'],
3869 'Error': {'additionalProperties': False,
3870 'properties': {'Code': {'type': 'string'},
3871 'Info': {'$ref': '#/definitions/ErrorInfo'},
3872 'Message': {'type': 'string'}},
3873 'required': ['Message', 'Code'],
3875 'ErrorInfo': {'additionalProperties': False,
3876 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3877 'MacaroonPath': {'type': 'string'}},
3879 'ErrorResult': {'additionalProperties': False,
3880 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3881 'required': ['Error'],
3883 'ErrorResults': {'additionalProperties': False,
3884 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
3886 'required': ['Results'],
3888 'Macaroon': {'additionalProperties': False,
3889 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3891 'data': {'items': {'type': 'integer'},
3893 'id': {'$ref': '#/definitions/packet'},
3894 'location': {'$ref': '#/definitions/packet'},
3895 'sig': {'items': {'type': 'integer'},
3897 'required': ['data',
3903 'caveat': {'additionalProperties': False,
3904 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3905 'location': {'$ref': '#/definitions/packet'},
3906 'verificationId': {'$ref': '#/definitions/packet'}},
3907 'required': ['location',
3911 'packet': {'additionalProperties': False,
3912 'properties': {'headerLen': {'type': 'integer'},
3913 'start': {'type': 'integer'},
3914 'totalLen': {'type': 'integer'}},
3915 'required': ['start', 'totalLen', 'headerLen'],
3917 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3918 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
3920 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
3921 'Result': {'$ref': '#/definitions/ErrorResults'}},
3926 #@ReturnMapping(AnnotationsGetResults)
3927 async def Get(self
, entities
):
3929 entities : typing.Sequence[~Entity]
3930 Returns -> typing.Sequence[~AnnotationsGetResult]
3932 # map input types to rpc msg
3934 msg
= dict(Type
='Annotations', Request
='Get', Version
=2, Params
=params
)
3935 params
['Entities'] = entities
3936 reply
= await self
.rpc(msg
)
3937 return self
._map
(reply
, Get
)
3941 #@ReturnMapping(ErrorResults)
3942 async def Set(self
, annotations
):
3944 annotations : typing.Sequence[~EntityAnnotations]
3945 Returns -> typing.Sequence[~ErrorResult]
3947 # map input types to rpc msg
3949 msg
= dict(Type
='Annotations', Request
='Set', Version
=2, Params
=params
)
3950 params
['Annotations'] = annotations
3951 reply
= await self
.rpc(msg
)
3952 return self
._map
(reply
, Set
)
3955 class Backups(Type
):
3958 schema
= {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
3959 'properties': {'Notes': {'type': 'string'}},
3960 'required': ['Notes'],
3962 'BackupsInfoArgs': {'additionalProperties': False,
3963 'properties': {'ID': {'type': 'string'}},
3966 'BackupsListArgs': {'additionalProperties': False,
3968 'BackupsListResult': {'additionalProperties': False,
3969 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
3971 'required': ['List'],
3973 'BackupsMetadataResult': {'additionalProperties': False,
3974 'properties': {'CACert': {'type': 'string'},
3975 'CAPrivateKey': {'type': 'string'},
3976 'Checksum': {'type': 'string'},
3977 'ChecksumFormat': {'type': 'string'},
3978 'Finished': {'format': 'date-time',
3980 'Hostname': {'type': 'string'},
3981 'ID': {'type': 'string'},
3982 'Machine': {'type': 'string'},
3983 'Model': {'type': 'string'},
3984 'Notes': {'type': 'string'},
3985 'Size': {'type': 'integer'},
3986 'Started': {'format': 'date-time',
3988 'Stored': {'format': 'date-time',
3990 'Version': {'$ref': '#/definitions/Number'}},
4006 'BackupsRemoveArgs': {'additionalProperties': False,
4007 'properties': {'ID': {'type': 'string'}},
4010 'Number': {'additionalProperties': False,
4011 'properties': {'Build': {'type': 'integer'},
4012 'Major': {'type': 'integer'},
4013 'Minor': {'type': 'integer'},
4014 'Patch': {'type': 'integer'},
4015 'Tag': {'type': 'string'}},
4016 'required': ['Major',
4022 'RestoreArgs': {'additionalProperties': False,
4023 'properties': {'BackupId': {'type': 'string'}},
4024 'required': ['BackupId'],
4026 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
4027 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
4029 'FinishRestore': {'type': 'object'},
4030 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
4031 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
4033 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
4034 'Result': {'$ref': '#/definitions/BackupsListResult'}},
4036 'PrepareRestore': {'type': 'object'},
4037 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
4039 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
4044 #@ReturnMapping(BackupsMetadataResult)
4045 async def Create(self
, notes
):
4048 Returns -> typing.Union[str, ~Number, int]
4050 # map input types to rpc msg
4052 msg
= dict(Type
='Backups', Request
='Create', Version
=1, Params
=params
)
4053 params
['Notes'] = notes
4054 reply
= await self
.rpc(msg
)
4055 return self
._map
(reply
, Create
)
4059 #@ReturnMapping(None)
4060 async def FinishRestore(self
):
4065 # map input types to rpc msg
4067 msg
= dict(Type
='Backups', Request
='FinishRestore', Version
=1, Params
=params
)
4069 reply
= await self
.rpc(msg
)
4070 return self
._map
(reply
, FinishRestore
)
4074 #@ReturnMapping(BackupsMetadataResult)
4075 async def Info(self
, id_
):
4078 Returns -> typing.Union[str, ~Number, int]
4080 # map input types to rpc msg
4082 msg
= dict(Type
='Backups', Request
='Info', Version
=1, Params
=params
)
4084 reply
= await self
.rpc(msg
)
4085 return self
._map
(reply
, Info
)
4089 #@ReturnMapping(BackupsListResult)
4090 async def List(self
):
4093 Returns -> typing.Sequence[~BackupsMetadataResult]
4095 # map input types to rpc msg
4097 msg
= dict(Type
='Backups', Request
='List', Version
=1, Params
=params
)
4099 reply
= await self
.rpc(msg
)
4100 return self
._map
(reply
, List
)
4104 #@ReturnMapping(None)
4105 async def PrepareRestore(self
):
4110 # map input types to rpc msg
4112 msg
= dict(Type
='Backups', Request
='PrepareRestore', Version
=1, Params
=params
)
4114 reply
= await self
.rpc(msg
)
4115 return self
._map
(reply
, PrepareRestore
)
4119 #@ReturnMapping(None)
4120 async def Remove(self
, id_
):
4125 # map input types to rpc msg
4127 msg
= dict(Type
='Backups', Request
='Remove', Version
=1, Params
=params
)
4129 reply
= await self
.rpc(msg
)
4130 return self
._map
(reply
, Remove
)
4134 #@ReturnMapping(None)
4135 async def Restore(self
, backupid
):
4140 # map input types to rpc msg
4142 msg
= dict(Type
='Backups', Request
='Restore', Version
=1, Params
=params
)
4143 params
['BackupId'] = backupid
4144 reply
= await self
.rpc(msg
)
4145 return self
._map
(reply
, Restore
)
4151 schema
= {'definitions': {'Block': {'additionalProperties': False,
4152 'properties': {'id': {'type': 'string'},
4153 'message': {'type': 'string'},
4154 'tag': {'type': 'string'},
4155 'type': {'type': 'string'}},
4156 'required': ['id', 'tag', 'type'],
4158 'BlockResult': {'additionalProperties': False,
4159 'properties': {'error': {'$ref': '#/definitions/Error'},
4160 'result': {'$ref': '#/definitions/Block'}},
4161 'required': ['result'],
4163 'BlockResults': {'additionalProperties': False,
4164 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
4167 'BlockSwitchParams': {'additionalProperties': False,
4168 'properties': {'message': {'type': 'string'},
4169 'type': {'type': 'string'}},
4170 'required': ['type'],
4172 'Error': {'additionalProperties': False,
4173 'properties': {'Code': {'type': 'string'},
4174 'Info': {'$ref': '#/definitions/ErrorInfo'},
4175 'Message': {'type': 'string'}},
4176 'required': ['Message', 'Code'],
4178 'ErrorInfo': {'additionalProperties': False,
4179 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4180 'MacaroonPath': {'type': 'string'}},
4182 'ErrorResult': {'additionalProperties': False,
4183 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4184 'required': ['Error'],
4186 'Macaroon': {'additionalProperties': False,
4187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4189 'data': {'items': {'type': 'integer'},
4191 'id': {'$ref': '#/definitions/packet'},
4192 'location': {'$ref': '#/definitions/packet'},
4193 'sig': {'items': {'type': 'integer'},
4195 'required': ['data',
4201 'caveat': {'additionalProperties': False,
4202 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4203 'location': {'$ref': '#/definitions/packet'},
4204 'verificationId': {'$ref': '#/definitions/packet'}},
4205 'required': ['location',
4209 'packet': {'additionalProperties': False,
4210 'properties': {'headerLen': {'type': 'integer'},
4211 'start': {'type': 'integer'},
4212 'totalLen': {'type': 'integer'}},
4213 'required': ['start', 'totalLen', 'headerLen'],
4215 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
4217 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
4218 'Result': {'$ref': '#/definitions/ErrorResult'}},
4220 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
4221 'Result': {'$ref': '#/definitions/ErrorResult'}},
4226 #@ReturnMapping(BlockResults)
4227 async def List(self
):
4230 Returns -> typing.Sequence[~BlockResult]
4232 # map input types to rpc msg
4234 msg
= dict(Type
='Block', Request
='List', Version
=2, Params
=params
)
4236 reply
= await self
.rpc(msg
)
4237 return self
._map
(reply
, List
)
4241 #@ReturnMapping(ErrorResult)
4242 async def SwitchBlockOff(self
, message
, type_
):
4248 # map input types to rpc msg
4250 msg
= dict(Type
='Block', Request
='SwitchBlockOff', Version
=2, Params
=params
)
4251 params
['message'] = message
4252 params
['type'] = type_
4253 reply
= await self
.rpc(msg
)
4254 return self
._map
(reply
, SwitchBlockOff
)
4258 #@ReturnMapping(ErrorResult)
4259 async def SwitchBlockOn(self
, message
, type_
):
4265 # map input types to rpc msg
4267 msg
= dict(Type
='Block', Request
='SwitchBlockOn', Version
=2, Params
=params
)
4268 params
['message'] = message
4269 params
['type'] = type_
4270 reply
= await self
.rpc(msg
)
4271 return self
._map
(reply
, SwitchBlockOn
)
4274 class CharmRevisionUpdater(Type
):
4275 name
= 'CharmRevisionUpdater'
4277 schema
= {'definitions': {'Error': {'additionalProperties': False,
4278 'properties': {'Code': {'type': 'string'},
4279 'Info': {'$ref': '#/definitions/ErrorInfo'},
4280 'Message': {'type': 'string'}},
4281 'required': ['Message', 'Code'],
4283 'ErrorInfo': {'additionalProperties': False,
4284 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4285 'MacaroonPath': {'type': 'string'}},
4287 'ErrorResult': {'additionalProperties': False,
4288 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4289 'required': ['Error'],
4291 'Macaroon': {'additionalProperties': False,
4292 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4294 'data': {'items': {'type': 'integer'},
4296 'id': {'$ref': '#/definitions/packet'},
4297 'location': {'$ref': '#/definitions/packet'},
4298 'sig': {'items': {'type': 'integer'},
4300 'required': ['data',
4306 'caveat': {'additionalProperties': False,
4307 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4308 'location': {'$ref': '#/definitions/packet'},
4309 'verificationId': {'$ref': '#/definitions/packet'}},
4310 'required': ['location',
4314 'packet': {'additionalProperties': False,
4315 'properties': {'headerLen': {'type': 'integer'},
4316 'start': {'type': 'integer'},
4317 'totalLen': {'type': 'integer'}},
4318 'required': ['start', 'totalLen', 'headerLen'],
4320 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
4325 #@ReturnMapping(ErrorResult)
4326 async def UpdateLatestRevisions(self
):
4331 # map input types to rpc msg
4333 msg
= dict(Type
='CharmRevisionUpdater', Request
='UpdateLatestRevisions', Version
=1, Params
=params
)
4335 reply
= await self
.rpc(msg
)
4336 return self
._map
(reply
, UpdateLatestRevisions
)
4342 schema
= {'definitions': {'CharmInfo': {'additionalProperties': False,
4343 'properties': {'CharmURL': {'type': 'string'}},
4344 'required': ['CharmURL'],
4346 'CharmsList': {'additionalProperties': False,
4347 'properties': {'Names': {'items': {'type': 'string'},
4349 'required': ['Names'],
4351 'CharmsListResult': {'additionalProperties': False,
4352 'properties': {'CharmURLs': {'items': {'type': 'string'},
4354 'required': ['CharmURLs'],
4356 'IsMeteredResult': {'additionalProperties': False,
4357 'properties': {'Metered': {'type': 'boolean'}},
4358 'required': ['Metered'],
4360 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
4361 'Result': {'$ref': '#/definitions/CharmInfo'}},
4363 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
4364 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
4366 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
4367 'Result': {'$ref': '#/definitions/CharmsListResult'}},
4372 #@ReturnMapping(CharmInfo)
4373 async def CharmInfo(self
, charmurl
):
4378 # map input types to rpc msg
4380 msg
= dict(Type
='Charms', Request
='CharmInfo', Version
=2, Params
=params
)
4381 params
['CharmURL'] = charmurl
4382 reply
= await self
.rpc(msg
)
4383 return self
._map
(reply
, CharmInfo
)
4387 #@ReturnMapping(IsMeteredResult)
4388 async def IsMetered(self
, charmurl
):
4393 # map input types to rpc msg
4395 msg
= dict(Type
='Charms', Request
='IsMetered', Version
=2, Params
=params
)
4396 params
['CharmURL'] = charmurl
4397 reply
= await self
.rpc(msg
)
4398 return self
._map
(reply
, IsMetered
)
4402 #@ReturnMapping(CharmsListResult)
4403 async def List(self
, names
):
4405 names : typing.Sequence[str]
4406 Returns -> typing.Sequence[str]
4408 # map input types to rpc msg
4410 msg
= dict(Type
='Charms', Request
='List', Version
=2, Params
=params
)
4411 params
['Names'] = names
4412 reply
= await self
.rpc(msg
)
4413 return self
._map
(reply
, List
)
4416 class Cleaner(Type
):
4419 schema
= {'definitions': {'Error': {'additionalProperties': False,
4420 'properties': {'Code': {'type': 'string'},
4421 'Info': {'$ref': '#/definitions/ErrorInfo'},
4422 'Message': {'type': 'string'}},
4423 'required': ['Message', 'Code'],
4425 'ErrorInfo': {'additionalProperties': False,
4426 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4427 'MacaroonPath': {'type': 'string'}},
4429 'Macaroon': {'additionalProperties': False,
4430 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4432 'data': {'items': {'type': 'integer'},
4434 'id': {'$ref': '#/definitions/packet'},
4435 'location': {'$ref': '#/definitions/packet'},
4436 'sig': {'items': {'type': 'integer'},
4438 'required': ['data',
4444 'NotifyWatchResult': {'additionalProperties': False,
4445 'properties': {'Error': {'$ref': '#/definitions/Error'},
4446 'NotifyWatcherId': {'type': 'string'}},
4447 'required': ['NotifyWatcherId', 'Error'],
4449 'caveat': {'additionalProperties': False,
4450 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4451 'location': {'$ref': '#/definitions/packet'},
4452 'verificationId': {'$ref': '#/definitions/packet'}},
4453 'required': ['location',
4457 'packet': {'additionalProperties': False,
4458 'properties': {'headerLen': {'type': 'integer'},
4459 'start': {'type': 'integer'},
4460 'totalLen': {'type': 'integer'}},
4461 'required': ['start', 'totalLen', 'headerLen'],
4463 'properties': {'Cleanup': {'type': 'object'},
4464 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4469 #@ReturnMapping(None)
4470 async def Cleanup(self
):
4475 # map input types to rpc msg
4477 msg
= dict(Type
='Cleaner', Request
='Cleanup', Version
=2, Params
=params
)
4479 reply
= await self
.rpc(msg
)
4480 return self
._map
(reply
, Cleanup
)
4484 #@ReturnMapping(NotifyWatchResult)
4485 async def WatchCleanups(self
):
4488 Returns -> typing.Union[~Error, str]
4490 # map input types to rpc msg
4492 msg
= dict(Type
='Cleaner', Request
='WatchCleanups', Version
=2, Params
=params
)
4494 reply
= await self
.rpc(msg
)
4495 return self
._map
(reply
, WatchCleanups
)
4501 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
4502 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
4505 'required': ['Servers'],
4507 'AddCharm': {'additionalProperties': False,
4508 'properties': {'Channel': {'type': 'string'},
4509 'URL': {'type': 'string'}},
4510 'required': ['URL', 'Channel'],
4512 'AddCharmWithAuthorization': {'additionalProperties': False,
4513 'properties': {'Channel': {'type': 'string'},
4514 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
4515 'URL': {'type': 'string'}},
4518 'CharmStoreMacaroon'],
4520 'AddMachineParams': {'additionalProperties': False,
4521 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
4523 'Constraints': {'$ref': '#/definitions/Value'},
4524 'ContainerType': {'type': 'string'},
4525 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
4527 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
4528 'InstanceId': {'type': 'string'},
4529 'Jobs': {'items': {'type': 'string'},
4531 'Nonce': {'type': 'string'},
4532 'ParentId': {'type': 'string'},
4533 'Placement': {'$ref': '#/definitions/Placement'},
4534 'Series': {'type': 'string'}},
4535 'required': ['Series',
4544 'HardwareCharacteristics',
4547 'AddMachines': {'additionalProperties': False,
4548 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
4550 'required': ['MachineParams'],
4552 'AddMachinesResult': {'additionalProperties': False,
4553 'properties': {'Error': {'$ref': '#/definitions/Error'},
4554 'Machine': {'type': 'string'}},
4555 'required': ['Machine', 'Error'],
4557 'AddMachinesResults': {'additionalProperties': False,
4558 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
4560 'required': ['Machines'],
4562 'Address': {'additionalProperties': False,
4563 'properties': {'Scope': {'type': 'string'},
4564 'SpaceName': {'type': 'string'},
4565 'Type': {'type': 'string'},
4566 'Value': {'type': 'string'}},
4567 'required': ['Value', 'Type', 'Scope'],
4569 'AgentVersionResult': {'additionalProperties': False,
4570 'properties': {'Version': {'$ref': '#/definitions/Number'}},
4571 'required': ['Version'],
4573 'AllWatcherId': {'additionalProperties': False,
4574 'properties': {'AllWatcherId': {'type': 'string'}},
4575 'required': ['AllWatcherId'],
4577 'Binary': {'additionalProperties': False,
4578 'properties': {'Arch': {'type': 'string'},
4579 'Number': {'$ref': '#/definitions/Number'},
4580 'Series': {'type': 'string'}},
4581 'required': ['Number', 'Series', 'Arch'],
4583 'BundleChangesChange': {'additionalProperties': False,
4584 'properties': {'args': {'items': {'additionalProperties': True,
4587 'id': {'type': 'string'},
4588 'method': {'type': 'string'},
4589 'requires': {'items': {'type': 'string'},
4596 'CharmInfo': {'additionalProperties': False,
4597 'properties': {'CharmURL': {'type': 'string'}},
4598 'required': ['CharmURL'],
4600 'Constraints': {'additionalProperties': False,
4601 'properties': {'Count': {'type': 'integer'},
4602 'Pool': {'type': 'string'},
4603 'Size': {'type': 'integer'}},
4604 'required': ['Pool', 'Size', 'Count'],
4606 'DestroyMachines': {'additionalProperties': False,
4607 'properties': {'Force': {'type': 'boolean'},
4608 'MachineNames': {'items': {'type': 'string'},
4610 'required': ['MachineNames', 'Force'],
4612 'DetailedStatus': {'additionalProperties': False,
4613 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
4616 'Err': {'additionalProperties': True,
4618 'Info': {'type': 'string'},
4619 'Kind': {'type': 'string'},
4620 'Life': {'type': 'string'},
4621 'Since': {'format': 'date-time',
4623 'Status': {'type': 'string'},
4624 'Version': {'type': 'string'}},
4625 'required': ['Status',
4634 'EndpointStatus': {'additionalProperties': False,
4635 'properties': {'Name': {'type': 'string'},
4636 'Role': {'type': 'string'},
4637 'ServiceName': {'type': 'string'},
4638 'Subordinate': {'type': 'boolean'}},
4639 'required': ['ServiceName',
4644 'Entities': {'additionalProperties': False,
4645 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
4647 'required': ['Entities'],
4649 'Entity': {'additionalProperties': False,
4650 'properties': {'Tag': {'type': 'string'}},
4651 'required': ['Tag'],
4653 'EntityStatus': {'additionalProperties': False,
4654 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
4657 'Info': {'type': 'string'},
4658 'Since': {'format': 'date-time',
4660 'Status': {'type': 'string'}},
4661 'required': ['Status',
4666 'Error': {'additionalProperties': False,
4667 'properties': {'Code': {'type': 'string'},
4668 'Info': {'$ref': '#/definitions/ErrorInfo'},
4669 'Message': {'type': 'string'}},
4670 'required': ['Message', 'Code'],
4672 'ErrorInfo': {'additionalProperties': False,
4673 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4674 'MacaroonPath': {'type': 'string'}},
4676 'ErrorResult': {'additionalProperties': False,
4677 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4678 'required': ['Error'],
4680 'ErrorResults': {'additionalProperties': False,
4681 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
4683 'required': ['Results'],
4685 'FindToolsParams': {'additionalProperties': False,
4686 'properties': {'Arch': {'type': 'string'},
4687 'MajorVersion': {'type': 'integer'},
4688 'MinorVersion': {'type': 'integer'},
4689 'Number': {'$ref': '#/definitions/Number'},
4690 'Series': {'type': 'string'}},
4691 'required': ['Number',
4697 'FindToolsResult': {'additionalProperties': False,
4698 'properties': {'Error': {'$ref': '#/definitions/Error'},
4699 'List': {'items': {'$ref': '#/definitions/Tools'},
4701 'required': ['List', 'Error'],
4703 'FullStatus': {'additionalProperties': False,
4704 'properties': {'AvailableVersion': {'type': 'string'},
4705 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
4707 'ModelName': {'type': 'string'},
4708 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
4710 'Services': {'patternProperties': {'.*': {'$ref': '#/definitions/ServiceStatus'}},
4712 'required': ['ModelName',
4718 'GetBundleChangesParams': {'additionalProperties': False,
4719 'properties': {'yaml': {'type': 'string'}},
4720 'required': ['yaml'],
4722 'GetBundleChangesResults': {'additionalProperties': False,
4723 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
4725 'errors': {'items': {'type': 'string'},
4728 'GetConstraintsResults': {'additionalProperties': False,
4729 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
4730 'required': ['Constraints'],
4732 'HardwareCharacteristics': {'additionalProperties': False,
4733 'properties': {'Arch': {'type': 'string'},
4734 'AvailabilityZone': {'type': 'string'},
4735 'CpuCores': {'type': 'integer'},
4736 'CpuPower': {'type': 'integer'},
4737 'Mem': {'type': 'integer'},
4738 'RootDisk': {'type': 'integer'},
4739 'Tags': {'items': {'type': 'string'},
4742 'HostPort': {'additionalProperties': False,
4743 'properties': {'Address': {'$ref': '#/definitions/Address'},
4744 'Port': {'type': 'integer'}},
4745 'required': ['Address', 'Port'],
4747 'Macaroon': {'additionalProperties': False,
4748 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4750 'data': {'items': {'type': 'integer'},
4752 'id': {'$ref': '#/definitions/packet'},
4753 'location': {'$ref': '#/definitions/packet'},
4754 'sig': {'items': {'type': 'integer'},
4756 'required': ['data',
4762 'MachineStatus': {'additionalProperties': False,
4763 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
4764 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
4766 'DNSName': {'type': 'string'},
4767 'Hardware': {'type': 'string'},
4768 'HasVote': {'type': 'boolean'},
4769 'Id': {'type': 'string'},
4770 'InstanceId': {'type': 'string'},
4771 'InstanceStatus': {'$ref': '#/definitions/DetailedStatus'},
4772 'Jobs': {'items': {'type': 'string'},
4774 'Series': {'type': 'string'},
4775 'WantsVote': {'type': 'boolean'}},
4776 'required': ['AgentStatus',
4788 'MeterStatus': {'additionalProperties': False,
4789 'properties': {'Color': {'type': 'string'},
4790 'Message': {'type': 'string'}},
4791 'required': ['Color', 'Message'],
4793 'ModelConfigResults': {'additionalProperties': False,
4794 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
4797 'required': ['Config'],
4799 'ModelInfo': {'additionalProperties': False,
4800 'properties': {'DefaultSeries': {'type': 'string'},
4801 'Life': {'type': 'string'},
4802 'Name': {'type': 'string'},
4803 'OwnerTag': {'type': 'string'},
4804 'ProviderType': {'type': 'string'},
4805 'ServerUUID': {'type': 'string'},
4806 'Status': {'$ref': '#/definitions/EntityStatus'},
4807 'UUID': {'type': 'string'},
4808 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
4810 'required': ['Name',
4820 'ModelSet': {'additionalProperties': False,
4821 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
4824 'required': ['Config'],
4826 'ModelUnset': {'additionalProperties': False,
4827 'properties': {'Keys': {'items': {'type': 'string'},
4829 'required': ['Keys'],
4831 'ModelUserInfo': {'additionalProperties': False,
4832 'properties': {'access': {'type': 'string'},
4833 'displayname': {'type': 'string'},
4834 'lastconnection': {'format': 'date-time',
4836 'user': {'type': 'string'}},
4837 'required': ['user',
4842 'ModelUserInfoResult': {'additionalProperties': False,
4843 'properties': {'error': {'$ref': '#/definitions/Error'},
4844 'result': {'$ref': '#/definitions/ModelUserInfo'}},
4846 'ModelUserInfoResults': {'additionalProperties': False,
4847 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
4849 'required': ['results'],
4851 'Number': {'additionalProperties': False,
4852 'properties': {'Build': {'type': 'integer'},
4853 'Major': {'type': 'integer'},
4854 'Minor': {'type': 'integer'},
4855 'Patch': {'type': 'integer'},
4856 'Tag': {'type': 'string'}},
4857 'required': ['Major',
4863 'Placement': {'additionalProperties': False,
4864 'properties': {'Directive': {'type': 'string'},
4865 'Scope': {'type': 'string'}},
4866 'required': ['Scope', 'Directive'],
4868 'PrivateAddress': {'additionalProperties': False,
4869 'properties': {'Target': {'type': 'string'}},
4870 'required': ['Target'],
4872 'PrivateAddressResults': {'additionalProperties': False,
4873 'properties': {'PrivateAddress': {'type': 'string'}},
4874 'required': ['PrivateAddress'],
4876 'ProvisioningScriptParams': {'additionalProperties': False,
4877 'properties': {'DataDir': {'type': 'string'},
4878 'DisablePackageCommands': {'type': 'boolean'},
4879 'MachineId': {'type': 'string'},
4880 'Nonce': {'type': 'string'}},
4881 'required': ['MachineId',
4884 'DisablePackageCommands'],
4886 'ProvisioningScriptResult': {'additionalProperties': False,
4887 'properties': {'Script': {'type': 'string'}},
4888 'required': ['Script'],
4890 'PublicAddress': {'additionalProperties': False,
4891 'properties': {'Target': {'type': 'string'}},
4892 'required': ['Target'],
4894 'PublicAddressResults': {'additionalProperties': False,
4895 'properties': {'PublicAddress': {'type': 'string'}},
4896 'required': ['PublicAddress'],
4898 'RelationStatus': {'additionalProperties': False,
4899 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
4901 'Id': {'type': 'integer'},
4902 'Interface': {'type': 'string'},
4903 'Key': {'type': 'string'},
4904 'Scope': {'type': 'string'}},
4911 'ResolveCharmResult': {'additionalProperties': False,
4912 'properties': {'Error': {'type': 'string'},
4913 'URL': {'$ref': '#/definitions/URL'}},
4915 'ResolveCharmResults': {'additionalProperties': False,
4916 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
4918 'required': ['URLs'],
4920 'ResolveCharms': {'additionalProperties': False,
4921 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
4923 'required': ['References'],
4925 'Resolved': {'additionalProperties': False,
4926 'properties': {'Retry': {'type': 'boolean'},
4927 'UnitName': {'type': 'string'}},
4928 'required': ['UnitName', 'Retry'],
4930 'ServiceStatus': {'additionalProperties': False,
4931 'properties': {'CanUpgradeTo': {'type': 'string'},
4932 'Charm': {'type': 'string'},
4933 'Err': {'additionalProperties': True,
4935 'Exposed': {'type': 'boolean'},
4936 'Life': {'type': 'string'},
4937 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
4939 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
4942 'Status': {'$ref': '#/definitions/DetailedStatus'},
4943 'SubordinateTo': {'items': {'type': 'string'},
4945 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
4958 'SetConstraints': {'additionalProperties': False,
4959 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
4960 'ServiceName': {'type': 'string'}},
4961 'required': ['ServiceName', 'Constraints'],
4963 'SetModelAgentVersion': {'additionalProperties': False,
4964 'properties': {'Version': {'$ref': '#/definitions/Number'}},
4965 'required': ['Version'],
4967 'StatusHistoryArgs': {'additionalProperties': False,
4968 'properties': {'Kind': {'type': 'string'},
4969 'Name': {'type': 'string'},
4970 'Size': {'type': 'integer'}},
4971 'required': ['Kind', 'Size', 'Name'],
4973 'StatusHistoryResults': {'additionalProperties': False,
4974 'properties': {'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
4976 'required': ['Statuses'],
4978 'StatusParams': {'additionalProperties': False,
4979 'properties': {'Patterns': {'items': {'type': 'string'},
4981 'required': ['Patterns'],
4983 'Tools': {'additionalProperties': False,
4984 'properties': {'sha256': {'type': 'string'},
4985 'size': {'type': 'integer'},
4986 'url': {'type': 'string'},
4987 'version': {'$ref': '#/definitions/Binary'}},
4988 'required': ['version', 'url', 'size'],
4990 'URL': {'additionalProperties': False,
4991 'properties': {'Channel': {'type': 'string'},
4992 'Name': {'type': 'string'},
4993 'Revision': {'type': 'integer'},
4994 'Schema': {'type': 'string'},
4995 'Series': {'type': 'string'},
4996 'User': {'type': 'string'}},
4997 'required': ['Schema',
5004 'UnitStatus': {'additionalProperties': False,
5005 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
5006 'Charm': {'type': 'string'},
5007 'Machine': {'type': 'string'},
5008 'OpenedPorts': {'items': {'type': 'string'},
5010 'PublicAddress': {'type': 'string'},
5011 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
5013 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
5014 'required': ['AgentStatus',
5022 'Value': {'additionalProperties': False,
5023 'properties': {'arch': {'type': 'string'},
5024 'container': {'type': 'string'},
5025 'cpu-cores': {'type': 'integer'},
5026 'cpu-power': {'type': 'integer'},
5027 'instance-type': {'type': 'string'},
5028 'mem': {'type': 'integer'},
5029 'root-disk': {'type': 'integer'},
5030 'spaces': {'items': {'type': 'string'},
5032 'tags': {'items': {'type': 'string'},
5034 'virt-type': {'type': 'string'}},
5036 'caveat': {'additionalProperties': False,
5037 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5038 'location': {'$ref': '#/definitions/packet'},
5039 'verificationId': {'$ref': '#/definitions/packet'}},
5040 'required': ['location',
5044 'packet': {'additionalProperties': False,
5045 'properties': {'headerLen': {'type': 'integer'},
5046 'start': {'type': 'integer'},
5047 'totalLen': {'type': 'integer'}},
5048 'required': ['start', 'totalLen', 'headerLen'],
5050 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
5052 'AbortCurrentUpgrade': {'type': 'object'},
5053 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
5055 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
5057 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5058 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5060 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5061 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5063 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
5065 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
5066 'Result': {'$ref': '#/definitions/CharmInfo'}},
5068 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
5070 'DestroyModel': {'type': 'object'},
5071 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
5072 'Result': {'$ref': '#/definitions/FindToolsResult'}},
5074 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
5075 'Result': {'$ref': '#/definitions/FullStatus'}},
5077 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
5078 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
5080 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
5082 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5083 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5085 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5087 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
5089 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
5091 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
5093 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
5095 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
5096 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
5098 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
5099 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
5101 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
5102 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
5104 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
5105 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
5107 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
5109 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5110 'Result': {'$ref': '#/definitions/ErrorResults'}},
5112 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
5114 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
5116 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryArgs'},
5117 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
5119 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
5124 #@ReturnMapping(APIHostPortsResult)
5125 async def APIHostPorts(self
):
5128 Returns -> typing.Sequence[~HostPort]
5130 # map input types to rpc msg
5132 msg
= dict(Type
='Client', Request
='APIHostPorts', Version
=1, Params
=params
)
5134 reply
= await self
.rpc(msg
)
5135 return self
._map
(reply
, APIHostPorts
)
5139 #@ReturnMapping(None)
5140 async def AbortCurrentUpgrade(self
):
5145 # map input types to rpc msg
5147 msg
= dict(Type
='Client', Request
='AbortCurrentUpgrade', Version
=1, Params
=params
)
5149 reply
= await self
.rpc(msg
)
5150 return self
._map
(reply
, AbortCurrentUpgrade
)
5154 #@ReturnMapping(None)
5155 async def AddCharm(self
, channel
, url
):
5161 # map input types to rpc msg
5163 msg
= dict(Type
='Client', Request
='AddCharm', Version
=1, Params
=params
)
5164 params
['Channel'] = channel
5166 reply
= await self
.rpc(msg
)
5167 return self
._map
(reply
, AddCharm
)
5171 #@ReturnMapping(None)
5172 async def AddCharmWithAuthorization(self
, charmstoremacaroon
, channel
, url
):
5174 charmstoremacaroon : ~Macaroon
5179 # map input types to rpc msg
5181 msg
= dict(Type
='Client', Request
='AddCharmWithAuthorization', Version
=1, Params
=params
)
5182 params
['CharmStoreMacaroon'] = charmstoremacaroon
5183 params
['Channel'] = channel
5185 reply
= await self
.rpc(msg
)
5186 return self
._map
(reply
, AddCharmWithAuthorization
)
5190 #@ReturnMapping(AddMachinesResults)
5191 async def AddMachines(self
, machineparams
):
5193 machineparams : typing.Sequence[~AddMachineParams]
5194 Returns -> typing.Sequence[~AddMachinesResult]
5196 # map input types to rpc msg
5198 msg
= dict(Type
='Client', Request
='AddMachines', Version
=1, Params
=params
)
5199 params
['MachineParams'] = machineparams
5200 reply
= await self
.rpc(msg
)
5201 return self
._map
(reply
, AddMachines
)
5205 #@ReturnMapping(AddMachinesResults)
5206 async def AddMachinesV2(self
, machineparams
):
5208 machineparams : typing.Sequence[~AddMachineParams]
5209 Returns -> typing.Sequence[~AddMachinesResult]
5211 # map input types to rpc msg
5213 msg
= dict(Type
='Client', Request
='AddMachinesV2', Version
=1, Params
=params
)
5214 params
['MachineParams'] = machineparams
5215 reply
= await self
.rpc(msg
)
5216 return self
._map
(reply
, AddMachinesV2
)
5220 #@ReturnMapping(AgentVersionResult)
5221 async def AgentVersion(self
):
5226 # map input types to rpc msg
5228 msg
= dict(Type
='Client', Request
='AgentVersion', Version
=1, Params
=params
)
5230 reply
= await self
.rpc(msg
)
5231 return self
._map
(reply
, AgentVersion
)
5235 #@ReturnMapping(CharmInfo)
5236 async def CharmInfo(self
, charmurl
):
5241 # map input types to rpc msg
5243 msg
= dict(Type
='Client', Request
='CharmInfo', Version
=1, Params
=params
)
5244 params
['CharmURL'] = charmurl
5245 reply
= await self
.rpc(msg
)
5246 return self
._map
(reply
, CharmInfo
)
5250 #@ReturnMapping(None)
5251 async def DestroyMachines(self
, machinenames
, force
):
5253 machinenames : typing.Sequence[str]
5257 # map input types to rpc msg
5259 msg
= dict(Type
='Client', Request
='DestroyMachines', Version
=1, Params
=params
)
5260 params
['MachineNames'] = machinenames
5261 params
['Force'] = force
5262 reply
= await self
.rpc(msg
)
5263 return self
._map
(reply
, DestroyMachines
)
5267 #@ReturnMapping(None)
5268 async def DestroyModel(self
):
5273 # map input types to rpc msg
5275 msg
= dict(Type
='Client', Request
='DestroyModel', Version
=1, Params
=params
)
5277 reply
= await self
.rpc(msg
)
5278 return self
._map
(reply
, DestroyModel
)
5282 #@ReturnMapping(FindToolsResult)
5283 async def FindTools(self
, majorversion
, series
, minorversion
, arch
, number
):
5290 Returns -> typing.Union[~Error, typing.Sequence[~Tools]]
5292 # map input types to rpc msg
5294 msg
= dict(Type
='Client', Request
='FindTools', Version
=1, Params
=params
)
5295 params
['MajorVersion'] = majorversion
5296 params
['Series'] = series
5297 params
['MinorVersion'] = minorversion
5298 params
['Arch'] = arch
5299 params
['Number'] = number
5300 reply
= await self
.rpc(msg
)
5301 return self
._map
(reply
, FindTools
)
5305 #@ReturnMapping(FullStatus)
5306 async def FullStatus(self
, patterns
):
5308 patterns : typing.Sequence[str]
5309 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], typing.Sequence[~RelationStatus]]
5311 # map input types to rpc msg
5313 msg
= dict(Type
='Client', Request
='FullStatus', Version
=1, Params
=params
)
5314 params
['Patterns'] = patterns
5315 reply
= await self
.rpc(msg
)
5316 return self
._map
(reply
, FullStatus
)
5320 #@ReturnMapping(GetBundleChangesResults)
5321 async def GetBundleChanges(self
, yaml
):
5324 Returns -> typing.Sequence[~BundleChangesChange]
5326 # map input types to rpc msg
5328 msg
= dict(Type
='Client', Request
='GetBundleChanges', Version
=1, Params
=params
)
5329 params
['yaml'] = yaml
5330 reply
= await self
.rpc(msg
)
5331 return self
._map
(reply
, GetBundleChanges
)
5335 #@ReturnMapping(GetConstraintsResults)
5336 async def GetModelConstraints(self
):
5341 # map input types to rpc msg
5343 msg
= dict(Type
='Client', Request
='GetModelConstraints', Version
=1, Params
=params
)
5345 reply
= await self
.rpc(msg
)
5346 return self
._map
(reply
, GetModelConstraints
)
5350 #@ReturnMapping(AddMachinesResults)
5351 async def InjectMachines(self
, machineparams
):
5353 machineparams : typing.Sequence[~AddMachineParams]
5354 Returns -> typing.Sequence[~AddMachinesResult]
5356 # map input types to rpc msg
5358 msg
= dict(Type
='Client', Request
='InjectMachines', Version
=1, Params
=params
)
5359 params
['MachineParams'] = machineparams
5360 reply
= await self
.rpc(msg
)
5361 return self
._map
(reply
, InjectMachines
)
5365 #@ReturnMapping(ModelConfigResults)
5366 async def ModelGet(self
):
5369 Returns -> typing.Mapping[str, typing.Any]
5371 # map input types to rpc msg
5373 msg
= dict(Type
='Client', Request
='ModelGet', Version
=1, Params
=params
)
5375 reply
= await self
.rpc(msg
)
5376 return self
._map
(reply
, ModelGet
)
5380 #@ReturnMapping(ModelInfo)
5381 async def ModelInfo(self
):
5384 Returns -> typing.Union[typing.Sequence[~ModelUserInfo], ~EntityStatus]
5386 # map input types to rpc msg
5388 msg
= dict(Type
='Client', Request
='ModelInfo', Version
=1, Params
=params
)
5390 reply
= await self
.rpc(msg
)
5391 return self
._map
(reply
, ModelInfo
)
5395 #@ReturnMapping(None)
5396 async def ModelSet(self
, config
):
5398 config : typing.Mapping[str, typing.Any]
5401 # map input types to rpc msg
5403 msg
= dict(Type
='Client', Request
='ModelSet', Version
=1, Params
=params
)
5404 params
['Config'] = config
5405 reply
= await self
.rpc(msg
)
5406 return self
._map
(reply
, ModelSet
)
5410 #@ReturnMapping(None)
5411 async def ModelUnset(self
, keys
):
5413 keys : typing.Sequence[str]
5416 # map input types to rpc msg
5418 msg
= dict(Type
='Client', Request
='ModelUnset', Version
=1, Params
=params
)
5419 params
['Keys'] = keys
5420 reply
= await self
.rpc(msg
)
5421 return self
._map
(reply
, ModelUnset
)
5425 #@ReturnMapping(ModelUserInfoResults)
5426 async def ModelUserInfo(self
):
5429 Returns -> typing.Sequence[~ModelUserInfoResult]
5431 # map input types to rpc msg
5433 msg
= dict(Type
='Client', Request
='ModelUserInfo', Version
=1, Params
=params
)
5435 reply
= await self
.rpc(msg
)
5436 return self
._map
(reply
, ModelUserInfo
)
5440 #@ReturnMapping(PrivateAddressResults)
5441 async def PrivateAddress(self
, target
):
5446 # map input types to rpc msg
5448 msg
= dict(Type
='Client', Request
='PrivateAddress', Version
=1, Params
=params
)
5449 params
['Target'] = target
5450 reply
= await self
.rpc(msg
)
5451 return self
._map
(reply
, PrivateAddress
)
5455 #@ReturnMapping(ProvisioningScriptResult)
5456 async def ProvisioningScript(self
, datadir
, disablepackagecommands
, nonce
, machineid
):
5459 disablepackagecommands : bool
5464 # map input types to rpc msg
5466 msg
= dict(Type
='Client', Request
='ProvisioningScript', Version
=1, Params
=params
)
5467 params
['DataDir'] = datadir
5468 params
['DisablePackageCommands'] = disablepackagecommands
5469 params
['Nonce'] = nonce
5470 params
['MachineId'] = machineid
5471 reply
= await self
.rpc(msg
)
5472 return self
._map
(reply
, ProvisioningScript
)
5476 #@ReturnMapping(PublicAddressResults)
5477 async def PublicAddress(self
, target
):
5482 # map input types to rpc msg
5484 msg
= dict(Type
='Client', Request
='PublicAddress', Version
=1, Params
=params
)
5485 params
['Target'] = target
5486 reply
= await self
.rpc(msg
)
5487 return self
._map
(reply
, PublicAddress
)
5491 #@ReturnMapping(ResolveCharmResults)
5492 async def ResolveCharms(self
, references
):
5494 references : typing.Sequence[~URL]
5495 Returns -> typing.Sequence[~ResolveCharmResult]
5497 # map input types to rpc msg
5499 msg
= dict(Type
='Client', Request
='ResolveCharms', Version
=1, Params
=params
)
5500 params
['References'] = references
5501 reply
= await self
.rpc(msg
)
5502 return self
._map
(reply
, ResolveCharms
)
5506 #@ReturnMapping(None)
5507 async def Resolved(self
, unitname
, retry
):
5513 # map input types to rpc msg
5515 msg
= dict(Type
='Client', Request
='Resolved', Version
=1, Params
=params
)
5516 params
['UnitName'] = unitname
5517 params
['Retry'] = retry
5518 reply
= await self
.rpc(msg
)
5519 return self
._map
(reply
, Resolved
)
5523 #@ReturnMapping(ErrorResults)
5524 async def RetryProvisioning(self
, entities
):
5526 entities : typing.Sequence[~Entity]
5527 Returns -> typing.Sequence[~ErrorResult]
5529 # map input types to rpc msg
5531 msg
= dict(Type
='Client', Request
='RetryProvisioning', Version
=1, Params
=params
)
5532 params
['Entities'] = entities
5533 reply
= await self
.rpc(msg
)
5534 return self
._map
(reply
, RetryProvisioning
)
5538 #@ReturnMapping(None)
5539 async def SetModelAgentVersion(self
, build
, minor
, tag
, patch
, major
):
5548 # map input types to rpc msg
5550 msg
= dict(Type
='Client', Request
='SetModelAgentVersion', Version
=1, Params
=params
)
5551 params
['Build'] = build
5552 params
['Minor'] = minor
5554 params
['Patch'] = patch
5555 params
['Major'] = major
5556 reply
= await self
.rpc(msg
)
5557 return self
._map
(reply
, SetModelAgentVersion
)
5561 #@ReturnMapping(None)
5562 async def SetModelConstraints(self
, constraints
, servicename
):
5564 constraints : ~Value
5568 # map input types to rpc msg
5570 msg
= dict(Type
='Client', Request
='SetModelConstraints', Version
=1, Params
=params
)
5571 params
['Constraints'] = constraints
5572 params
['ServiceName'] = servicename
5573 reply
= await self
.rpc(msg
)
5574 return self
._map
(reply
, SetModelConstraints
)
5578 #@ReturnMapping(StatusHistoryResults)
5579 async def StatusHistory(self
, name
, kind
, size
):
5584 Returns -> typing.Sequence[~DetailedStatus]
5586 # map input types to rpc msg
5588 msg
= dict(Type
='Client', Request
='StatusHistory', Version
=1, Params
=params
)
5589 params
['Name'] = name
5590 params
['Kind'] = kind
5591 params
['Size'] = size
5592 reply
= await self
.rpc(msg
)
5593 return self
._map
(reply
, StatusHistory
)
5597 #@ReturnMapping(AllWatcherId)
5598 async def WatchAll(self
):
5603 # map input types to rpc msg
5605 msg
= dict(Type
='Client', Request
='WatchAll', Version
=1, Params
=params
)
5607 reply
= await self
.rpc(msg
)
5608 return self
._map
(reply
, WatchAll
)
5611 class Controller(Type
):
5614 schema
= {'definitions': {'AllWatcherId': {'additionalProperties': False,
5615 'properties': {'AllWatcherId': {'type': 'string'}},
5616 'required': ['AllWatcherId'],
5618 'DestroyControllerArgs': {'additionalProperties': False,
5619 'properties': {'destroy-models': {'type': 'boolean'}},
5620 'required': ['destroy-models'],
5622 'Entities': {'additionalProperties': False,
5623 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5625 'required': ['Entities'],
5627 'Entity': {'additionalProperties': False,
5628 'properties': {'Tag': {'type': 'string'}},
5629 'required': ['Tag'],
5631 'Error': {'additionalProperties': False,
5632 'properties': {'Code': {'type': 'string'},
5633 'Info': {'$ref': '#/definitions/ErrorInfo'},
5634 'Message': {'type': 'string'}},
5635 'required': ['Message', 'Code'],
5637 'ErrorInfo': {'additionalProperties': False,
5638 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5639 'MacaroonPath': {'type': 'string'}},
5641 'InitiateModelMigrationArgs': {'additionalProperties': False,
5642 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
5644 'required': ['specs'],
5646 'InitiateModelMigrationResult': {'additionalProperties': False,
5647 'properties': {'error': {'$ref': '#/definitions/Error'},
5648 'id': {'type': 'string'},
5649 'model-tag': {'type': 'string'}},
5650 'required': ['model-tag',
5654 'InitiateModelMigrationResults': {'additionalProperties': False,
5655 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
5657 'required': ['results'],
5659 'Macaroon': {'additionalProperties': False,
5660 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5662 'data': {'items': {'type': 'integer'},
5664 'id': {'$ref': '#/definitions/packet'},
5665 'location': {'$ref': '#/definitions/packet'},
5666 'sig': {'items': {'type': 'integer'},
5668 'required': ['data',
5674 'Model': {'additionalProperties': False,
5675 'properties': {'Name': {'type': 'string'},
5676 'OwnerTag': {'type': 'string'},
5677 'UUID': {'type': 'string'}},
5678 'required': ['Name', 'UUID', 'OwnerTag'],
5680 'ModelBlockInfo': {'additionalProperties': False,
5681 'properties': {'blocks': {'items': {'type': 'string'},
5683 'model-uuid': {'type': 'string'},
5684 'name': {'type': 'string'},
5685 'owner-tag': {'type': 'string'}},
5686 'required': ['name',
5691 'ModelBlockInfoList': {'additionalProperties': False,
5692 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
5695 'ModelConfigResults': {'additionalProperties': False,
5696 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
5699 'required': ['Config'],
5701 'ModelMigrationSpec': {'additionalProperties': False,
5702 'properties': {'model-tag': {'type': 'string'},
5703 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
5704 'required': ['model-tag',
5707 'ModelMigrationTargetInfo': {'additionalProperties': False,
5708 'properties': {'addrs': {'items': {'type': 'string'},
5710 'auth-tag': {'type': 'string'},
5711 'ca-cert': {'type': 'string'},
5712 'controller-tag': {'type': 'string'},
5713 'password': {'type': 'string'}},
5714 'required': ['controller-tag',
5720 'ModelStatus': {'additionalProperties': False,
5721 'properties': {'hosted-machine-count': {'type': 'integer'},
5722 'life': {'type': 'string'},
5723 'model-tag': {'type': 'string'},
5724 'owner-tag': {'type': 'string'},
5725 'service-count': {'type': 'integer'}},
5726 'required': ['model-tag',
5728 'hosted-machine-count',
5732 'ModelStatusResults': {'additionalProperties': False,
5733 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
5735 'required': ['models'],
5737 'RemoveBlocksArgs': {'additionalProperties': False,
5738 'properties': {'all': {'type': 'boolean'}},
5739 'required': ['all'],
5741 'UserModel': {'additionalProperties': False,
5742 'properties': {'LastConnection': {'format': 'date-time',
5744 'Model': {'$ref': '#/definitions/Model'}},
5745 'required': ['Model', 'LastConnection'],
5747 'UserModelList': {'additionalProperties': False,
5748 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
5750 'required': ['UserModels'],
5752 'caveat': {'additionalProperties': False,
5753 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5754 'location': {'$ref': '#/definitions/packet'},
5755 'verificationId': {'$ref': '#/definitions/packet'}},
5756 'required': ['location',
5760 'packet': {'additionalProperties': False,
5761 'properties': {'headerLen': {'type': 'integer'},
5762 'start': {'type': 'integer'},
5763 'totalLen': {'type': 'integer'}},
5764 'required': ['start', 'totalLen', 'headerLen'],
5766 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
5768 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
5770 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
5771 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
5773 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
5775 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5777 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5778 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
5780 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
5782 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
5787 #@ReturnMapping(UserModelList)
5788 async def AllModels(self
):
5791 Returns -> typing.Sequence[~UserModel]
5793 # map input types to rpc msg
5795 msg
= dict(Type
='Controller', Request
='AllModels', Version
=2, Params
=params
)
5797 reply
= await self
.rpc(msg
)
5798 return self
._map
(reply
, AllModels
)
5802 #@ReturnMapping(None)
5803 async def DestroyController(self
, destroy_models
):
5805 destroy_models : bool
5808 # map input types to rpc msg
5810 msg
= dict(Type
='Controller', Request
='DestroyController', Version
=2, Params
=params
)
5811 params
['destroy-models'] = destroy_models
5812 reply
= await self
.rpc(msg
)
5813 return self
._map
(reply
, DestroyController
)
5817 #@ReturnMapping(InitiateModelMigrationResults)
5818 async def InitiateModelMigration(self
, specs
):
5820 specs : typing.Sequence[~ModelMigrationSpec]
5821 Returns -> typing.Sequence[~InitiateModelMigrationResult]
5823 # map input types to rpc msg
5825 msg
= dict(Type
='Controller', Request
='InitiateModelMigration', Version
=2, Params
=params
)
5826 params
['specs'] = specs
5827 reply
= await self
.rpc(msg
)
5828 return self
._map
(reply
, InitiateModelMigration
)
5832 #@ReturnMapping(ModelBlockInfoList)
5833 async def ListBlockedModels(self
):
5836 Returns -> typing.Sequence[~ModelBlockInfo]
5838 # map input types to rpc msg
5840 msg
= dict(Type
='Controller', Request
='ListBlockedModels', Version
=2, Params
=params
)
5842 reply
= await self
.rpc(msg
)
5843 return self
._map
(reply
, ListBlockedModels
)
5847 #@ReturnMapping(ModelConfigResults)
5848 async def ModelConfig(self
):
5851 Returns -> typing.Mapping[str, typing.Any]
5853 # map input types to rpc msg
5855 msg
= dict(Type
='Controller', Request
='ModelConfig', Version
=2, Params
=params
)
5857 reply
= await self
.rpc(msg
)
5858 return self
._map
(reply
, ModelConfig
)
5862 #@ReturnMapping(ModelStatusResults)
5863 async def ModelStatus(self
, entities
):
5865 entities : typing.Sequence[~Entity]
5866 Returns -> typing.Sequence[~ModelStatus]
5868 # map input types to rpc msg
5870 msg
= dict(Type
='Controller', Request
='ModelStatus', Version
=2, Params
=params
)
5871 params
['Entities'] = entities
5872 reply
= await self
.rpc(msg
)
5873 return self
._map
(reply
, ModelStatus
)
5877 #@ReturnMapping(None)
5878 async def RemoveBlocks(self
, all_
):
5883 # map input types to rpc msg
5885 msg
= dict(Type
='Controller', Request
='RemoveBlocks', Version
=2, Params
=params
)
5886 params
['all'] = all_
5887 reply
= await self
.rpc(msg
)
5888 return self
._map
(reply
, RemoveBlocks
)
5892 #@ReturnMapping(AllWatcherId)
5893 async def WatchAllModels(self
):
5898 # map input types to rpc msg
5900 msg
= dict(Type
='Controller', Request
='WatchAllModels', Version
=2, Params
=params
)
5902 reply
= await self
.rpc(msg
)
5903 return self
._map
(reply
, WatchAllModels
)
5906 class Deployer(Type
):
5909 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
5910 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
5913 'required': ['Servers'],
5915 'Address': {'additionalProperties': False,
5916 'properties': {'Scope': {'type': 'string'},
5917 'SpaceName': {'type': 'string'},
5918 'Type': {'type': 'string'},
5919 'Value': {'type': 'string'}},
5920 'required': ['Value', 'Type', 'Scope'],
5922 'BytesResult': {'additionalProperties': False,
5923 'properties': {'Result': {'items': {'type': 'integer'},
5925 'required': ['Result'],
5927 'DeployerConnectionValues': {'additionalProperties': False,
5928 'properties': {'APIAddresses': {'items': {'type': 'string'},
5930 'StateAddresses': {'items': {'type': 'string'},
5932 'required': ['StateAddresses',
5935 'Entities': {'additionalProperties': False,
5936 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5938 'required': ['Entities'],
5940 'Entity': {'additionalProperties': False,
5941 'properties': {'Tag': {'type': 'string'}},
5942 'required': ['Tag'],
5944 'EntityPassword': {'additionalProperties': False,
5945 'properties': {'Password': {'type': 'string'},
5946 'Tag': {'type': 'string'}},
5947 'required': ['Tag', 'Password'],
5949 'EntityPasswords': {'additionalProperties': False,
5950 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5952 'required': ['Changes'],
5954 'Error': {'additionalProperties': False,
5955 'properties': {'Code': {'type': 'string'},
5956 'Info': {'$ref': '#/definitions/ErrorInfo'},
5957 'Message': {'type': 'string'}},
5958 'required': ['Message', 'Code'],
5960 'ErrorInfo': {'additionalProperties': False,
5961 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5962 'MacaroonPath': {'type': 'string'}},
5964 'ErrorResult': {'additionalProperties': False,
5965 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5966 'required': ['Error'],
5968 'ErrorResults': {'additionalProperties': False,
5969 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
5971 'required': ['Results'],
5973 'HostPort': {'additionalProperties': False,
5974 'properties': {'Address': {'$ref': '#/definitions/Address'},
5975 'Port': {'type': 'integer'}},
5976 'required': ['Address', 'Port'],
5978 'LifeResult': {'additionalProperties': False,
5979 'properties': {'Error': {'$ref': '#/definitions/Error'},
5980 'Life': {'type': 'string'}},
5981 'required': ['Life', 'Error'],
5983 'LifeResults': {'additionalProperties': False,
5984 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
5986 'required': ['Results'],
5988 'Macaroon': {'additionalProperties': False,
5989 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5991 'data': {'items': {'type': 'integer'},
5993 'id': {'$ref': '#/definitions/packet'},
5994 'location': {'$ref': '#/definitions/packet'},
5995 'sig': {'items': {'type': 'integer'},
5997 'required': ['data',
6003 'NotifyWatchResult': {'additionalProperties': False,
6004 'properties': {'Error': {'$ref': '#/definitions/Error'},
6005 'NotifyWatcherId': {'type': 'string'}},
6006 'required': ['NotifyWatcherId', 'Error'],
6008 'StringResult': {'additionalProperties': False,
6009 'properties': {'Error': {'$ref': '#/definitions/Error'},
6010 'Result': {'type': 'string'}},
6011 'required': ['Error', 'Result'],
6013 'StringsResult': {'additionalProperties': False,
6014 'properties': {'Error': {'$ref': '#/definitions/Error'},
6015 'Result': {'items': {'type': 'string'},
6017 'required': ['Error', 'Result'],
6019 'StringsWatchResult': {'additionalProperties': False,
6020 'properties': {'Changes': {'items': {'type': 'string'},
6022 'Error': {'$ref': '#/definitions/Error'},
6023 'StringsWatcherId': {'type': 'string'}},
6024 'required': ['StringsWatcherId',
6028 'StringsWatchResults': {'additionalProperties': False,
6029 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
6031 'required': ['Results'],
6033 'caveat': {'additionalProperties': False,
6034 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6035 'location': {'$ref': '#/definitions/packet'},
6036 'verificationId': {'$ref': '#/definitions/packet'}},
6037 'required': ['location',
6041 'packet': {'additionalProperties': False,
6042 'properties': {'headerLen': {'type': 'integer'},
6043 'start': {'type': 'integer'},
6044 'totalLen': {'type': 'integer'}},
6045 'required': ['start', 'totalLen', 'headerLen'],
6047 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6049 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
6051 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
6053 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
6055 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6056 'Result': {'$ref': '#/definitions/LifeResults'}},
6058 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
6060 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6061 'Result': {'$ref': '#/definitions/ErrorResults'}},
6063 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6064 'Result': {'$ref': '#/definitions/ErrorResults'}},
6066 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6068 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6070 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6071 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6076 #@ReturnMapping(StringsResult)
6077 async def APIAddresses(self
):
6080 Returns -> typing.Union[~Error, typing.Sequence[str]]
6082 # map input types to rpc msg
6084 msg
= dict(Type
='Deployer', Request
='APIAddresses', Version
=1, Params
=params
)
6086 reply
= await self
.rpc(msg
)
6087 return self
._map
(reply
, APIAddresses
)
6091 #@ReturnMapping(APIHostPortsResult)
6092 async def APIHostPorts(self
):
6095 Returns -> typing.Sequence[~HostPort]
6097 # map input types to rpc msg
6099 msg
= dict(Type
='Deployer', Request
='APIHostPorts', Version
=1, Params
=params
)
6101 reply
= await self
.rpc(msg
)
6102 return self
._map
(reply
, APIHostPorts
)
6106 #@ReturnMapping(BytesResult)
6107 async def CACert(self
):
6110 Returns -> typing.Sequence[int]
6112 # map input types to rpc msg
6114 msg
= dict(Type
='Deployer', Request
='CACert', Version
=1, Params
=params
)
6116 reply
= await self
.rpc(msg
)
6117 return self
._map
(reply
, CACert
)
6121 #@ReturnMapping(DeployerConnectionValues)
6122 async def ConnectionInfo(self
):
6125 Returns -> typing.Sequence[str]
6127 # map input types to rpc msg
6129 msg
= dict(Type
='Deployer', Request
='ConnectionInfo', Version
=1, Params
=params
)
6131 reply
= await self
.rpc(msg
)
6132 return self
._map
(reply
, ConnectionInfo
)
6136 #@ReturnMapping(LifeResults)
6137 async def Life(self
, entities
):
6139 entities : typing.Sequence[~Entity]
6140 Returns -> typing.Sequence[~LifeResult]
6142 # map input types to rpc msg
6144 msg
= dict(Type
='Deployer', Request
='Life', Version
=1, Params
=params
)
6145 params
['Entities'] = entities
6146 reply
= await self
.rpc(msg
)
6147 return self
._map
(reply
, Life
)
6151 #@ReturnMapping(StringResult)
6152 async def ModelUUID(self
):
6155 Returns -> typing.Union[~Error, str]
6157 # map input types to rpc msg
6159 msg
= dict(Type
='Deployer', Request
='ModelUUID', Version
=1, Params
=params
)
6161 reply
= await self
.rpc(msg
)
6162 return self
._map
(reply
, ModelUUID
)
6166 #@ReturnMapping(ErrorResults)
6167 async def Remove(self
, entities
):
6169 entities : typing.Sequence[~Entity]
6170 Returns -> typing.Sequence[~ErrorResult]
6172 # map input types to rpc msg
6174 msg
= dict(Type
='Deployer', Request
='Remove', Version
=1, Params
=params
)
6175 params
['Entities'] = entities
6176 reply
= await self
.rpc(msg
)
6177 return self
._map
(reply
, Remove
)
6181 #@ReturnMapping(ErrorResults)
6182 async def SetPasswords(self
, changes
):
6184 changes : typing.Sequence[~EntityPassword]
6185 Returns -> typing.Sequence[~ErrorResult]
6187 # map input types to rpc msg
6189 msg
= dict(Type
='Deployer', Request
='SetPasswords', Version
=1, Params
=params
)
6190 params
['Changes'] = changes
6191 reply
= await self
.rpc(msg
)
6192 return self
._map
(reply
, SetPasswords
)
6196 #@ReturnMapping(StringsResult)
6197 async def StateAddresses(self
):
6200 Returns -> typing.Union[~Error, typing.Sequence[str]]
6202 # map input types to rpc msg
6204 msg
= dict(Type
='Deployer', Request
='StateAddresses', Version
=1, Params
=params
)
6206 reply
= await self
.rpc(msg
)
6207 return self
._map
(reply
, StateAddresses
)
6211 #@ReturnMapping(NotifyWatchResult)
6212 async def WatchAPIHostPorts(self
):
6215 Returns -> typing.Union[~Error, str]
6217 # map input types to rpc msg
6219 msg
= dict(Type
='Deployer', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
6221 reply
= await self
.rpc(msg
)
6222 return self
._map
(reply
, WatchAPIHostPorts
)
6226 #@ReturnMapping(StringsWatchResults)
6227 async def WatchUnits(self
, entities
):
6229 entities : typing.Sequence[~Entity]
6230 Returns -> typing.Sequence[~StringsWatchResult]
6232 # map input types to rpc msg
6234 msg
= dict(Type
='Deployer', Request
='WatchUnits', Version
=1, Params
=params
)
6235 params
['Entities'] = entities
6236 reply
= await self
.rpc(msg
)
6237 return self
._map
(reply
, WatchUnits
)
6240 class DiscoverSpaces(Type
):
6241 name
= 'DiscoverSpaces'
6243 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
6244 'properties': {'SpaceTag': {'type': 'string'},
6245 'SubnetProviderId': {'type': 'string'},
6246 'SubnetTag': {'type': 'string'},
6247 'Zones': {'items': {'type': 'string'},
6249 'required': ['SpaceTag'],
6251 'AddSubnetsParams': {'additionalProperties': False,
6252 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
6254 'required': ['Subnets'],
6256 'CreateSpaceParams': {'additionalProperties': False,
6257 'properties': {'ProviderId': {'type': 'string'},
6258 'Public': {'type': 'boolean'},
6259 'SpaceTag': {'type': 'string'},
6260 'SubnetTags': {'items': {'type': 'string'},
6262 'required': ['SubnetTags',
6266 'CreateSpacesParams': {'additionalProperties': False,
6267 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
6269 'required': ['Spaces'],
6271 'DiscoverSpacesResults': {'additionalProperties': False,
6272 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
6274 'required': ['Results'],
6276 'Error': {'additionalProperties': False,
6277 'properties': {'Code': {'type': 'string'},
6278 'Info': {'$ref': '#/definitions/ErrorInfo'},
6279 'Message': {'type': 'string'}},
6280 'required': ['Message', 'Code'],
6282 'ErrorInfo': {'additionalProperties': False,
6283 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6284 'MacaroonPath': {'type': 'string'}},
6286 'ErrorResult': {'additionalProperties': False,
6287 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6288 'required': ['Error'],
6290 'ErrorResults': {'additionalProperties': False,
6291 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6293 'required': ['Results'],
6295 'ListSubnetsResults': {'additionalProperties': False,
6296 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
6298 'required': ['Results'],
6300 'Macaroon': {'additionalProperties': False,
6301 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6303 'data': {'items': {'type': 'integer'},
6305 'id': {'$ref': '#/definitions/packet'},
6306 'location': {'$ref': '#/definitions/packet'},
6307 'sig': {'items': {'type': 'integer'},
6309 'required': ['data',
6315 'ModelConfigResult': {'additionalProperties': False,
6316 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6319 'required': ['Config'],
6321 'ProviderSpace': {'additionalProperties': False,
6322 'properties': {'Error': {'$ref': '#/definitions/Error'},
6323 'Name': {'type': 'string'},
6324 'ProviderId': {'type': 'string'},
6325 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
6327 'required': ['Name',
6331 'Subnet': {'additionalProperties': False,
6332 'properties': {'CIDR': {'type': 'string'},
6333 'Life': {'type': 'string'},
6334 'ProviderId': {'type': 'string'},
6335 'SpaceTag': {'type': 'string'},
6336 'StaticRangeHighIP': {'items': {'type': 'integer'},
6338 'StaticRangeLowIP': {'items': {'type': 'integer'},
6340 'Status': {'type': 'string'},
6341 'VLANTag': {'type': 'integer'},
6342 'Zones': {'items': {'type': 'string'},
6344 'required': ['CIDR',
6350 'SubnetsFilters': {'additionalProperties': False,
6351 'properties': {'SpaceTag': {'type': 'string'},
6352 'Zone': {'type': 'string'}},
6354 'caveat': {'additionalProperties': False,
6355 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6356 'location': {'$ref': '#/definitions/packet'},
6357 'verificationId': {'$ref': '#/definitions/packet'}},
6358 'required': ['location',
6362 'packet': {'additionalProperties': False,
6363 'properties': {'headerLen': {'type': 'integer'},
6364 'start': {'type': 'integer'},
6365 'totalLen': {'type': 'integer'}},
6366 'required': ['start', 'totalLen', 'headerLen'],
6368 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
6369 'Result': {'$ref': '#/definitions/ErrorResults'}},
6371 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
6372 'Result': {'$ref': '#/definitions/ErrorResults'}},
6374 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
6376 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
6377 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
6379 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6384 #@ReturnMapping(ErrorResults)
6385 async def AddSubnets(self
, subnets
):
6387 subnets : typing.Sequence[~AddSubnetParams]
6388 Returns -> typing.Sequence[~ErrorResult]
6390 # map input types to rpc msg
6392 msg
= dict(Type
='DiscoverSpaces', Request
='AddSubnets', Version
=2, Params
=params
)
6393 params
['Subnets'] = subnets
6394 reply
= await self
.rpc(msg
)
6395 return self
._map
(reply
, AddSubnets
)
6399 #@ReturnMapping(ErrorResults)
6400 async def CreateSpaces(self
, spaces
):
6402 spaces : typing.Sequence[~CreateSpaceParams]
6403 Returns -> typing.Sequence[~ErrorResult]
6405 # map input types to rpc msg
6407 msg
= dict(Type
='DiscoverSpaces', Request
='CreateSpaces', Version
=2, Params
=params
)
6408 params
['Spaces'] = spaces
6409 reply
= await self
.rpc(msg
)
6410 return self
._map
(reply
, CreateSpaces
)
6414 #@ReturnMapping(DiscoverSpacesResults)
6415 async def ListSpaces(self
):
6418 Returns -> typing.Sequence[~ProviderSpace]
6420 # map input types to rpc msg
6422 msg
= dict(Type
='DiscoverSpaces', Request
='ListSpaces', Version
=2, Params
=params
)
6424 reply
= await self
.rpc(msg
)
6425 return self
._map
(reply
, ListSpaces
)
6429 #@ReturnMapping(ListSubnetsResults)
6430 async def ListSubnets(self
, spacetag
, zone
):
6434 Returns -> typing.Sequence[~Subnet]
6436 # map input types to rpc msg
6438 msg
= dict(Type
='DiscoverSpaces', Request
='ListSubnets', Version
=2, Params
=params
)
6439 params
['SpaceTag'] = spacetag
6440 params
['Zone'] = zone
6441 reply
= await self
.rpc(msg
)
6442 return self
._map
(reply
, ListSubnets
)
6446 #@ReturnMapping(ModelConfigResult)
6447 async def ModelConfig(self
):
6450 Returns -> typing.Mapping[str, typing.Any]
6452 # map input types to rpc msg
6454 msg
= dict(Type
='DiscoverSpaces', Request
='ModelConfig', Version
=2, Params
=params
)
6456 reply
= await self
.rpc(msg
)
6457 return self
._map
(reply
, ModelConfig
)
6460 class DiskManager(Type
):
6461 name
= 'DiskManager'
6463 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
6464 'properties': {'BusAddress': {'type': 'string'},
6465 'DeviceLinks': {'items': {'type': 'string'},
6467 'DeviceName': {'type': 'string'},
6468 'FilesystemType': {'type': 'string'},
6469 'HardwareId': {'type': 'string'},
6470 'InUse': {'type': 'boolean'},
6471 'Label': {'type': 'string'},
6472 'MountPoint': {'type': 'string'},
6473 'Size': {'type': 'integer'},
6474 'UUID': {'type': 'string'}},
6475 'required': ['DeviceName',
6486 'Error': {'additionalProperties': False,
6487 'properties': {'Code': {'type': 'string'},
6488 'Info': {'$ref': '#/definitions/ErrorInfo'},
6489 'Message': {'type': 'string'}},
6490 'required': ['Message', 'Code'],
6492 'ErrorInfo': {'additionalProperties': False,
6493 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6494 'MacaroonPath': {'type': 'string'}},
6496 'ErrorResult': {'additionalProperties': False,
6497 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6498 'required': ['Error'],
6500 'ErrorResults': {'additionalProperties': False,
6501 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6503 'required': ['Results'],
6505 'Macaroon': {'additionalProperties': False,
6506 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6508 'data': {'items': {'type': 'integer'},
6510 'id': {'$ref': '#/definitions/packet'},
6511 'location': {'$ref': '#/definitions/packet'},
6512 'sig': {'items': {'type': 'integer'},
6514 'required': ['data',
6520 'MachineBlockDevices': {'additionalProperties': False,
6521 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
6523 'machine': {'type': 'string'}},
6524 'required': ['machine'],
6526 'SetMachineBlockDevices': {'additionalProperties': False,
6527 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
6529 'required': ['machineblockdevices'],
6531 'caveat': {'additionalProperties': False,
6532 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6533 'location': {'$ref': '#/definitions/packet'},
6534 'verificationId': {'$ref': '#/definitions/packet'}},
6535 'required': ['location',
6539 'packet': {'additionalProperties': False,
6540 'properties': {'headerLen': {'type': 'integer'},
6541 'start': {'type': 'integer'},
6542 'totalLen': {'type': 'integer'}},
6543 'required': ['start', 'totalLen', 'headerLen'],
6545 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
6546 'Result': {'$ref': '#/definitions/ErrorResults'}},
6551 #@ReturnMapping(ErrorResults)
6552 async def SetMachineBlockDevices(self
, machineblockdevices
):
6554 machineblockdevices : typing.Sequence[~MachineBlockDevices]
6555 Returns -> typing.Sequence[~ErrorResult]
6557 # map input types to rpc msg
6559 msg
= dict(Type
='DiskManager', Request
='SetMachineBlockDevices', Version
=2, Params
=params
)
6560 params
['machineblockdevices'] = machineblockdevices
6561 reply
= await self
.rpc(msg
)
6562 return self
._map
(reply
, SetMachineBlockDevices
)
6565 class EntityWatcher(Type
):
6566 name
= 'EntityWatcher'
6568 schema
= {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
6569 'properties': {'Changes': {'items': {'type': 'string'},
6571 'EntityWatcherId': {'type': 'string'},
6572 'Error': {'$ref': '#/definitions/Error'}},
6573 'required': ['EntityWatcherId',
6577 'Error': {'additionalProperties': False,
6578 'properties': {'Code': {'type': 'string'},
6579 'Info': {'$ref': '#/definitions/ErrorInfo'},
6580 'Message': {'type': 'string'}},
6581 'required': ['Message', 'Code'],
6583 'ErrorInfo': {'additionalProperties': False,
6584 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6585 'MacaroonPath': {'type': 'string'}},
6587 'Macaroon': {'additionalProperties': False,
6588 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6590 'data': {'items': {'type': 'integer'},
6592 'id': {'$ref': '#/definitions/packet'},
6593 'location': {'$ref': '#/definitions/packet'},
6594 'sig': {'items': {'type': 'integer'},
6596 'required': ['data',
6602 'caveat': {'additionalProperties': False,
6603 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6604 'location': {'$ref': '#/definitions/packet'},
6605 'verificationId': {'$ref': '#/definitions/packet'}},
6606 'required': ['location',
6610 'packet': {'additionalProperties': False,
6611 'properties': {'headerLen': {'type': 'integer'},
6612 'start': {'type': 'integer'},
6613 'totalLen': {'type': 'integer'}},
6614 'required': ['start', 'totalLen', 'headerLen'],
6616 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
6618 'Stop': {'type': 'object'}},
6622 #@ReturnMapping(EntitiesWatchResult)
6623 async def Next(self
):
6626 Returns -> typing.Union[~Error, typing.Sequence[str]]
6628 # map input types to rpc msg
6630 msg
= dict(Type
='EntityWatcher', Request
='Next', Version
=2, Params
=params
)
6632 reply
= await self
.rpc(msg
)
6633 return self
._map
(reply
, Next
)
6637 #@ReturnMapping(None)
6638 async def Stop(self
):
6643 # map input types to rpc msg
6645 msg
= dict(Type
='EntityWatcher', Request
='Stop', Version
=2, Params
=params
)
6647 reply
= await self
.rpc(msg
)
6648 return self
._map
(reply
, Stop
)
6651 class FilesystemAttachmentsWatcher(Type
):
6652 name
= 'FilesystemAttachmentsWatcher'
6654 schema
= {'definitions': {'Error': {'additionalProperties': False,
6655 'properties': {'Code': {'type': 'string'},
6656 'Info': {'$ref': '#/definitions/ErrorInfo'},
6657 'Message': {'type': 'string'}},
6658 'required': ['Message', 'Code'],
6660 'ErrorInfo': {'additionalProperties': False,
6661 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6662 'MacaroonPath': {'type': 'string'}},
6664 'Macaroon': {'additionalProperties': False,
6665 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6667 'data': {'items': {'type': 'integer'},
6669 'id': {'$ref': '#/definitions/packet'},
6670 'location': {'$ref': '#/definitions/packet'},
6671 'sig': {'items': {'type': 'integer'},
6673 'required': ['data',
6679 'MachineStorageId': {'additionalProperties': False,
6680 'properties': {'attachmenttag': {'type': 'string'},
6681 'machinetag': {'type': 'string'}},
6682 'required': ['machinetag',
6685 'MachineStorageIdsWatchResult': {'additionalProperties': False,
6686 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
6688 'Error': {'$ref': '#/definitions/Error'},
6689 'MachineStorageIdsWatcherId': {'type': 'string'}},
6690 'required': ['MachineStorageIdsWatcherId',
6694 'caveat': {'additionalProperties': False,
6695 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6696 'location': {'$ref': '#/definitions/packet'},
6697 'verificationId': {'$ref': '#/definitions/packet'}},
6698 'required': ['location',
6702 'packet': {'additionalProperties': False,
6703 'properties': {'headerLen': {'type': 'integer'},
6704 'start': {'type': 'integer'},
6705 'totalLen': {'type': 'integer'}},
6706 'required': ['start', 'totalLen', 'headerLen'],
6708 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
6710 'Stop': {'type': 'object'}},
6714 #@ReturnMapping(MachineStorageIdsWatchResult)
6715 async def Next(self
):
6718 Returns -> typing.Union[~Error, typing.Sequence[~MachineStorageId]]
6720 # map input types to rpc msg
6722 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
6724 reply
= await self
.rpc(msg
)
6725 return self
._map
(reply
, Next
)
6729 #@ReturnMapping(None)
6730 async def Stop(self
):
6735 # map input types to rpc msg
6737 msg
= dict(Type
='FilesystemAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
6739 reply
= await self
.rpc(msg
)
6740 return self
._map
(reply
, Stop
)
6743 class Firewaller(Type
):
6746 schema
= {'definitions': {'BoolResult': {'additionalProperties': False,
6747 'properties': {'Error': {'$ref': '#/definitions/Error'},
6748 'Result': {'type': 'boolean'}},
6749 'required': ['Error', 'Result'],
6751 'BoolResults': {'additionalProperties': False,
6752 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
6754 'required': ['Results'],
6756 'Entities': {'additionalProperties': False,
6757 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6759 'required': ['Entities'],
6761 'Entity': {'additionalProperties': False,
6762 'properties': {'Tag': {'type': 'string'}},
6763 'required': ['Tag'],
6765 'Error': {'additionalProperties': False,
6766 'properties': {'Code': {'type': 'string'},
6767 'Info': {'$ref': '#/definitions/ErrorInfo'},
6768 'Message': {'type': 'string'}},
6769 'required': ['Message', 'Code'],
6771 'ErrorInfo': {'additionalProperties': False,
6772 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6773 'MacaroonPath': {'type': 'string'}},
6775 'LifeResult': {'additionalProperties': False,
6776 'properties': {'Error': {'$ref': '#/definitions/Error'},
6777 'Life': {'type': 'string'}},
6778 'required': ['Life', 'Error'],
6780 'LifeResults': {'additionalProperties': False,
6781 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
6783 'required': ['Results'],
6785 'Macaroon': {'additionalProperties': False,
6786 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6788 'data': {'items': {'type': 'integer'},
6790 'id': {'$ref': '#/definitions/packet'},
6791 'location': {'$ref': '#/definitions/packet'},
6792 'sig': {'items': {'type': 'integer'},
6794 'required': ['data',
6800 'MachinePortRange': {'additionalProperties': False,
6801 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
6802 'RelationTag': {'type': 'string'},
6803 'UnitTag': {'type': 'string'}},
6804 'required': ['UnitTag',
6808 'MachinePorts': {'additionalProperties': False,
6809 'properties': {'MachineTag': {'type': 'string'},
6810 'SubnetTag': {'type': 'string'}},
6811 'required': ['MachineTag', 'SubnetTag'],
6813 'MachinePortsParams': {'additionalProperties': False,
6814 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
6816 'required': ['Params'],
6818 'MachinePortsResult': {'additionalProperties': False,
6819 'properties': {'Error': {'$ref': '#/definitions/Error'},
6820 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
6822 'required': ['Error', 'Ports'],
6824 'MachinePortsResults': {'additionalProperties': False,
6825 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
6827 'required': ['Results'],
6829 'ModelConfigResult': {'additionalProperties': False,
6830 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6833 'required': ['Config'],
6835 'NotifyWatchResult': {'additionalProperties': False,
6836 'properties': {'Error': {'$ref': '#/definitions/Error'},
6837 'NotifyWatcherId': {'type': 'string'}},
6838 'required': ['NotifyWatcherId', 'Error'],
6840 'NotifyWatchResults': {'additionalProperties': False,
6841 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6843 'required': ['Results'],
6845 'PortRange': {'additionalProperties': False,
6846 'properties': {'FromPort': {'type': 'integer'},
6847 'Protocol': {'type': 'string'},
6848 'ToPort': {'type': 'integer'}},
6849 'required': ['FromPort', 'ToPort', 'Protocol'],
6851 'StringResult': {'additionalProperties': False,
6852 'properties': {'Error': {'$ref': '#/definitions/Error'},
6853 'Result': {'type': 'string'}},
6854 'required': ['Error', 'Result'],
6856 'StringResults': {'additionalProperties': False,
6857 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
6859 'required': ['Results'],
6861 'StringsResult': {'additionalProperties': False,
6862 'properties': {'Error': {'$ref': '#/definitions/Error'},
6863 'Result': {'items': {'type': 'string'},
6865 'required': ['Error', 'Result'],
6867 'StringsResults': {'additionalProperties': False,
6868 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
6870 'required': ['Results'],
6872 'StringsWatchResult': {'additionalProperties': False,
6873 'properties': {'Changes': {'items': {'type': 'string'},
6875 'Error': {'$ref': '#/definitions/Error'},
6876 'StringsWatcherId': {'type': 'string'}},
6877 'required': ['StringsWatcherId',
6881 'StringsWatchResults': {'additionalProperties': False,
6882 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
6884 'required': ['Results'],
6886 'caveat': {'additionalProperties': False,
6887 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6888 'location': {'$ref': '#/definitions/packet'},
6889 'verificationId': {'$ref': '#/definitions/packet'}},
6890 'required': ['location',
6894 'packet': {'additionalProperties': False,
6895 'properties': {'headerLen': {'type': 'integer'},
6896 'start': {'type': 'integer'},
6897 'totalLen': {'type': 'integer'}},
6898 'required': ['start', 'totalLen', 'headerLen'],
6900 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6901 'Result': {'$ref': '#/definitions/StringResults'}},
6903 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6904 'Result': {'$ref': '#/definitions/BoolResults'}},
6906 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6907 'Result': {'$ref': '#/definitions/StringsResults'}},
6909 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
6910 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
6912 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6913 'Result': {'$ref': '#/definitions/StringResults'}},
6915 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6916 'Result': {'$ref': '#/definitions/LifeResults'}},
6918 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6920 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6921 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6923 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6925 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
6927 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6928 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6930 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6931 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6936 #@ReturnMapping(StringResults)
6937 async def GetAssignedMachine(self
, entities
):
6939 entities : typing.Sequence[~Entity]
6940 Returns -> typing.Sequence[~StringResult]
6942 # map input types to rpc msg
6944 msg
= dict(Type
='Firewaller', Request
='GetAssignedMachine', Version
=2, Params
=params
)
6945 params
['Entities'] = entities
6946 reply
= await self
.rpc(msg
)
6947 return self
._map
(reply
, GetAssignedMachine
)
6951 #@ReturnMapping(BoolResults)
6952 async def GetExposed(self
, entities
):
6954 entities : typing.Sequence[~Entity]
6955 Returns -> typing.Sequence[~BoolResult]
6957 # map input types to rpc msg
6959 msg
= dict(Type
='Firewaller', Request
='GetExposed', Version
=2, Params
=params
)
6960 params
['Entities'] = entities
6961 reply
= await self
.rpc(msg
)
6962 return self
._map
(reply
, GetExposed
)
6966 #@ReturnMapping(StringsResults)
6967 async def GetMachineActiveSubnets(self
, entities
):
6969 entities : typing.Sequence[~Entity]
6970 Returns -> typing.Sequence[~StringsResult]
6972 # map input types to rpc msg
6974 msg
= dict(Type
='Firewaller', Request
='GetMachineActiveSubnets', Version
=2, Params
=params
)
6975 params
['Entities'] = entities
6976 reply
= await self
.rpc(msg
)
6977 return self
._map
(reply
, GetMachineActiveSubnets
)
6981 #@ReturnMapping(MachinePortsResults)
6982 async def GetMachinePorts(self
, params
):
6984 params : typing.Sequence[~MachinePorts]
6985 Returns -> typing.Sequence[~MachinePortsResult]
6987 # map input types to rpc msg
6989 msg
= dict(Type
='Firewaller', Request
='GetMachinePorts', Version
=2, Params
=params
)
6990 params
['Params'] = params
6991 reply
= await self
.rpc(msg
)
6992 return self
._map
(reply
, GetMachinePorts
)
6996 #@ReturnMapping(StringResults)
6997 async def InstanceId(self
, entities
):
6999 entities : typing.Sequence[~Entity]
7000 Returns -> typing.Sequence[~StringResult]
7002 # map input types to rpc msg
7004 msg
= dict(Type
='Firewaller', Request
='InstanceId', Version
=2, Params
=params
)
7005 params
['Entities'] = entities
7006 reply
= await self
.rpc(msg
)
7007 return self
._map
(reply
, InstanceId
)
7011 #@ReturnMapping(LifeResults)
7012 async def Life(self
, entities
):
7014 entities : typing.Sequence[~Entity]
7015 Returns -> typing.Sequence[~LifeResult]
7017 # map input types to rpc msg
7019 msg
= dict(Type
='Firewaller', Request
='Life', Version
=2, Params
=params
)
7020 params
['Entities'] = entities
7021 reply
= await self
.rpc(msg
)
7022 return self
._map
(reply
, Life
)
7026 #@ReturnMapping(ModelConfigResult)
7027 async def ModelConfig(self
):
7030 Returns -> typing.Mapping[str, typing.Any]
7032 # map input types to rpc msg
7034 msg
= dict(Type
='Firewaller', Request
='ModelConfig', Version
=2, Params
=params
)
7036 reply
= await self
.rpc(msg
)
7037 return self
._map
(reply
, ModelConfig
)
7041 #@ReturnMapping(NotifyWatchResults)
7042 async def Watch(self
, entities
):
7044 entities : typing.Sequence[~Entity]
7045 Returns -> typing.Sequence[~NotifyWatchResult]
7047 # map input types to rpc msg
7049 msg
= dict(Type
='Firewaller', Request
='Watch', Version
=2, Params
=params
)
7050 params
['Entities'] = entities
7051 reply
= await self
.rpc(msg
)
7052 return self
._map
(reply
, Watch
)
7056 #@ReturnMapping(NotifyWatchResult)
7057 async def WatchForModelConfigChanges(self
):
7060 Returns -> typing.Union[~Error, str]
7062 # map input types to rpc msg
7064 msg
= dict(Type
='Firewaller', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
7066 reply
= await self
.rpc(msg
)
7067 return self
._map
(reply
, WatchForModelConfigChanges
)
7071 #@ReturnMapping(StringsWatchResult)
7072 async def WatchModelMachines(self
):
7075 Returns -> typing.Union[~Error, typing.Sequence[str]]
7077 # map input types to rpc msg
7079 msg
= dict(Type
='Firewaller', Request
='WatchModelMachines', Version
=2, Params
=params
)
7081 reply
= await self
.rpc(msg
)
7082 return self
._map
(reply
, WatchModelMachines
)
7086 #@ReturnMapping(StringsWatchResults)
7087 async def WatchOpenedPorts(self
, entities
):
7089 entities : typing.Sequence[~Entity]
7090 Returns -> typing.Sequence[~StringsWatchResult]
7092 # map input types to rpc msg
7094 msg
= dict(Type
='Firewaller', Request
='WatchOpenedPorts', Version
=2, Params
=params
)
7095 params
['Entities'] = entities
7096 reply
= await self
.rpc(msg
)
7097 return self
._map
(reply
, WatchOpenedPorts
)
7101 #@ReturnMapping(StringsWatchResults)
7102 async def WatchUnits(self
, entities
):
7104 entities : typing.Sequence[~Entity]
7105 Returns -> typing.Sequence[~StringsWatchResult]
7107 # map input types to rpc msg
7109 msg
= dict(Type
='Firewaller', Request
='WatchUnits', Version
=2, Params
=params
)
7110 params
['Entities'] = entities
7111 reply
= await self
.rpc(msg
)
7112 return self
._map
(reply
, WatchUnits
)
7115 class HighAvailability(Type
):
7116 name
= 'HighAvailability'
7118 schema
= {'definitions': {'Address': {'additionalProperties': False,
7119 'properties': {'Scope': {'type': 'string'},
7120 'SpaceName': {'type': 'string'},
7121 'SpaceProviderId': {'type': 'string'},
7122 'Type': {'type': 'string'},
7123 'Value': {'type': 'string'}},
7124 'required': ['Value',
7130 'ControllersChangeResult': {'additionalProperties': False,
7131 'properties': {'Error': {'$ref': '#/definitions/Error'},
7132 'Result': {'$ref': '#/definitions/ControllersChanges'}},
7133 'required': ['Result', 'Error'],
7135 'ControllersChangeResults': {'additionalProperties': False,
7136 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
7138 'required': ['Results'],
7140 'ControllersChanges': {'additionalProperties': False,
7141 'properties': {'added': {'items': {'type': 'string'},
7143 'converted': {'items': {'type': 'string'},
7145 'demoted': {'items': {'type': 'string'},
7147 'maintained': {'items': {'type': 'string'},
7149 'promoted': {'items': {'type': 'string'},
7151 'removed': {'items': {'type': 'string'},
7154 'ControllersSpec': {'additionalProperties': False,
7155 'properties': {'ModelTag': {'type': 'string'},
7156 'constraints': {'$ref': '#/definitions/Value'},
7157 'num-controllers': {'type': 'integer'},
7158 'placement': {'items': {'type': 'string'},
7160 'series': {'type': 'string'}},
7161 'required': ['ModelTag',
7164 'ControllersSpecs': {'additionalProperties': False,
7165 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
7167 'required': ['Specs'],
7169 'Error': {'additionalProperties': False,
7170 'properties': {'Code': {'type': 'string'},
7171 'Info': {'$ref': '#/definitions/ErrorInfo'},
7172 'Message': {'type': 'string'}},
7173 'required': ['Message', 'Code'],
7175 'ErrorInfo': {'additionalProperties': False,
7176 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7177 'MacaroonPath': {'type': 'string'}},
7179 'HAMember': {'additionalProperties': False,
7180 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
7181 'Series': {'type': 'string'},
7182 'Tag': {'type': 'string'}},
7183 'required': ['Tag', 'PublicAddress', 'Series'],
7185 'Macaroon': {'additionalProperties': False,
7186 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7188 'data': {'items': {'type': 'integer'},
7190 'id': {'$ref': '#/definitions/packet'},
7191 'location': {'$ref': '#/definitions/packet'},
7192 'sig': {'items': {'type': 'integer'},
7194 'required': ['data',
7200 'Member': {'additionalProperties': False,
7201 'properties': {'Address': {'type': 'string'},
7202 'Arbiter': {'type': 'boolean'},
7203 'BuildIndexes': {'type': 'boolean'},
7204 'Hidden': {'type': 'boolean'},
7205 'Id': {'type': 'integer'},
7206 'Priority': {'type': 'number'},
7207 'SlaveDelay': {'type': 'integer'},
7208 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
7210 'Votes': {'type': 'integer'}},
7221 'MongoUpgradeResults': {'additionalProperties': False,
7222 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
7223 'Members': {'items': {'$ref': '#/definitions/HAMember'},
7225 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
7227 'required': ['RsMembers',
7231 'ResumeReplicationParams': {'additionalProperties': False,
7232 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
7234 'required': ['Members'],
7236 'UpgradeMongoParams': {'additionalProperties': False,
7237 'properties': {'Target': {'$ref': '#/definitions/Version'}},
7238 'required': ['Target'],
7240 'Value': {'additionalProperties': False,
7241 'properties': {'arch': {'type': 'string'},
7242 'container': {'type': 'string'},
7243 'cpu-cores': {'type': 'integer'},
7244 'cpu-power': {'type': 'integer'},
7245 'instance-type': {'type': 'string'},
7246 'mem': {'type': 'integer'},
7247 'root-disk': {'type': 'integer'},
7248 'spaces': {'items': {'type': 'string'},
7250 'tags': {'items': {'type': 'string'},
7252 'virt-type': {'type': 'string'}},
7254 'Version': {'additionalProperties': False,
7255 'properties': {'Major': {'type': 'integer'},
7256 'Minor': {'type': 'integer'},
7257 'Patch': {'type': 'string'},
7258 'StorageEngine': {'type': 'string'}},
7259 'required': ['Major',
7264 'caveat': {'additionalProperties': False,
7265 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7266 'location': {'$ref': '#/definitions/packet'},
7267 'verificationId': {'$ref': '#/definitions/packet'}},
7268 'required': ['location',
7272 'packet': {'additionalProperties': False,
7273 'properties': {'headerLen': {'type': 'integer'},
7274 'start': {'type': 'integer'},
7275 'totalLen': {'type': 'integer'}},
7276 'required': ['start', 'totalLen', 'headerLen'],
7278 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
7279 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
7281 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
7283 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
7284 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
7289 #@ReturnMapping(ControllersChangeResults)
7290 async def EnableHA(self
, specs
):
7292 specs : typing.Sequence[~ControllersSpec]
7293 Returns -> typing.Sequence[~ControllersChangeResult]
7295 # map input types to rpc msg
7297 msg
= dict(Type
='HighAvailability', Request
='EnableHA', Version
=2, Params
=params
)
7298 params
['Specs'] = specs
7299 reply
= await self
.rpc(msg
)
7300 return self
._map
(reply
, EnableHA
)
7304 #@ReturnMapping(None)
7305 async def ResumeHAReplicationAfterUpgrade(self
, members
):
7307 members : typing.Sequence[~Member]
7310 # map input types to rpc msg
7312 msg
= dict(Type
='HighAvailability', Request
='ResumeHAReplicationAfterUpgrade', Version
=2, Params
=params
)
7313 params
['Members'] = members
7314 reply
= await self
.rpc(msg
)
7315 return self
._map
(reply
, ResumeHAReplicationAfterUpgrade
)
7319 #@ReturnMapping(MongoUpgradeResults)
7320 async def StopHAReplicationForUpgrade(self
, minor
, patch
, major
, storageengine
):
7326 Returns -> typing.Union[~HAMember, typing.Sequence[~Member]]
7328 # map input types to rpc msg
7330 msg
= dict(Type
='HighAvailability', Request
='StopHAReplicationForUpgrade', Version
=2, Params
=params
)
7331 params
['Minor'] = minor
7332 params
['Patch'] = patch
7333 params
['Major'] = major
7334 params
['StorageEngine'] = storageengine
7335 reply
= await self
.rpc(msg
)
7336 return self
._map
(reply
, StopHAReplicationForUpgrade
)
7339 class HostKeyReporter(Type
):
7340 name
= 'HostKeyReporter'
7342 schema
= {'definitions': {'Error': {'additionalProperties': False,
7343 'properties': {'Code': {'type': 'string'},
7344 'Info': {'$ref': '#/definitions/ErrorInfo'},
7345 'Message': {'type': 'string'}},
7346 'required': ['Message', 'Code'],
7348 'ErrorInfo': {'additionalProperties': False,
7349 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7350 'MacaroonPath': {'type': 'string'}},
7352 'ErrorResult': {'additionalProperties': False,
7353 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7354 'required': ['Error'],
7356 'ErrorResults': {'additionalProperties': False,
7357 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7359 'required': ['Results'],
7361 'Macaroon': {'additionalProperties': False,
7362 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7364 'data': {'items': {'type': 'integer'},
7366 'id': {'$ref': '#/definitions/packet'},
7367 'location': {'$ref': '#/definitions/packet'},
7368 'sig': {'items': {'type': 'integer'},
7370 'required': ['data',
7376 'SSHHostKeySet': {'additionalProperties': False,
7377 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
7379 'required': ['entity-keys'],
7381 'SSHHostKeys': {'additionalProperties': False,
7382 'properties': {'public-keys': {'items': {'type': 'string'},
7384 'tag': {'type': 'string'}},
7385 'required': ['tag', 'public-keys'],
7387 'caveat': {'additionalProperties': False,
7388 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7389 'location': {'$ref': '#/definitions/packet'},
7390 'verificationId': {'$ref': '#/definitions/packet'}},
7391 'required': ['location',
7395 'packet': {'additionalProperties': False,
7396 'properties': {'headerLen': {'type': 'integer'},
7397 'start': {'type': 'integer'},
7398 'totalLen': {'type': 'integer'}},
7399 'required': ['start', 'totalLen', 'headerLen'],
7401 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
7402 'Result': {'$ref': '#/definitions/ErrorResults'}},
7407 #@ReturnMapping(ErrorResults)
7408 async def ReportKeys(self
, entity_keys
):
7410 entity_keys : typing.Sequence[~SSHHostKeys]
7411 Returns -> typing.Sequence[~ErrorResult]
7413 # map input types to rpc msg
7415 msg
= dict(Type
='HostKeyReporter', Request
='ReportKeys', Version
=1, Params
=params
)
7416 params
['entity-keys'] = entity_keys
7417 reply
= await self
.rpc(msg
)
7418 return self
._map
(reply
, ReportKeys
)
7421 class ImageManager(Type
):
7422 name
= 'ImageManager'
7424 schema
= {'definitions': {'Error': {'additionalProperties': False,
7425 'properties': {'Code': {'type': 'string'},
7426 'Info': {'$ref': '#/definitions/ErrorInfo'},
7427 'Message': {'type': 'string'}},
7428 'required': ['Message', 'Code'],
7430 'ErrorInfo': {'additionalProperties': False,
7431 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7432 'MacaroonPath': {'type': 'string'}},
7434 'ErrorResult': {'additionalProperties': False,
7435 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7436 'required': ['Error'],
7438 'ErrorResults': {'additionalProperties': False,
7439 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7441 'required': ['Results'],
7443 'ImageFilterParams': {'additionalProperties': False,
7444 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
7446 'required': ['images'],
7448 'ImageMetadata': {'additionalProperties': False,
7449 'properties': {'arch': {'type': 'string'},
7450 'created': {'format': 'date-time',
7452 'kind': {'type': 'string'},
7453 'series': {'type': 'string'},
7454 'url': {'type': 'string'}},
7455 'required': ['kind',
7461 'ImageSpec': {'additionalProperties': False,
7462 'properties': {'arch': {'type': 'string'},
7463 'kind': {'type': 'string'},
7464 'series': {'type': 'string'}},
7465 'required': ['kind', 'arch', 'series'],
7467 'ListImageResult': {'additionalProperties': False,
7468 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
7470 'required': ['result'],
7472 'Macaroon': {'additionalProperties': False,
7473 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7475 'data': {'items': {'type': 'integer'},
7477 'id': {'$ref': '#/definitions/packet'},
7478 'location': {'$ref': '#/definitions/packet'},
7479 'sig': {'items': {'type': 'integer'},
7481 'required': ['data',
7487 'caveat': {'additionalProperties': False,
7488 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7489 'location': {'$ref': '#/definitions/packet'},
7490 'verificationId': {'$ref': '#/definitions/packet'}},
7491 'required': ['location',
7495 'packet': {'additionalProperties': False,
7496 'properties': {'headerLen': {'type': 'integer'},
7497 'start': {'type': 'integer'},
7498 'totalLen': {'type': 'integer'}},
7499 'required': ['start', 'totalLen', 'headerLen'],
7501 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
7502 'Result': {'$ref': '#/definitions/ErrorResults'}},
7504 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
7505 'Result': {'$ref': '#/definitions/ListImageResult'}},
7510 #@ReturnMapping(ErrorResults)
7511 async def DeleteImages(self
, images
):
7513 images : typing.Sequence[~ImageSpec]
7514 Returns -> typing.Sequence[~ErrorResult]
7516 # map input types to rpc msg
7518 msg
= dict(Type
='ImageManager', Request
='DeleteImages', Version
=2, Params
=params
)
7519 params
['images'] = images
7520 reply
= await self
.rpc(msg
)
7521 return self
._map
(reply
, DeleteImages
)
7525 #@ReturnMapping(ListImageResult)
7526 async def ListImages(self
, images
):
7528 images : typing.Sequence[~ImageSpec]
7529 Returns -> typing.Sequence[~ImageMetadata]
7531 # map input types to rpc msg
7533 msg
= dict(Type
='ImageManager', Request
='ListImages', Version
=2, Params
=params
)
7534 params
['images'] = images
7535 reply
= await self
.rpc(msg
)
7536 return self
._map
(reply
, ListImages
)
7539 class ImageMetadata(Type
):
7540 name
= 'ImageMetadata'
7542 schema
= {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
7543 'properties': {'arch': {'type': 'string'},
7544 'image_id': {'type': 'string'},
7545 'priority': {'type': 'integer'},
7546 'region': {'type': 'string'},
7547 'root_storage_size': {'type': 'integer'},
7548 'root_storage_type': {'type': 'string'},
7549 'series': {'type': 'string'},
7550 'source': {'type': 'string'},
7551 'stream': {'type': 'string'},
7552 'version': {'type': 'string'},
7553 'virt_type': {'type': 'string'}},
7554 'required': ['image_id',
7562 'CloudImageMetadataList': {'additionalProperties': False,
7563 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
7566 'Error': {'additionalProperties': False,
7567 'properties': {'Code': {'type': 'string'},
7568 'Info': {'$ref': '#/definitions/ErrorInfo'},
7569 'Message': {'type': 'string'}},
7570 'required': ['Message', 'Code'],
7572 'ErrorInfo': {'additionalProperties': False,
7573 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7574 'MacaroonPath': {'type': 'string'}},
7576 'ErrorResult': {'additionalProperties': False,
7577 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7578 'required': ['Error'],
7580 'ErrorResults': {'additionalProperties': False,
7581 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7583 'required': ['Results'],
7585 'ImageMetadataFilter': {'additionalProperties': False,
7586 'properties': {'arches': {'items': {'type': 'string'},
7588 'region': {'type': 'string'},
7589 'root-storage-type': {'type': 'string'},
7590 'series': {'items': {'type': 'string'},
7592 'stream': {'type': 'string'},
7593 'virt_type': {'type': 'string'}},
7595 'ListCloudImageMetadataResult': {'additionalProperties': False,
7596 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
7598 'required': ['result'],
7600 'Macaroon': {'additionalProperties': False,
7601 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7603 'data': {'items': {'type': 'integer'},
7605 'id': {'$ref': '#/definitions/packet'},
7606 'location': {'$ref': '#/definitions/packet'},
7607 'sig': {'items': {'type': 'integer'},
7609 'required': ['data',
7615 'MetadataImageIds': {'additionalProperties': False,
7616 'properties': {'image_ids': {'items': {'type': 'string'},
7618 'required': ['image_ids'],
7620 'MetadataSaveParams': {'additionalProperties': False,
7621 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
7624 'caveat': {'additionalProperties': False,
7625 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7626 'location': {'$ref': '#/definitions/packet'},
7627 'verificationId': {'$ref': '#/definitions/packet'}},
7628 'required': ['location',
7632 'packet': {'additionalProperties': False,
7633 'properties': {'headerLen': {'type': 'integer'},
7634 'start': {'type': 'integer'},
7635 'totalLen': {'type': 'integer'}},
7636 'required': ['start', 'totalLen', 'headerLen'],
7638 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
7639 'Result': {'$ref': '#/definitions/ErrorResults'}},
7641 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
7642 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
7644 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
7645 'Result': {'$ref': '#/definitions/ErrorResults'}},
7647 'UpdateFromPublishedImages': {'type': 'object'}},
7651 #@ReturnMapping(ErrorResults)
7652 async def Delete(self
, image_ids
):
7654 image_ids : typing.Sequence[str]
7655 Returns -> typing.Sequence[~ErrorResult]
7657 # map input types to rpc msg
7659 msg
= dict(Type
='ImageMetadata', Request
='Delete', Version
=2, Params
=params
)
7660 params
['image_ids'] = image_ids
7661 reply
= await self
.rpc(msg
)
7662 return self
._map
(reply
, Delete
)
7666 #@ReturnMapping(ListCloudImageMetadataResult)
7667 async def List(self
, root_storage_type
, arches
, virt_type
, series
, stream
, region
):
7669 root_storage_type : str
7670 arches : typing.Sequence[str]
7672 series : typing.Sequence[str]
7675 Returns -> typing.Sequence[~CloudImageMetadata]
7677 # map input types to rpc msg
7679 msg
= dict(Type
='ImageMetadata', Request
='List', Version
=2, Params
=params
)
7680 params
['root-storage-type'] = root_storage_type
7681 params
['arches'] = arches
7682 params
['virt_type'] = virt_type
7683 params
['series'] = series
7684 params
['stream'] = stream
7685 params
['region'] = region
7686 reply
= await self
.rpc(msg
)
7687 return self
._map
(reply
, List
)
7691 #@ReturnMapping(ErrorResults)
7692 async def Save(self
, metadata
):
7694 metadata : typing.Sequence[~CloudImageMetadataList]
7695 Returns -> typing.Sequence[~ErrorResult]
7697 # map input types to rpc msg
7699 msg
= dict(Type
='ImageMetadata', Request
='Save', Version
=2, Params
=params
)
7700 params
['metadata'] = metadata
7701 reply
= await self
.rpc(msg
)
7702 return self
._map
(reply
, Save
)
7706 #@ReturnMapping(None)
7707 async def UpdateFromPublishedImages(self
):
7712 # map input types to rpc msg
7714 msg
= dict(Type
='ImageMetadata', Request
='UpdateFromPublishedImages', Version
=2, Params
=params
)
7716 reply
= await self
.rpc(msg
)
7717 return self
._map
(reply
, UpdateFromPublishedImages
)
7720 class InstancePoller(Type
):
7721 name
= 'InstancePoller'
7723 schema
= {'definitions': {'Address': {'additionalProperties': False,
7724 'properties': {'Scope': {'type': 'string'},
7725 'SpaceName': {'type': 'string'},
7726 'Type': {'type': 'string'},
7727 'Value': {'type': 'string'}},
7728 'required': ['Value', 'Type', 'Scope'],
7730 'BoolResult': {'additionalProperties': False,
7731 'properties': {'Error': {'$ref': '#/definitions/Error'},
7732 'Result': {'type': 'boolean'}},
7733 'required': ['Error', 'Result'],
7735 'BoolResults': {'additionalProperties': False,
7736 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
7738 'required': ['Results'],
7740 'Entities': {'additionalProperties': False,
7741 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7743 'required': ['Entities'],
7745 'Entity': {'additionalProperties': False,
7746 'properties': {'Tag': {'type': 'string'}},
7747 'required': ['Tag'],
7749 'EntityStatusArgs': {'additionalProperties': False,
7750 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7753 'Info': {'type': 'string'},
7754 'Status': {'type': 'string'},
7755 'Tag': {'type': 'string'}},
7761 'Error': {'additionalProperties': False,
7762 'properties': {'Code': {'type': 'string'},
7763 'Info': {'$ref': '#/definitions/ErrorInfo'},
7764 'Message': {'type': 'string'}},
7765 'required': ['Message', 'Code'],
7767 'ErrorInfo': {'additionalProperties': False,
7768 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7769 'MacaroonPath': {'type': 'string'}},
7771 'ErrorResult': {'additionalProperties': False,
7772 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7773 'required': ['Error'],
7775 'ErrorResults': {'additionalProperties': False,
7776 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7778 'required': ['Results'],
7780 'LifeResult': {'additionalProperties': False,
7781 'properties': {'Error': {'$ref': '#/definitions/Error'},
7782 'Life': {'type': 'string'}},
7783 'required': ['Life', 'Error'],
7785 'LifeResults': {'additionalProperties': False,
7786 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
7788 'required': ['Results'],
7790 'Macaroon': {'additionalProperties': False,
7791 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7793 'data': {'items': {'type': 'integer'},
7795 'id': {'$ref': '#/definitions/packet'},
7796 'location': {'$ref': '#/definitions/packet'},
7797 'sig': {'items': {'type': 'integer'},
7799 'required': ['data',
7805 'MachineAddresses': {'additionalProperties': False,
7806 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
7808 'Tag': {'type': 'string'}},
7809 'required': ['Tag', 'Addresses'],
7811 'MachineAddressesResult': {'additionalProperties': False,
7812 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
7814 'Error': {'$ref': '#/definitions/Error'}},
7815 'required': ['Error', 'Addresses'],
7817 'MachineAddressesResults': {'additionalProperties': False,
7818 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
7820 'required': ['Results'],
7822 'ModelConfigResult': {'additionalProperties': False,
7823 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7826 'required': ['Config'],
7828 'NotifyWatchResult': {'additionalProperties': False,
7829 'properties': {'Error': {'$ref': '#/definitions/Error'},
7830 'NotifyWatcherId': {'type': 'string'}},
7831 'required': ['NotifyWatcherId', 'Error'],
7833 'SetMachinesAddresses': {'additionalProperties': False,
7834 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
7836 'required': ['MachineAddresses'],
7838 'SetStatus': {'additionalProperties': False,
7839 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
7841 'required': ['Entities'],
7843 'StatusResult': {'additionalProperties': False,
7844 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7847 'Error': {'$ref': '#/definitions/Error'},
7848 'Id': {'type': 'string'},
7849 'Info': {'type': 'string'},
7850 'Life': {'type': 'string'},
7851 'Since': {'format': 'date-time',
7853 'Status': {'type': 'string'}},
7854 'required': ['Error',
7862 'StatusResults': {'additionalProperties': False,
7863 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
7865 'required': ['Results'],
7867 'StringResult': {'additionalProperties': False,
7868 'properties': {'Error': {'$ref': '#/definitions/Error'},
7869 'Result': {'type': 'string'}},
7870 'required': ['Error', 'Result'],
7872 'StringResults': {'additionalProperties': False,
7873 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
7875 'required': ['Results'],
7877 'StringsWatchResult': {'additionalProperties': False,
7878 'properties': {'Changes': {'items': {'type': 'string'},
7880 'Error': {'$ref': '#/definitions/Error'},
7881 'StringsWatcherId': {'type': 'string'}},
7882 'required': ['StringsWatcherId',
7886 'caveat': {'additionalProperties': False,
7887 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7888 'location': {'$ref': '#/definitions/packet'},
7889 'verificationId': {'$ref': '#/definitions/packet'}},
7890 'required': ['location',
7894 'packet': {'additionalProperties': False,
7895 'properties': {'headerLen': {'type': 'integer'},
7896 'start': {'type': 'integer'},
7897 'totalLen': {'type': 'integer'}},
7898 'required': ['start', 'totalLen', 'headerLen'],
7900 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7901 'Result': {'$ref': '#/definitions/BoolResults'}},
7903 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7904 'Result': {'$ref': '#/definitions/StringResults'}},
7906 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7907 'Result': {'$ref': '#/definitions/StatusResults'}},
7909 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7910 'Result': {'$ref': '#/definitions/LifeResults'}},
7912 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
7914 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7915 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
7917 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
7918 'Result': {'$ref': '#/definitions/ErrorResults'}},
7920 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
7921 'Result': {'$ref': '#/definitions/ErrorResults'}},
7923 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7924 'Result': {'$ref': '#/definitions/StatusResults'}},
7926 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7928 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7933 #@ReturnMapping(BoolResults)
7934 async def AreManuallyProvisioned(self
, entities
):
7936 entities : typing.Sequence[~Entity]
7937 Returns -> typing.Sequence[~BoolResult]
7939 # map input types to rpc msg
7941 msg
= dict(Type
='InstancePoller', Request
='AreManuallyProvisioned', Version
=2, Params
=params
)
7942 params
['Entities'] = entities
7943 reply
= await self
.rpc(msg
)
7944 return self
._map
(reply
, AreManuallyProvisioned
)
7948 #@ReturnMapping(StringResults)
7949 async def InstanceId(self
, entities
):
7951 entities : typing.Sequence[~Entity]
7952 Returns -> typing.Sequence[~StringResult]
7954 # map input types to rpc msg
7956 msg
= dict(Type
='InstancePoller', Request
='InstanceId', Version
=2, Params
=params
)
7957 params
['Entities'] = entities
7958 reply
= await self
.rpc(msg
)
7959 return self
._map
(reply
, InstanceId
)
7963 #@ReturnMapping(StatusResults)
7964 async def InstanceStatus(self
, entities
):
7966 entities : typing.Sequence[~Entity]
7967 Returns -> typing.Sequence[~StatusResult]
7969 # map input types to rpc msg
7971 msg
= dict(Type
='InstancePoller', Request
='InstanceStatus', Version
=2, Params
=params
)
7972 params
['Entities'] = entities
7973 reply
= await self
.rpc(msg
)
7974 return self
._map
(reply
, InstanceStatus
)
7978 #@ReturnMapping(LifeResults)
7979 async def Life(self
, entities
):
7981 entities : typing.Sequence[~Entity]
7982 Returns -> typing.Sequence[~LifeResult]
7984 # map input types to rpc msg
7986 msg
= dict(Type
='InstancePoller', Request
='Life', Version
=2, Params
=params
)
7987 params
['Entities'] = entities
7988 reply
= await self
.rpc(msg
)
7989 return self
._map
(reply
, Life
)
7993 #@ReturnMapping(ModelConfigResult)
7994 async def ModelConfig(self
):
7997 Returns -> typing.Mapping[str, typing.Any]
7999 # map input types to rpc msg
8001 msg
= dict(Type
='InstancePoller', Request
='ModelConfig', Version
=2, Params
=params
)
8003 reply
= await self
.rpc(msg
)
8004 return self
._map
(reply
, ModelConfig
)
8008 #@ReturnMapping(MachineAddressesResults)
8009 async def ProviderAddresses(self
, entities
):
8011 entities : typing.Sequence[~Entity]
8012 Returns -> typing.Sequence[~MachineAddressesResult]
8014 # map input types to rpc msg
8016 msg
= dict(Type
='InstancePoller', Request
='ProviderAddresses', Version
=2, Params
=params
)
8017 params
['Entities'] = entities
8018 reply
= await self
.rpc(msg
)
8019 return self
._map
(reply
, ProviderAddresses
)
8023 #@ReturnMapping(ErrorResults)
8024 async def SetInstanceStatus(self
, entities
):
8026 entities : typing.Sequence[~EntityStatusArgs]
8027 Returns -> typing.Sequence[~ErrorResult]
8029 # map input types to rpc msg
8031 msg
= dict(Type
='InstancePoller', Request
='SetInstanceStatus', Version
=2, Params
=params
)
8032 params
['Entities'] = entities
8033 reply
= await self
.rpc(msg
)
8034 return self
._map
(reply
, SetInstanceStatus
)
8038 #@ReturnMapping(ErrorResults)
8039 async def SetProviderAddresses(self
, machineaddresses
):
8041 machineaddresses : typing.Sequence[~MachineAddresses]
8042 Returns -> typing.Sequence[~ErrorResult]
8044 # map input types to rpc msg
8046 msg
= dict(Type
='InstancePoller', Request
='SetProviderAddresses', Version
=2, Params
=params
)
8047 params
['MachineAddresses'] = machineaddresses
8048 reply
= await self
.rpc(msg
)
8049 return self
._map
(reply
, SetProviderAddresses
)
8053 #@ReturnMapping(StatusResults)
8054 async def Status(self
, entities
):
8056 entities : typing.Sequence[~Entity]
8057 Returns -> typing.Sequence[~StatusResult]
8059 # map input types to rpc msg
8061 msg
= dict(Type
='InstancePoller', Request
='Status', Version
=2, Params
=params
)
8062 params
['Entities'] = entities
8063 reply
= await self
.rpc(msg
)
8064 return self
._map
(reply
, Status
)
8068 #@ReturnMapping(NotifyWatchResult)
8069 async def WatchForModelConfigChanges(self
):
8072 Returns -> typing.Union[~Error, str]
8074 # map input types to rpc msg
8076 msg
= dict(Type
='InstancePoller', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
8078 reply
= await self
.rpc(msg
)
8079 return self
._map
(reply
, WatchForModelConfigChanges
)
8083 #@ReturnMapping(StringsWatchResult)
8084 async def WatchModelMachines(self
):
8087 Returns -> typing.Union[~Error, typing.Sequence[str]]
8089 # map input types to rpc msg
8091 msg
= dict(Type
='InstancePoller', Request
='WatchModelMachines', Version
=2, Params
=params
)
8093 reply
= await self
.rpc(msg
)
8094 return self
._map
(reply
, WatchModelMachines
)
8097 class KeyManager(Type
):
8100 schema
= {'definitions': {'Entities': {'additionalProperties': False,
8101 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8103 'required': ['Entities'],
8105 'Entity': {'additionalProperties': False,
8106 'properties': {'Tag': {'type': 'string'}},
8107 'required': ['Tag'],
8109 'Error': {'additionalProperties': False,
8110 'properties': {'Code': {'type': 'string'},
8111 'Info': {'$ref': '#/definitions/ErrorInfo'},
8112 'Message': {'type': 'string'}},
8113 'required': ['Message', 'Code'],
8115 'ErrorInfo': {'additionalProperties': False,
8116 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8117 'MacaroonPath': {'type': 'string'}},
8119 'ErrorResult': {'additionalProperties': False,
8120 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8121 'required': ['Error'],
8123 'ErrorResults': {'additionalProperties': False,
8124 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8126 'required': ['Results'],
8128 'ListSSHKeys': {'additionalProperties': False,
8129 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
8130 'Mode': {'type': 'boolean'}},
8131 'required': ['Entities', 'Mode'],
8133 'Macaroon': {'additionalProperties': False,
8134 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8136 'data': {'items': {'type': 'integer'},
8138 'id': {'$ref': '#/definitions/packet'},
8139 'location': {'$ref': '#/definitions/packet'},
8140 'sig': {'items': {'type': 'integer'},
8142 'required': ['data',
8148 'ModifyUserSSHKeys': {'additionalProperties': False,
8149 'properties': {'Keys': {'items': {'type': 'string'},
8151 'User': {'type': 'string'}},
8152 'required': ['User', 'Keys'],
8154 'StringsResult': {'additionalProperties': False,
8155 'properties': {'Error': {'$ref': '#/definitions/Error'},
8156 'Result': {'items': {'type': 'string'},
8158 'required': ['Error', 'Result'],
8160 'StringsResults': {'additionalProperties': False,
8161 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
8163 'required': ['Results'],
8165 'caveat': {'additionalProperties': False,
8166 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8167 'location': {'$ref': '#/definitions/packet'},
8168 'verificationId': {'$ref': '#/definitions/packet'}},
8169 'required': ['location',
8173 'packet': {'additionalProperties': False,
8174 'properties': {'headerLen': {'type': 'integer'},
8175 'start': {'type': 'integer'},
8176 'totalLen': {'type': 'integer'}},
8177 'required': ['start', 'totalLen', 'headerLen'],
8179 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8180 'Result': {'$ref': '#/definitions/ErrorResults'}},
8182 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8183 'Result': {'$ref': '#/definitions/ErrorResults'}},
8185 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8186 'Result': {'$ref': '#/definitions/ErrorResults'}},
8188 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
8189 'Result': {'$ref': '#/definitions/StringsResults'}},
8194 #@ReturnMapping(ErrorResults)
8195 async def AddKeys(self
, user
, keys
):
8198 keys : typing.Sequence[str]
8199 Returns -> typing.Sequence[~ErrorResult]
8201 # map input types to rpc msg
8203 msg
= dict(Type
='KeyManager', Request
='AddKeys', Version
=1, Params
=params
)
8204 params
['User'] = user
8205 params
['Keys'] = keys
8206 reply
= await self
.rpc(msg
)
8207 return self
._map
(reply
, AddKeys
)
8211 #@ReturnMapping(ErrorResults)
8212 async def DeleteKeys(self
, user
, keys
):
8215 keys : typing.Sequence[str]
8216 Returns -> typing.Sequence[~ErrorResult]
8218 # map input types to rpc msg
8220 msg
= dict(Type
='KeyManager', Request
='DeleteKeys', Version
=1, Params
=params
)
8221 params
['User'] = user
8222 params
['Keys'] = keys
8223 reply
= await self
.rpc(msg
)
8224 return self
._map
(reply
, DeleteKeys
)
8228 #@ReturnMapping(ErrorResults)
8229 async def ImportKeys(self
, user
, keys
):
8232 keys : typing.Sequence[str]
8233 Returns -> typing.Sequence[~ErrorResult]
8235 # map input types to rpc msg
8237 msg
= dict(Type
='KeyManager', Request
='ImportKeys', Version
=1, Params
=params
)
8238 params
['User'] = user
8239 params
['Keys'] = keys
8240 reply
= await self
.rpc(msg
)
8241 return self
._map
(reply
, ImportKeys
)
8245 #@ReturnMapping(StringsResults)
8246 async def ListKeys(self
, entities
, mode
):
8248 entities : ~Entities
8250 Returns -> typing.Sequence[~StringsResult]
8252 # map input types to rpc msg
8254 msg
= dict(Type
='KeyManager', Request
='ListKeys', Version
=1, Params
=params
)
8255 params
['Entities'] = entities
8256 params
['Mode'] = mode
8257 reply
= await self
.rpc(msg
)
8258 return self
._map
(reply
, ListKeys
)
8261 class KeyUpdater(Type
):
8264 schema
= {'definitions': {'Entities': {'additionalProperties': False,
8265 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8267 'required': ['Entities'],
8269 'Entity': {'additionalProperties': False,
8270 'properties': {'Tag': {'type': 'string'}},
8271 'required': ['Tag'],
8273 'Error': {'additionalProperties': False,
8274 'properties': {'Code': {'type': 'string'},
8275 'Info': {'$ref': '#/definitions/ErrorInfo'},
8276 'Message': {'type': 'string'}},
8277 'required': ['Message', 'Code'],
8279 'ErrorInfo': {'additionalProperties': False,
8280 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8281 'MacaroonPath': {'type': 'string'}},
8283 'Macaroon': {'additionalProperties': False,
8284 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8286 'data': {'items': {'type': 'integer'},
8288 'id': {'$ref': '#/definitions/packet'},
8289 'location': {'$ref': '#/definitions/packet'},
8290 'sig': {'items': {'type': 'integer'},
8292 'required': ['data',
8298 'NotifyWatchResult': {'additionalProperties': False,
8299 'properties': {'Error': {'$ref': '#/definitions/Error'},
8300 'NotifyWatcherId': {'type': 'string'}},
8301 'required': ['NotifyWatcherId', 'Error'],
8303 'NotifyWatchResults': {'additionalProperties': False,
8304 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8306 'required': ['Results'],
8308 'StringsResult': {'additionalProperties': False,
8309 'properties': {'Error': {'$ref': '#/definitions/Error'},
8310 'Result': {'items': {'type': 'string'},
8312 'required': ['Error', 'Result'],
8314 'StringsResults': {'additionalProperties': False,
8315 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
8317 'required': ['Results'],
8319 'caveat': {'additionalProperties': False,
8320 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8321 'location': {'$ref': '#/definitions/packet'},
8322 'verificationId': {'$ref': '#/definitions/packet'}},
8323 'required': ['location',
8327 'packet': {'additionalProperties': False,
8328 'properties': {'headerLen': {'type': 'integer'},
8329 'start': {'type': 'integer'},
8330 'totalLen': {'type': 'integer'}},
8331 'required': ['start', 'totalLen', 'headerLen'],
8333 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8334 'Result': {'$ref': '#/definitions/StringsResults'}},
8336 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8337 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8342 #@ReturnMapping(StringsResults)
8343 async def AuthorisedKeys(self
, entities
):
8345 entities : typing.Sequence[~Entity]
8346 Returns -> typing.Sequence[~StringsResult]
8348 # map input types to rpc msg
8350 msg
= dict(Type
='KeyUpdater', Request
='AuthorisedKeys', Version
=1, Params
=params
)
8351 params
['Entities'] = entities
8352 reply
= await self
.rpc(msg
)
8353 return self
._map
(reply
, AuthorisedKeys
)
8357 #@ReturnMapping(NotifyWatchResults)
8358 async def WatchAuthorisedKeys(self
, entities
):
8360 entities : typing.Sequence[~Entity]
8361 Returns -> typing.Sequence[~NotifyWatchResult]
8363 # map input types to rpc msg
8365 msg
= dict(Type
='KeyUpdater', Request
='WatchAuthorisedKeys', Version
=1, Params
=params
)
8366 params
['Entities'] = entities
8367 reply
= await self
.rpc(msg
)
8368 return self
._map
(reply
, WatchAuthorisedKeys
)
8371 class LeadershipService(Type
):
8372 name
= 'LeadershipService'
8374 schema
= {'definitions': {'ClaimLeadershipBulkParams': {'additionalProperties': False,
8375 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
8377 'required': ['Params'],
8379 'ClaimLeadershipBulkResults': {'additionalProperties': False,
8380 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8382 'required': ['Results'],
8384 'ClaimLeadershipParams': {'additionalProperties': False,
8385 'properties': {'DurationSeconds': {'type': 'number'},
8386 'ServiceTag': {'type': 'string'},
8387 'UnitTag': {'type': 'string'}},
8388 'required': ['ServiceTag',
8392 'Error': {'additionalProperties': False,
8393 'properties': {'Code': {'type': 'string'},
8394 'Info': {'$ref': '#/definitions/ErrorInfo'},
8395 'Message': {'type': 'string'}},
8396 'required': ['Message', 'Code'],
8398 'ErrorInfo': {'additionalProperties': False,
8399 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8400 'MacaroonPath': {'type': 'string'}},
8402 'ErrorResult': {'additionalProperties': False,
8403 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8404 'required': ['Error'],
8406 'Macaroon': {'additionalProperties': False,
8407 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8409 'data': {'items': {'type': 'integer'},
8411 'id': {'$ref': '#/definitions/packet'},
8412 'location': {'$ref': '#/definitions/packet'},
8413 'sig': {'items': {'type': 'integer'},
8415 'required': ['data',
8421 'ServiceTag': {'additionalProperties': False,
8422 'properties': {'Name': {'type': 'string'}},
8423 'required': ['Name'],
8425 'caveat': {'additionalProperties': False,
8426 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8427 'location': {'$ref': '#/definitions/packet'},
8428 'verificationId': {'$ref': '#/definitions/packet'}},
8429 'required': ['location',
8433 'packet': {'additionalProperties': False,
8434 'properties': {'headerLen': {'type': 'integer'},
8435 'start': {'type': 'integer'},
8436 'totalLen': {'type': 'integer'}},
8437 'required': ['start', 'totalLen', 'headerLen'],
8439 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ServiceTag'},
8440 'Result': {'$ref': '#/definitions/ErrorResult'}},
8442 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
8443 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
8448 #@ReturnMapping(ErrorResult)
8449 async def BlockUntilLeadershipReleased(self
, name
):
8454 # map input types to rpc msg
8456 msg
= dict(Type
='LeadershipService', Request
='BlockUntilLeadershipReleased', Version
=2, Params
=params
)
8457 params
['Name'] = name
8458 reply
= await self
.rpc(msg
)
8459 return self
._map
(reply
, BlockUntilLeadershipReleased
)
8463 #@ReturnMapping(ClaimLeadershipBulkResults)
8464 async def ClaimLeadership(self
, params
):
8466 params : typing.Sequence[~ClaimLeadershipParams]
8467 Returns -> typing.Sequence[~ErrorResult]
8469 # map input types to rpc msg
8471 msg
= dict(Type
='LeadershipService', Request
='ClaimLeadership', Version
=2, Params
=params
)
8472 params
['Params'] = params
8473 reply
= await self
.rpc(msg
)
8474 return self
._map
(reply
, ClaimLeadership
)
8477 class LifeFlag(Type
):
8480 schema
= {'definitions': {'Entities': {'additionalProperties': False,
8481 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8483 'required': ['Entities'],
8485 'Entity': {'additionalProperties': False,
8486 'properties': {'Tag': {'type': 'string'}},
8487 'required': ['Tag'],
8489 'Error': {'additionalProperties': False,
8490 'properties': {'Code': {'type': 'string'},
8491 'Info': {'$ref': '#/definitions/ErrorInfo'},
8492 'Message': {'type': 'string'}},
8493 'required': ['Message', 'Code'],
8495 'ErrorInfo': {'additionalProperties': False,
8496 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8497 'MacaroonPath': {'type': 'string'}},
8499 'LifeResult': {'additionalProperties': False,
8500 'properties': {'Error': {'$ref': '#/definitions/Error'},
8501 'Life': {'type': 'string'}},
8502 'required': ['Life', 'Error'],
8504 'LifeResults': {'additionalProperties': False,
8505 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
8507 'required': ['Results'],
8509 'Macaroon': {'additionalProperties': False,
8510 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8512 'data': {'items': {'type': 'integer'},
8514 'id': {'$ref': '#/definitions/packet'},
8515 'location': {'$ref': '#/definitions/packet'},
8516 'sig': {'items': {'type': 'integer'},
8518 'required': ['data',
8524 'NotifyWatchResult': {'additionalProperties': False,
8525 'properties': {'Error': {'$ref': '#/definitions/Error'},
8526 'NotifyWatcherId': {'type': 'string'}},
8527 'required': ['NotifyWatcherId', 'Error'],
8529 'NotifyWatchResults': {'additionalProperties': False,
8530 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8532 'required': ['Results'],
8534 'caveat': {'additionalProperties': False,
8535 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8536 'location': {'$ref': '#/definitions/packet'},
8537 'verificationId': {'$ref': '#/definitions/packet'}},
8538 'required': ['location',
8542 'packet': {'additionalProperties': False,
8543 'properties': {'headerLen': {'type': 'integer'},
8544 'start': {'type': 'integer'},
8545 'totalLen': {'type': 'integer'}},
8546 'required': ['start', 'totalLen', 'headerLen'],
8548 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8549 'Result': {'$ref': '#/definitions/LifeResults'}},
8551 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8552 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8557 #@ReturnMapping(LifeResults)
8558 async def Life(self
, entities
):
8560 entities : typing.Sequence[~Entity]
8561 Returns -> typing.Sequence[~LifeResult]
8563 # map input types to rpc msg
8565 msg
= dict(Type
='LifeFlag', Request
='Life', Version
=1, Params
=params
)
8566 params
['Entities'] = entities
8567 reply
= await self
.rpc(msg
)
8568 return self
._map
(reply
, Life
)
8572 #@ReturnMapping(NotifyWatchResults)
8573 async def Watch(self
, entities
):
8575 entities : typing.Sequence[~Entity]
8576 Returns -> typing.Sequence[~NotifyWatchResult]
8578 # map input types to rpc msg
8580 msg
= dict(Type
='LifeFlag', Request
='Watch', Version
=1, Params
=params
)
8581 params
['Entities'] = entities
8582 reply
= await self
.rpc(msg
)
8583 return self
._map
(reply
, Watch
)
8589 schema
= {'definitions': {'Entities': {'additionalProperties': False,
8590 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8592 'required': ['Entities'],
8594 'Entity': {'additionalProperties': False,
8595 'properties': {'Tag': {'type': 'string'}},
8596 'required': ['Tag'],
8598 'Error': {'additionalProperties': False,
8599 'properties': {'Code': {'type': 'string'},
8600 'Info': {'$ref': '#/definitions/ErrorInfo'},
8601 'Message': {'type': 'string'}},
8602 'required': ['Message', 'Code'],
8604 'ErrorInfo': {'additionalProperties': False,
8605 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8606 'MacaroonPath': {'type': 'string'}},
8608 'Macaroon': {'additionalProperties': False,
8609 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8611 'data': {'items': {'type': 'integer'},
8613 'id': {'$ref': '#/definitions/packet'},
8614 'location': {'$ref': '#/definitions/packet'},
8615 'sig': {'items': {'type': 'integer'},
8617 'required': ['data',
8623 'NotifyWatchResult': {'additionalProperties': False,
8624 'properties': {'Error': {'$ref': '#/definitions/Error'},
8625 'NotifyWatcherId': {'type': 'string'}},
8626 'required': ['NotifyWatcherId', 'Error'],
8628 'NotifyWatchResults': {'additionalProperties': False,
8629 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8631 'required': ['Results'],
8633 'StringResult': {'additionalProperties': False,
8634 'properties': {'Error': {'$ref': '#/definitions/Error'},
8635 'Result': {'type': 'string'}},
8636 'required': ['Error', 'Result'],
8638 'StringResults': {'additionalProperties': False,
8639 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
8641 'required': ['Results'],
8643 'caveat': {'additionalProperties': False,
8644 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8645 'location': {'$ref': '#/definitions/packet'},
8646 'verificationId': {'$ref': '#/definitions/packet'}},
8647 'required': ['location',
8651 'packet': {'additionalProperties': False,
8652 'properties': {'headerLen': {'type': 'integer'},
8653 'start': {'type': 'integer'},
8654 'totalLen': {'type': 'integer'}},
8655 'required': ['start', 'totalLen', 'headerLen'],
8657 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8658 'Result': {'$ref': '#/definitions/StringResults'}},
8660 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8661 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8666 #@ReturnMapping(StringResults)
8667 async def LoggingConfig(self
, entities
):
8669 entities : typing.Sequence[~Entity]
8670 Returns -> typing.Sequence[~StringResult]
8672 # map input types to rpc msg
8674 msg
= dict(Type
='Logger', Request
='LoggingConfig', Version
=1, Params
=params
)
8675 params
['Entities'] = entities
8676 reply
= await self
.rpc(msg
)
8677 return self
._map
(reply
, LoggingConfig
)
8681 #@ReturnMapping(NotifyWatchResults)
8682 async def WatchLoggingConfig(self
, entities
):
8684 entities : typing.Sequence[~Entity]
8685 Returns -> typing.Sequence[~NotifyWatchResult]
8687 # map input types to rpc msg
8689 msg
= dict(Type
='Logger', Request
='WatchLoggingConfig', Version
=1, Params
=params
)
8690 params
['Entities'] = entities
8691 reply
= await self
.rpc(msg
)
8692 return self
._map
(reply
, WatchLoggingConfig
)
8695 class MachineActions(Type
):
8696 name
= 'MachineActions'
8698 schema
= {'definitions': {'Action': {'additionalProperties': False,
8699 'properties': {'name': {'type': 'string'},
8700 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
8703 'receiver': {'type': 'string'},
8704 'tag': {'type': 'string'}},
8705 'required': ['tag', 'receiver', 'name'],
8707 'ActionExecutionResult': {'additionalProperties': False,
8708 'properties': {'actiontag': {'type': 'string'},
8709 'message': {'type': 'string'},
8710 'results': {'patternProperties': {'.*': {'additionalProperties': True,
8713 'status': {'type': 'string'}},
8714 'required': ['actiontag', 'status'],
8716 'ActionExecutionResults': {'additionalProperties': False,
8717 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
8720 'ActionResult': {'additionalProperties': False,
8721 'properties': {'action': {'$ref': '#/definitions/Action'},
8722 'completed': {'format': 'date-time',
8724 'enqueued': {'format': 'date-time',
8726 'error': {'$ref': '#/definitions/Error'},
8727 'message': {'type': 'string'},
8728 'output': {'patternProperties': {'.*': {'additionalProperties': True,
8731 'started': {'format': 'date-time',
8733 'status': {'type': 'string'}},
8735 'ActionResults': {'additionalProperties': False,
8736 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
8739 'ActionsByReceiver': {'additionalProperties': False,
8740 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
8742 'error': {'$ref': '#/definitions/Error'},
8743 'receiver': {'type': 'string'}},
8745 'ActionsByReceivers': {'additionalProperties': False,
8746 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
8749 'Entities': {'additionalProperties': False,
8750 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8752 'required': ['Entities'],
8754 'Entity': {'additionalProperties': False,
8755 'properties': {'Tag': {'type': 'string'}},
8756 'required': ['Tag'],
8758 'Error': {'additionalProperties': False,
8759 'properties': {'Code': {'type': 'string'},
8760 'Info': {'$ref': '#/definitions/ErrorInfo'},
8761 'Message': {'type': 'string'}},
8762 'required': ['Message', 'Code'],
8764 'ErrorInfo': {'additionalProperties': False,
8765 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8766 'MacaroonPath': {'type': 'string'}},
8768 'ErrorResult': {'additionalProperties': False,
8769 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8770 'required': ['Error'],
8772 'ErrorResults': {'additionalProperties': False,
8773 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8775 'required': ['Results'],
8777 'Macaroon': {'additionalProperties': False,
8778 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8780 'data': {'items': {'type': 'integer'},
8782 'id': {'$ref': '#/definitions/packet'},
8783 'location': {'$ref': '#/definitions/packet'},
8784 'sig': {'items': {'type': 'integer'},
8786 'required': ['data',
8792 'StringsWatchResult': {'additionalProperties': False,
8793 'properties': {'Changes': {'items': {'type': 'string'},
8795 'Error': {'$ref': '#/definitions/Error'},
8796 'StringsWatcherId': {'type': 'string'}},
8797 'required': ['StringsWatcherId',
8801 'StringsWatchResults': {'additionalProperties': False,
8802 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8804 'required': ['Results'],
8806 'caveat': {'additionalProperties': False,
8807 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8808 'location': {'$ref': '#/definitions/packet'},
8809 'verificationId': {'$ref': '#/definitions/packet'}},
8810 'required': ['location',
8814 'packet': {'additionalProperties': False,
8815 'properties': {'headerLen': {'type': 'integer'},
8816 'start': {'type': 'integer'},
8817 'totalLen': {'type': 'integer'}},
8818 'required': ['start', 'totalLen', 'headerLen'],
8820 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8821 'Result': {'$ref': '#/definitions/ActionResults'}},
8823 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8824 'Result': {'$ref': '#/definitions/ErrorResults'}},
8826 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
8827 'Result': {'$ref': '#/definitions/ErrorResults'}},
8829 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8830 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
8832 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8833 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8838 #@ReturnMapping(ActionResults)
8839 async def Actions(self
, entities
):
8841 entities : typing.Sequence[~Entity]
8842 Returns -> typing.Sequence[~ActionResult]
8844 # map input types to rpc msg
8846 msg
= dict(Type
='MachineActions', Request
='Actions', Version
=1, Params
=params
)
8847 params
['Entities'] = entities
8848 reply
= await self
.rpc(msg
)
8849 return self
._map
(reply
, Actions
)
8853 #@ReturnMapping(ErrorResults)
8854 async def BeginActions(self
, entities
):
8856 entities : typing.Sequence[~Entity]
8857 Returns -> typing.Sequence[~ErrorResult]
8859 # map input types to rpc msg
8861 msg
= dict(Type
='MachineActions', Request
='BeginActions', Version
=1, Params
=params
)
8862 params
['Entities'] = entities
8863 reply
= await self
.rpc(msg
)
8864 return self
._map
(reply
, BeginActions
)
8868 #@ReturnMapping(ErrorResults)
8869 async def FinishActions(self
, results
):
8871 results : typing.Sequence[~ActionExecutionResult]
8872 Returns -> typing.Sequence[~ErrorResult]
8874 # map input types to rpc msg
8876 msg
= dict(Type
='MachineActions', Request
='FinishActions', Version
=1, Params
=params
)
8877 params
['results'] = results
8878 reply
= await self
.rpc(msg
)
8879 return self
._map
(reply
, FinishActions
)
8883 #@ReturnMapping(ActionsByReceivers)
8884 async def RunningActions(self
, entities
):
8886 entities : typing.Sequence[~Entity]
8887 Returns -> typing.Sequence[~ActionsByReceiver]
8889 # map input types to rpc msg
8891 msg
= dict(Type
='MachineActions', Request
='RunningActions', Version
=1, Params
=params
)
8892 params
['Entities'] = entities
8893 reply
= await self
.rpc(msg
)
8894 return self
._map
(reply
, RunningActions
)
8898 #@ReturnMapping(StringsWatchResults)
8899 async def WatchActionNotifications(self
, entities
):
8901 entities : typing.Sequence[~Entity]
8902 Returns -> typing.Sequence[~StringsWatchResult]
8904 # map input types to rpc msg
8906 msg
= dict(Type
='MachineActions', Request
='WatchActionNotifications', Version
=1, Params
=params
)
8907 params
['Entities'] = entities
8908 reply
= await self
.rpc(msg
)
8909 return self
._map
(reply
, WatchActionNotifications
)
8912 class MachineManager(Type
):
8913 name
= 'MachineManager'
8915 schema
= {'definitions': {'AddMachineParams': {'additionalProperties': False,
8916 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
8918 'Constraints': {'$ref': '#/definitions/Value'},
8919 'ContainerType': {'type': 'string'},
8920 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
8922 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8923 'InstanceId': {'type': 'string'},
8924 'Jobs': {'items': {'type': 'string'},
8926 'Nonce': {'type': 'string'},
8927 'ParentId': {'type': 'string'},
8928 'Placement': {'$ref': '#/definitions/Placement'},
8929 'Series': {'type': 'string'}},
8930 'required': ['Series',
8939 'HardwareCharacteristics',
8942 'AddMachines': {'additionalProperties': False,
8943 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
8945 'required': ['MachineParams'],
8947 'AddMachinesResult': {'additionalProperties': False,
8948 'properties': {'Error': {'$ref': '#/definitions/Error'},
8949 'Machine': {'type': 'string'}},
8950 'required': ['Machine', 'Error'],
8952 'AddMachinesResults': {'additionalProperties': False,
8953 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8955 'required': ['Machines'],
8957 'Address': {'additionalProperties': False,
8958 'properties': {'Scope': {'type': 'string'},
8959 'SpaceName': {'type': 'string'},
8960 'Type': {'type': 'string'},
8961 'Value': {'type': 'string'}},
8962 'required': ['Value', 'Type', 'Scope'],
8964 'Constraints': {'additionalProperties': False,
8965 'properties': {'Count': {'type': 'integer'},
8966 'Pool': {'type': 'string'},
8967 'Size': {'type': 'integer'}},
8968 'required': ['Pool', 'Size', 'Count'],
8970 'Error': {'additionalProperties': False,
8971 'properties': {'Code': {'type': 'string'},
8972 'Info': {'$ref': '#/definitions/ErrorInfo'},
8973 'Message': {'type': 'string'}},
8974 'required': ['Message', 'Code'],
8976 'ErrorInfo': {'additionalProperties': False,
8977 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8978 'MacaroonPath': {'type': 'string'}},
8980 'HardwareCharacteristics': {'additionalProperties': False,
8981 'properties': {'Arch': {'type': 'string'},
8982 'AvailabilityZone': {'type': 'string'},
8983 'CpuCores': {'type': 'integer'},
8984 'CpuPower': {'type': 'integer'},
8985 'Mem': {'type': 'integer'},
8986 'RootDisk': {'type': 'integer'},
8987 'Tags': {'items': {'type': 'string'},
8990 'Macaroon': {'additionalProperties': False,
8991 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8993 'data': {'items': {'type': 'integer'},
8995 'id': {'$ref': '#/definitions/packet'},
8996 'location': {'$ref': '#/definitions/packet'},
8997 'sig': {'items': {'type': 'integer'},
8999 'required': ['data',
9005 'Placement': {'additionalProperties': False,
9006 'properties': {'Directive': {'type': 'string'},
9007 'Scope': {'type': 'string'}},
9008 'required': ['Scope', 'Directive'],
9010 'Value': {'additionalProperties': False,
9011 'properties': {'arch': {'type': 'string'},
9012 'container': {'type': 'string'},
9013 'cpu-cores': {'type': 'integer'},
9014 'cpu-power': {'type': 'integer'},
9015 'instance-type': {'type': 'string'},
9016 'mem': {'type': 'integer'},
9017 'root-disk': {'type': 'integer'},
9018 'spaces': {'items': {'type': 'string'},
9020 'tags': {'items': {'type': 'string'},
9022 'virt-type': {'type': 'string'}},
9024 'caveat': {'additionalProperties': False,
9025 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9026 'location': {'$ref': '#/definitions/packet'},
9027 'verificationId': {'$ref': '#/definitions/packet'}},
9028 'required': ['location',
9032 'packet': {'additionalProperties': False,
9033 'properties': {'headerLen': {'type': 'integer'},
9034 'start': {'type': 'integer'},
9035 'totalLen': {'type': 'integer'}},
9036 'required': ['start', 'totalLen', 'headerLen'],
9038 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9039 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9044 #@ReturnMapping(AddMachinesResults)
9045 async def AddMachines(self
, machineparams
):
9047 machineparams : typing.Sequence[~AddMachineParams]
9048 Returns -> typing.Sequence[~AddMachinesResult]
9050 # map input types to rpc msg
9052 msg
= dict(Type
='MachineManager', Request
='AddMachines', Version
=2, Params
=params
)
9053 params
['MachineParams'] = machineparams
9054 reply
= await self
.rpc(msg
)
9055 return self
._map
(reply
, AddMachines
)
9058 class Machiner(Type
):
9061 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9062 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9065 'required': ['Servers'],
9067 'Address': {'additionalProperties': False,
9068 'properties': {'Scope': {'type': 'string'},
9069 'SpaceName': {'type': 'string'},
9070 'Type': {'type': 'string'},
9071 'Value': {'type': 'string'}},
9072 'required': ['Value', 'Type', 'Scope'],
9074 'BytesResult': {'additionalProperties': False,
9075 'properties': {'Result': {'items': {'type': 'integer'},
9077 'required': ['Result'],
9079 'Entities': {'additionalProperties': False,
9080 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9082 'required': ['Entities'],
9084 'Entity': {'additionalProperties': False,
9085 'properties': {'Tag': {'type': 'string'}},
9086 'required': ['Tag'],
9088 'EntityStatusArgs': {'additionalProperties': False,
9089 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
9092 'Info': {'type': 'string'},
9093 'Status': {'type': 'string'},
9094 'Tag': {'type': 'string'}},
9100 'Error': {'additionalProperties': False,
9101 'properties': {'Code': {'type': 'string'},
9102 'Info': {'$ref': '#/definitions/ErrorInfo'},
9103 'Message': {'type': 'string'}},
9104 'required': ['Message', 'Code'],
9106 'ErrorInfo': {'additionalProperties': False,
9107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9108 'MacaroonPath': {'type': 'string'}},
9110 'ErrorResult': {'additionalProperties': False,
9111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9112 'required': ['Error'],
9114 'ErrorResults': {'additionalProperties': False,
9115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9117 'required': ['Results'],
9119 'HostPort': {'additionalProperties': False,
9120 'properties': {'Address': {'$ref': '#/definitions/Address'},
9121 'Port': {'type': 'integer'}},
9122 'required': ['Address', 'Port'],
9124 'JobsResult': {'additionalProperties': False,
9125 'properties': {'Error': {'$ref': '#/definitions/Error'},
9126 'Jobs': {'items': {'type': 'string'},
9128 'required': ['Jobs', 'Error'],
9130 'JobsResults': {'additionalProperties': False,
9131 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
9133 'required': ['Results'],
9135 'LifeResult': {'additionalProperties': False,
9136 'properties': {'Error': {'$ref': '#/definitions/Error'},
9137 'Life': {'type': 'string'}},
9138 'required': ['Life', 'Error'],
9140 'LifeResults': {'additionalProperties': False,
9141 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9143 'required': ['Results'],
9145 'Macaroon': {'additionalProperties': False,
9146 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9148 'data': {'items': {'type': 'integer'},
9150 'id': {'$ref': '#/definitions/packet'},
9151 'location': {'$ref': '#/definitions/packet'},
9152 'sig': {'items': {'type': 'integer'},
9154 'required': ['data',
9160 'MachineAddresses': {'additionalProperties': False,
9161 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
9163 'Tag': {'type': 'string'}},
9164 'required': ['Tag', 'Addresses'],
9166 'NetworkConfig': {'additionalProperties': False,
9167 'properties': {'Address': {'type': 'string'},
9168 'CIDR': {'type': 'string'},
9169 'ConfigType': {'type': 'string'},
9170 'DNSSearchDomains': {'items': {'type': 'string'},
9172 'DNSServers': {'items': {'type': 'string'},
9174 'DeviceIndex': {'type': 'integer'},
9175 'Disabled': {'type': 'boolean'},
9176 'GatewayAddress': {'type': 'string'},
9177 'InterfaceName': {'type': 'string'},
9178 'InterfaceType': {'type': 'string'},
9179 'MACAddress': {'type': 'string'},
9180 'MTU': {'type': 'integer'},
9181 'NoAutoStart': {'type': 'boolean'},
9182 'ParentInterfaceName': {'type': 'string'},
9183 'ProviderAddressId': {'type': 'string'},
9184 'ProviderId': {'type': 'string'},
9185 'ProviderSpaceId': {'type': 'string'},
9186 'ProviderSubnetId': {'type': 'string'},
9187 'ProviderVLANId': {'type': 'string'},
9188 'VLANTag': {'type': 'integer'}},
9189 'required': ['DeviceIndex',
9196 'ProviderAddressId',
9200 'ParentInterfaceName',
9204 'NotifyWatchResult': {'additionalProperties': False,
9205 'properties': {'Error': {'$ref': '#/definitions/Error'},
9206 'NotifyWatcherId': {'type': 'string'}},
9207 'required': ['NotifyWatcherId', 'Error'],
9209 'NotifyWatchResults': {'additionalProperties': False,
9210 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9212 'required': ['Results'],
9214 'SetMachineNetworkConfig': {'additionalProperties': False,
9215 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
9217 'Tag': {'type': 'string'}},
9218 'required': ['Tag', 'Config'],
9220 'SetMachinesAddresses': {'additionalProperties': False,
9221 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
9223 'required': ['MachineAddresses'],
9225 'SetStatus': {'additionalProperties': False,
9226 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
9228 'required': ['Entities'],
9230 'StringResult': {'additionalProperties': False,
9231 'properties': {'Error': {'$ref': '#/definitions/Error'},
9232 'Result': {'type': 'string'}},
9233 'required': ['Error', 'Result'],
9235 'StringsResult': {'additionalProperties': False,
9236 'properties': {'Error': {'$ref': '#/definitions/Error'},
9237 'Result': {'items': {'type': 'string'},
9239 'required': ['Error', 'Result'],
9241 'caveat': {'additionalProperties': False,
9242 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9243 'location': {'$ref': '#/definitions/packet'},
9244 'verificationId': {'$ref': '#/definitions/packet'}},
9245 'required': ['location',
9249 'packet': {'additionalProperties': False,
9250 'properties': {'headerLen': {'type': 'integer'},
9251 'start': {'type': 'integer'},
9252 'totalLen': {'type': 'integer'}},
9253 'required': ['start', 'totalLen', 'headerLen'],
9255 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9257 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9259 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9261 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9262 'Result': {'$ref': '#/definitions/ErrorResults'}},
9264 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9265 'Result': {'$ref': '#/definitions/JobsResults'}},
9267 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9268 'Result': {'$ref': '#/definitions/LifeResults'}},
9270 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9272 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
9273 'Result': {'$ref': '#/definitions/ErrorResults'}},
9275 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
9277 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9278 'Result': {'$ref': '#/definitions/ErrorResults'}},
9280 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9281 'Result': {'$ref': '#/definitions/ErrorResults'}},
9283 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9284 'Result': {'$ref': '#/definitions/ErrorResults'}},
9286 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9287 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9289 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9294 #@ReturnMapping(StringsResult)
9295 async def APIAddresses(self
):
9298 Returns -> typing.Union[~Error, typing.Sequence[str]]
9300 # map input types to rpc msg
9302 msg
= dict(Type
='Machiner', Request
='APIAddresses', Version
=1, Params
=params
)
9304 reply
= await self
.rpc(msg
)
9305 return self
._map
(reply
, APIAddresses
)
9309 #@ReturnMapping(APIHostPortsResult)
9310 async def APIHostPorts(self
):
9313 Returns -> typing.Sequence[~HostPort]
9315 # map input types to rpc msg
9317 msg
= dict(Type
='Machiner', Request
='APIHostPorts', Version
=1, Params
=params
)
9319 reply
= await self
.rpc(msg
)
9320 return self
._map
(reply
, APIHostPorts
)
9324 #@ReturnMapping(BytesResult)
9325 async def CACert(self
):
9328 Returns -> typing.Sequence[int]
9330 # map input types to rpc msg
9332 msg
= dict(Type
='Machiner', Request
='CACert', Version
=1, Params
=params
)
9334 reply
= await self
.rpc(msg
)
9335 return self
._map
(reply
, CACert
)
9339 #@ReturnMapping(ErrorResults)
9340 async def EnsureDead(self
, entities
):
9342 entities : typing.Sequence[~Entity]
9343 Returns -> typing.Sequence[~ErrorResult]
9345 # map input types to rpc msg
9347 msg
= dict(Type
='Machiner', Request
='EnsureDead', Version
=1, Params
=params
)
9348 params
['Entities'] = entities
9349 reply
= await self
.rpc(msg
)
9350 return self
._map
(reply
, EnsureDead
)
9354 #@ReturnMapping(JobsResults)
9355 async def Jobs(self
, entities
):
9357 entities : typing.Sequence[~Entity]
9358 Returns -> typing.Sequence[~JobsResult]
9360 # map input types to rpc msg
9362 msg
= dict(Type
='Machiner', Request
='Jobs', Version
=1, Params
=params
)
9363 params
['Entities'] = entities
9364 reply
= await self
.rpc(msg
)
9365 return self
._map
(reply
, Jobs
)
9369 #@ReturnMapping(LifeResults)
9370 async def Life(self
, entities
):
9372 entities : typing.Sequence[~Entity]
9373 Returns -> typing.Sequence[~LifeResult]
9375 # map input types to rpc msg
9377 msg
= dict(Type
='Machiner', Request
='Life', Version
=1, Params
=params
)
9378 params
['Entities'] = entities
9379 reply
= await self
.rpc(msg
)
9380 return self
._map
(reply
, Life
)
9384 #@ReturnMapping(StringResult)
9385 async def ModelUUID(self
):
9388 Returns -> typing.Union[~Error, str]
9390 # map input types to rpc msg
9392 msg
= dict(Type
='Machiner', Request
='ModelUUID', Version
=1, Params
=params
)
9394 reply
= await self
.rpc(msg
)
9395 return self
._map
(reply
, ModelUUID
)
9399 #@ReturnMapping(ErrorResults)
9400 async def SetMachineAddresses(self
, machineaddresses
):
9402 machineaddresses : typing.Sequence[~MachineAddresses]
9403 Returns -> typing.Sequence[~ErrorResult]
9405 # map input types to rpc msg
9407 msg
= dict(Type
='Machiner', Request
='SetMachineAddresses', Version
=1, Params
=params
)
9408 params
['MachineAddresses'] = machineaddresses
9409 reply
= await self
.rpc(msg
)
9410 return self
._map
(reply
, SetMachineAddresses
)
9414 #@ReturnMapping(None)
9415 async def SetObservedNetworkConfig(self
, tag
, config
):
9418 config : typing.Sequence[~NetworkConfig]
9421 # map input types to rpc msg
9423 msg
= dict(Type
='Machiner', Request
='SetObservedNetworkConfig', Version
=1, Params
=params
)
9425 params
['Config'] = config
9426 reply
= await self
.rpc(msg
)
9427 return self
._map
(reply
, SetObservedNetworkConfig
)
9431 #@ReturnMapping(ErrorResults)
9432 async def SetProviderNetworkConfig(self
, entities
):
9434 entities : typing.Sequence[~Entity]
9435 Returns -> typing.Sequence[~ErrorResult]
9437 # map input types to rpc msg
9439 msg
= dict(Type
='Machiner', Request
='SetProviderNetworkConfig', Version
=1, Params
=params
)
9440 params
['Entities'] = entities
9441 reply
= await self
.rpc(msg
)
9442 return self
._map
(reply
, SetProviderNetworkConfig
)
9446 #@ReturnMapping(ErrorResults)
9447 async def SetStatus(self
, entities
):
9449 entities : typing.Sequence[~EntityStatusArgs]
9450 Returns -> typing.Sequence[~ErrorResult]
9452 # map input types to rpc msg
9454 msg
= dict(Type
='Machiner', Request
='SetStatus', Version
=1, Params
=params
)
9455 params
['Entities'] = entities
9456 reply
= await self
.rpc(msg
)
9457 return self
._map
(reply
, SetStatus
)
9461 #@ReturnMapping(ErrorResults)
9462 async def UpdateStatus(self
, entities
):
9464 entities : typing.Sequence[~EntityStatusArgs]
9465 Returns -> typing.Sequence[~ErrorResult]
9467 # map input types to rpc msg
9469 msg
= dict(Type
='Machiner', Request
='UpdateStatus', Version
=1, Params
=params
)
9470 params
['Entities'] = entities
9471 reply
= await self
.rpc(msg
)
9472 return self
._map
(reply
, UpdateStatus
)
9476 #@ReturnMapping(NotifyWatchResults)
9477 async def Watch(self
, entities
):
9479 entities : typing.Sequence[~Entity]
9480 Returns -> typing.Sequence[~NotifyWatchResult]
9482 # map input types to rpc msg
9484 msg
= dict(Type
='Machiner', Request
='Watch', Version
=1, Params
=params
)
9485 params
['Entities'] = entities
9486 reply
= await self
.rpc(msg
)
9487 return self
._map
(reply
, Watch
)
9491 #@ReturnMapping(NotifyWatchResult)
9492 async def WatchAPIHostPorts(self
):
9495 Returns -> typing.Union[~Error, str]
9497 # map input types to rpc msg
9499 msg
= dict(Type
='Machiner', Request
='WatchAPIHostPorts', Version
=1, Params
=params
)
9501 reply
= await self
.rpc(msg
)
9502 return self
._map
(reply
, WatchAPIHostPorts
)
9505 class MeterStatus(Type
):
9506 name
= 'MeterStatus'
9508 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9509 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9511 'required': ['Entities'],
9513 'Entity': {'additionalProperties': False,
9514 'properties': {'Tag': {'type': 'string'}},
9515 'required': ['Tag'],
9517 'Error': {'additionalProperties': False,
9518 'properties': {'Code': {'type': 'string'},
9519 'Info': {'$ref': '#/definitions/ErrorInfo'},
9520 'Message': {'type': 'string'}},
9521 'required': ['Message', 'Code'],
9523 'ErrorInfo': {'additionalProperties': False,
9524 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9525 'MacaroonPath': {'type': 'string'}},
9527 'Macaroon': {'additionalProperties': False,
9528 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9530 'data': {'items': {'type': 'integer'},
9532 'id': {'$ref': '#/definitions/packet'},
9533 'location': {'$ref': '#/definitions/packet'},
9534 'sig': {'items': {'type': 'integer'},
9536 'required': ['data',
9542 'MeterStatusResult': {'additionalProperties': False,
9543 'properties': {'Code': {'type': 'string'},
9544 'Error': {'$ref': '#/definitions/Error'},
9545 'Info': {'type': 'string'}},
9546 'required': ['Code', 'Info', 'Error'],
9548 'MeterStatusResults': {'additionalProperties': False,
9549 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
9551 'required': ['Results'],
9553 'NotifyWatchResult': {'additionalProperties': False,
9554 'properties': {'Error': {'$ref': '#/definitions/Error'},
9555 'NotifyWatcherId': {'type': 'string'}},
9556 'required': ['NotifyWatcherId', 'Error'],
9558 'NotifyWatchResults': {'additionalProperties': False,
9559 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9561 'required': ['Results'],
9563 'caveat': {'additionalProperties': False,
9564 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9565 'location': {'$ref': '#/definitions/packet'},
9566 'verificationId': {'$ref': '#/definitions/packet'}},
9567 'required': ['location',
9571 'packet': {'additionalProperties': False,
9572 'properties': {'headerLen': {'type': 'integer'},
9573 'start': {'type': 'integer'},
9574 'totalLen': {'type': 'integer'}},
9575 'required': ['start', 'totalLen', 'headerLen'],
9577 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9578 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
9580 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9581 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9586 #@ReturnMapping(MeterStatusResults)
9587 async def GetMeterStatus(self
, entities
):
9589 entities : typing.Sequence[~Entity]
9590 Returns -> typing.Sequence[~MeterStatusResult]
9592 # map input types to rpc msg
9594 msg
= dict(Type
='MeterStatus', Request
='GetMeterStatus', Version
=1, Params
=params
)
9595 params
['Entities'] = entities
9596 reply
= await self
.rpc(msg
)
9597 return self
._map
(reply
, GetMeterStatus
)
9601 #@ReturnMapping(NotifyWatchResults)
9602 async def WatchMeterStatus(self
, entities
):
9604 entities : typing.Sequence[~Entity]
9605 Returns -> typing.Sequence[~NotifyWatchResult]
9607 # map input types to rpc msg
9609 msg
= dict(Type
='MeterStatus', Request
='WatchMeterStatus', Version
=1, Params
=params
)
9610 params
['Entities'] = entities
9611 reply
= await self
.rpc(msg
)
9612 return self
._map
(reply
, WatchMeterStatus
)
9615 class MetricsAdder(Type
):
9616 name
= 'MetricsAdder'
9618 schema
= {'definitions': {'Error': {'additionalProperties': False,
9619 'properties': {'Code': {'type': 'string'},
9620 'Info': {'$ref': '#/definitions/ErrorInfo'},
9621 'Message': {'type': 'string'}},
9622 'required': ['Message', 'Code'],
9624 'ErrorInfo': {'additionalProperties': False,
9625 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9626 'MacaroonPath': {'type': 'string'}},
9628 'ErrorResult': {'additionalProperties': False,
9629 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9630 'required': ['Error'],
9632 'ErrorResults': {'additionalProperties': False,
9633 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9635 'required': ['Results'],
9637 'Macaroon': {'additionalProperties': False,
9638 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9640 'data': {'items': {'type': 'integer'},
9642 'id': {'$ref': '#/definitions/packet'},
9643 'location': {'$ref': '#/definitions/packet'},
9644 'sig': {'items': {'type': 'integer'},
9646 'required': ['data',
9652 'Metric': {'additionalProperties': False,
9653 'properties': {'Key': {'type': 'string'},
9654 'Time': {'format': 'date-time',
9656 'Value': {'type': 'string'}},
9657 'required': ['Key', 'Value', 'Time'],
9659 'MetricBatch': {'additionalProperties': False,
9660 'properties': {'CharmURL': {'type': 'string'},
9661 'Created': {'format': 'date-time',
9663 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
9665 'UUID': {'type': 'string'}},
9666 'required': ['UUID',
9671 'MetricBatchParam': {'additionalProperties': False,
9672 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
9673 'Tag': {'type': 'string'}},
9674 'required': ['Tag', 'Batch'],
9676 'MetricBatchParams': {'additionalProperties': False,
9677 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
9679 'required': ['Batches'],
9681 'caveat': {'additionalProperties': False,
9682 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9683 'location': {'$ref': '#/definitions/packet'},
9684 'verificationId': {'$ref': '#/definitions/packet'}},
9685 'required': ['location',
9689 'packet': {'additionalProperties': False,
9690 'properties': {'headerLen': {'type': 'integer'},
9691 'start': {'type': 'integer'},
9692 'totalLen': {'type': 'integer'}},
9693 'required': ['start', 'totalLen', 'headerLen'],
9695 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
9696 'Result': {'$ref': '#/definitions/ErrorResults'}},
9701 #@ReturnMapping(ErrorResults)
9702 async def AddMetricBatches(self
, batches
):
9704 batches : typing.Sequence[~MetricBatchParam]
9705 Returns -> typing.Sequence[~ErrorResult]
9707 # map input types to rpc msg
9709 msg
= dict(Type
='MetricsAdder', Request
='AddMetricBatches', Version
=2, Params
=params
)
9710 params
['Batches'] = batches
9711 reply
= await self
.rpc(msg
)
9712 return self
._map
(reply
, AddMetricBatches
)
9715 class MetricsDebug(Type
):
9716 name
= 'MetricsDebug'
9718 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9719 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9721 'required': ['Entities'],
9723 'Entity': {'additionalProperties': False,
9724 'properties': {'Tag': {'type': 'string'}},
9725 'required': ['Tag'],
9727 'EntityMetrics': {'additionalProperties': False,
9728 'properties': {'error': {'$ref': '#/definitions/Error'},
9729 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
9732 'Error': {'additionalProperties': False,
9733 'properties': {'Code': {'type': 'string'},
9734 'Info': {'$ref': '#/definitions/ErrorInfo'},
9735 'Message': {'type': 'string'}},
9736 'required': ['Message', 'Code'],
9738 'ErrorInfo': {'additionalProperties': False,
9739 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9740 'MacaroonPath': {'type': 'string'}},
9742 'ErrorResult': {'additionalProperties': False,
9743 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9744 'required': ['Error'],
9746 'ErrorResults': {'additionalProperties': False,
9747 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9749 'required': ['Results'],
9751 'Macaroon': {'additionalProperties': False,
9752 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9754 'data': {'items': {'type': 'integer'},
9756 'id': {'$ref': '#/definitions/packet'},
9757 'location': {'$ref': '#/definitions/packet'},
9758 'sig': {'items': {'type': 'integer'},
9760 'required': ['data',
9766 'MeterStatusParam': {'additionalProperties': False,
9767 'properties': {'code': {'type': 'string'},
9768 'info': {'type': 'string'},
9769 'tag': {'type': 'string'}},
9770 'required': ['tag', 'code', 'info'],
9772 'MeterStatusParams': {'additionalProperties': False,
9773 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
9775 'required': ['statues'],
9777 'MetricResult': {'additionalProperties': False,
9778 'properties': {'key': {'type': 'string'},
9779 'time': {'format': 'date-time',
9781 'value': {'type': 'string'}},
9782 'required': ['time', 'key', 'value'],
9784 'MetricResults': {'additionalProperties': False,
9785 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
9787 'required': ['results'],
9789 'caveat': {'additionalProperties': False,
9790 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9791 'location': {'$ref': '#/definitions/packet'},
9792 'verificationId': {'$ref': '#/definitions/packet'}},
9793 'required': ['location',
9797 'packet': {'additionalProperties': False,
9798 'properties': {'headerLen': {'type': 'integer'},
9799 'start': {'type': 'integer'},
9800 'totalLen': {'type': 'integer'}},
9801 'required': ['start', 'totalLen', 'headerLen'],
9803 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9804 'Result': {'$ref': '#/definitions/MetricResults'}},
9806 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
9807 'Result': {'$ref': '#/definitions/ErrorResults'}},
9812 #@ReturnMapping(MetricResults)
9813 async def GetMetrics(self
, entities
):
9815 entities : typing.Sequence[~Entity]
9816 Returns -> typing.Sequence[~EntityMetrics]
9818 # map input types to rpc msg
9820 msg
= dict(Type
='MetricsDebug', Request
='GetMetrics', Version
=1, Params
=params
)
9821 params
['Entities'] = entities
9822 reply
= await self
.rpc(msg
)
9823 return self
._map
(reply
, GetMetrics
)
9827 #@ReturnMapping(ErrorResults)
9828 async def SetMeterStatus(self
, statues
):
9830 statues : typing.Sequence[~MeterStatusParam]
9831 Returns -> typing.Sequence[~ErrorResult]
9833 # map input types to rpc msg
9835 msg
= dict(Type
='MetricsDebug', Request
='SetMeterStatus', Version
=1, Params
=params
)
9836 params
['statues'] = statues
9837 reply
= await self
.rpc(msg
)
9838 return self
._map
(reply
, SetMeterStatus
)
9841 class MetricsManager(Type
):
9842 name
= 'MetricsManager'
9844 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9845 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9847 'required': ['Entities'],
9849 'Entity': {'additionalProperties': False,
9850 'properties': {'Tag': {'type': 'string'}},
9851 'required': ['Tag'],
9853 'Error': {'additionalProperties': False,
9854 'properties': {'Code': {'type': 'string'},
9855 'Info': {'$ref': '#/definitions/ErrorInfo'},
9856 'Message': {'type': 'string'}},
9857 'required': ['Message', 'Code'],
9859 'ErrorInfo': {'additionalProperties': False,
9860 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9861 'MacaroonPath': {'type': 'string'}},
9863 'ErrorResult': {'additionalProperties': False,
9864 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9865 'required': ['Error'],
9867 'ErrorResults': {'additionalProperties': False,
9868 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9870 'required': ['Results'],
9872 'Macaroon': {'additionalProperties': False,
9873 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9875 'data': {'items': {'type': 'integer'},
9877 'id': {'$ref': '#/definitions/packet'},
9878 'location': {'$ref': '#/definitions/packet'},
9879 'sig': {'items': {'type': 'integer'},
9881 'required': ['data',
9887 'caveat': {'additionalProperties': False,
9888 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9889 'location': {'$ref': '#/definitions/packet'},
9890 'verificationId': {'$ref': '#/definitions/packet'}},
9891 'required': ['location',
9895 'packet': {'additionalProperties': False,
9896 'properties': {'headerLen': {'type': 'integer'},
9897 'start': {'type': 'integer'},
9898 'totalLen': {'type': 'integer'}},
9899 'required': ['start', 'totalLen', 'headerLen'],
9901 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9902 'Result': {'$ref': '#/definitions/ErrorResults'}},
9904 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9905 'Result': {'$ref': '#/definitions/ErrorResults'}},
9910 #@ReturnMapping(ErrorResults)
9911 async def CleanupOldMetrics(self
, entities
):
9913 entities : typing.Sequence[~Entity]
9914 Returns -> typing.Sequence[~ErrorResult]
9916 # map input types to rpc msg
9918 msg
= dict(Type
='MetricsManager', Request
='CleanupOldMetrics', Version
=1, Params
=params
)
9919 params
['Entities'] = entities
9920 reply
= await self
.rpc(msg
)
9921 return self
._map
(reply
, CleanupOldMetrics
)
9925 #@ReturnMapping(ErrorResults)
9926 async def SendMetrics(self
, entities
):
9928 entities : typing.Sequence[~Entity]
9929 Returns -> typing.Sequence[~ErrorResult]
9931 # map input types to rpc msg
9933 msg
= dict(Type
='MetricsManager', Request
='SendMetrics', Version
=1, Params
=params
)
9934 params
['Entities'] = entities
9935 reply
= await self
.rpc(msg
)
9936 return self
._map
(reply
, SendMetrics
)
9939 class MigrationFlag(Type
):
9940 name
= 'MigrationFlag'
9942 schema
= {'definitions': {'Entities': {'additionalProperties': False,
9943 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9945 'required': ['Entities'],
9947 'Entity': {'additionalProperties': False,
9948 'properties': {'Tag': {'type': 'string'}},
9949 'required': ['Tag'],
9951 'Error': {'additionalProperties': False,
9952 'properties': {'Code': {'type': 'string'},
9953 'Info': {'$ref': '#/definitions/ErrorInfo'},
9954 'Message': {'type': 'string'}},
9955 'required': ['Message', 'Code'],
9957 'ErrorInfo': {'additionalProperties': False,
9958 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9959 'MacaroonPath': {'type': 'string'}},
9961 'Macaroon': {'additionalProperties': False,
9962 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9964 'data': {'items': {'type': 'integer'},
9966 'id': {'$ref': '#/definitions/packet'},
9967 'location': {'$ref': '#/definitions/packet'},
9968 'sig': {'items': {'type': 'integer'},
9970 'required': ['data',
9976 'NotifyWatchResult': {'additionalProperties': False,
9977 'properties': {'Error': {'$ref': '#/definitions/Error'},
9978 'NotifyWatcherId': {'type': 'string'}},
9979 'required': ['NotifyWatcherId', 'Error'],
9981 'NotifyWatchResults': {'additionalProperties': False,
9982 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9984 'required': ['Results'],
9986 'PhaseResult': {'additionalProperties': False,
9987 'properties': {'Error': {'$ref': '#/definitions/Error'},
9988 'phase': {'type': 'string'}},
9989 'required': ['phase', 'Error'],
9991 'PhaseResults': {'additionalProperties': False,
9992 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
9994 'required': ['Results'],
9996 'caveat': {'additionalProperties': False,
9997 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9998 'location': {'$ref': '#/definitions/packet'},
9999 'verificationId': {'$ref': '#/definitions/packet'}},
10000 'required': ['location',
10004 'packet': {'additionalProperties': False,
10005 'properties': {'headerLen': {'type': 'integer'},
10006 'start': {'type': 'integer'},
10007 'totalLen': {'type': 'integer'}},
10008 'required': ['start', 'totalLen', 'headerLen'],
10009 'type': 'object'}},
10010 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10011 'Result': {'$ref': '#/definitions/PhaseResults'}},
10013 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10014 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10015 'type': 'object'}},
10019 #@ReturnMapping(PhaseResults)
10020 async def Phase(self
, entities
):
10022 entities : typing.Sequence[~Entity]
10023 Returns -> typing.Sequence[~PhaseResult]
10025 # map input types to rpc msg
10027 msg
= dict(Type
='MigrationFlag', Request
='Phase', Version
=1, Params
=params
)
10028 params
['Entities'] = entities
10029 reply
= await self
.rpc(msg
)
10030 return self
._map
(reply
, Phase
)
10034 #@ReturnMapping(NotifyWatchResults)
10035 async def Watch(self
, entities
):
10037 entities : typing.Sequence[~Entity]
10038 Returns -> typing.Sequence[~NotifyWatchResult]
10040 # map input types to rpc msg
10042 msg
= dict(Type
='MigrationFlag', Request
='Watch', Version
=1, Params
=params
)
10043 params
['Entities'] = entities
10044 reply
= await self
.rpc(msg
)
10045 return self
._map
(reply
, Watch
)
10048 class MigrationMaster(Type
):
10049 name
= 'MigrationMaster'
10051 schema
= {'definitions': {'Error': {'additionalProperties': False,
10052 'properties': {'Code': {'type': 'string'},
10053 'Info': {'$ref': '#/definitions/ErrorInfo'},
10054 'Message': {'type': 'string'}},
10055 'required': ['Message', 'Code'],
10057 'ErrorInfo': {'additionalProperties': False,
10058 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10059 'MacaroonPath': {'type': 'string'}},
10061 'FullMigrationStatus': {'additionalProperties': False,
10062 'properties': {'attempt': {'type': 'integer'},
10063 'phase': {'type': 'string'},
10064 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
10065 'required': ['spec',
10069 'Macaroon': {'additionalProperties': False,
10070 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10072 'data': {'items': {'type': 'integer'},
10074 'id': {'$ref': '#/definitions/packet'},
10075 'location': {'$ref': '#/definitions/packet'},
10076 'sig': {'items': {'type': 'integer'},
10078 'required': ['data',
10084 'ModelMigrationSpec': {'additionalProperties': False,
10085 'properties': {'model-tag': {'type': 'string'},
10086 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
10087 'required': ['model-tag',
10090 'ModelMigrationTargetInfo': {'additionalProperties': False,
10091 'properties': {'addrs': {'items': {'type': 'string'},
10093 'auth-tag': {'type': 'string'},
10094 'ca-cert': {'type': 'string'},
10095 'controller-tag': {'type': 'string'},
10096 'password': {'type': 'string'}},
10097 'required': ['controller-tag',
10103 'NotifyWatchResult': {'additionalProperties': False,
10104 'properties': {'Error': {'$ref': '#/definitions/Error'},
10105 'NotifyWatcherId': {'type': 'string'}},
10106 'required': ['NotifyWatcherId', 'Error'],
10108 'SerializedModel': {'additionalProperties': False,
10109 'properties': {'bytes': {'items': {'type': 'integer'},
10111 'required': ['bytes'],
10113 'SetMigrationPhaseArgs': {'additionalProperties': False,
10114 'properties': {'phase': {'type': 'string'}},
10115 'required': ['phase'],
10117 'caveat': {'additionalProperties': False,
10118 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10119 'location': {'$ref': '#/definitions/packet'},
10120 'verificationId': {'$ref': '#/definitions/packet'}},
10121 'required': ['location',
10125 'packet': {'additionalProperties': False,
10126 'properties': {'headerLen': {'type': 'integer'},
10127 'start': {'type': 'integer'},
10128 'totalLen': {'type': 'integer'}},
10129 'required': ['start', 'totalLen', 'headerLen'],
10130 'type': 'object'}},
10131 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
10133 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
10135 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
10137 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10138 'type': 'object'}},
10142 #@ReturnMapping(SerializedModel)
10143 async def Export(self
):
10146 Returns -> typing.Sequence[int]
10148 # map input types to rpc msg
10150 msg
= dict(Type
='MigrationMaster', Request
='Export', Version
=1, Params
=params
)
10152 reply
= await self
.rpc(msg
)
10153 return self
._map
(reply
, Export
)
10157 #@ReturnMapping(FullMigrationStatus)
10158 async def GetMigrationStatus(self
):
10161 Returns -> typing.Union[str, ~ModelMigrationSpec, int]
10163 # map input types to rpc msg
10165 msg
= dict(Type
='MigrationMaster', Request
='GetMigrationStatus', Version
=1, Params
=params
)
10167 reply
= await self
.rpc(msg
)
10168 return self
._map
(reply
, GetMigrationStatus
)
10172 #@ReturnMapping(None)
10173 async def SetPhase(self
, phase
):
10178 # map input types to rpc msg
10180 msg
= dict(Type
='MigrationMaster', Request
='SetPhase', Version
=1, Params
=params
)
10181 params
['phase'] = phase
10182 reply
= await self
.rpc(msg
)
10183 return self
._map
(reply
, SetPhase
)
10187 #@ReturnMapping(NotifyWatchResult)
10188 async def Watch(self
):
10191 Returns -> typing.Union[~Error, str]
10193 # map input types to rpc msg
10195 msg
= dict(Type
='MigrationMaster', Request
='Watch', Version
=1, Params
=params
)
10197 reply
= await self
.rpc(msg
)
10198 return self
._map
(reply
, Watch
)
10201 class MigrationMinion(Type
):
10202 name
= 'MigrationMinion'
10204 schema
= {'definitions': {'Error': {'additionalProperties': False,
10205 'properties': {'Code': {'type': 'string'},
10206 'Info': {'$ref': '#/definitions/ErrorInfo'},
10207 'Message': {'type': 'string'}},
10208 'required': ['Message', 'Code'],
10210 'ErrorInfo': {'additionalProperties': False,
10211 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10212 'MacaroonPath': {'type': 'string'}},
10214 'Macaroon': {'additionalProperties': False,
10215 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10217 'data': {'items': {'type': 'integer'},
10219 'id': {'$ref': '#/definitions/packet'},
10220 'location': {'$ref': '#/definitions/packet'},
10221 'sig': {'items': {'type': 'integer'},
10223 'required': ['data',
10229 'NotifyWatchResult': {'additionalProperties': False,
10230 'properties': {'Error': {'$ref': '#/definitions/Error'},
10231 'NotifyWatcherId': {'type': 'string'}},
10232 'required': ['NotifyWatcherId', 'Error'],
10234 'caveat': {'additionalProperties': False,
10235 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10236 'location': {'$ref': '#/definitions/packet'},
10237 'verificationId': {'$ref': '#/definitions/packet'}},
10238 'required': ['location',
10242 'packet': {'additionalProperties': False,
10243 'properties': {'headerLen': {'type': 'integer'},
10244 'start': {'type': 'integer'},
10245 'totalLen': {'type': 'integer'}},
10246 'required': ['start', 'totalLen', 'headerLen'],
10247 'type': 'object'}},
10248 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10249 'type': 'object'}},
10253 #@ReturnMapping(NotifyWatchResult)
10254 async def Watch(self
):
10257 Returns -> typing.Union[~Error, str]
10259 # map input types to rpc msg
10261 msg
= dict(Type
='MigrationMinion', Request
='Watch', Version
=1, Params
=params
)
10263 reply
= await self
.rpc(msg
)
10264 return self
._map
(reply
, Watch
)
10267 class MigrationStatusWatcher(Type
):
10268 name
= 'MigrationStatusWatcher'
10270 schema
= {'definitions': {'MigrationStatus': {'additionalProperties': False,
10271 'properties': {'attempt': {'type': 'integer'},
10272 'phase': {'type': 'string'},
10273 'source-api-addrs': {'items': {'type': 'string'},
10275 'source-ca-cert': {'type': 'string'},
10276 'target-api-addrs': {'items': {'type': 'string'},
10278 'target-ca-cert': {'type': 'string'}},
10279 'required': ['attempt',
10281 'source-api-addrs',
10283 'target-api-addrs',
10285 'type': 'object'}},
10286 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
10288 'Stop': {'type': 'object'}},
10292 #@ReturnMapping(MigrationStatus)
10293 async def Next(self
):
10296 Returns -> typing.Union[typing.Sequence[str], int]
10298 # map input types to rpc msg
10300 msg
= dict(Type
='MigrationStatusWatcher', Request
='Next', Version
=1, Params
=params
)
10302 reply
= await self
.rpc(msg
)
10303 return self
._map
(reply
, Next
)
10307 #@ReturnMapping(None)
10308 async def Stop(self
):
10313 # map input types to rpc msg
10315 msg
= dict(Type
='MigrationStatusWatcher', Request
='Stop', Version
=1, Params
=params
)
10317 reply
= await self
.rpc(msg
)
10318 return self
._map
(reply
, Stop
)
10321 class MigrationTarget(Type
):
10322 name
= 'MigrationTarget'
10324 schema
= {'definitions': {'ModelArgs': {'additionalProperties': False,
10325 'properties': {'model-tag': {'type': 'string'}},
10326 'required': ['model-tag'],
10328 'SerializedModel': {'additionalProperties': False,
10329 'properties': {'bytes': {'items': {'type': 'integer'},
10331 'required': ['bytes'],
10332 'type': 'object'}},
10333 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
10335 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
10337 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
10338 'type': 'object'}},
10342 #@ReturnMapping(None)
10343 async def Abort(self
, model_tag
):
10348 # map input types to rpc msg
10350 msg
= dict(Type
='MigrationTarget', Request
='Abort', Version
=1, Params
=params
)
10351 params
['model-tag'] = model_tag
10352 reply
= await self
.rpc(msg
)
10353 return self
._map
(reply
, Abort
)
10357 #@ReturnMapping(None)
10358 async def Activate(self
, model_tag
):
10363 # map input types to rpc msg
10365 msg
= dict(Type
='MigrationTarget', Request
='Activate', Version
=1, Params
=params
)
10366 params
['model-tag'] = model_tag
10367 reply
= await self
.rpc(msg
)
10368 return self
._map
(reply
, Activate
)
10372 #@ReturnMapping(None)
10373 async def Import(self
, bytes_
):
10375 bytes_ : typing.Sequence[int]
10378 # map input types to rpc msg
10380 msg
= dict(Type
='MigrationTarget', Request
='Import', Version
=1, Params
=params
)
10381 params
['bytes'] = bytes_
10382 reply
= await self
.rpc(msg
)
10383 return self
._map
(reply
, Import
)
10386 class ModelManager(Type
):
10387 name
= 'ModelManager'
10389 schema
= {'definitions': {'Entities': {'additionalProperties': False,
10390 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10392 'required': ['Entities'],
10394 'Entity': {'additionalProperties': False,
10395 'properties': {'Tag': {'type': 'string'}},
10396 'required': ['Tag'],
10398 'EntityStatus': {'additionalProperties': False,
10399 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10400 'type': 'object'}},
10402 'Info': {'type': 'string'},
10403 'Since': {'format': 'date-time',
10405 'Status': {'type': 'string'}},
10406 'required': ['Status',
10411 'Error': {'additionalProperties': False,
10412 'properties': {'Code': {'type': 'string'},
10413 'Info': {'$ref': '#/definitions/ErrorInfo'},
10414 'Message': {'type': 'string'}},
10415 'required': ['Message', 'Code'],
10417 'ErrorInfo': {'additionalProperties': False,
10418 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10419 'MacaroonPath': {'type': 'string'}},
10421 'ErrorResult': {'additionalProperties': False,
10422 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10423 'required': ['Error'],
10425 'ErrorResults': {'additionalProperties': False,
10426 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10428 'required': ['Results'],
10430 'Macaroon': {'additionalProperties': False,
10431 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10433 'data': {'items': {'type': 'integer'},
10435 'id': {'$ref': '#/definitions/packet'},
10436 'location': {'$ref': '#/definitions/packet'},
10437 'sig': {'items': {'type': 'integer'},
10439 'required': ['data',
10445 'Model': {'additionalProperties': False,
10446 'properties': {'Name': {'type': 'string'},
10447 'OwnerTag': {'type': 'string'},
10448 'UUID': {'type': 'string'}},
10449 'required': ['Name', 'UUID', 'OwnerTag'],
10451 'ModelConfigResult': {'additionalProperties': False,
10452 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10453 'type': 'object'}},
10454 'type': 'object'}},
10455 'required': ['Config'],
10457 'ModelCreateArgs': {'additionalProperties': False,
10458 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
10459 'type': 'object'}},
10461 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10462 'type': 'object'}},
10464 'OwnerTag': {'type': 'string'}},
10465 'required': ['OwnerTag',
10469 'ModelInfo': {'additionalProperties': False,
10470 'properties': {'DefaultSeries': {'type': 'string'},
10471 'Life': {'type': 'string'},
10472 'Name': {'type': 'string'},
10473 'OwnerTag': {'type': 'string'},
10474 'ProviderType': {'type': 'string'},
10475 'ServerUUID': {'type': 'string'},
10476 'Status': {'$ref': '#/definitions/EntityStatus'},
10477 'UUID': {'type': 'string'},
10478 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
10480 'required': ['Name',
10490 'ModelInfoResult': {'additionalProperties': False,
10491 'properties': {'error': {'$ref': '#/definitions/Error'},
10492 'result': {'$ref': '#/definitions/ModelInfo'}},
10494 'ModelInfoResults': {'additionalProperties': False,
10495 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
10497 'required': ['results'],
10499 'ModelSkeletonConfigArgs': {'additionalProperties': False,
10500 'properties': {'Provider': {'type': 'string'},
10501 'Region': {'type': 'string'}},
10502 'required': ['Provider', 'Region'],
10504 'ModelUserInfo': {'additionalProperties': False,
10505 'properties': {'access': {'type': 'string'},
10506 'displayname': {'type': 'string'},
10507 'lastconnection': {'format': 'date-time',
10509 'user': {'type': 'string'}},
10510 'required': ['user',
10515 'ModifyModelAccess': {'additionalProperties': False,
10516 'properties': {'access': {'type': 'string'},
10517 'action': {'type': 'string'},
10518 'model-tag': {'type': 'string'},
10519 'user-tag': {'type': 'string'}},
10520 'required': ['user-tag',
10525 'ModifyModelAccessRequest': {'additionalProperties': False,
10526 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
10528 'required': ['changes'],
10530 'UserModel': {'additionalProperties': False,
10531 'properties': {'LastConnection': {'format': 'date-time',
10533 'Model': {'$ref': '#/definitions/Model'}},
10534 'required': ['Model', 'LastConnection'],
10536 'UserModelList': {'additionalProperties': False,
10537 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
10539 'required': ['UserModels'],
10541 'caveat': {'additionalProperties': False,
10542 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10543 'location': {'$ref': '#/definitions/packet'},
10544 'verificationId': {'$ref': '#/definitions/packet'}},
10545 'required': ['location',
10549 'packet': {'additionalProperties': False,
10550 'properties': {'headerLen': {'type': 'integer'},
10551 'start': {'type': 'integer'},
10552 'totalLen': {'type': 'integer'}},
10553 'required': ['start', 'totalLen', 'headerLen'],
10554 'type': 'object'}},
10555 'properties': {'ConfigSkeleton': {'properties': {'Params': {'$ref': '#/definitions/ModelSkeletonConfigArgs'},
10556 'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10558 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
10559 'Result': {'$ref': '#/definitions/Model'}},
10561 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
10562 'Result': {'$ref': '#/definitions/UserModelList'}},
10564 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10565 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
10567 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
10568 'Result': {'$ref': '#/definitions/ErrorResults'}},
10569 'type': 'object'}},
10573 #@ReturnMapping(ModelConfigResult)
10574 async def ConfigSkeleton(self
, region
, provider
):
10578 Returns -> typing.Mapping[str, typing.Any]
10580 # map input types to rpc msg
10582 msg
= dict(Type
='ModelManager', Request
='ConfigSkeleton', Version
=2, Params
=params
)
10583 params
['Region'] = region
10584 params
['Provider'] = provider
10585 reply
= await self
.rpc(msg
)
10586 return self
._map
(reply
, ConfigSkeleton
)
10590 #@ReturnMapping(Model)
10591 async def CreateModel(self
, account
, ownertag
, config
):
10593 account : typing.Mapping[str, typing.Any]
10595 config : typing.Mapping[str, typing.Any]
10596 Returns -> <class 'str'>
10598 # map input types to rpc msg
10600 msg
= dict(Type
='ModelManager', Request
='CreateModel', Version
=2, Params
=params
)
10601 params
['Account'] = account
10602 params
['OwnerTag'] = ownertag
10603 params
['Config'] = config
10604 reply
= await self
.rpc(msg
)
10605 return self
._map
(reply
, CreateModel
)
10609 #@ReturnMapping(UserModelList)
10610 async def ListModels(self
, tag
):
10613 Returns -> typing.Sequence[~UserModel]
10615 # map input types to rpc msg
10617 msg
= dict(Type
='ModelManager', Request
='ListModels', Version
=2, Params
=params
)
10618 params
['Tag'] = tag
10619 reply
= await self
.rpc(msg
)
10620 return self
._map
(reply
, ListModels
)
10624 #@ReturnMapping(ModelInfoResults)
10625 async def ModelInfo(self
, entities
):
10627 entities : typing.Sequence[~Entity]
10628 Returns -> typing.Sequence[~ModelInfoResult]
10630 # map input types to rpc msg
10632 msg
= dict(Type
='ModelManager', Request
='ModelInfo', Version
=2, Params
=params
)
10633 params
['Entities'] = entities
10634 reply
= await self
.rpc(msg
)
10635 return self
._map
(reply
, ModelInfo
)
10639 #@ReturnMapping(ErrorResults)
10640 async def ModifyModelAccess(self
, changes
):
10642 changes : typing.Sequence[~ModifyModelAccess]
10643 Returns -> typing.Sequence[~ErrorResult]
10645 # map input types to rpc msg
10647 msg
= dict(Type
='ModelManager', Request
='ModifyModelAccess', Version
=2, Params
=params
)
10648 params
['changes'] = changes
10649 reply
= await self
.rpc(msg
)
10650 return self
._map
(reply
, ModifyModelAccess
)
10653 class NotifyWatcher(Type
):
10654 name
= 'NotifyWatcher'
10656 schema
= {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
10660 #@ReturnMapping(None)
10661 async def Next(self
):
10666 # map input types to rpc msg
10668 msg
= dict(Type
='NotifyWatcher', Request
='Next', Version
=1, Params
=params
)
10670 reply
= await self
.rpc(msg
)
10671 return self
._map
(reply
, Next
)
10675 #@ReturnMapping(None)
10676 async def Stop(self
):
10681 # map input types to rpc msg
10683 msg
= dict(Type
='NotifyWatcher', Request
='Stop', Version
=1, Params
=params
)
10685 reply
= await self
.rpc(msg
)
10686 return self
._map
(reply
, Stop
)
10689 class Pinger(Type
):
10692 schema
= {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
10696 #@ReturnMapping(None)
10697 async def Ping(self
):
10702 # map input types to rpc msg
10704 msg
= dict(Type
='Pinger', Request
='Ping', Version
=1, Params
=params
)
10706 reply
= await self
.rpc(msg
)
10707 return self
._map
(reply
, Ping
)
10711 #@ReturnMapping(None)
10712 async def Stop(self
):
10717 # map input types to rpc msg
10719 msg
= dict(Type
='Pinger', Request
='Stop', Version
=1, Params
=params
)
10721 reply
= await self
.rpc(msg
)
10722 return self
._map
(reply
, Stop
)
10725 class Provisioner(Type
):
10726 name
= 'Provisioner'
10728 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10729 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10732 'required': ['Servers'],
10734 'Address': {'additionalProperties': False,
10735 'properties': {'Scope': {'type': 'string'},
10736 'SpaceName': {'type': 'string'},
10737 'Type': {'type': 'string'},
10738 'Value': {'type': 'string'}},
10739 'required': ['Value', 'Type', 'Scope'],
10741 'Binary': {'additionalProperties': False,
10742 'properties': {'Arch': {'type': 'string'},
10743 'Number': {'$ref': '#/definitions/Number'},
10744 'Series': {'type': 'string'}},
10745 'required': ['Number', 'Series', 'Arch'],
10747 'BytesResult': {'additionalProperties': False,
10748 'properties': {'Result': {'items': {'type': 'integer'},
10750 'required': ['Result'],
10752 'CloudImageMetadata': {'additionalProperties': False,
10753 'properties': {'arch': {'type': 'string'},
10754 'image_id': {'type': 'string'},
10755 'priority': {'type': 'integer'},
10756 'region': {'type': 'string'},
10757 'root_storage_size': {'type': 'integer'},
10758 'root_storage_type': {'type': 'string'},
10759 'series': {'type': 'string'},
10760 'source': {'type': 'string'},
10761 'stream': {'type': 'string'},
10762 'version': {'type': 'string'},
10763 'virt_type': {'type': 'string'}},
10764 'required': ['image_id',
10772 'ConstraintsResult': {'additionalProperties': False,
10773 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
10774 'Error': {'$ref': '#/definitions/Error'}},
10775 'required': ['Error', 'Constraints'],
10777 'ConstraintsResults': {'additionalProperties': False,
10778 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
10780 'required': ['Results'],
10782 'ContainerConfig': {'additionalProperties': False,
10783 'properties': {'AllowLXCLoopMounts': {'type': 'boolean'},
10784 'AptMirror': {'type': 'string'},
10785 'AptProxy': {'$ref': '#/definitions/Settings'},
10786 'AuthorizedKeys': {'type': 'string'},
10787 'PreferIPv6': {'type': 'boolean'},
10788 'ProviderType': {'type': 'string'},
10789 'Proxy': {'$ref': '#/definitions/Settings'},
10790 'SSLHostnameVerification': {'type': 'boolean'},
10791 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}},
10792 'required': ['ProviderType',
10794 'SSLHostnameVerification',
10799 'AllowLXCLoopMounts',
10802 'ContainerManagerConfig': {'additionalProperties': False,
10803 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
10804 'type': 'object'}},
10805 'required': ['ManagerConfig'],
10807 'ContainerManagerConfigParams': {'additionalProperties': False,
10808 'properties': {'Type': {'type': 'string'}},
10809 'required': ['Type'],
10811 'DistributionGroupResult': {'additionalProperties': False,
10812 'properties': {'Error': {'$ref': '#/definitions/Error'},
10813 'Result': {'items': {'type': 'string'},
10815 'required': ['Error', 'Result'],
10817 'DistributionGroupResults': {'additionalProperties': False,
10818 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
10820 'required': ['Results'],
10822 'Entities': {'additionalProperties': False,
10823 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10825 'required': ['Entities'],
10827 'Entity': {'additionalProperties': False,
10828 'properties': {'Tag': {'type': 'string'}},
10829 'required': ['Tag'],
10831 'EntityPassword': {'additionalProperties': False,
10832 'properties': {'Password': {'type': 'string'},
10833 'Tag': {'type': 'string'}},
10834 'required': ['Tag', 'Password'],
10836 'EntityPasswords': {'additionalProperties': False,
10837 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10839 'required': ['Changes'],
10841 'EntityStatusArgs': {'additionalProperties': False,
10842 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10843 'type': 'object'}},
10845 'Info': {'type': 'string'},
10846 'Status': {'type': 'string'},
10847 'Tag': {'type': 'string'}},
10848 'required': ['Tag',
10853 'Error': {'additionalProperties': False,
10854 'properties': {'Code': {'type': 'string'},
10855 'Info': {'$ref': '#/definitions/ErrorInfo'},
10856 'Message': {'type': 'string'}},
10857 'required': ['Message', 'Code'],
10859 'ErrorInfo': {'additionalProperties': False,
10860 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10861 'MacaroonPath': {'type': 'string'}},
10863 'ErrorResult': {'additionalProperties': False,
10864 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10865 'required': ['Error'],
10867 'ErrorResults': {'additionalProperties': False,
10868 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10870 'required': ['Results'],
10872 'FindToolsParams': {'additionalProperties': False,
10873 'properties': {'Arch': {'type': 'string'},
10874 'MajorVersion': {'type': 'integer'},
10875 'MinorVersion': {'type': 'integer'},
10876 'Number': {'$ref': '#/definitions/Number'},
10877 'Series': {'type': 'string'}},
10878 'required': ['Number',
10884 'FindToolsResult': {'additionalProperties': False,
10885 'properties': {'Error': {'$ref': '#/definitions/Error'},
10886 'List': {'items': {'$ref': '#/definitions/Tools'},
10888 'required': ['List', 'Error'],
10890 'HardwareCharacteristics': {'additionalProperties': False,
10891 'properties': {'Arch': {'type': 'string'},
10892 'AvailabilityZone': {'type': 'string'},
10893 'CpuCores': {'type': 'integer'},
10894 'CpuPower': {'type': 'integer'},
10895 'Mem': {'type': 'integer'},
10896 'RootDisk': {'type': 'integer'},
10897 'Tags': {'items': {'type': 'string'},
10900 'HostPort': {'additionalProperties': False,
10901 'properties': {'Address': {'$ref': '#/definitions/Address'},
10902 'Port': {'type': 'integer'}},
10903 'required': ['Address', 'Port'],
10905 'InstanceInfo': {'additionalProperties': False,
10906 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
10907 'InstanceId': {'type': 'string'},
10908 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
10910 'Nonce': {'type': 'string'},
10911 'Tag': {'type': 'string'},
10912 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
10914 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
10916 'required': ['Tag',
10921 'VolumeAttachments',
10924 'InstancesInfo': {'additionalProperties': False,
10925 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
10927 'required': ['Machines'],
10929 'LifeResult': {'additionalProperties': False,
10930 'properties': {'Error': {'$ref': '#/definitions/Error'},
10931 'Life': {'type': 'string'}},
10932 'required': ['Life', 'Error'],
10934 'LifeResults': {'additionalProperties': False,
10935 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10937 'required': ['Results'],
10939 'Macaroon': {'additionalProperties': False,
10940 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10942 'data': {'items': {'type': 'integer'},
10944 'id': {'$ref': '#/definitions/packet'},
10945 'location': {'$ref': '#/definitions/packet'},
10946 'sig': {'items': {'type': 'integer'},
10948 'required': ['data',
10954 'MachineContainers': {'additionalProperties': False,
10955 'properties': {'ContainerTypes': {'items': {'type': 'string'},
10957 'MachineTag': {'type': 'string'}},
10958 'required': ['MachineTag',
10961 'MachineContainersParams': {'additionalProperties': False,
10962 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
10964 'required': ['Params'],
10966 'MachineNetworkConfigResult': {'additionalProperties': False,
10967 'properties': {'Error': {'$ref': '#/definitions/Error'},
10968 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
10970 'required': ['Error', 'Info'],
10972 'MachineNetworkConfigResults': {'additionalProperties': False,
10973 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
10975 'required': ['Results'],
10977 'ModelConfigResult': {'additionalProperties': False,
10978 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10979 'type': 'object'}},
10980 'type': 'object'}},
10981 'required': ['Config'],
10983 'NetworkConfig': {'additionalProperties': False,
10984 'properties': {'Address': {'type': 'string'},
10985 'CIDR': {'type': 'string'},
10986 'ConfigType': {'type': 'string'},
10987 'DNSSearchDomains': {'items': {'type': 'string'},
10989 'DNSServers': {'items': {'type': 'string'},
10991 'DeviceIndex': {'type': 'integer'},
10992 'Disabled': {'type': 'boolean'},
10993 'GatewayAddress': {'type': 'string'},
10994 'InterfaceName': {'type': 'string'},
10995 'InterfaceType': {'type': 'string'},
10996 'MACAddress': {'type': 'string'},
10997 'MTU': {'type': 'integer'},
10998 'NoAutoStart': {'type': 'boolean'},
10999 'ParentInterfaceName': {'type': 'string'},
11000 'ProviderAddressId': {'type': 'string'},
11001 'ProviderId': {'type': 'string'},
11002 'ProviderSpaceId': {'type': 'string'},
11003 'ProviderSubnetId': {'type': 'string'},
11004 'ProviderVLANId': {'type': 'string'},
11005 'VLANTag': {'type': 'integer'}},
11006 'required': ['DeviceIndex',
11011 'ProviderSubnetId',
11013 'ProviderAddressId',
11017 'ParentInterfaceName',
11021 'NotifyWatchResult': {'additionalProperties': False,
11022 'properties': {'Error': {'$ref': '#/definitions/Error'},
11023 'NotifyWatcherId': {'type': 'string'}},
11024 'required': ['NotifyWatcherId', 'Error'],
11026 'Number': {'additionalProperties': False,
11027 'properties': {'Build': {'type': 'integer'},
11028 'Major': {'type': 'integer'},
11029 'Minor': {'type': 'integer'},
11030 'Patch': {'type': 'integer'},
11031 'Tag': {'type': 'string'}},
11032 'required': ['Major',
11038 'ProvisioningInfo': {'additionalProperties': False,
11039 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
11040 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
11042 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11044 'Jobs': {'items': {'type': 'string'},
11046 'Placement': {'type': 'string'},
11047 'Series': {'type': 'string'},
11048 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
11051 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11053 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
11055 'required': ['Constraints',
11063 'EndpointBindings'],
11065 'ProvisioningInfoResult': {'additionalProperties': False,
11066 'properties': {'Error': {'$ref': '#/definitions/Error'},
11067 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
11068 'required': ['Error', 'Result'],
11070 'ProvisioningInfoResults': {'additionalProperties': False,
11071 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
11073 'required': ['Results'],
11075 'SetStatus': {'additionalProperties': False,
11076 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11078 'required': ['Entities'],
11080 'Settings': {'additionalProperties': False,
11081 'properties': {'Ftp': {'type': 'string'},
11082 'Http': {'type': 'string'},
11083 'Https': {'type': 'string'},
11084 'NoProxy': {'type': 'string'}},
11085 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
11087 'StatusResult': {'additionalProperties': False,
11088 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11089 'type': 'object'}},
11091 'Error': {'$ref': '#/definitions/Error'},
11092 'Id': {'type': 'string'},
11093 'Info': {'type': 'string'},
11094 'Life': {'type': 'string'},
11095 'Since': {'format': 'date-time',
11097 'Status': {'type': 'string'}},
11098 'required': ['Error',
11106 'StatusResults': {'additionalProperties': False,
11107 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
11109 'required': ['Results'],
11111 'StringResult': {'additionalProperties': False,
11112 'properties': {'Error': {'$ref': '#/definitions/Error'},
11113 'Result': {'type': 'string'}},
11114 'required': ['Error', 'Result'],
11116 'StringResults': {'additionalProperties': False,
11117 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11119 'required': ['Results'],
11121 'StringsResult': {'additionalProperties': False,
11122 'properties': {'Error': {'$ref': '#/definitions/Error'},
11123 'Result': {'items': {'type': 'string'},
11125 'required': ['Error', 'Result'],
11127 'StringsWatchResult': {'additionalProperties': False,
11128 'properties': {'Changes': {'items': {'type': 'string'},
11130 'Error': {'$ref': '#/definitions/Error'},
11131 'StringsWatcherId': {'type': 'string'}},
11132 'required': ['StringsWatcherId',
11136 'StringsWatchResults': {'additionalProperties': False,
11137 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11139 'required': ['Results'],
11141 'Tools': {'additionalProperties': False,
11142 'properties': {'sha256': {'type': 'string'},
11143 'size': {'type': 'integer'},
11144 'url': {'type': 'string'},
11145 'version': {'$ref': '#/definitions/Binary'}},
11146 'required': ['version', 'url', 'size'],
11148 'ToolsResult': {'additionalProperties': False,
11149 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
11150 'Error': {'$ref': '#/definitions/Error'},
11151 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
11153 'required': ['ToolsList',
11154 'DisableSSLHostnameVerification',
11157 'ToolsResults': {'additionalProperties': False,
11158 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
11160 'required': ['Results'],
11162 'UpdateBehavior': {'additionalProperties': False,
11163 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
11164 'EnableOSUpgrade': {'type': 'boolean'}},
11165 'required': ['EnableOSRefreshUpdate',
11166 'EnableOSUpgrade'],
11168 'Value': {'additionalProperties': False,
11169 'properties': {'arch': {'type': 'string'},
11170 'container': {'type': 'string'},
11171 'cpu-cores': {'type': 'integer'},
11172 'cpu-power': {'type': 'integer'},
11173 'instance-type': {'type': 'string'},
11174 'mem': {'type': 'integer'},
11175 'root-disk': {'type': 'integer'},
11176 'spaces': {'items': {'type': 'string'},
11178 'tags': {'items': {'type': 'string'},
11180 'virt-type': {'type': 'string'}},
11182 'Volume': {'additionalProperties': False,
11183 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
11184 'volumetag': {'type': 'string'}},
11185 'required': ['volumetag', 'info'],
11187 'VolumeAttachmentInfo': {'additionalProperties': False,
11188 'properties': {'busaddress': {'type': 'string'},
11189 'devicelink': {'type': 'string'},
11190 'devicename': {'type': 'string'},
11191 'read-only': {'type': 'boolean'}},
11193 'VolumeAttachmentParams': {'additionalProperties': False,
11194 'properties': {'instanceid': {'type': 'string'},
11195 'machinetag': {'type': 'string'},
11196 'provider': {'type': 'string'},
11197 'read-only': {'type': 'boolean'},
11198 'volumeid': {'type': 'string'},
11199 'volumetag': {'type': 'string'}},
11200 'required': ['volumetag',
11204 'VolumeInfo': {'additionalProperties': False,
11205 'properties': {'hardwareid': {'type': 'string'},
11206 'persistent': {'type': 'boolean'},
11207 'size': {'type': 'integer'},
11208 'volumeid': {'type': 'string'}},
11209 'required': ['volumeid', 'size', 'persistent'],
11211 'VolumeParams': {'additionalProperties': False,
11212 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
11213 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
11214 'type': 'object'}},
11216 'provider': {'type': 'string'},
11217 'size': {'type': 'integer'},
11218 'tags': {'patternProperties': {'.*': {'type': 'string'}},
11220 'volumetag': {'type': 'string'}},
11221 'required': ['volumetag', 'size', 'provider'],
11223 'WatchContainer': {'additionalProperties': False,
11224 'properties': {'ContainerType': {'type': 'string'},
11225 'MachineTag': {'type': 'string'}},
11226 'required': ['MachineTag', 'ContainerType'],
11228 'WatchContainers': {'additionalProperties': False,
11229 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
11231 'required': ['Params'],
11233 'caveat': {'additionalProperties': False,
11234 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11235 'location': {'$ref': '#/definitions/packet'},
11236 'verificationId': {'$ref': '#/definitions/packet'}},
11237 'required': ['location',
11241 'packet': {'additionalProperties': False,
11242 'properties': {'headerLen': {'type': 'integer'},
11243 'start': {'type': 'integer'},
11244 'totalLen': {'type': 'integer'}},
11245 'required': ['start', 'totalLen', 'headerLen'],
11246 'type': 'object'}},
11247 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11249 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
11251 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
11253 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11254 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
11256 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
11258 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
11259 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
11261 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11262 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
11264 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11265 'Result': {'$ref': '#/definitions/ErrorResults'}},
11267 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
11268 'Result': {'$ref': '#/definitions/FindToolsResult'}},
11270 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11271 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
11273 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11274 'Result': {'$ref': '#/definitions/StringResults'}},
11276 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11277 'Result': {'$ref': '#/definitions/StatusResults'}},
11279 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11280 'Result': {'$ref': '#/definitions/LifeResults'}},
11282 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
11284 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11286 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
11288 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11289 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
11291 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11292 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
11294 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11295 'Result': {'$ref': '#/definitions/ErrorResults'}},
11297 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11298 'Result': {'$ref': '#/definitions/ErrorResults'}},
11300 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11301 'Result': {'$ref': '#/definitions/StringResults'}},
11303 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
11304 'Result': {'$ref': '#/definitions/ErrorResults'}},
11306 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11307 'Result': {'$ref': '#/definitions/ErrorResults'}},
11309 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
11310 'Result': {'$ref': '#/definitions/ErrorResults'}},
11312 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11313 'Result': {'$ref': '#/definitions/ErrorResults'}},
11315 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
11316 'Result': {'$ref': '#/definitions/ErrorResults'}},
11318 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11320 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11321 'Result': {'$ref': '#/definitions/StatusResults'}},
11323 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11324 'Result': {'$ref': '#/definitions/ToolsResults'}},
11326 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11327 'Result': {'$ref': '#/definitions/ErrorResults'}},
11329 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11331 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
11332 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11334 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
11335 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11337 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11339 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11341 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11342 'type': 'object'}},
11346 #@ReturnMapping(StringsResult)
11347 async def APIAddresses(self
):
11350 Returns -> typing.Union[~Error, typing.Sequence[str]]
11352 # map input types to rpc msg
11354 msg
= dict(Type
='Provisioner', Request
='APIAddresses', Version
=2, Params
=params
)
11356 reply
= await self
.rpc(msg
)
11357 return self
._map
(reply
, APIAddresses
)
11361 #@ReturnMapping(APIHostPortsResult)
11362 async def APIHostPorts(self
):
11365 Returns -> typing.Sequence[~HostPort]
11367 # map input types to rpc msg
11369 msg
= dict(Type
='Provisioner', Request
='APIHostPorts', Version
=2, Params
=params
)
11371 reply
= await self
.rpc(msg
)
11372 return self
._map
(reply
, APIHostPorts
)
11376 #@ReturnMapping(BytesResult)
11377 async def CACert(self
):
11380 Returns -> typing.Sequence[int]
11382 # map input types to rpc msg
11384 msg
= dict(Type
='Provisioner', Request
='CACert', Version
=2, Params
=params
)
11386 reply
= await self
.rpc(msg
)
11387 return self
._map
(reply
, CACert
)
11391 #@ReturnMapping(ConstraintsResults)
11392 async def Constraints(self
, entities
):
11394 entities : typing.Sequence[~Entity]
11395 Returns -> typing.Sequence[~ConstraintsResult]
11397 # map input types to rpc msg
11399 msg
= dict(Type
='Provisioner', Request
='Constraints', Version
=2, Params
=params
)
11400 params
['Entities'] = entities
11401 reply
= await self
.rpc(msg
)
11402 return self
._map
(reply
, Constraints
)
11406 #@ReturnMapping(ContainerConfig)
11407 async def ContainerConfig(self
):
11410 Returns -> typing.Union[str, bool, ~Settings, ~UpdateBehavior]
11412 # map input types to rpc msg
11414 msg
= dict(Type
='Provisioner', Request
='ContainerConfig', Version
=2, Params
=params
)
11416 reply
= await self
.rpc(msg
)
11417 return self
._map
(reply
, ContainerConfig
)
11421 #@ReturnMapping(ContainerManagerConfig)
11422 async def ContainerManagerConfig(self
, type_
):
11425 Returns -> typing.Mapping[str, str]
11427 # map input types to rpc msg
11429 msg
= dict(Type
='Provisioner', Request
='ContainerManagerConfig', Version
=2, Params
=params
)
11430 params
['Type'] = type_
11431 reply
= await self
.rpc(msg
)
11432 return self
._map
(reply
, ContainerManagerConfig
)
11436 #@ReturnMapping(DistributionGroupResults)
11437 async def DistributionGroup(self
, entities
):
11439 entities : typing.Sequence[~Entity]
11440 Returns -> typing.Sequence[~DistributionGroupResult]
11442 # map input types to rpc msg
11444 msg
= dict(Type
='Provisioner', Request
='DistributionGroup', Version
=2, Params
=params
)
11445 params
['Entities'] = entities
11446 reply
= await self
.rpc(msg
)
11447 return self
._map
(reply
, DistributionGroup
)
11451 #@ReturnMapping(ErrorResults)
11452 async def EnsureDead(self
, entities
):
11454 entities : typing.Sequence[~Entity]
11455 Returns -> typing.Sequence[~ErrorResult]
11457 # map input types to rpc msg
11459 msg
= dict(Type
='Provisioner', Request
='EnsureDead', Version
=2, Params
=params
)
11460 params
['Entities'] = entities
11461 reply
= await self
.rpc(msg
)
11462 return self
._map
(reply
, EnsureDead
)
11466 #@ReturnMapping(FindToolsResult)
11467 async def FindTools(self
, majorversion
, series
, minorversion
, arch
, number
):
11474 Returns -> typing.Union[~Error, typing.Sequence[~Tools]]
11476 # map input types to rpc msg
11478 msg
= dict(Type
='Provisioner', Request
='FindTools', Version
=2, Params
=params
)
11479 params
['MajorVersion'] = majorversion
11480 params
['Series'] = series
11481 params
['MinorVersion'] = minorversion
11482 params
['Arch'] = arch
11483 params
['Number'] = number
11484 reply
= await self
.rpc(msg
)
11485 return self
._map
(reply
, FindTools
)
11489 #@ReturnMapping(MachineNetworkConfigResults)
11490 async def GetContainerInterfaceInfo(self
, entities
):
11492 entities : typing.Sequence[~Entity]
11493 Returns -> typing.Sequence[~MachineNetworkConfigResult]
11495 # map input types to rpc msg
11497 msg
= dict(Type
='Provisioner', Request
='GetContainerInterfaceInfo', Version
=2, Params
=params
)
11498 params
['Entities'] = entities
11499 reply
= await self
.rpc(msg
)
11500 return self
._map
(reply
, GetContainerInterfaceInfo
)
11504 #@ReturnMapping(StringResults)
11505 async def InstanceId(self
, entities
):
11507 entities : typing.Sequence[~Entity]
11508 Returns -> typing.Sequence[~StringResult]
11510 # map input types to rpc msg
11512 msg
= dict(Type
='Provisioner', Request
='InstanceId', Version
=2, Params
=params
)
11513 params
['Entities'] = entities
11514 reply
= await self
.rpc(msg
)
11515 return self
._map
(reply
, InstanceId
)
11519 #@ReturnMapping(StatusResults)
11520 async def InstanceStatus(self
, entities
):
11522 entities : typing.Sequence[~Entity]
11523 Returns -> typing.Sequence[~StatusResult]
11525 # map input types to rpc msg
11527 msg
= dict(Type
='Provisioner', Request
='InstanceStatus', Version
=2, Params
=params
)
11528 params
['Entities'] = entities
11529 reply
= await self
.rpc(msg
)
11530 return self
._map
(reply
, InstanceStatus
)
11534 #@ReturnMapping(LifeResults)
11535 async def Life(self
, entities
):
11537 entities : typing.Sequence[~Entity]
11538 Returns -> typing.Sequence[~LifeResult]
11540 # map input types to rpc msg
11542 msg
= dict(Type
='Provisioner', Request
='Life', Version
=2, Params
=params
)
11543 params
['Entities'] = entities
11544 reply
= await self
.rpc(msg
)
11545 return self
._map
(reply
, Life
)
11549 #@ReturnMapping(StatusResults)
11550 async def MachinesWithTransientErrors(self
):
11553 Returns -> typing.Sequence[~StatusResult]
11555 # map input types to rpc msg
11557 msg
= dict(Type
='Provisioner', Request
='MachinesWithTransientErrors', Version
=2, Params
=params
)
11559 reply
= await self
.rpc(msg
)
11560 return self
._map
(reply
, MachinesWithTransientErrors
)
11564 #@ReturnMapping(ModelConfigResult)
11565 async def ModelConfig(self
):
11568 Returns -> typing.Mapping[str, typing.Any]
11570 # map input types to rpc msg
11572 msg
= dict(Type
='Provisioner', Request
='ModelConfig', Version
=2, Params
=params
)
11574 reply
= await self
.rpc(msg
)
11575 return self
._map
(reply
, ModelConfig
)
11579 #@ReturnMapping(StringResult)
11580 async def ModelUUID(self
):
11583 Returns -> typing.Union[~Error, str]
11585 # map input types to rpc msg
11587 msg
= dict(Type
='Provisioner', Request
='ModelUUID', Version
=2, Params
=params
)
11589 reply
= await self
.rpc(msg
)
11590 return self
._map
(reply
, ModelUUID
)
11594 #@ReturnMapping(MachineNetworkConfigResults)
11595 async def PrepareContainerInterfaceInfo(self
, entities
):
11597 entities : typing.Sequence[~Entity]
11598 Returns -> typing.Sequence[~MachineNetworkConfigResult]
11600 # map input types to rpc msg
11602 msg
= dict(Type
='Provisioner', Request
='PrepareContainerInterfaceInfo', Version
=2, Params
=params
)
11603 params
['Entities'] = entities
11604 reply
= await self
.rpc(msg
)
11605 return self
._map
(reply
, PrepareContainerInterfaceInfo
)
11609 #@ReturnMapping(ProvisioningInfoResults)
11610 async def ProvisioningInfo(self
, entities
):
11612 entities : typing.Sequence[~Entity]
11613 Returns -> typing.Sequence[~ProvisioningInfoResult]
11615 # map input types to rpc msg
11617 msg
= dict(Type
='Provisioner', Request
='ProvisioningInfo', Version
=2, Params
=params
)
11618 params
['Entities'] = entities
11619 reply
= await self
.rpc(msg
)
11620 return self
._map
(reply
, ProvisioningInfo
)
11624 #@ReturnMapping(ErrorResults)
11625 async def ReleaseContainerAddresses(self
, entities
):
11627 entities : typing.Sequence[~Entity]
11628 Returns -> typing.Sequence[~ErrorResult]
11630 # map input types to rpc msg
11632 msg
= dict(Type
='Provisioner', Request
='ReleaseContainerAddresses', Version
=2, Params
=params
)
11633 params
['Entities'] = entities
11634 reply
= await self
.rpc(msg
)
11635 return self
._map
(reply
, ReleaseContainerAddresses
)
11639 #@ReturnMapping(ErrorResults)
11640 async def Remove(self
, entities
):
11642 entities : typing.Sequence[~Entity]
11643 Returns -> typing.Sequence[~ErrorResult]
11645 # map input types to rpc msg
11647 msg
= dict(Type
='Provisioner', Request
='Remove', Version
=2, Params
=params
)
11648 params
['Entities'] = entities
11649 reply
= await self
.rpc(msg
)
11650 return self
._map
(reply
, Remove
)
11654 #@ReturnMapping(StringResults)
11655 async def Series(self
, entities
):
11657 entities : typing.Sequence[~Entity]
11658 Returns -> typing.Sequence[~StringResult]
11660 # map input types to rpc msg
11662 msg
= dict(Type
='Provisioner', Request
='Series', Version
=2, Params
=params
)
11663 params
['Entities'] = entities
11664 reply
= await self
.rpc(msg
)
11665 return self
._map
(reply
, Series
)
11669 #@ReturnMapping(ErrorResults)
11670 async def SetInstanceInfo(self
, machines
):
11672 machines : typing.Sequence[~InstanceInfo]
11673 Returns -> typing.Sequence[~ErrorResult]
11675 # map input types to rpc msg
11677 msg
= dict(Type
='Provisioner', Request
='SetInstanceInfo', Version
=2, Params
=params
)
11678 params
['Machines'] = machines
11679 reply
= await self
.rpc(msg
)
11680 return self
._map
(reply
, SetInstanceInfo
)
11684 #@ReturnMapping(ErrorResults)
11685 async def SetInstanceStatus(self
, entities
):
11687 entities : typing.Sequence[~EntityStatusArgs]
11688 Returns -> typing.Sequence[~ErrorResult]
11690 # map input types to rpc msg
11692 msg
= dict(Type
='Provisioner', Request
='SetInstanceStatus', Version
=2, Params
=params
)
11693 params
['Entities'] = entities
11694 reply
= await self
.rpc(msg
)
11695 return self
._map
(reply
, SetInstanceStatus
)
11699 #@ReturnMapping(ErrorResults)
11700 async def SetPasswords(self
, changes
):
11702 changes : typing.Sequence[~EntityPassword]
11703 Returns -> typing.Sequence[~ErrorResult]
11705 # map input types to rpc msg
11707 msg
= dict(Type
='Provisioner', Request
='SetPasswords', Version
=2, Params
=params
)
11708 params
['Changes'] = changes
11709 reply
= await self
.rpc(msg
)
11710 return self
._map
(reply
, SetPasswords
)
11714 #@ReturnMapping(ErrorResults)
11715 async def SetStatus(self
, entities
):
11717 entities : typing.Sequence[~EntityStatusArgs]
11718 Returns -> typing.Sequence[~ErrorResult]
11720 # map input types to rpc msg
11722 msg
= dict(Type
='Provisioner', Request
='SetStatus', Version
=2, Params
=params
)
11723 params
['Entities'] = entities
11724 reply
= await self
.rpc(msg
)
11725 return self
._map
(reply
, SetStatus
)
11729 #@ReturnMapping(ErrorResults)
11730 async def SetSupportedContainers(self
, params
):
11732 params : typing.Sequence[~MachineContainers]
11733 Returns -> typing.Sequence[~ErrorResult]
11735 # map input types to rpc msg
11737 msg
= dict(Type
='Provisioner', Request
='SetSupportedContainers', Version
=2, Params
=params
)
11738 params
['Params'] = params
11739 reply
= await self
.rpc(msg
)
11740 return self
._map
(reply
, SetSupportedContainers
)
11744 #@ReturnMapping(StringsResult)
11745 async def StateAddresses(self
):
11748 Returns -> typing.Union[~Error, typing.Sequence[str]]
11750 # map input types to rpc msg
11752 msg
= dict(Type
='Provisioner', Request
='StateAddresses', Version
=2, Params
=params
)
11754 reply
= await self
.rpc(msg
)
11755 return self
._map
(reply
, StateAddresses
)
11759 #@ReturnMapping(StatusResults)
11760 async def Status(self
, entities
):
11762 entities : typing.Sequence[~Entity]
11763 Returns -> typing.Sequence[~StatusResult]
11765 # map input types to rpc msg
11767 msg
= dict(Type
='Provisioner', Request
='Status', Version
=2, Params
=params
)
11768 params
['Entities'] = entities
11769 reply
= await self
.rpc(msg
)
11770 return self
._map
(reply
, Status
)
11774 #@ReturnMapping(ToolsResults)
11775 async def Tools(self
, entities
):
11777 entities : typing.Sequence[~Entity]
11778 Returns -> typing.Sequence[~ToolsResult]
11780 # map input types to rpc msg
11782 msg
= dict(Type
='Provisioner', Request
='Tools', Version
=2, Params
=params
)
11783 params
['Entities'] = entities
11784 reply
= await self
.rpc(msg
)
11785 return self
._map
(reply
, Tools
)
11789 #@ReturnMapping(ErrorResults)
11790 async def UpdateStatus(self
, entities
):
11792 entities : typing.Sequence[~EntityStatusArgs]
11793 Returns -> typing.Sequence[~ErrorResult]
11795 # map input types to rpc msg
11797 msg
= dict(Type
='Provisioner', Request
='UpdateStatus', Version
=2, Params
=params
)
11798 params
['Entities'] = entities
11799 reply
= await self
.rpc(msg
)
11800 return self
._map
(reply
, UpdateStatus
)
11804 #@ReturnMapping(NotifyWatchResult)
11805 async def WatchAPIHostPorts(self
):
11808 Returns -> typing.Union[~Error, str]
11810 # map input types to rpc msg
11812 msg
= dict(Type
='Provisioner', Request
='WatchAPIHostPorts', Version
=2, Params
=params
)
11814 reply
= await self
.rpc(msg
)
11815 return self
._map
(reply
, WatchAPIHostPorts
)
11819 #@ReturnMapping(StringsWatchResults)
11820 async def WatchAllContainers(self
, params
):
11822 params : typing.Sequence[~WatchContainer]
11823 Returns -> typing.Sequence[~StringsWatchResult]
11825 # map input types to rpc msg
11827 msg
= dict(Type
='Provisioner', Request
='WatchAllContainers', Version
=2, Params
=params
)
11828 params
['Params'] = params
11829 reply
= await self
.rpc(msg
)
11830 return self
._map
(reply
, WatchAllContainers
)
11834 #@ReturnMapping(StringsWatchResults)
11835 async def WatchContainers(self
, params
):
11837 params : typing.Sequence[~WatchContainer]
11838 Returns -> typing.Sequence[~StringsWatchResult]
11840 # map input types to rpc msg
11842 msg
= dict(Type
='Provisioner', Request
='WatchContainers', Version
=2, Params
=params
)
11843 params
['Params'] = params
11844 reply
= await self
.rpc(msg
)
11845 return self
._map
(reply
, WatchContainers
)
11849 #@ReturnMapping(NotifyWatchResult)
11850 async def WatchForModelConfigChanges(self
):
11853 Returns -> typing.Union[~Error, str]
11855 # map input types to rpc msg
11857 msg
= dict(Type
='Provisioner', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
11859 reply
= await self
.rpc(msg
)
11860 return self
._map
(reply
, WatchForModelConfigChanges
)
11864 #@ReturnMapping(NotifyWatchResult)
11865 async def WatchMachineErrorRetry(self
):
11868 Returns -> typing.Union[~Error, str]
11870 # map input types to rpc msg
11872 msg
= dict(Type
='Provisioner', Request
='WatchMachineErrorRetry', Version
=2, Params
=params
)
11874 reply
= await self
.rpc(msg
)
11875 return self
._map
(reply
, WatchMachineErrorRetry
)
11879 #@ReturnMapping(StringsWatchResult)
11880 async def WatchModelMachines(self
):
11883 Returns -> typing.Union[~Error, typing.Sequence[str]]
11885 # map input types to rpc msg
11887 msg
= dict(Type
='Provisioner', Request
='WatchModelMachines', Version
=2, Params
=params
)
11889 reply
= await self
.rpc(msg
)
11890 return self
._map
(reply
, WatchModelMachines
)
11893 class ProxyUpdater(Type
):
11894 name
= 'ProxyUpdater'
11896 schema
= {'definitions': {'Entities': {'additionalProperties': False,
11897 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11899 'required': ['Entities'],
11901 'Entity': {'additionalProperties': False,
11902 'properties': {'Tag': {'type': 'string'}},
11903 'required': ['Tag'],
11905 'Error': {'additionalProperties': False,
11906 'properties': {'Code': {'type': 'string'},
11907 'Info': {'$ref': '#/definitions/ErrorInfo'},
11908 'Message': {'type': 'string'}},
11909 'required': ['Message', 'Code'],
11911 'ErrorInfo': {'additionalProperties': False,
11912 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11913 'MacaroonPath': {'type': 'string'}},
11915 'Macaroon': {'additionalProperties': False,
11916 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11918 'data': {'items': {'type': 'integer'},
11920 'id': {'$ref': '#/definitions/packet'},
11921 'location': {'$ref': '#/definitions/packet'},
11922 'sig': {'items': {'type': 'integer'},
11924 'required': ['data',
11930 'NotifyWatchResult': {'additionalProperties': False,
11931 'properties': {'Error': {'$ref': '#/definitions/Error'},
11932 'NotifyWatcherId': {'type': 'string'}},
11933 'required': ['NotifyWatcherId', 'Error'],
11935 'NotifyWatchResults': {'additionalProperties': False,
11936 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11938 'required': ['Results'],
11940 'ProxyConfig': {'additionalProperties': False,
11941 'properties': {'FTP': {'type': 'string'},
11942 'HTTP': {'type': 'string'},
11943 'HTTPS': {'type': 'string'},
11944 'NoProxy': {'type': 'string'}},
11945 'required': ['HTTP',
11950 'ProxyConfigResult': {'additionalProperties': False,
11951 'properties': {'APTProxySettings': {'$ref': '#/definitions/ProxyConfig'},
11952 'Error': {'$ref': '#/definitions/Error'},
11953 'ProxySettings': {'$ref': '#/definitions/ProxyConfig'}},
11954 'required': ['ProxySettings',
11955 'APTProxySettings'],
11957 'ProxyConfigResults': {'additionalProperties': False,
11958 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
11960 'required': ['Results'],
11962 'caveat': {'additionalProperties': False,
11963 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11964 'location': {'$ref': '#/definitions/packet'},
11965 'verificationId': {'$ref': '#/definitions/packet'}},
11966 'required': ['location',
11970 'packet': {'additionalProperties': False,
11971 'properties': {'headerLen': {'type': 'integer'},
11972 'start': {'type': 'integer'},
11973 'totalLen': {'type': 'integer'}},
11974 'required': ['start', 'totalLen', 'headerLen'],
11975 'type': 'object'}},
11976 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11977 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
11979 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11980 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11981 'type': 'object'}},
11985 #@ReturnMapping(ProxyConfigResults)
11986 async def ProxyConfig(self
, entities
):
11988 entities : typing.Sequence[~Entity]
11989 Returns -> typing.Sequence[~ProxyConfigResult]
11991 # map input types to rpc msg
11993 msg
= dict(Type
='ProxyUpdater', Request
='ProxyConfig', Version
=1, Params
=params
)
11994 params
['Entities'] = entities
11995 reply
= await self
.rpc(msg
)
11996 return self
._map
(reply
, ProxyConfig
)
12000 #@ReturnMapping(NotifyWatchResults)
12001 async def WatchForProxyConfigAndAPIHostPortChanges(self
, entities
):
12003 entities : typing.Sequence[~Entity]
12004 Returns -> typing.Sequence[~NotifyWatchResult]
12006 # map input types to rpc msg
12008 msg
= dict(Type
='ProxyUpdater', Request
='WatchForProxyConfigAndAPIHostPortChanges', Version
=1, Params
=params
)
12009 params
['Entities'] = entities
12010 reply
= await self
.rpc(msg
)
12011 return self
._map
(reply
, WatchForProxyConfigAndAPIHostPortChanges
)
12014 class Reboot(Type
):
12017 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12018 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12020 'required': ['Entities'],
12022 'Entity': {'additionalProperties': False,
12023 'properties': {'Tag': {'type': 'string'}},
12024 'required': ['Tag'],
12026 'Error': {'additionalProperties': False,
12027 'properties': {'Code': {'type': 'string'},
12028 'Info': {'$ref': '#/definitions/ErrorInfo'},
12029 'Message': {'type': 'string'}},
12030 'required': ['Message', 'Code'],
12032 'ErrorInfo': {'additionalProperties': False,
12033 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12034 'MacaroonPath': {'type': 'string'}},
12036 'ErrorResult': {'additionalProperties': False,
12037 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12038 'required': ['Error'],
12040 'ErrorResults': {'additionalProperties': False,
12041 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12043 'required': ['Results'],
12045 'Macaroon': {'additionalProperties': False,
12046 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12048 'data': {'items': {'type': 'integer'},
12050 'id': {'$ref': '#/definitions/packet'},
12051 'location': {'$ref': '#/definitions/packet'},
12052 'sig': {'items': {'type': 'integer'},
12054 'required': ['data',
12060 'NotifyWatchResult': {'additionalProperties': False,
12061 'properties': {'Error': {'$ref': '#/definitions/Error'},
12062 'NotifyWatcherId': {'type': 'string'}},
12063 'required': ['NotifyWatcherId', 'Error'],
12065 'RebootActionResult': {'additionalProperties': False,
12066 'properties': {'error': {'$ref': '#/definitions/Error'},
12067 'result': {'type': 'string'}},
12069 'RebootActionResults': {'additionalProperties': False,
12070 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
12073 'caveat': {'additionalProperties': False,
12074 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12075 'location': {'$ref': '#/definitions/packet'},
12076 'verificationId': {'$ref': '#/definitions/packet'}},
12077 'required': ['location',
12081 'packet': {'additionalProperties': False,
12082 'properties': {'headerLen': {'type': 'integer'},
12083 'start': {'type': 'integer'},
12084 'totalLen': {'type': 'integer'}},
12085 'required': ['start', 'totalLen', 'headerLen'],
12086 'type': 'object'}},
12087 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12088 'Result': {'$ref': '#/definitions/ErrorResults'}},
12090 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12091 'Result': {'$ref': '#/definitions/RebootActionResults'}},
12093 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12094 'Result': {'$ref': '#/definitions/ErrorResults'}},
12096 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12097 'type': 'object'}},
12101 #@ReturnMapping(ErrorResults)
12102 async def ClearReboot(self
, entities
):
12104 entities : typing.Sequence[~Entity]
12105 Returns -> typing.Sequence[~ErrorResult]
12107 # map input types to rpc msg
12109 msg
= dict(Type
='Reboot', Request
='ClearReboot', Version
=2, Params
=params
)
12110 params
['Entities'] = entities
12111 reply
= await self
.rpc(msg
)
12112 return self
._map
(reply
, ClearReboot
)
12116 #@ReturnMapping(RebootActionResults)
12117 async def GetRebootAction(self
, entities
):
12119 entities : typing.Sequence[~Entity]
12120 Returns -> typing.Sequence[~RebootActionResult]
12122 # map input types to rpc msg
12124 msg
= dict(Type
='Reboot', Request
='GetRebootAction', Version
=2, Params
=params
)
12125 params
['Entities'] = entities
12126 reply
= await self
.rpc(msg
)
12127 return self
._map
(reply
, GetRebootAction
)
12131 #@ReturnMapping(ErrorResults)
12132 async def RequestReboot(self
, entities
):
12134 entities : typing.Sequence[~Entity]
12135 Returns -> typing.Sequence[~ErrorResult]
12137 # map input types to rpc msg
12139 msg
= dict(Type
='Reboot', Request
='RequestReboot', Version
=2, Params
=params
)
12140 params
['Entities'] = entities
12141 reply
= await self
.rpc(msg
)
12142 return self
._map
(reply
, RequestReboot
)
12146 #@ReturnMapping(NotifyWatchResult)
12147 async def WatchForRebootEvent(self
):
12150 Returns -> typing.Union[~Error, str]
12152 # map input types to rpc msg
12154 msg
= dict(Type
='Reboot', Request
='WatchForRebootEvent', Version
=2, Params
=params
)
12156 reply
= await self
.rpc(msg
)
12157 return self
._map
(reply
, WatchForRebootEvent
)
12160 class RelationUnitsWatcher(Type
):
12161 name
= 'RelationUnitsWatcher'
12163 schema
= {'definitions': {'Error': {'additionalProperties': False,
12164 'properties': {'Code': {'type': 'string'},
12165 'Info': {'$ref': '#/definitions/ErrorInfo'},
12166 'Message': {'type': 'string'}},
12167 'required': ['Message', 'Code'],
12169 'ErrorInfo': {'additionalProperties': False,
12170 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12171 'MacaroonPath': {'type': 'string'}},
12173 'Macaroon': {'additionalProperties': False,
12174 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12176 'data': {'items': {'type': 'integer'},
12178 'id': {'$ref': '#/definitions/packet'},
12179 'location': {'$ref': '#/definitions/packet'},
12180 'sig': {'items': {'type': 'integer'},
12182 'required': ['data',
12188 'RelationUnitsChange': {'additionalProperties': False,
12189 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
12191 'Departed': {'items': {'type': 'string'},
12193 'required': ['Changed', 'Departed'],
12195 'RelationUnitsWatchResult': {'additionalProperties': False,
12196 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
12197 'Error': {'$ref': '#/definitions/Error'},
12198 'RelationUnitsWatcherId': {'type': 'string'}},
12199 'required': ['RelationUnitsWatcherId',
12203 'UnitSettings': {'additionalProperties': False,
12204 'properties': {'Version': {'type': 'integer'}},
12205 'required': ['Version'],
12207 'caveat': {'additionalProperties': False,
12208 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12209 'location': {'$ref': '#/definitions/packet'},
12210 'verificationId': {'$ref': '#/definitions/packet'}},
12211 'required': ['location',
12215 'packet': {'additionalProperties': False,
12216 'properties': {'headerLen': {'type': 'integer'},
12217 'start': {'type': 'integer'},
12218 'totalLen': {'type': 'integer'}},
12219 'required': ['start', 'totalLen', 'headerLen'],
12220 'type': 'object'}},
12221 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
12223 'Stop': {'type': 'object'}},
12227 #@ReturnMapping(RelationUnitsWatchResult)
12228 async def Next(self
):
12231 Returns -> typing.Union[~Error, str, ~RelationUnitsChange]
12233 # map input types to rpc msg
12235 msg
= dict(Type
='RelationUnitsWatcher', Request
='Next', Version
=1, Params
=params
)
12237 reply
= await self
.rpc(msg
)
12238 return self
._map
(reply
, Next
)
12242 #@ReturnMapping(None)
12243 async def Stop(self
):
12248 # map input types to rpc msg
12250 msg
= dict(Type
='RelationUnitsWatcher', Request
='Stop', Version
=1, Params
=params
)
12252 reply
= await self
.rpc(msg
)
12253 return self
._map
(reply
, Stop
)
12256 class Resumer(Type
):
12259 schema
= {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
12262 #@ReturnMapping(None)
12263 async def ResumeTransactions(self
):
12268 # map input types to rpc msg
12270 msg
= dict(Type
='Resumer', Request
='ResumeTransactions', Version
=2, Params
=params
)
12272 reply
= await self
.rpc(msg
)
12273 return self
._map
(reply
, ResumeTransactions
)
12276 class RetryStrategy(Type
):
12277 name
= 'RetryStrategy'
12279 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12280 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12282 'required': ['Entities'],
12284 'Entity': {'additionalProperties': False,
12285 'properties': {'Tag': {'type': 'string'}},
12286 'required': ['Tag'],
12288 'Error': {'additionalProperties': False,
12289 'properties': {'Code': {'type': 'string'},
12290 'Info': {'$ref': '#/definitions/ErrorInfo'},
12291 'Message': {'type': 'string'}},
12292 'required': ['Message', 'Code'],
12294 'ErrorInfo': {'additionalProperties': False,
12295 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12296 'MacaroonPath': {'type': 'string'}},
12298 'Macaroon': {'additionalProperties': False,
12299 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12301 'data': {'items': {'type': 'integer'},
12303 'id': {'$ref': '#/definitions/packet'},
12304 'location': {'$ref': '#/definitions/packet'},
12305 'sig': {'items': {'type': 'integer'},
12307 'required': ['data',
12313 'NotifyWatchResult': {'additionalProperties': False,
12314 'properties': {'Error': {'$ref': '#/definitions/Error'},
12315 'NotifyWatcherId': {'type': 'string'}},
12316 'required': ['NotifyWatcherId', 'Error'],
12318 'NotifyWatchResults': {'additionalProperties': False,
12319 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12321 'required': ['Results'],
12323 'RetryStrategy': {'additionalProperties': False,
12324 'properties': {'JitterRetryTime': {'type': 'boolean'},
12325 'MaxRetryTime': {'type': 'integer'},
12326 'MinRetryTime': {'type': 'integer'},
12327 'RetryTimeFactor': {'type': 'integer'},
12328 'ShouldRetry': {'type': 'boolean'}},
12329 'required': ['ShouldRetry',
12333 'RetryTimeFactor'],
12335 'RetryStrategyResult': {'additionalProperties': False,
12336 'properties': {'Error': {'$ref': '#/definitions/Error'},
12337 'Result': {'$ref': '#/definitions/RetryStrategy'}},
12338 'required': ['Error', 'Result'],
12340 'RetryStrategyResults': {'additionalProperties': False,
12341 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
12343 'required': ['Results'],
12345 'caveat': {'additionalProperties': False,
12346 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12347 'location': {'$ref': '#/definitions/packet'},
12348 'verificationId': {'$ref': '#/definitions/packet'}},
12349 'required': ['location',
12353 'packet': {'additionalProperties': False,
12354 'properties': {'headerLen': {'type': 'integer'},
12355 'start': {'type': 'integer'},
12356 'totalLen': {'type': 'integer'}},
12357 'required': ['start', 'totalLen', 'headerLen'],
12358 'type': 'object'}},
12359 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12360 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
12362 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12363 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12364 'type': 'object'}},
12368 #@ReturnMapping(RetryStrategyResults)
12369 async def RetryStrategy(self
, entities
):
12371 entities : typing.Sequence[~Entity]
12372 Returns -> typing.Sequence[~RetryStrategyResult]
12374 # map input types to rpc msg
12376 msg
= dict(Type
='RetryStrategy', Request
='RetryStrategy', Version
=1, Params
=params
)
12377 params
['Entities'] = entities
12378 reply
= await self
.rpc(msg
)
12379 return self
._map
(reply
, RetryStrategy
)
12383 #@ReturnMapping(NotifyWatchResults)
12384 async def WatchRetryStrategy(self
, entities
):
12386 entities : typing.Sequence[~Entity]
12387 Returns -> typing.Sequence[~NotifyWatchResult]
12389 # map input types to rpc msg
12391 msg
= dict(Type
='RetryStrategy', Request
='WatchRetryStrategy', Version
=1, Params
=params
)
12392 params
['Entities'] = entities
12393 reply
= await self
.rpc(msg
)
12394 return self
._map
(reply
, WatchRetryStrategy
)
12397 class SSHClient(Type
):
12400 schema
= {'definitions': {'Entities': {'additionalProperties': False,
12401 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12403 'required': ['Entities'],
12405 'Entity': {'additionalProperties': False,
12406 'properties': {'Tag': {'type': 'string'}},
12407 'required': ['Tag'],
12409 'Error': {'additionalProperties': False,
12410 'properties': {'Code': {'type': 'string'},
12411 'Info': {'$ref': '#/definitions/ErrorInfo'},
12412 'Message': {'type': 'string'}},
12413 'required': ['Message', 'Code'],
12415 'ErrorInfo': {'additionalProperties': False,
12416 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12417 'MacaroonPath': {'type': 'string'}},
12419 'Macaroon': {'additionalProperties': False,
12420 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12422 'data': {'items': {'type': 'integer'},
12424 'id': {'$ref': '#/definitions/packet'},
12425 'location': {'$ref': '#/definitions/packet'},
12426 'sig': {'items': {'type': 'integer'},
12428 'required': ['data',
12434 'SSHAddressResult': {'additionalProperties': False,
12435 'properties': {'address': {'type': 'string'},
12436 'error': {'$ref': '#/definitions/Error'}},
12438 'SSHAddressResults': {'additionalProperties': False,
12439 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
12441 'required': ['results'],
12443 'SSHProxyResult': {'additionalProperties': False,
12444 'properties': {'use-proxy': {'type': 'boolean'}},
12445 'required': ['use-proxy'],
12447 'SSHPublicKeysResult': {'additionalProperties': False,
12448 'properties': {'error': {'$ref': '#/definitions/Error'},
12449 'public-keys': {'items': {'type': 'string'},
12452 'SSHPublicKeysResults': {'additionalProperties': False,
12453 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
12455 'required': ['results'],
12457 'caveat': {'additionalProperties': False,
12458 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12459 'location': {'$ref': '#/definitions/packet'},
12460 'verificationId': {'$ref': '#/definitions/packet'}},
12461 'required': ['location',
12465 'packet': {'additionalProperties': False,
12466 'properties': {'headerLen': {'type': 'integer'},
12467 'start': {'type': 'integer'},
12468 'totalLen': {'type': 'integer'}},
12469 'required': ['start', 'totalLen', 'headerLen'],
12470 'type': 'object'}},
12471 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12472 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
12474 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
12476 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12477 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
12479 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12480 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
12481 'type': 'object'}},
12485 #@ReturnMapping(SSHAddressResults)
12486 async def PrivateAddress(self
, entities
):
12488 entities : typing.Sequence[~Entity]
12489 Returns -> typing.Sequence[~SSHAddressResult]
12491 # map input types to rpc msg
12493 msg
= dict(Type
='SSHClient', Request
='PrivateAddress', Version
=1, Params
=params
)
12494 params
['Entities'] = entities
12495 reply
= await self
.rpc(msg
)
12496 return self
._map
(reply
, PrivateAddress
)
12500 #@ReturnMapping(SSHProxyResult)
12501 async def Proxy(self
):
12506 # map input types to rpc msg
12508 msg
= dict(Type
='SSHClient', Request
='Proxy', Version
=1, Params
=params
)
12510 reply
= await self
.rpc(msg
)
12511 return self
._map
(reply
, Proxy
)
12515 #@ReturnMapping(SSHAddressResults)
12516 async def PublicAddress(self
, entities
):
12518 entities : typing.Sequence[~Entity]
12519 Returns -> typing.Sequence[~SSHAddressResult]
12521 # map input types to rpc msg
12523 msg
= dict(Type
='SSHClient', Request
='PublicAddress', Version
=1, Params
=params
)
12524 params
['Entities'] = entities
12525 reply
= await self
.rpc(msg
)
12526 return self
._map
(reply
, PublicAddress
)
12530 #@ReturnMapping(SSHPublicKeysResults)
12531 async def PublicKeys(self
, entities
):
12533 entities : typing.Sequence[~Entity]
12534 Returns -> typing.Sequence[~SSHPublicKeysResult]
12536 # map input types to rpc msg
12538 msg
= dict(Type
='SSHClient', Request
='PublicKeys', Version
=1, Params
=params
)
12539 params
['Entities'] = entities
12540 reply
= await self
.rpc(msg
)
12541 return self
._map
(reply
, PublicKeys
)
12544 class Service(Type
):
12547 schema
= {'definitions': {'AddRelation': {'additionalProperties': False,
12548 'properties': {'Endpoints': {'items': {'type': 'string'},
12550 'required': ['Endpoints'],
12552 'AddRelationResults': {'additionalProperties': False,
12553 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
12554 'type': 'object'}},
12555 'required': ['Endpoints'],
12557 'AddServiceUnits': {'additionalProperties': False,
12558 'properties': {'NumUnits': {'type': 'integer'},
12559 'Placement': {'items': {'$ref': '#/definitions/Placement'},
12561 'ServiceName': {'type': 'string'}},
12562 'required': ['ServiceName',
12566 'AddServiceUnitsResults': {'additionalProperties': False,
12567 'properties': {'Units': {'items': {'type': 'string'},
12569 'required': ['Units'],
12571 'Constraints': {'additionalProperties': False,
12572 'properties': {'Count': {'type': 'integer'},
12573 'Pool': {'type': 'string'},
12574 'Size': {'type': 'integer'}},
12575 'required': ['Pool', 'Size', 'Count'],
12577 'DestroyRelation': {'additionalProperties': False,
12578 'properties': {'Endpoints': {'items': {'type': 'string'},
12580 'required': ['Endpoints'],
12582 'DestroyServiceUnits': {'additionalProperties': False,
12583 'properties': {'UnitNames': {'items': {'type': 'string'},
12585 'required': ['UnitNames'],
12587 'Error': {'additionalProperties': False,
12588 'properties': {'Code': {'type': 'string'},
12589 'Info': {'$ref': '#/definitions/ErrorInfo'},
12590 'Message': {'type': 'string'}},
12591 'required': ['Message', 'Code'],
12593 'ErrorInfo': {'additionalProperties': False,
12594 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12595 'MacaroonPath': {'type': 'string'}},
12597 'ErrorResult': {'additionalProperties': False,
12598 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12599 'required': ['Error'],
12601 'ErrorResults': {'additionalProperties': False,
12602 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12604 'required': ['Results'],
12606 'GetConstraintsResults': {'additionalProperties': False,
12607 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
12608 'required': ['Constraints'],
12610 'GetServiceConstraints': {'additionalProperties': False,
12611 'properties': {'ServiceName': {'type': 'string'}},
12612 'required': ['ServiceName'],
12614 'Macaroon': {'additionalProperties': False,
12615 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12617 'data': {'items': {'type': 'integer'},
12619 'id': {'$ref': '#/definitions/packet'},
12620 'location': {'$ref': '#/definitions/packet'},
12621 'sig': {'items': {'type': 'integer'},
12623 'required': ['data',
12629 'Placement': {'additionalProperties': False,
12630 'properties': {'Directive': {'type': 'string'},
12631 'Scope': {'type': 'string'}},
12632 'required': ['Scope', 'Directive'],
12634 'Relation': {'additionalProperties': False,
12635 'properties': {'Interface': {'type': 'string'},
12636 'Limit': {'type': 'integer'},
12637 'Name': {'type': 'string'},
12638 'Optional': {'type': 'boolean'},
12639 'Role': {'type': 'string'},
12640 'Scope': {'type': 'string'}},
12641 'required': ['Name',
12648 'ServiceCharmRelations': {'additionalProperties': False,
12649 'properties': {'ServiceName': {'type': 'string'}},
12650 'required': ['ServiceName'],
12652 'ServiceCharmRelationsResults': {'additionalProperties': False,
12653 'properties': {'CharmRelations': {'items': {'type': 'string'},
12655 'required': ['CharmRelations'],
12657 'ServiceDeploy': {'additionalProperties': False,
12658 'properties': {'Channel': {'type': 'string'},
12659 'CharmUrl': {'type': 'string'},
12660 'Config': {'patternProperties': {'.*': {'type': 'string'}},
12662 'ConfigYAML': {'type': 'string'},
12663 'Constraints': {'$ref': '#/definitions/Value'},
12664 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
12666 'NumUnits': {'type': 'integer'},
12667 'Placement': {'items': {'$ref': '#/definitions/Placement'},
12669 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
12671 'Series': {'type': 'string'},
12672 'ServiceName': {'type': 'string'},
12673 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
12674 'type': 'object'}},
12675 'required': ['ServiceName',
12685 'EndpointBindings',
12688 'ServiceDestroy': {'additionalProperties': False,
12689 'properties': {'ServiceName': {'type': 'string'}},
12690 'required': ['ServiceName'],
12692 'ServiceExpose': {'additionalProperties': False,
12693 'properties': {'ServiceName': {'type': 'string'}},
12694 'required': ['ServiceName'],
12696 'ServiceGet': {'additionalProperties': False,
12697 'properties': {'ServiceName': {'type': 'string'}},
12698 'required': ['ServiceName'],
12700 'ServiceGetResults': {'additionalProperties': False,
12701 'properties': {'Charm': {'type': 'string'},
12702 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12703 'type': 'object'}},
12705 'Constraints': {'$ref': '#/definitions/Value'},
12706 'Service': {'type': 'string'}},
12707 'required': ['Service',
12712 'ServiceMetricCredential': {'additionalProperties': False,
12713 'properties': {'MetricCredentials': {'items': {'type': 'integer'},
12715 'ServiceName': {'type': 'string'}},
12716 'required': ['ServiceName',
12717 'MetricCredentials'],
12719 'ServiceMetricCredentials': {'additionalProperties': False,
12720 'properties': {'Creds': {'items': {'$ref': '#/definitions/ServiceMetricCredential'},
12722 'required': ['Creds'],
12724 'ServiceSet': {'additionalProperties': False,
12725 'properties': {'Options': {'patternProperties': {'.*': {'type': 'string'}},
12727 'ServiceName': {'type': 'string'}},
12728 'required': ['ServiceName', 'Options'],
12730 'ServiceSetCharm': {'additionalProperties': False,
12731 'properties': {'charmurl': {'type': 'string'},
12732 'cs-channel': {'type': 'string'},
12733 'forceseries': {'type': 'boolean'},
12734 'forceunits': {'type': 'boolean'},
12735 'resourceids': {'patternProperties': {'.*': {'type': 'string'}},
12737 'servicename': {'type': 'string'}},
12738 'required': ['servicename',
12745 'ServiceUnexpose': {'additionalProperties': False,
12746 'properties': {'ServiceName': {'type': 'string'}},
12747 'required': ['ServiceName'],
12749 'ServiceUnset': {'additionalProperties': False,
12750 'properties': {'Options': {'items': {'type': 'string'},
12752 'ServiceName': {'type': 'string'}},
12753 'required': ['ServiceName', 'Options'],
12755 'ServiceUpdate': {'additionalProperties': False,
12756 'properties': {'CharmUrl': {'type': 'string'},
12757 'Constraints': {'$ref': '#/definitions/Value'},
12758 'ForceCharmUrl': {'type': 'boolean'},
12759 'ForceSeries': {'type': 'boolean'},
12760 'MinUnits': {'type': 'integer'},
12761 'ServiceName': {'type': 'string'},
12762 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}},
12764 'SettingsYAML': {'type': 'string'}},
12765 'required': ['ServiceName',
12774 'ServicesDeploy': {'additionalProperties': False,
12775 'properties': {'Services': {'items': {'$ref': '#/definitions/ServiceDeploy'},
12777 'required': ['Services'],
12779 'SetConstraints': {'additionalProperties': False,
12780 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
12781 'ServiceName': {'type': 'string'}},
12782 'required': ['ServiceName', 'Constraints'],
12784 'StringResult': {'additionalProperties': False,
12785 'properties': {'Error': {'$ref': '#/definitions/Error'},
12786 'Result': {'type': 'string'}},
12787 'required': ['Error', 'Result'],
12789 'Value': {'additionalProperties': False,
12790 'properties': {'arch': {'type': 'string'},
12791 'container': {'type': 'string'},
12792 'cpu-cores': {'type': 'integer'},
12793 'cpu-power': {'type': 'integer'},
12794 'instance-type': {'type': 'string'},
12795 'mem': {'type': 'integer'},
12796 'root-disk': {'type': 'integer'},
12797 'spaces': {'items': {'type': 'string'},
12799 'tags': {'items': {'type': 'string'},
12801 'virt-type': {'type': 'string'}},
12803 'caveat': {'additionalProperties': False,
12804 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12805 'location': {'$ref': '#/definitions/packet'},
12806 'verificationId': {'$ref': '#/definitions/packet'}},
12807 'required': ['location',
12811 'packet': {'additionalProperties': False,
12812 'properties': {'headerLen': {'type': 'integer'},
12813 'start': {'type': 'integer'},
12814 'totalLen': {'type': 'integer'}},
12815 'required': ['start', 'totalLen', 'headerLen'],
12816 'type': 'object'}},
12817 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
12818 'Result': {'$ref': '#/definitions/AddRelationResults'}},
12820 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddServiceUnits'},
12821 'Result': {'$ref': '#/definitions/AddServiceUnitsResults'}},
12823 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ServiceCharmRelations'},
12824 'Result': {'$ref': '#/definitions/ServiceCharmRelationsResults'}},
12826 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ServicesDeploy'},
12827 'Result': {'$ref': '#/definitions/ErrorResults'}},
12829 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ServiceDestroy'}},
12831 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
12833 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyServiceUnits'}},
12835 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ServiceExpose'}},
12837 'Get': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
12838 'Result': {'$ref': '#/definitions/ServiceGetResults'}},
12840 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
12841 'Result': {'$ref': '#/definitions/StringResult'}},
12843 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetServiceConstraints'},
12844 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
12846 'Set': {'properties': {'Params': {'$ref': '#/definitions/ServiceSet'}},
12848 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ServiceSetCharm'}},
12850 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
12852 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ServiceMetricCredentials'},
12853 'Result': {'$ref': '#/definitions/ErrorResults'}},
12855 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnexpose'}},
12857 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnset'}},
12859 'Update': {'properties': {'Params': {'$ref': '#/definitions/ServiceUpdate'}},
12860 'type': 'object'}},
12864 #@ReturnMapping(AddRelationResults)
12865 async def AddRelation(self
, endpoints
):
12867 endpoints : typing.Sequence[str]
12868 Returns -> typing.Mapping[str, ~Relation]
12870 # map input types to rpc msg
12872 msg
= dict(Type
='Service', Request
='AddRelation', Version
=3, Params
=params
)
12873 params
['Endpoints'] = endpoints
12874 reply
= await self
.rpc(msg
)
12875 return self
._map
(reply
, AddRelation
)
12879 #@ReturnMapping(AddServiceUnitsResults)
12880 async def AddUnits(self
, numunits
, placement
, servicename
):
12883 placement : typing.Sequence[~Placement]
12885 Returns -> typing.Sequence[str]
12887 # map input types to rpc msg
12889 msg
= dict(Type
='Service', Request
='AddUnits', Version
=3, Params
=params
)
12890 params
['NumUnits'] = numunits
12891 params
['Placement'] = placement
12892 params
['ServiceName'] = servicename
12893 reply
= await self
.rpc(msg
)
12894 return self
._map
(reply
, AddUnits
)
12898 #@ReturnMapping(ServiceCharmRelationsResults)
12899 async def CharmRelations(self
, servicename
):
12902 Returns -> typing.Sequence[str]
12904 # map input types to rpc msg
12906 msg
= dict(Type
='Service', Request
='CharmRelations', Version
=3, Params
=params
)
12907 params
['ServiceName'] = servicename
12908 reply
= await self
.rpc(msg
)
12909 return self
._map
(reply
, CharmRelations
)
12913 #@ReturnMapping(ErrorResults)
12914 async def Deploy(self
, services
):
12916 services : typing.Sequence[~ServiceDeploy]
12917 Returns -> typing.Sequence[~ErrorResult]
12919 # map input types to rpc msg
12921 msg
= dict(Type
='Service', Request
='Deploy', Version
=3, Params
=params
)
12922 params
['Services'] = services
12923 reply
= await self
.rpc(msg
)
12924 return self
._map
(reply
, Deploy
)
12928 #@ReturnMapping(None)
12929 async def Destroy(self
, servicename
):
12934 # map input types to rpc msg
12936 msg
= dict(Type
='Service', Request
='Destroy', Version
=3, Params
=params
)
12937 params
['ServiceName'] = servicename
12938 reply
= await self
.rpc(msg
)
12939 return self
._map
(reply
, Destroy
)
12943 #@ReturnMapping(None)
12944 async def DestroyRelation(self
, endpoints
):
12946 endpoints : typing.Sequence[str]
12949 # map input types to rpc msg
12951 msg
= dict(Type
='Service', Request
='DestroyRelation', Version
=3, Params
=params
)
12952 params
['Endpoints'] = endpoints
12953 reply
= await self
.rpc(msg
)
12954 return self
._map
(reply
, DestroyRelation
)
12958 #@ReturnMapping(None)
12959 async def DestroyUnits(self
, unitnames
):
12961 unitnames : typing.Sequence[str]
12964 # map input types to rpc msg
12966 msg
= dict(Type
='Service', Request
='DestroyUnits', Version
=3, Params
=params
)
12967 params
['UnitNames'] = unitnames
12968 reply
= await self
.rpc(msg
)
12969 return self
._map
(reply
, DestroyUnits
)
12973 #@ReturnMapping(None)
12974 async def Expose(self
, servicename
):
12979 # map input types to rpc msg
12981 msg
= dict(Type
='Service', Request
='Expose', Version
=3, Params
=params
)
12982 params
['ServiceName'] = servicename
12983 reply
= await self
.rpc(msg
)
12984 return self
._map
(reply
, Expose
)
12988 #@ReturnMapping(ServiceGetResults)
12989 async def Get(self
, servicename
):
12992 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], ~Value]
12994 # map input types to rpc msg
12996 msg
= dict(Type
='Service', Request
='Get', Version
=3, Params
=params
)
12997 params
['ServiceName'] = servicename
12998 reply
= await self
.rpc(msg
)
12999 return self
._map
(reply
, Get
)
13003 #@ReturnMapping(StringResult)
13004 async def GetCharmURL(self
, servicename
):
13007 Returns -> typing.Union[~Error, str]
13009 # map input types to rpc msg
13011 msg
= dict(Type
='Service', Request
='GetCharmURL', Version
=3, Params
=params
)
13012 params
['ServiceName'] = servicename
13013 reply
= await self
.rpc(msg
)
13014 return self
._map
(reply
, GetCharmURL
)
13018 #@ReturnMapping(GetConstraintsResults)
13019 async def GetConstraints(self
, servicename
):
13024 # map input types to rpc msg
13026 msg
= dict(Type
='Service', Request
='GetConstraints', Version
=3, Params
=params
)
13027 params
['ServiceName'] = servicename
13028 reply
= await self
.rpc(msg
)
13029 return self
._map
(reply
, GetConstraints
)
13033 #@ReturnMapping(None)
13034 async def Set(self
, options
, servicename
):
13036 options : typing.Mapping[str, str]
13040 # map input types to rpc msg
13042 msg
= dict(Type
='Service', Request
='Set', Version
=3, Params
=params
)
13043 params
['Options'] = options
13044 params
['ServiceName'] = servicename
13045 reply
= await self
.rpc(msg
)
13046 return self
._map
(reply
, Set
)
13050 #@ReturnMapping(None)
13051 async def SetCharm(self
, resourceids
, charmurl
, forceunits
, cs_channel
, servicename
, forceseries
):
13053 resourceids : typing.Mapping[str, str]
13061 # map input types to rpc msg
13063 msg
= dict(Type
='Service', Request
='SetCharm', Version
=3, Params
=params
)
13064 params
['resourceids'] = resourceids
13065 params
['charmurl'] = charmurl
13066 params
['forceunits'] = forceunits
13067 params
['cs-channel'] = cs_channel
13068 params
['servicename'] = servicename
13069 params
['forceseries'] = forceseries
13070 reply
= await self
.rpc(msg
)
13071 return self
._map
(reply
, SetCharm
)
13075 #@ReturnMapping(None)
13076 async def SetConstraints(self
, constraints
, servicename
):
13078 constraints : ~Value
13082 # map input types to rpc msg
13084 msg
= dict(Type
='Service', Request
='SetConstraints', Version
=3, Params
=params
)
13085 params
['Constraints'] = constraints
13086 params
['ServiceName'] = servicename
13087 reply
= await self
.rpc(msg
)
13088 return self
._map
(reply
, SetConstraints
)
13092 #@ReturnMapping(ErrorResults)
13093 async def SetMetricCredentials(self
, creds
):
13095 creds : typing.Sequence[~ServiceMetricCredential]
13096 Returns -> typing.Sequence[~ErrorResult]
13098 # map input types to rpc msg
13100 msg
= dict(Type
='Service', Request
='SetMetricCredentials', Version
=3, Params
=params
)
13101 params
['Creds'] = creds
13102 reply
= await self
.rpc(msg
)
13103 return self
._map
(reply
, SetMetricCredentials
)
13107 #@ReturnMapping(None)
13108 async def Unexpose(self
, servicename
):
13113 # map input types to rpc msg
13115 msg
= dict(Type
='Service', Request
='Unexpose', Version
=3, Params
=params
)
13116 params
['ServiceName'] = servicename
13117 reply
= await self
.rpc(msg
)
13118 return self
._map
(reply
, Unexpose
)
13122 #@ReturnMapping(None)
13123 async def Unset(self
, options
, servicename
):
13125 options : typing.Sequence[str]
13129 # map input types to rpc msg
13131 msg
= dict(Type
='Service', Request
='Unset', Version
=3, Params
=params
)
13132 params
['Options'] = options
13133 params
['ServiceName'] = servicename
13134 reply
= await self
.rpc(msg
)
13135 return self
._map
(reply
, Unset
)
13139 #@ReturnMapping(None)
13140 async def Update(self
, forceseries
, charmurl
, settingsstrings
, settingsyaml
, constraints
, servicename
, minunits
, forcecharmurl
):
13144 settingsstrings : typing.Mapping[str, str]
13146 constraints : ~Value
13149 forcecharmurl : bool
13152 # map input types to rpc msg
13154 msg
= dict(Type
='Service', Request
='Update', Version
=3, Params
=params
)
13155 params
['ForceSeries'] = forceseries
13156 params
['CharmUrl'] = charmurl
13157 params
['SettingsStrings'] = settingsstrings
13158 params
['SettingsYAML'] = settingsyaml
13159 params
['Constraints'] = constraints
13160 params
['ServiceName'] = servicename
13161 params
['MinUnits'] = minunits
13162 params
['ForceCharmUrl'] = forcecharmurl
13163 reply
= await self
.rpc(msg
)
13164 return self
._map
(reply
, Update
)
13167 class ServiceScaler(Type
):
13168 name
= 'ServiceScaler'
13170 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13171 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13173 'required': ['Entities'],
13175 'Entity': {'additionalProperties': False,
13176 'properties': {'Tag': {'type': 'string'}},
13177 'required': ['Tag'],
13179 'Error': {'additionalProperties': False,
13180 'properties': {'Code': {'type': 'string'},
13181 'Info': {'$ref': '#/definitions/ErrorInfo'},
13182 'Message': {'type': 'string'}},
13183 'required': ['Message', 'Code'],
13185 'ErrorInfo': {'additionalProperties': False,
13186 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13187 'MacaroonPath': {'type': 'string'}},
13189 'ErrorResult': {'additionalProperties': False,
13190 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13191 'required': ['Error'],
13193 'ErrorResults': {'additionalProperties': False,
13194 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13196 'required': ['Results'],
13198 'Macaroon': {'additionalProperties': False,
13199 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13201 'data': {'items': {'type': 'integer'},
13203 'id': {'$ref': '#/definitions/packet'},
13204 'location': {'$ref': '#/definitions/packet'},
13205 'sig': {'items': {'type': 'integer'},
13207 'required': ['data',
13213 'StringsWatchResult': {'additionalProperties': False,
13214 'properties': {'Changes': {'items': {'type': 'string'},
13216 'Error': {'$ref': '#/definitions/Error'},
13217 'StringsWatcherId': {'type': 'string'}},
13218 'required': ['StringsWatcherId',
13222 'caveat': {'additionalProperties': False,
13223 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13224 'location': {'$ref': '#/definitions/packet'},
13225 'verificationId': {'$ref': '#/definitions/packet'}},
13226 'required': ['location',
13230 'packet': {'additionalProperties': False,
13231 'properties': {'headerLen': {'type': 'integer'},
13232 'start': {'type': 'integer'},
13233 'totalLen': {'type': 'integer'}},
13234 'required': ['start', 'totalLen', 'headerLen'],
13235 'type': 'object'}},
13236 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13237 'Result': {'$ref': '#/definitions/ErrorResults'}},
13239 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
13240 'type': 'object'}},
13244 #@ReturnMapping(ErrorResults)
13245 async def Rescale(self
, entities
):
13247 entities : typing.Sequence[~Entity]
13248 Returns -> typing.Sequence[~ErrorResult]
13250 # map input types to rpc msg
13252 msg
= dict(Type
='ServiceScaler', Request
='Rescale', Version
=1, Params
=params
)
13253 params
['Entities'] = entities
13254 reply
= await self
.rpc(msg
)
13255 return self
._map
(reply
, Rescale
)
13259 #@ReturnMapping(StringsWatchResult)
13260 async def Watch(self
):
13263 Returns -> typing.Union[~Error, typing.Sequence[str]]
13265 # map input types to rpc msg
13267 msg
= dict(Type
='ServiceScaler', Request
='Watch', Version
=1, Params
=params
)
13269 reply
= await self
.rpc(msg
)
13270 return self
._map
(reply
, Watch
)
13273 class Singular(Type
):
13276 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13277 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13279 'required': ['Entities'],
13281 'Entity': {'additionalProperties': False,
13282 'properties': {'Tag': {'type': 'string'}},
13283 'required': ['Tag'],
13285 'Error': {'additionalProperties': False,
13286 'properties': {'Code': {'type': 'string'},
13287 'Info': {'$ref': '#/definitions/ErrorInfo'},
13288 'Message': {'type': 'string'}},
13289 'required': ['Message', 'Code'],
13291 'ErrorInfo': {'additionalProperties': False,
13292 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13293 'MacaroonPath': {'type': 'string'}},
13295 'ErrorResult': {'additionalProperties': False,
13296 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13297 'required': ['Error'],
13299 'ErrorResults': {'additionalProperties': False,
13300 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13302 'required': ['Results'],
13304 'Macaroon': {'additionalProperties': False,
13305 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13307 'data': {'items': {'type': 'integer'},
13309 'id': {'$ref': '#/definitions/packet'},
13310 'location': {'$ref': '#/definitions/packet'},
13311 'sig': {'items': {'type': 'integer'},
13313 'required': ['data',
13319 'SingularClaim': {'additionalProperties': False,
13320 'properties': {'ControllerTag': {'type': 'string'},
13321 'Duration': {'type': 'integer'},
13322 'ModelTag': {'type': 'string'}},
13323 'required': ['ModelTag',
13327 'SingularClaims': {'additionalProperties': False,
13328 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
13330 'required': ['Claims'],
13332 'caveat': {'additionalProperties': False,
13333 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13334 'location': {'$ref': '#/definitions/packet'},
13335 'verificationId': {'$ref': '#/definitions/packet'}},
13336 'required': ['location',
13340 'packet': {'additionalProperties': False,
13341 'properties': {'headerLen': {'type': 'integer'},
13342 'start': {'type': 'integer'},
13343 'totalLen': {'type': 'integer'}},
13344 'required': ['start', 'totalLen', 'headerLen'],
13345 'type': 'object'}},
13346 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
13347 'Result': {'$ref': '#/definitions/ErrorResults'}},
13349 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13350 'Result': {'$ref': '#/definitions/ErrorResults'}},
13351 'type': 'object'}},
13355 #@ReturnMapping(ErrorResults)
13356 async def Claim(self
, claims
):
13358 claims : typing.Sequence[~SingularClaim]
13359 Returns -> typing.Sequence[~ErrorResult]
13361 # map input types to rpc msg
13363 msg
= dict(Type
='Singular', Request
='Claim', Version
=1, Params
=params
)
13364 params
['Claims'] = claims
13365 reply
= await self
.rpc(msg
)
13366 return self
._map
(reply
, Claim
)
13370 #@ReturnMapping(ErrorResults)
13371 async def Wait(self
, entities
):
13373 entities : typing.Sequence[~Entity]
13374 Returns -> typing.Sequence[~ErrorResult]
13376 # map input types to rpc msg
13378 msg
= dict(Type
='Singular', Request
='Wait', Version
=1, Params
=params
)
13379 params
['Entities'] = entities
13380 reply
= await self
.rpc(msg
)
13381 return self
._map
(reply
, Wait
)
13384 class Spaces(Type
):
13387 schema
= {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
13388 'properties': {'ProviderId': {'type': 'string'},
13389 'Public': {'type': 'boolean'},
13390 'SpaceTag': {'type': 'string'},
13391 'SubnetTags': {'items': {'type': 'string'},
13393 'required': ['SubnetTags',
13397 'CreateSpacesParams': {'additionalProperties': False,
13398 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
13400 'required': ['Spaces'],
13402 'Error': {'additionalProperties': False,
13403 'properties': {'Code': {'type': 'string'},
13404 'Info': {'$ref': '#/definitions/ErrorInfo'},
13405 'Message': {'type': 'string'}},
13406 'required': ['Message', 'Code'],
13408 'ErrorInfo': {'additionalProperties': False,
13409 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13410 'MacaroonPath': {'type': 'string'}},
13412 'ErrorResult': {'additionalProperties': False,
13413 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13414 'required': ['Error'],
13416 'ErrorResults': {'additionalProperties': False,
13417 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13419 'required': ['Results'],
13421 'ListSpacesResults': {'additionalProperties': False,
13422 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
13424 'required': ['Results'],
13426 'Macaroon': {'additionalProperties': False,
13427 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13429 'data': {'items': {'type': 'integer'},
13431 'id': {'$ref': '#/definitions/packet'},
13432 'location': {'$ref': '#/definitions/packet'},
13433 'sig': {'items': {'type': 'integer'},
13435 'required': ['data',
13441 'Space': {'additionalProperties': False,
13442 'properties': {'Error': {'$ref': '#/definitions/Error'},
13443 'Name': {'type': 'string'},
13444 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
13446 'required': ['Name', 'Subnets'],
13448 'Subnet': {'additionalProperties': False,
13449 'properties': {'CIDR': {'type': 'string'},
13450 'Life': {'type': 'string'},
13451 'ProviderId': {'type': 'string'},
13452 'SpaceTag': {'type': 'string'},
13453 'StaticRangeHighIP': {'items': {'type': 'integer'},
13455 'StaticRangeLowIP': {'items': {'type': 'integer'},
13457 'Status': {'type': 'string'},
13458 'VLANTag': {'type': 'integer'},
13459 'Zones': {'items': {'type': 'string'},
13461 'required': ['CIDR',
13467 'caveat': {'additionalProperties': False,
13468 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13469 'location': {'$ref': '#/definitions/packet'},
13470 'verificationId': {'$ref': '#/definitions/packet'}},
13471 'required': ['location',
13475 'packet': {'additionalProperties': False,
13476 'properties': {'headerLen': {'type': 'integer'},
13477 'start': {'type': 'integer'},
13478 'totalLen': {'type': 'integer'}},
13479 'required': ['start', 'totalLen', 'headerLen'],
13480 'type': 'object'}},
13481 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
13482 'Result': {'$ref': '#/definitions/ErrorResults'}},
13484 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
13485 'type': 'object'}},
13489 #@ReturnMapping(ErrorResults)
13490 async def CreateSpaces(self
, spaces
):
13492 spaces : typing.Sequence[~CreateSpaceParams]
13493 Returns -> typing.Sequence[~ErrorResult]
13495 # map input types to rpc msg
13497 msg
= dict(Type
='Spaces', Request
='CreateSpaces', Version
=2, Params
=params
)
13498 params
['Spaces'] = spaces
13499 reply
= await self
.rpc(msg
)
13500 return self
._map
(reply
, CreateSpaces
)
13504 #@ReturnMapping(ListSpacesResults)
13505 async def ListSpaces(self
):
13508 Returns -> typing.Sequence[~Space]
13510 # map input types to rpc msg
13512 msg
= dict(Type
='Spaces', Request
='ListSpaces', Version
=2, Params
=params
)
13514 reply
= await self
.rpc(msg
)
13515 return self
._map
(reply
, ListSpaces
)
13518 class StatusHistory(Type
):
13519 name
= 'StatusHistory'
13521 schema
= {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
13522 'properties': {'MaxLogsPerEntity': {'type': 'integer'}},
13523 'required': ['MaxLogsPerEntity'],
13524 'type': 'object'}},
13525 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
13526 'type': 'object'}},
13530 #@ReturnMapping(None)
13531 async def Prune(self
, maxlogsperentity
):
13533 maxlogsperentity : int
13536 # map input types to rpc msg
13538 msg
= dict(Type
='StatusHistory', Request
='Prune', Version
=2, Params
=params
)
13539 params
['MaxLogsPerEntity'] = maxlogsperentity
13540 reply
= await self
.rpc(msg
)
13541 return self
._map
(reply
, Prune
)
13544 class Storage(Type
):
13547 schema
= {'definitions': {'Entities': {'additionalProperties': False,
13548 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13550 'required': ['Entities'],
13552 'Entity': {'additionalProperties': False,
13553 'properties': {'Tag': {'type': 'string'}},
13554 'required': ['Tag'],
13556 'EntityStatus': {'additionalProperties': False,
13557 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13558 'type': 'object'}},
13560 'Info': {'type': 'string'},
13561 'Since': {'format': 'date-time',
13563 'Status': {'type': 'string'}},
13564 'required': ['Status',
13569 'Error': {'additionalProperties': False,
13570 'properties': {'Code': {'type': 'string'},
13571 'Info': {'$ref': '#/definitions/ErrorInfo'},
13572 'Message': {'type': 'string'}},
13573 'required': ['Message', 'Code'],
13575 'ErrorInfo': {'additionalProperties': False,
13576 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13577 'MacaroonPath': {'type': 'string'}},
13579 'ErrorResult': {'additionalProperties': False,
13580 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13581 'required': ['Error'],
13583 'ErrorResults': {'additionalProperties': False,
13584 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13586 'required': ['Results'],
13588 'FilesystemAttachmentInfo': {'additionalProperties': False,
13589 'properties': {'mountpoint': {'type': 'string'},
13590 'read-only': {'type': 'boolean'}},
13592 'FilesystemDetails': {'additionalProperties': False,
13593 'properties': {'filesystemtag': {'type': 'string'},
13594 'info': {'$ref': '#/definitions/FilesystemInfo'},
13595 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
13597 'status': {'$ref': '#/definitions/EntityStatus'},
13598 'storage': {'$ref': '#/definitions/StorageDetails'},
13599 'volumetag': {'type': 'string'}},
13600 'required': ['filesystemtag',
13604 'FilesystemDetailsListResult': {'additionalProperties': False,
13605 'properties': {'error': {'$ref': '#/definitions/Error'},
13606 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
13609 'FilesystemDetailsListResults': {'additionalProperties': False,
13610 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
13613 'FilesystemFilter': {'additionalProperties': False,
13614 'properties': {'machines': {'items': {'type': 'string'},
13617 'FilesystemFilters': {'additionalProperties': False,
13618 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
13621 'FilesystemInfo': {'additionalProperties': False,
13622 'properties': {'filesystemid': {'type': 'string'},
13623 'size': {'type': 'integer'}},
13624 'required': ['filesystemid', 'size'],
13626 'Macaroon': {'additionalProperties': False,
13627 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13629 'data': {'items': {'type': 'integer'},
13631 'id': {'$ref': '#/definitions/packet'},
13632 'location': {'$ref': '#/definitions/packet'},
13633 'sig': {'items': {'type': 'integer'},
13635 'required': ['data',
13641 'StorageAddParams': {'additionalProperties': False,
13642 'properties': {'StorageName': {'type': 'string'},
13643 'storage': {'$ref': '#/definitions/StorageConstraints'},
13644 'unit': {'type': 'string'}},
13645 'required': ['unit',
13649 'StorageAttachmentDetails': {'additionalProperties': False,
13650 'properties': {'location': {'type': 'string'},
13651 'machinetag': {'type': 'string'},
13652 'storagetag': {'type': 'string'},
13653 'unittag': {'type': 'string'}},
13654 'required': ['storagetag',
13658 'StorageConstraints': {'additionalProperties': False,
13659 'properties': {'Count': {'type': 'integer'},
13660 'Pool': {'type': 'string'},
13661 'Size': {'type': 'integer'}},
13662 'required': ['Pool', 'Size', 'Count'],
13664 'StorageDetails': {'additionalProperties': False,
13665 'properties': {'Persistent': {'type': 'boolean'},
13666 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
13668 'kind': {'type': 'integer'},
13669 'ownertag': {'type': 'string'},
13670 'status': {'$ref': '#/definitions/EntityStatus'},
13671 'storagetag': {'type': 'string'}},
13672 'required': ['storagetag',
13678 'StorageDetailsListResult': {'additionalProperties': False,
13679 'properties': {'error': {'$ref': '#/definitions/Error'},
13680 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
13683 'StorageDetailsListResults': {'additionalProperties': False,
13684 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
13687 'StorageDetailsResult': {'additionalProperties': False,
13688 'properties': {'error': {'$ref': '#/definitions/Error'},
13689 'result': {'$ref': '#/definitions/StorageDetails'}},
13691 'StorageDetailsResults': {'additionalProperties': False,
13692 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
13695 'StorageFilter': {'additionalProperties': False,
13697 'StorageFilters': {'additionalProperties': False,
13698 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
13701 'StoragePool': {'additionalProperties': False,
13702 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
13703 'type': 'object'}},
13705 'name': {'type': 'string'},
13706 'provider': {'type': 'string'}},
13707 'required': ['name', 'provider', 'attrs'],
13709 'StoragePoolFilter': {'additionalProperties': False,
13710 'properties': {'names': {'items': {'type': 'string'},
13712 'providers': {'items': {'type': 'string'},
13715 'StoragePoolFilters': {'additionalProperties': False,
13716 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
13719 'StoragePoolsResult': {'additionalProperties': False,
13720 'properties': {'error': {'$ref': '#/definitions/Error'},
13721 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
13724 'StoragePoolsResults': {'additionalProperties': False,
13725 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
13728 'StoragesAddParams': {'additionalProperties': False,
13729 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
13731 'required': ['storages'],
13733 'VolumeAttachmentInfo': {'additionalProperties': False,
13734 'properties': {'busaddress': {'type': 'string'},
13735 'devicelink': {'type': 'string'},
13736 'devicename': {'type': 'string'},
13737 'read-only': {'type': 'boolean'}},
13739 'VolumeDetails': {'additionalProperties': False,
13740 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13741 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13743 'status': {'$ref': '#/definitions/EntityStatus'},
13744 'storage': {'$ref': '#/definitions/StorageDetails'},
13745 'volumetag': {'type': 'string'}},
13746 'required': ['volumetag', 'info', 'status'],
13748 'VolumeDetailsListResult': {'additionalProperties': False,
13749 'properties': {'error': {'$ref': '#/definitions/Error'},
13750 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
13753 'VolumeDetailsListResults': {'additionalProperties': False,
13754 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
13757 'VolumeFilter': {'additionalProperties': False,
13758 'properties': {'machines': {'items': {'type': 'string'},
13761 'VolumeFilters': {'additionalProperties': False,
13762 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
13765 'VolumeInfo': {'additionalProperties': False,
13766 'properties': {'hardwareid': {'type': 'string'},
13767 'persistent': {'type': 'boolean'},
13768 'size': {'type': 'integer'},
13769 'volumeid': {'type': 'string'}},
13770 'required': ['volumeid', 'size', 'persistent'],
13772 'caveat': {'additionalProperties': False,
13773 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13774 'location': {'$ref': '#/definitions/packet'},
13775 'verificationId': {'$ref': '#/definitions/packet'}},
13776 'required': ['location',
13780 'packet': {'additionalProperties': False,
13781 'properties': {'headerLen': {'type': 'integer'},
13782 'start': {'type': 'integer'},
13783 'totalLen': {'type': 'integer'}},
13784 'required': ['start', 'totalLen', 'headerLen'],
13785 'type': 'object'}},
13786 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
13787 'Result': {'$ref': '#/definitions/ErrorResults'}},
13789 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
13791 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
13792 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
13794 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
13795 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
13797 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
13798 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
13800 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
13801 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
13803 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13804 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
13805 'type': 'object'}},
13809 #@ReturnMapping(ErrorResults)
13810 async def AddToUnit(self
, storages
):
13812 storages : typing.Sequence[~StorageAddParams]
13813 Returns -> typing.Sequence[~ErrorResult]
13815 # map input types to rpc msg
13817 msg
= dict(Type
='Storage', Request
='AddToUnit', Version
=2, Params
=params
)
13818 params
['storages'] = storages
13819 reply
= await self
.rpc(msg
)
13820 return self
._map
(reply
, AddToUnit
)
13824 #@ReturnMapping(None)
13825 async def CreatePool(self
, name
, provider
, attrs
):
13829 attrs : typing.Mapping[str, typing.Any]
13832 # map input types to rpc msg
13834 msg
= dict(Type
='Storage', Request
='CreatePool', Version
=2, Params
=params
)
13835 params
['name'] = name
13836 params
['provider'] = provider
13837 params
['attrs'] = attrs
13838 reply
= await self
.rpc(msg
)
13839 return self
._map
(reply
, CreatePool
)
13843 #@ReturnMapping(FilesystemDetailsListResults)
13844 async def ListFilesystems(self
, filters
):
13846 filters : typing.Sequence[~FilesystemFilter]
13847 Returns -> typing.Sequence[~FilesystemDetailsListResult]
13849 # map input types to rpc msg
13851 msg
= dict(Type
='Storage', Request
='ListFilesystems', Version
=2, Params
=params
)
13852 params
['filters'] = filters
13853 reply
= await self
.rpc(msg
)
13854 return self
._map
(reply
, ListFilesystems
)
13858 #@ReturnMapping(StoragePoolsResults)
13859 async def ListPools(self
, filters
):
13861 filters : typing.Sequence[~StoragePoolFilter]
13862 Returns -> typing.Sequence[~StoragePoolsResult]
13864 # map input types to rpc msg
13866 msg
= dict(Type
='Storage', Request
='ListPools', Version
=2, Params
=params
)
13867 params
['filters'] = filters
13868 reply
= await self
.rpc(msg
)
13869 return self
._map
(reply
, ListPools
)
13873 #@ReturnMapping(StorageDetailsListResults)
13874 async def ListStorageDetails(self
, filters
):
13876 filters : typing.Sequence[~StorageFilter]
13877 Returns -> typing.Sequence[~StorageDetailsListResult]
13879 # map input types to rpc msg
13881 msg
= dict(Type
='Storage', Request
='ListStorageDetails', Version
=2, Params
=params
)
13882 params
['filters'] = filters
13883 reply
= await self
.rpc(msg
)
13884 return self
._map
(reply
, ListStorageDetails
)
13888 #@ReturnMapping(VolumeDetailsListResults)
13889 async def ListVolumes(self
, filters
):
13891 filters : typing.Sequence[~VolumeFilter]
13892 Returns -> typing.Sequence[~VolumeDetailsListResult]
13894 # map input types to rpc msg
13896 msg
= dict(Type
='Storage', Request
='ListVolumes', Version
=2, Params
=params
)
13897 params
['filters'] = filters
13898 reply
= await self
.rpc(msg
)
13899 return self
._map
(reply
, ListVolumes
)
13903 #@ReturnMapping(StorageDetailsResults)
13904 async def StorageDetails(self
, entities
):
13906 entities : typing.Sequence[~Entity]
13907 Returns -> typing.Sequence[~StorageDetailsResult]
13909 # map input types to rpc msg
13911 msg
= dict(Type
='Storage', Request
='StorageDetails', Version
=2, Params
=params
)
13912 params
['Entities'] = entities
13913 reply
= await self
.rpc(msg
)
13914 return self
._map
(reply
, StorageDetails
)
13917 class StorageProvisioner(Type
):
13918 name
= 'StorageProvisioner'
13920 schema
= {'definitions': {'BlockDevice': {'additionalProperties': False,
13921 'properties': {'BusAddress': {'type': 'string'},
13922 'DeviceLinks': {'items': {'type': 'string'},
13924 'DeviceName': {'type': 'string'},
13925 'FilesystemType': {'type': 'string'},
13926 'HardwareId': {'type': 'string'},
13927 'InUse': {'type': 'boolean'},
13928 'Label': {'type': 'string'},
13929 'MountPoint': {'type': 'string'},
13930 'Size': {'type': 'integer'},
13931 'UUID': {'type': 'string'}},
13932 'required': ['DeviceName',
13943 'BlockDeviceResult': {'additionalProperties': False,
13944 'properties': {'error': {'$ref': '#/definitions/Error'},
13945 'result': {'$ref': '#/definitions/BlockDevice'}},
13946 'required': ['result'],
13948 'BlockDeviceResults': {'additionalProperties': False,
13949 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
13952 'Entities': {'additionalProperties': False,
13953 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13955 'required': ['Entities'],
13957 'Entity': {'additionalProperties': False,
13958 'properties': {'Tag': {'type': 'string'}},
13959 'required': ['Tag'],
13961 'EntityStatusArgs': {'additionalProperties': False,
13962 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13963 'type': 'object'}},
13965 'Info': {'type': 'string'},
13966 'Status': {'type': 'string'},
13967 'Tag': {'type': 'string'}},
13968 'required': ['Tag',
13973 'Error': {'additionalProperties': False,
13974 'properties': {'Code': {'type': 'string'},
13975 'Info': {'$ref': '#/definitions/ErrorInfo'},
13976 'Message': {'type': 'string'}},
13977 'required': ['Message', 'Code'],
13979 'ErrorInfo': {'additionalProperties': False,
13980 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13981 'MacaroonPath': {'type': 'string'}},
13983 'ErrorResult': {'additionalProperties': False,
13984 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13985 'required': ['Error'],
13987 'ErrorResults': {'additionalProperties': False,
13988 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13990 'required': ['Results'],
13992 'Filesystem': {'additionalProperties': False,
13993 'properties': {'filesystemtag': {'type': 'string'},
13994 'info': {'$ref': '#/definitions/FilesystemInfo'},
13995 'volumetag': {'type': 'string'}},
13996 'required': ['filesystemtag', 'info'],
13998 'FilesystemAttachment': {'additionalProperties': False,
13999 'properties': {'filesystemtag': {'type': 'string'},
14000 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
14001 'machinetag': {'type': 'string'}},
14002 'required': ['filesystemtag',
14006 'FilesystemAttachmentInfo': {'additionalProperties': False,
14007 'properties': {'mountpoint': {'type': 'string'},
14008 'read-only': {'type': 'boolean'}},
14010 'FilesystemAttachmentParams': {'additionalProperties': False,
14011 'properties': {'filesystemid': {'type': 'string'},
14012 'filesystemtag': {'type': 'string'},
14013 'instanceid': {'type': 'string'},
14014 'machinetag': {'type': 'string'},
14015 'mountpoint': {'type': 'string'},
14016 'provider': {'type': 'string'},
14017 'read-only': {'type': 'boolean'}},
14018 'required': ['filesystemtag',
14022 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
14023 'properties': {'error': {'$ref': '#/definitions/Error'},
14024 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
14025 'required': ['result'],
14027 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
14028 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
14031 'FilesystemAttachmentResult': {'additionalProperties': False,
14032 'properties': {'error': {'$ref': '#/definitions/Error'},
14033 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
14034 'required': ['result'],
14036 'FilesystemAttachmentResults': {'additionalProperties': False,
14037 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
14040 'FilesystemAttachments': {'additionalProperties': False,
14041 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
14043 'required': ['filesystemattachments'],
14045 'FilesystemInfo': {'additionalProperties': False,
14046 'properties': {'filesystemid': {'type': 'string'},
14047 'size': {'type': 'integer'}},
14048 'required': ['filesystemid', 'size'],
14050 'FilesystemParams': {'additionalProperties': False,
14051 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
14052 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14053 'type': 'object'}},
14055 'filesystemtag': {'type': 'string'},
14056 'provider': {'type': 'string'},
14057 'size': {'type': 'integer'},
14058 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14060 'volumetag': {'type': 'string'}},
14061 'required': ['filesystemtag',
14065 'FilesystemParamsResult': {'additionalProperties': False,
14066 'properties': {'error': {'$ref': '#/definitions/Error'},
14067 'result': {'$ref': '#/definitions/FilesystemParams'}},
14068 'required': ['result'],
14070 'FilesystemParamsResults': {'additionalProperties': False,
14071 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
14074 'FilesystemResult': {'additionalProperties': False,
14075 'properties': {'error': {'$ref': '#/definitions/Error'},
14076 'result': {'$ref': '#/definitions/Filesystem'}},
14077 'required': ['result'],
14079 'FilesystemResults': {'additionalProperties': False,
14080 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
14083 'Filesystems': {'additionalProperties': False,
14084 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
14086 'required': ['filesystems'],
14088 'LifeResult': {'additionalProperties': False,
14089 'properties': {'Error': {'$ref': '#/definitions/Error'},
14090 'Life': {'type': 'string'}},
14091 'required': ['Life', 'Error'],
14093 'LifeResults': {'additionalProperties': False,
14094 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
14096 'required': ['Results'],
14098 'Macaroon': {'additionalProperties': False,
14099 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14101 'data': {'items': {'type': 'integer'},
14103 'id': {'$ref': '#/definitions/packet'},
14104 'location': {'$ref': '#/definitions/packet'},
14105 'sig': {'items': {'type': 'integer'},
14107 'required': ['data',
14113 'MachineStorageId': {'additionalProperties': False,
14114 'properties': {'attachmenttag': {'type': 'string'},
14115 'machinetag': {'type': 'string'}},
14116 'required': ['machinetag',
14119 'MachineStorageIds': {'additionalProperties': False,
14120 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
14122 'required': ['ids'],
14124 'MachineStorageIdsWatchResult': {'additionalProperties': False,
14125 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
14127 'Error': {'$ref': '#/definitions/Error'},
14128 'MachineStorageIdsWatcherId': {'type': 'string'}},
14129 'required': ['MachineStorageIdsWatcherId',
14133 'MachineStorageIdsWatchResults': {'additionalProperties': False,
14134 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
14136 'required': ['Results'],
14138 'ModelConfigResult': {'additionalProperties': False,
14139 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
14140 'type': 'object'}},
14141 'type': 'object'}},
14142 'required': ['Config'],
14144 'NotifyWatchResult': {'additionalProperties': False,
14145 'properties': {'Error': {'$ref': '#/definitions/Error'},
14146 'NotifyWatcherId': {'type': 'string'}},
14147 'required': ['NotifyWatcherId', 'Error'],
14149 'NotifyWatchResults': {'additionalProperties': False,
14150 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14152 'required': ['Results'],
14154 'SetStatus': {'additionalProperties': False,
14155 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
14157 'required': ['Entities'],
14159 'StringResult': {'additionalProperties': False,
14160 'properties': {'Error': {'$ref': '#/definitions/Error'},
14161 'Result': {'type': 'string'}},
14162 'required': ['Error', 'Result'],
14164 'StringResults': {'additionalProperties': False,
14165 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
14167 'required': ['Results'],
14169 'StringsWatchResult': {'additionalProperties': False,
14170 'properties': {'Changes': {'items': {'type': 'string'},
14172 'Error': {'$ref': '#/definitions/Error'},
14173 'StringsWatcherId': {'type': 'string'}},
14174 'required': ['StringsWatcherId',
14178 'StringsWatchResults': {'additionalProperties': False,
14179 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
14181 'required': ['Results'],
14183 'Volume': {'additionalProperties': False,
14184 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
14185 'volumetag': {'type': 'string'}},
14186 'required': ['volumetag', 'info'],
14188 'VolumeAttachment': {'additionalProperties': False,
14189 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
14190 'machinetag': {'type': 'string'},
14191 'volumetag': {'type': 'string'}},
14192 'required': ['volumetag',
14196 'VolumeAttachmentInfo': {'additionalProperties': False,
14197 'properties': {'busaddress': {'type': 'string'},
14198 'devicelink': {'type': 'string'},
14199 'devicename': {'type': 'string'},
14200 'read-only': {'type': 'boolean'}},
14202 'VolumeAttachmentParams': {'additionalProperties': False,
14203 'properties': {'instanceid': {'type': 'string'},
14204 'machinetag': {'type': 'string'},
14205 'provider': {'type': 'string'},
14206 'read-only': {'type': 'boolean'},
14207 'volumeid': {'type': 'string'},
14208 'volumetag': {'type': 'string'}},
14209 'required': ['volumetag',
14213 'VolumeAttachmentParamsResult': {'additionalProperties': False,
14214 'properties': {'error': {'$ref': '#/definitions/Error'},
14215 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
14216 'required': ['result'],
14218 'VolumeAttachmentParamsResults': {'additionalProperties': False,
14219 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
14222 'VolumeAttachmentResult': {'additionalProperties': False,
14223 'properties': {'error': {'$ref': '#/definitions/Error'},
14224 'result': {'$ref': '#/definitions/VolumeAttachment'}},
14225 'required': ['result'],
14227 'VolumeAttachmentResults': {'additionalProperties': False,
14228 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
14231 'VolumeAttachments': {'additionalProperties': False,
14232 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
14234 'required': ['volumeattachments'],
14236 'VolumeInfo': {'additionalProperties': False,
14237 'properties': {'hardwareid': {'type': 'string'},
14238 'persistent': {'type': 'boolean'},
14239 'size': {'type': 'integer'},
14240 'volumeid': {'type': 'string'}},
14241 'required': ['volumeid', 'size', 'persistent'],
14243 'VolumeParams': {'additionalProperties': False,
14244 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14245 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14246 'type': 'object'}},
14248 'provider': {'type': 'string'},
14249 'size': {'type': 'integer'},
14250 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14252 'volumetag': {'type': 'string'}},
14253 'required': ['volumetag', 'size', 'provider'],
14255 'VolumeParamsResult': {'additionalProperties': False,
14256 'properties': {'error': {'$ref': '#/definitions/Error'},
14257 'result': {'$ref': '#/definitions/VolumeParams'}},
14258 'required': ['result'],
14260 'VolumeParamsResults': {'additionalProperties': False,
14261 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
14264 'VolumeResult': {'additionalProperties': False,
14265 'properties': {'error': {'$ref': '#/definitions/Error'},
14266 'result': {'$ref': '#/definitions/Volume'}},
14267 'required': ['result'],
14269 'VolumeResults': {'additionalProperties': False,
14270 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
14273 'Volumes': {'additionalProperties': False,
14274 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
14276 'required': ['volumes'],
14278 'caveat': {'additionalProperties': False,
14279 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14280 'location': {'$ref': '#/definitions/packet'},
14281 'verificationId': {'$ref': '#/definitions/packet'}},
14282 'required': ['location',
14286 'packet': {'additionalProperties': False,
14287 'properties': {'headerLen': {'type': 'integer'},
14288 'start': {'type': 'integer'},
14289 'totalLen': {'type': 'integer'}},
14290 'required': ['start', 'totalLen', 'headerLen'],
14291 'type': 'object'}},
14292 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14293 'Result': {'$ref': '#/definitions/LifeResults'}},
14295 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14296 'Result': {'$ref': '#/definitions/ErrorResults'}},
14298 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14299 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
14301 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14302 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
14304 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14305 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
14307 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14308 'Result': {'$ref': '#/definitions/FilesystemResults'}},
14310 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14311 'Result': {'$ref': '#/definitions/StringResults'}},
14313 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14314 'Result': {'$ref': '#/definitions/LifeResults'}},
14316 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14318 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14319 'Result': {'$ref': '#/definitions/ErrorResults'}},
14321 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14322 'Result': {'$ref': '#/definitions/ErrorResults'}},
14324 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
14325 'Result': {'$ref': '#/definitions/ErrorResults'}},
14327 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
14328 'Result': {'$ref': '#/definitions/ErrorResults'}},
14330 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14331 'Result': {'$ref': '#/definitions/ErrorResults'}},
14333 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
14334 'Result': {'$ref': '#/definitions/ErrorResults'}},
14336 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
14337 'Result': {'$ref': '#/definitions/ErrorResults'}},
14339 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14340 'Result': {'$ref': '#/definitions/ErrorResults'}},
14342 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14343 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
14345 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14346 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
14348 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14349 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
14351 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14352 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
14354 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14355 'Result': {'$ref': '#/definitions/VolumeResults'}},
14357 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14358 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14360 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14361 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
14363 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14364 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14366 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14368 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14369 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14371 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14372 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
14374 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14375 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14376 'type': 'object'}},
14380 #@ReturnMapping(LifeResults)
14381 async def AttachmentLife(self
, ids
):
14383 ids : typing.Sequence[~MachineStorageId]
14384 Returns -> typing.Sequence[~LifeResult]
14386 # map input types to rpc msg
14388 msg
= dict(Type
='StorageProvisioner', Request
='AttachmentLife', Version
=2, Params
=params
)
14389 params
['ids'] = ids
14390 reply
= await self
.rpc(msg
)
14391 return self
._map
(reply
, AttachmentLife
)
14395 #@ReturnMapping(ErrorResults)
14396 async def EnsureDead(self
, entities
):
14398 entities : typing.Sequence[~Entity]
14399 Returns -> typing.Sequence[~ErrorResult]
14401 # map input types to rpc msg
14403 msg
= dict(Type
='StorageProvisioner', Request
='EnsureDead', Version
=2, Params
=params
)
14404 params
['Entities'] = entities
14405 reply
= await self
.rpc(msg
)
14406 return self
._map
(reply
, EnsureDead
)
14410 #@ReturnMapping(FilesystemAttachmentParamsResults)
14411 async def FilesystemAttachmentParams(self
, ids
):
14413 ids : typing.Sequence[~MachineStorageId]
14414 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
14416 # map input types to rpc msg
14418 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachmentParams', Version
=2, Params
=params
)
14419 params
['ids'] = ids
14420 reply
= await self
.rpc(msg
)
14421 return self
._map
(reply
, FilesystemAttachmentParams
)
14425 #@ReturnMapping(FilesystemAttachmentResults)
14426 async def FilesystemAttachments(self
, ids
):
14428 ids : typing.Sequence[~MachineStorageId]
14429 Returns -> typing.Sequence[~FilesystemAttachmentResult]
14431 # map input types to rpc msg
14433 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemAttachments', Version
=2, Params
=params
)
14434 params
['ids'] = ids
14435 reply
= await self
.rpc(msg
)
14436 return self
._map
(reply
, FilesystemAttachments
)
14440 #@ReturnMapping(FilesystemParamsResults)
14441 async def FilesystemParams(self
, entities
):
14443 entities : typing.Sequence[~Entity]
14444 Returns -> typing.Sequence[~FilesystemParamsResult]
14446 # map input types to rpc msg
14448 msg
= dict(Type
='StorageProvisioner', Request
='FilesystemParams', Version
=2, Params
=params
)
14449 params
['Entities'] = entities
14450 reply
= await self
.rpc(msg
)
14451 return self
._map
(reply
, FilesystemParams
)
14455 #@ReturnMapping(FilesystemResults)
14456 async def Filesystems(self
, entities
):
14458 entities : typing.Sequence[~Entity]
14459 Returns -> typing.Sequence[~FilesystemResult]
14461 # map input types to rpc msg
14463 msg
= dict(Type
='StorageProvisioner', Request
='Filesystems', Version
=2, Params
=params
)
14464 params
['Entities'] = entities
14465 reply
= await self
.rpc(msg
)
14466 return self
._map
(reply
, Filesystems
)
14470 #@ReturnMapping(StringResults)
14471 async def InstanceId(self
, entities
):
14473 entities : typing.Sequence[~Entity]
14474 Returns -> typing.Sequence[~StringResult]
14476 # map input types to rpc msg
14478 msg
= dict(Type
='StorageProvisioner', Request
='InstanceId', Version
=2, Params
=params
)
14479 params
['Entities'] = entities
14480 reply
= await self
.rpc(msg
)
14481 return self
._map
(reply
, InstanceId
)
14485 #@ReturnMapping(LifeResults)
14486 async def Life(self
, entities
):
14488 entities : typing.Sequence[~Entity]
14489 Returns -> typing.Sequence[~LifeResult]
14491 # map input types to rpc msg
14493 msg
= dict(Type
='StorageProvisioner', Request
='Life', Version
=2, Params
=params
)
14494 params
['Entities'] = entities
14495 reply
= await self
.rpc(msg
)
14496 return self
._map
(reply
, Life
)
14500 #@ReturnMapping(ModelConfigResult)
14501 async def ModelConfig(self
):
14504 Returns -> typing.Mapping[str, typing.Any]
14506 # map input types to rpc msg
14508 msg
= dict(Type
='StorageProvisioner', Request
='ModelConfig', Version
=2, Params
=params
)
14510 reply
= await self
.rpc(msg
)
14511 return self
._map
(reply
, ModelConfig
)
14515 #@ReturnMapping(ErrorResults)
14516 async def Remove(self
, entities
):
14518 entities : typing.Sequence[~Entity]
14519 Returns -> typing.Sequence[~ErrorResult]
14521 # map input types to rpc msg
14523 msg
= dict(Type
='StorageProvisioner', Request
='Remove', Version
=2, Params
=params
)
14524 params
['Entities'] = entities
14525 reply
= await self
.rpc(msg
)
14526 return self
._map
(reply
, Remove
)
14530 #@ReturnMapping(ErrorResults)
14531 async def RemoveAttachment(self
, ids
):
14533 ids : typing.Sequence[~MachineStorageId]
14534 Returns -> typing.Sequence[~ErrorResult]
14536 # map input types to rpc msg
14538 msg
= dict(Type
='StorageProvisioner', Request
='RemoveAttachment', Version
=2, Params
=params
)
14539 params
['ids'] = ids
14540 reply
= await self
.rpc(msg
)
14541 return self
._map
(reply
, RemoveAttachment
)
14545 #@ReturnMapping(ErrorResults)
14546 async def SetFilesystemAttachmentInfo(self
, filesystemattachments
):
14548 filesystemattachments : typing.Sequence[~FilesystemAttachment]
14549 Returns -> typing.Sequence[~ErrorResult]
14551 # map input types to rpc msg
14553 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemAttachmentInfo', Version
=2, Params
=params
)
14554 params
['filesystemattachments'] = filesystemattachments
14555 reply
= await self
.rpc(msg
)
14556 return self
._map
(reply
, SetFilesystemAttachmentInfo
)
14560 #@ReturnMapping(ErrorResults)
14561 async def SetFilesystemInfo(self
, filesystems
):
14563 filesystems : typing.Sequence[~Filesystem]
14564 Returns -> typing.Sequence[~ErrorResult]
14566 # map input types to rpc msg
14568 msg
= dict(Type
='StorageProvisioner', Request
='SetFilesystemInfo', Version
=2, Params
=params
)
14569 params
['filesystems'] = filesystems
14570 reply
= await self
.rpc(msg
)
14571 return self
._map
(reply
, SetFilesystemInfo
)
14575 #@ReturnMapping(ErrorResults)
14576 async def SetStatus(self
, entities
):
14578 entities : typing.Sequence[~EntityStatusArgs]
14579 Returns -> typing.Sequence[~ErrorResult]
14581 # map input types to rpc msg
14583 msg
= dict(Type
='StorageProvisioner', Request
='SetStatus', Version
=2, Params
=params
)
14584 params
['Entities'] = entities
14585 reply
= await self
.rpc(msg
)
14586 return self
._map
(reply
, SetStatus
)
14590 #@ReturnMapping(ErrorResults)
14591 async def SetVolumeAttachmentInfo(self
, volumeattachments
):
14593 volumeattachments : typing.Sequence[~VolumeAttachment]
14594 Returns -> typing.Sequence[~ErrorResult]
14596 # map input types to rpc msg
14598 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeAttachmentInfo', Version
=2, Params
=params
)
14599 params
['volumeattachments'] = volumeattachments
14600 reply
= await self
.rpc(msg
)
14601 return self
._map
(reply
, SetVolumeAttachmentInfo
)
14605 #@ReturnMapping(ErrorResults)
14606 async def SetVolumeInfo(self
, volumes
):
14608 volumes : typing.Sequence[~Volume]
14609 Returns -> typing.Sequence[~ErrorResult]
14611 # map input types to rpc msg
14613 msg
= dict(Type
='StorageProvisioner', Request
='SetVolumeInfo', Version
=2, Params
=params
)
14614 params
['volumes'] = volumes
14615 reply
= await self
.rpc(msg
)
14616 return self
._map
(reply
, SetVolumeInfo
)
14620 #@ReturnMapping(ErrorResults)
14621 async def UpdateStatus(self
, entities
):
14623 entities : typing.Sequence[~EntityStatusArgs]
14624 Returns -> typing.Sequence[~ErrorResult]
14626 # map input types to rpc msg
14628 msg
= dict(Type
='StorageProvisioner', Request
='UpdateStatus', Version
=2, Params
=params
)
14629 params
['Entities'] = entities
14630 reply
= await self
.rpc(msg
)
14631 return self
._map
(reply
, UpdateStatus
)
14635 #@ReturnMapping(VolumeAttachmentParamsResults)
14636 async def VolumeAttachmentParams(self
, ids
):
14638 ids : typing.Sequence[~MachineStorageId]
14639 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
14641 # map input types to rpc msg
14643 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachmentParams', Version
=2, Params
=params
)
14644 params
['ids'] = ids
14645 reply
= await self
.rpc(msg
)
14646 return self
._map
(reply
, VolumeAttachmentParams
)
14650 #@ReturnMapping(VolumeAttachmentResults)
14651 async def VolumeAttachments(self
, ids
):
14653 ids : typing.Sequence[~MachineStorageId]
14654 Returns -> typing.Sequence[~VolumeAttachmentResult]
14656 # map input types to rpc msg
14658 msg
= dict(Type
='StorageProvisioner', Request
='VolumeAttachments', Version
=2, Params
=params
)
14659 params
['ids'] = ids
14660 reply
= await self
.rpc(msg
)
14661 return self
._map
(reply
, VolumeAttachments
)
14665 #@ReturnMapping(BlockDeviceResults)
14666 async def VolumeBlockDevices(self
, ids
):
14668 ids : typing.Sequence[~MachineStorageId]
14669 Returns -> typing.Sequence[~BlockDeviceResult]
14671 # map input types to rpc msg
14673 msg
= dict(Type
='StorageProvisioner', Request
='VolumeBlockDevices', Version
=2, Params
=params
)
14674 params
['ids'] = ids
14675 reply
= await self
.rpc(msg
)
14676 return self
._map
(reply
, VolumeBlockDevices
)
14680 #@ReturnMapping(VolumeParamsResults)
14681 async def VolumeParams(self
, entities
):
14683 entities : typing.Sequence[~Entity]
14684 Returns -> typing.Sequence[~VolumeParamsResult]
14686 # map input types to rpc msg
14688 msg
= dict(Type
='StorageProvisioner', Request
='VolumeParams', Version
=2, Params
=params
)
14689 params
['Entities'] = entities
14690 reply
= await self
.rpc(msg
)
14691 return self
._map
(reply
, VolumeParams
)
14695 #@ReturnMapping(VolumeResults)
14696 async def Volumes(self
, entities
):
14698 entities : typing.Sequence[~Entity]
14699 Returns -> typing.Sequence[~VolumeResult]
14701 # map input types to rpc msg
14703 msg
= dict(Type
='StorageProvisioner', Request
='Volumes', Version
=2, Params
=params
)
14704 params
['Entities'] = entities
14705 reply
= await self
.rpc(msg
)
14706 return self
._map
(reply
, Volumes
)
14710 #@ReturnMapping(NotifyWatchResults)
14711 async def WatchBlockDevices(self
, entities
):
14713 entities : typing.Sequence[~Entity]
14714 Returns -> typing.Sequence[~NotifyWatchResult]
14716 # map input types to rpc msg
14718 msg
= dict(Type
='StorageProvisioner', Request
='WatchBlockDevices', Version
=2, Params
=params
)
14719 params
['Entities'] = entities
14720 reply
= await self
.rpc(msg
)
14721 return self
._map
(reply
, WatchBlockDevices
)
14725 #@ReturnMapping(MachineStorageIdsWatchResults)
14726 async def WatchFilesystemAttachments(self
, entities
):
14728 entities : typing.Sequence[~Entity]
14729 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
14731 # map input types to rpc msg
14733 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystemAttachments', Version
=2, Params
=params
)
14734 params
['Entities'] = entities
14735 reply
= await self
.rpc(msg
)
14736 return self
._map
(reply
, WatchFilesystemAttachments
)
14740 #@ReturnMapping(StringsWatchResults)
14741 async def WatchFilesystems(self
, entities
):
14743 entities : typing.Sequence[~Entity]
14744 Returns -> typing.Sequence[~StringsWatchResult]
14746 # map input types to rpc msg
14748 msg
= dict(Type
='StorageProvisioner', Request
='WatchFilesystems', Version
=2, Params
=params
)
14749 params
['Entities'] = entities
14750 reply
= await self
.rpc(msg
)
14751 return self
._map
(reply
, WatchFilesystems
)
14755 #@ReturnMapping(NotifyWatchResult)
14756 async def WatchForModelConfigChanges(self
):
14759 Returns -> typing.Union[~Error, str]
14761 # map input types to rpc msg
14763 msg
= dict(Type
='StorageProvisioner', Request
='WatchForModelConfigChanges', Version
=2, Params
=params
)
14765 reply
= await self
.rpc(msg
)
14766 return self
._map
(reply
, WatchForModelConfigChanges
)
14770 #@ReturnMapping(NotifyWatchResults)
14771 async def WatchMachines(self
, entities
):
14773 entities : typing.Sequence[~Entity]
14774 Returns -> typing.Sequence[~NotifyWatchResult]
14776 # map input types to rpc msg
14778 msg
= dict(Type
='StorageProvisioner', Request
='WatchMachines', Version
=2, Params
=params
)
14779 params
['Entities'] = entities
14780 reply
= await self
.rpc(msg
)
14781 return self
._map
(reply
, WatchMachines
)
14785 #@ReturnMapping(MachineStorageIdsWatchResults)
14786 async def WatchVolumeAttachments(self
, entities
):
14788 entities : typing.Sequence[~Entity]
14789 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
14791 # map input types to rpc msg
14793 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumeAttachments', Version
=2, Params
=params
)
14794 params
['Entities'] = entities
14795 reply
= await self
.rpc(msg
)
14796 return self
._map
(reply
, WatchVolumeAttachments
)
14800 #@ReturnMapping(StringsWatchResults)
14801 async def WatchVolumes(self
, entities
):
14803 entities : typing.Sequence[~Entity]
14804 Returns -> typing.Sequence[~StringsWatchResult]
14806 # map input types to rpc msg
14808 msg
= dict(Type
='StorageProvisioner', Request
='WatchVolumes', Version
=2, Params
=params
)
14809 params
['Entities'] = entities
14810 reply
= await self
.rpc(msg
)
14811 return self
._map
(reply
, WatchVolumes
)
14814 class StringsWatcher(Type
):
14815 name
= 'StringsWatcher'
14817 schema
= {'definitions': {'Error': {'additionalProperties': False,
14818 'properties': {'Code': {'type': 'string'},
14819 'Info': {'$ref': '#/definitions/ErrorInfo'},
14820 'Message': {'type': 'string'}},
14821 'required': ['Message', 'Code'],
14823 'ErrorInfo': {'additionalProperties': False,
14824 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14825 'MacaroonPath': {'type': 'string'}},
14827 'Macaroon': {'additionalProperties': False,
14828 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14830 'data': {'items': {'type': 'integer'},
14832 'id': {'$ref': '#/definitions/packet'},
14833 'location': {'$ref': '#/definitions/packet'},
14834 'sig': {'items': {'type': 'integer'},
14836 'required': ['data',
14842 'StringsWatchResult': {'additionalProperties': False,
14843 'properties': {'Changes': {'items': {'type': 'string'},
14845 'Error': {'$ref': '#/definitions/Error'},
14846 'StringsWatcherId': {'type': 'string'}},
14847 'required': ['StringsWatcherId',
14851 'caveat': {'additionalProperties': False,
14852 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14853 'location': {'$ref': '#/definitions/packet'},
14854 'verificationId': {'$ref': '#/definitions/packet'}},
14855 'required': ['location',
14859 'packet': {'additionalProperties': False,
14860 'properties': {'headerLen': {'type': 'integer'},
14861 'start': {'type': 'integer'},
14862 'totalLen': {'type': 'integer'}},
14863 'required': ['start', 'totalLen', 'headerLen'],
14864 'type': 'object'}},
14865 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
14867 'Stop': {'type': 'object'}},
14871 #@ReturnMapping(StringsWatchResult)
14872 async def Next(self
):
14875 Returns -> typing.Union[~Error, typing.Sequence[str]]
14877 # map input types to rpc msg
14879 msg
= dict(Type
='StringsWatcher', Request
='Next', Version
=1, Params
=params
)
14881 reply
= await self
.rpc(msg
)
14882 return self
._map
(reply
, Next
)
14886 #@ReturnMapping(None)
14887 async def Stop(self
):
14892 # map input types to rpc msg
14894 msg
= dict(Type
='StringsWatcher', Request
='Stop', Version
=1, Params
=params
)
14896 reply
= await self
.rpc(msg
)
14897 return self
._map
(reply
, Stop
)
14900 class Subnets(Type
):
14903 schema
= {'definitions': {'AddSubnetParams': {'additionalProperties': False,
14904 'properties': {'SpaceTag': {'type': 'string'},
14905 'SubnetProviderId': {'type': 'string'},
14906 'SubnetTag': {'type': 'string'},
14907 'Zones': {'items': {'type': 'string'},
14909 'required': ['SpaceTag'],
14911 'AddSubnetsParams': {'additionalProperties': False,
14912 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
14914 'required': ['Subnets'],
14916 'Error': {'additionalProperties': False,
14917 'properties': {'Code': {'type': 'string'},
14918 'Info': {'$ref': '#/definitions/ErrorInfo'},
14919 'Message': {'type': 'string'}},
14920 'required': ['Message', 'Code'],
14922 'ErrorInfo': {'additionalProperties': False,
14923 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14924 'MacaroonPath': {'type': 'string'}},
14926 'ErrorResult': {'additionalProperties': False,
14927 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14928 'required': ['Error'],
14930 'ErrorResults': {'additionalProperties': False,
14931 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14933 'required': ['Results'],
14935 'ListSubnetsResults': {'additionalProperties': False,
14936 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
14938 'required': ['Results'],
14940 'Macaroon': {'additionalProperties': False,
14941 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14943 'data': {'items': {'type': 'integer'},
14945 'id': {'$ref': '#/definitions/packet'},
14946 'location': {'$ref': '#/definitions/packet'},
14947 'sig': {'items': {'type': 'integer'},
14949 'required': ['data',
14955 'SpaceResult': {'additionalProperties': False,
14956 'properties': {'Error': {'$ref': '#/definitions/Error'},
14957 'Tag': {'type': 'string'}},
14958 'required': ['Error', 'Tag'],
14960 'SpaceResults': {'additionalProperties': False,
14961 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
14963 'required': ['Results'],
14965 'Subnet': {'additionalProperties': False,
14966 'properties': {'CIDR': {'type': 'string'},
14967 'Life': {'type': 'string'},
14968 'ProviderId': {'type': 'string'},
14969 'SpaceTag': {'type': 'string'},
14970 'StaticRangeHighIP': {'items': {'type': 'integer'},
14972 'StaticRangeLowIP': {'items': {'type': 'integer'},
14974 'Status': {'type': 'string'},
14975 'VLANTag': {'type': 'integer'},
14976 'Zones': {'items': {'type': 'string'},
14978 'required': ['CIDR',
14984 'SubnetsFilters': {'additionalProperties': False,
14985 'properties': {'SpaceTag': {'type': 'string'},
14986 'Zone': {'type': 'string'}},
14988 'ZoneResult': {'additionalProperties': False,
14989 'properties': {'Available': {'type': 'boolean'},
14990 'Error': {'$ref': '#/definitions/Error'},
14991 'Name': {'type': 'string'}},
14992 'required': ['Error', 'Name', 'Available'],
14994 'ZoneResults': {'additionalProperties': False,
14995 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
14997 'required': ['Results'],
14999 'caveat': {'additionalProperties': False,
15000 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15001 'location': {'$ref': '#/definitions/packet'},
15002 'verificationId': {'$ref': '#/definitions/packet'}},
15003 'required': ['location',
15007 'packet': {'additionalProperties': False,
15008 'properties': {'headerLen': {'type': 'integer'},
15009 'start': {'type': 'integer'},
15010 'totalLen': {'type': 'integer'}},
15011 'required': ['start', 'totalLen', 'headerLen'],
15012 'type': 'object'}},
15013 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
15014 'Result': {'$ref': '#/definitions/ErrorResults'}},
15016 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
15018 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
15020 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
15021 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
15022 'type': 'object'}},
15026 #@ReturnMapping(ErrorResults)
15027 async def AddSubnets(self
, subnets
):
15029 subnets : typing.Sequence[~AddSubnetParams]
15030 Returns -> typing.Sequence[~ErrorResult]
15032 # map input types to rpc msg
15034 msg
= dict(Type
='Subnets', Request
='AddSubnets', Version
=2, Params
=params
)
15035 params
['Subnets'] = subnets
15036 reply
= await self
.rpc(msg
)
15037 return self
._map
(reply
, AddSubnets
)
15041 #@ReturnMapping(SpaceResults)
15042 async def AllSpaces(self
):
15045 Returns -> typing.Sequence[~SpaceResult]
15047 # map input types to rpc msg
15049 msg
= dict(Type
='Subnets', Request
='AllSpaces', Version
=2, Params
=params
)
15051 reply
= await self
.rpc(msg
)
15052 return self
._map
(reply
, AllSpaces
)
15056 #@ReturnMapping(ZoneResults)
15057 async def AllZones(self
):
15060 Returns -> typing.Sequence[~ZoneResult]
15062 # map input types to rpc msg
15064 msg
= dict(Type
='Subnets', Request
='AllZones', Version
=2, Params
=params
)
15066 reply
= await self
.rpc(msg
)
15067 return self
._map
(reply
, AllZones
)
15071 #@ReturnMapping(ListSubnetsResults)
15072 async def ListSubnets(self
, spacetag
, zone
):
15076 Returns -> typing.Sequence[~Subnet]
15078 # map input types to rpc msg
15080 msg
= dict(Type
='Subnets', Request
='ListSubnets', Version
=2, Params
=params
)
15081 params
['SpaceTag'] = spacetag
15082 params
['Zone'] = zone
15083 reply
= await self
.rpc(msg
)
15084 return self
._map
(reply
, ListSubnets
)
15087 class Undertaker(Type
):
15088 name
= 'Undertaker'
15090 schema
= {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
15091 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15092 'type': 'object'}},
15094 'Info': {'type': 'string'},
15095 'Status': {'type': 'string'},
15096 'Tag': {'type': 'string'}},
15097 'required': ['Tag',
15102 'Error': {'additionalProperties': False,
15103 'properties': {'Code': {'type': 'string'},
15104 'Info': {'$ref': '#/definitions/ErrorInfo'},
15105 'Message': {'type': 'string'}},
15106 'required': ['Message', 'Code'],
15108 'ErrorInfo': {'additionalProperties': False,
15109 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15110 'MacaroonPath': {'type': 'string'}},
15112 'ErrorResult': {'additionalProperties': False,
15113 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15114 'required': ['Error'],
15116 'ErrorResults': {'additionalProperties': False,
15117 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15119 'required': ['Results'],
15121 'Macaroon': {'additionalProperties': False,
15122 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15124 'data': {'items': {'type': 'integer'},
15126 'id': {'$ref': '#/definitions/packet'},
15127 'location': {'$ref': '#/definitions/packet'},
15128 'sig': {'items': {'type': 'integer'},
15130 'required': ['data',
15136 'ModelConfigResult': {'additionalProperties': False,
15137 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15138 'type': 'object'}},
15139 'type': 'object'}},
15140 'required': ['Config'],
15142 'NotifyWatchResult': {'additionalProperties': False,
15143 'properties': {'Error': {'$ref': '#/definitions/Error'},
15144 'NotifyWatcherId': {'type': 'string'}},
15145 'required': ['NotifyWatcherId', 'Error'],
15147 'NotifyWatchResults': {'additionalProperties': False,
15148 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15150 'required': ['Results'],
15152 'SetStatus': {'additionalProperties': False,
15153 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15155 'required': ['Entities'],
15157 'UndertakerModelInfo': {'additionalProperties': False,
15158 'properties': {'GlobalName': {'type': 'string'},
15159 'IsSystem': {'type': 'boolean'},
15160 'Life': {'type': 'string'},
15161 'Name': {'type': 'string'},
15162 'UUID': {'type': 'string'}},
15163 'required': ['UUID',
15169 'UndertakerModelInfoResult': {'additionalProperties': False,
15170 'properties': {'Error': {'$ref': '#/definitions/Error'},
15171 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
15172 'required': ['Error', 'Result'],
15174 'caveat': {'additionalProperties': False,
15175 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15176 'location': {'$ref': '#/definitions/packet'},
15177 'verificationId': {'$ref': '#/definitions/packet'}},
15178 'required': ['location',
15182 'packet': {'additionalProperties': False,
15183 'properties': {'headerLen': {'type': 'integer'},
15184 'start': {'type': 'integer'},
15185 'totalLen': {'type': 'integer'}},
15186 'required': ['start', 'totalLen', 'headerLen'],
15187 'type': 'object'}},
15188 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
15190 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
15192 'ProcessDyingModel': {'type': 'object'},
15193 'RemoveModel': {'type': 'object'},
15194 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15195 'Result': {'$ref': '#/definitions/ErrorResults'}},
15197 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15198 'Result': {'$ref': '#/definitions/ErrorResults'}},
15200 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15201 'type': 'object'}},
15205 #@ReturnMapping(ModelConfigResult)
15206 async def ModelConfig(self
):
15209 Returns -> typing.Mapping[str, typing.Any]
15211 # map input types to rpc msg
15213 msg
= dict(Type
='Undertaker', Request
='ModelConfig', Version
=1, Params
=params
)
15215 reply
= await self
.rpc(msg
)
15216 return self
._map
(reply
, ModelConfig
)
15220 #@ReturnMapping(UndertakerModelInfoResult)
15221 async def ModelInfo(self
):
15224 Returns -> typing.Union[~Error, ~UndertakerModelInfo]
15226 # map input types to rpc msg
15228 msg
= dict(Type
='Undertaker', Request
='ModelInfo', Version
=1, Params
=params
)
15230 reply
= await self
.rpc(msg
)
15231 return self
._map
(reply
, ModelInfo
)
15235 #@ReturnMapping(None)
15236 async def ProcessDyingModel(self
):
15241 # map input types to rpc msg
15243 msg
= dict(Type
='Undertaker', Request
='ProcessDyingModel', Version
=1, Params
=params
)
15245 reply
= await self
.rpc(msg
)
15246 return self
._map
(reply
, ProcessDyingModel
)
15250 #@ReturnMapping(None)
15251 async def RemoveModel(self
):
15256 # map input types to rpc msg
15258 msg
= dict(Type
='Undertaker', Request
='RemoveModel', Version
=1, Params
=params
)
15260 reply
= await self
.rpc(msg
)
15261 return self
._map
(reply
, RemoveModel
)
15265 #@ReturnMapping(ErrorResults)
15266 async def SetStatus(self
, entities
):
15268 entities : typing.Sequence[~EntityStatusArgs]
15269 Returns -> typing.Sequence[~ErrorResult]
15271 # map input types to rpc msg
15273 msg
= dict(Type
='Undertaker', Request
='SetStatus', Version
=1, Params
=params
)
15274 params
['Entities'] = entities
15275 reply
= await self
.rpc(msg
)
15276 return self
._map
(reply
, SetStatus
)
15280 #@ReturnMapping(ErrorResults)
15281 async def UpdateStatus(self
, entities
):
15283 entities : typing.Sequence[~EntityStatusArgs]
15284 Returns -> typing.Sequence[~ErrorResult]
15286 # map input types to rpc msg
15288 msg
= dict(Type
='Undertaker', Request
='UpdateStatus', Version
=1, Params
=params
)
15289 params
['Entities'] = entities
15290 reply
= await self
.rpc(msg
)
15291 return self
._map
(reply
, UpdateStatus
)
15295 #@ReturnMapping(NotifyWatchResults)
15296 async def WatchModelResources(self
):
15299 Returns -> typing.Sequence[~NotifyWatchResult]
15301 # map input types to rpc msg
15303 msg
= dict(Type
='Undertaker', Request
='WatchModelResources', Version
=1, Params
=params
)
15305 reply
= await self
.rpc(msg
)
15306 return self
._map
(reply
, WatchModelResources
)
15309 class UnitAssigner(Type
):
15310 name
= 'UnitAssigner'
15312 schema
= {'definitions': {'Entities': {'additionalProperties': False,
15313 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15315 'required': ['Entities'],
15317 'Entity': {'additionalProperties': False,
15318 'properties': {'Tag': {'type': 'string'}},
15319 'required': ['Tag'],
15321 'EntityStatusArgs': {'additionalProperties': False,
15322 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15323 'type': 'object'}},
15325 'Info': {'type': 'string'},
15326 'Status': {'type': 'string'},
15327 'Tag': {'type': 'string'}},
15328 'required': ['Tag',
15333 'Error': {'additionalProperties': False,
15334 'properties': {'Code': {'type': 'string'},
15335 'Info': {'$ref': '#/definitions/ErrorInfo'},
15336 'Message': {'type': 'string'}},
15337 'required': ['Message', 'Code'],
15339 'ErrorInfo': {'additionalProperties': False,
15340 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15341 'MacaroonPath': {'type': 'string'}},
15343 'ErrorResult': {'additionalProperties': False,
15344 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15345 'required': ['Error'],
15347 'ErrorResults': {'additionalProperties': False,
15348 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15350 'required': ['Results'],
15352 'Macaroon': {'additionalProperties': False,
15353 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15355 'data': {'items': {'type': 'integer'},
15357 'id': {'$ref': '#/definitions/packet'},
15358 'location': {'$ref': '#/definitions/packet'},
15359 'sig': {'items': {'type': 'integer'},
15361 'required': ['data',
15367 'SetStatus': {'additionalProperties': False,
15368 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15370 'required': ['Entities'],
15372 'StringsWatchResult': {'additionalProperties': False,
15373 'properties': {'Changes': {'items': {'type': 'string'},
15375 'Error': {'$ref': '#/definitions/Error'},
15376 'StringsWatcherId': {'type': 'string'}},
15377 'required': ['StringsWatcherId',
15381 'caveat': {'additionalProperties': False,
15382 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15383 'location': {'$ref': '#/definitions/packet'},
15384 'verificationId': {'$ref': '#/definitions/packet'}},
15385 'required': ['location',
15389 'packet': {'additionalProperties': False,
15390 'properties': {'headerLen': {'type': 'integer'},
15391 'start': {'type': 'integer'},
15392 'totalLen': {'type': 'integer'}},
15393 'required': ['start', 'totalLen', 'headerLen'],
15394 'type': 'object'}},
15395 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15396 'Result': {'$ref': '#/definitions/ErrorResults'}},
15398 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15399 'Result': {'$ref': '#/definitions/ErrorResults'}},
15401 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15402 'type': 'object'}},
15406 #@ReturnMapping(ErrorResults)
15407 async def AssignUnits(self
, entities
):
15409 entities : typing.Sequence[~Entity]
15410 Returns -> typing.Sequence[~ErrorResult]
15412 # map input types to rpc msg
15414 msg
= dict(Type
='UnitAssigner', Request
='AssignUnits', Version
=1, Params
=params
)
15415 params
['Entities'] = entities
15416 reply
= await self
.rpc(msg
)
15417 return self
._map
(reply
, AssignUnits
)
15421 #@ReturnMapping(ErrorResults)
15422 async def SetAgentStatus(self
, entities
):
15424 entities : typing.Sequence[~EntityStatusArgs]
15425 Returns -> typing.Sequence[~ErrorResult]
15427 # map input types to rpc msg
15429 msg
= dict(Type
='UnitAssigner', Request
='SetAgentStatus', Version
=1, Params
=params
)
15430 params
['Entities'] = entities
15431 reply
= await self
.rpc(msg
)
15432 return self
._map
(reply
, SetAgentStatus
)
15436 #@ReturnMapping(StringsWatchResult)
15437 async def WatchUnitAssignments(self
):
15440 Returns -> typing.Union[~Error, typing.Sequence[str]]
15442 # map input types to rpc msg
15444 msg
= dict(Type
='UnitAssigner', Request
='WatchUnitAssignments', Version
=1, Params
=params
)
15446 reply
= await self
.rpc(msg
)
15447 return self
._map
(reply
, WatchUnitAssignments
)
15450 class Uniter(Type
):
15453 schema
= {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
15454 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
15457 'required': ['Servers'],
15459 'Action': {'additionalProperties': False,
15460 'properties': {'name': {'type': 'string'},
15461 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
15462 'type': 'object'}},
15464 'receiver': {'type': 'string'},
15465 'tag': {'type': 'string'}},
15466 'required': ['tag', 'receiver', 'name'],
15468 'ActionExecutionResult': {'additionalProperties': False,
15469 'properties': {'actiontag': {'type': 'string'},
15470 'message': {'type': 'string'},
15471 'results': {'patternProperties': {'.*': {'additionalProperties': True,
15472 'type': 'object'}},
15474 'status': {'type': 'string'}},
15475 'required': ['actiontag', 'status'],
15477 'ActionExecutionResults': {'additionalProperties': False,
15478 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
15481 'ActionResult': {'additionalProperties': False,
15482 'properties': {'action': {'$ref': '#/definitions/Action'},
15483 'completed': {'format': 'date-time',
15485 'enqueued': {'format': 'date-time',
15487 'error': {'$ref': '#/definitions/Error'},
15488 'message': {'type': 'string'},
15489 'output': {'patternProperties': {'.*': {'additionalProperties': True,
15490 'type': 'object'}},
15492 'started': {'format': 'date-time',
15494 'status': {'type': 'string'}},
15496 'ActionResults': {'additionalProperties': False,
15497 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
15500 'Address': {'additionalProperties': False,
15501 'properties': {'Scope': {'type': 'string'},
15502 'SpaceName': {'type': 'string'},
15503 'Type': {'type': 'string'},
15504 'Value': {'type': 'string'}},
15505 'required': ['Value', 'Type', 'Scope'],
15507 'BoolResult': {'additionalProperties': False,
15508 'properties': {'Error': {'$ref': '#/definitions/Error'},
15509 'Result': {'type': 'boolean'}},
15510 'required': ['Error', 'Result'],
15512 'BoolResults': {'additionalProperties': False,
15513 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
15515 'required': ['Results'],
15517 'BytesResult': {'additionalProperties': False,
15518 'properties': {'Result': {'items': {'type': 'integer'},
15520 'required': ['Result'],
15522 'CharmURL': {'additionalProperties': False,
15523 'properties': {'URL': {'type': 'string'}},
15524 'required': ['URL'],
15526 'CharmURLs': {'additionalProperties': False,
15527 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
15529 'required': ['URLs'],
15531 'ConfigSettingsResult': {'additionalProperties': False,
15532 'properties': {'Error': {'$ref': '#/definitions/Error'},
15533 'Settings': {'patternProperties': {'.*': {'additionalProperties': True,
15534 'type': 'object'}},
15535 'type': 'object'}},
15536 'required': ['Error', 'Settings'],
15538 'ConfigSettingsResults': {'additionalProperties': False,
15539 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
15541 'required': ['Results'],
15543 'Endpoint': {'additionalProperties': False,
15544 'properties': {'Relation': {'$ref': '#/definitions/Relation'},
15545 'ServiceName': {'type': 'string'}},
15546 'required': ['ServiceName', 'Relation'],
15548 'Entities': {'additionalProperties': False,
15549 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15551 'required': ['Entities'],
15553 'EntitiesCharmURL': {'additionalProperties': False,
15554 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
15556 'required': ['Entities'],
15558 'EntitiesPortRanges': {'additionalProperties': False,
15559 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
15561 'required': ['Entities'],
15563 'Entity': {'additionalProperties': False,
15564 'properties': {'Tag': {'type': 'string'}},
15565 'required': ['Tag'],
15567 'EntityCharmURL': {'additionalProperties': False,
15568 'properties': {'CharmURL': {'type': 'string'},
15569 'Tag': {'type': 'string'}},
15570 'required': ['Tag', 'CharmURL'],
15572 'EntityPortRange': {'additionalProperties': False,
15573 'properties': {'FromPort': {'type': 'integer'},
15574 'Protocol': {'type': 'string'},
15575 'Tag': {'type': 'string'},
15576 'ToPort': {'type': 'integer'}},
15577 'required': ['Tag',
15582 'EntityStatusArgs': {'additionalProperties': False,
15583 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15584 'type': 'object'}},
15586 'Info': {'type': 'string'},
15587 'Status': {'type': 'string'},
15588 'Tag': {'type': 'string'}},
15589 'required': ['Tag',
15594 'Error': {'additionalProperties': False,
15595 'properties': {'Code': {'type': 'string'},
15596 'Info': {'$ref': '#/definitions/ErrorInfo'},
15597 'Message': {'type': 'string'}},
15598 'required': ['Message', 'Code'],
15600 'ErrorInfo': {'additionalProperties': False,
15601 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15602 'MacaroonPath': {'type': 'string'}},
15604 'ErrorResult': {'additionalProperties': False,
15605 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15606 'required': ['Error'],
15608 'ErrorResults': {'additionalProperties': False,
15609 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15611 'required': ['Results'],
15613 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
15614 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
15616 'required': ['Results'],
15618 'GetLeadershipSettingsResult': {'additionalProperties': False,
15619 'properties': {'Error': {'$ref': '#/definitions/Error'},
15620 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15621 'type': 'object'}},
15622 'required': ['Settings',
15625 'HostPort': {'additionalProperties': False,
15626 'properties': {'Address': {'$ref': '#/definitions/Address'},
15627 'Port': {'type': 'integer'}},
15628 'required': ['Address', 'Port'],
15630 'IntResult': {'additionalProperties': False,
15631 'properties': {'Error': {'$ref': '#/definitions/Error'},
15632 'Result': {'type': 'integer'}},
15633 'required': ['Error', 'Result'],
15635 'IntResults': {'additionalProperties': False,
15636 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
15638 'required': ['Results'],
15640 'LifeResult': {'additionalProperties': False,
15641 'properties': {'Error': {'$ref': '#/definitions/Error'},
15642 'Life': {'type': 'string'}},
15643 'required': ['Life', 'Error'],
15645 'LifeResults': {'additionalProperties': False,
15646 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
15648 'required': ['Results'],
15650 'Macaroon': {'additionalProperties': False,
15651 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15653 'data': {'items': {'type': 'integer'},
15655 'id': {'$ref': '#/definitions/packet'},
15656 'location': {'$ref': '#/definitions/packet'},
15657 'sig': {'items': {'type': 'integer'},
15659 'required': ['data',
15665 'MachinePortRange': {'additionalProperties': False,
15666 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
15667 'RelationTag': {'type': 'string'},
15668 'UnitTag': {'type': 'string'}},
15669 'required': ['UnitTag',
15673 'MachinePortsResult': {'additionalProperties': False,
15674 'properties': {'Error': {'$ref': '#/definitions/Error'},
15675 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
15677 'required': ['Error', 'Ports'],
15679 'MachinePortsResults': {'additionalProperties': False,
15680 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
15682 'required': ['Results'],
15684 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
15685 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
15687 'required': ['Params'],
15689 'MergeLeadershipSettingsParam': {'additionalProperties': False,
15690 'properties': {'ServiceTag': {'type': 'string'},
15691 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15692 'type': 'object'}},
15693 'required': ['ServiceTag',
15696 'MeterStatusResult': {'additionalProperties': False,
15697 'properties': {'Code': {'type': 'string'},
15698 'Error': {'$ref': '#/definitions/Error'},
15699 'Info': {'type': 'string'}},
15700 'required': ['Code', 'Info', 'Error'],
15702 'MeterStatusResults': {'additionalProperties': False,
15703 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
15705 'required': ['Results'],
15707 'Metric': {'additionalProperties': False,
15708 'properties': {'Key': {'type': 'string'},
15709 'Time': {'format': 'date-time',
15711 'Value': {'type': 'string'}},
15712 'required': ['Key', 'Value', 'Time'],
15714 'MetricBatch': {'additionalProperties': False,
15715 'properties': {'CharmURL': {'type': 'string'},
15716 'Created': {'format': 'date-time',
15718 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
15720 'UUID': {'type': 'string'}},
15721 'required': ['UUID',
15726 'MetricBatchParam': {'additionalProperties': False,
15727 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
15728 'Tag': {'type': 'string'}},
15729 'required': ['Tag', 'Batch'],
15731 'MetricBatchParams': {'additionalProperties': False,
15732 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
15734 'required': ['Batches'],
15736 'ModelConfigResult': {'additionalProperties': False,
15737 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15738 'type': 'object'}},
15739 'type': 'object'}},
15740 'required': ['Config'],
15742 'ModelResult': {'additionalProperties': False,
15743 'properties': {'Error': {'$ref': '#/definitions/Error'},
15744 'Name': {'type': 'string'},
15745 'UUID': {'type': 'string'}},
15746 'required': ['Error', 'Name', 'UUID'],
15748 'NetworkConfig': {'additionalProperties': False,
15749 'properties': {'Address': {'type': 'string'},
15750 'CIDR': {'type': 'string'},
15751 'ConfigType': {'type': 'string'},
15752 'DNSSearchDomains': {'items': {'type': 'string'},
15754 'DNSServers': {'items': {'type': 'string'},
15756 'DeviceIndex': {'type': 'integer'},
15757 'Disabled': {'type': 'boolean'},
15758 'GatewayAddress': {'type': 'string'},
15759 'InterfaceName': {'type': 'string'},
15760 'InterfaceType': {'type': 'string'},
15761 'MACAddress': {'type': 'string'},
15762 'MTU': {'type': 'integer'},
15763 'NoAutoStart': {'type': 'boolean'},
15764 'ParentInterfaceName': {'type': 'string'},
15765 'ProviderAddressId': {'type': 'string'},
15766 'ProviderId': {'type': 'string'},
15767 'ProviderSpaceId': {'type': 'string'},
15768 'ProviderSubnetId': {'type': 'string'},
15769 'ProviderVLANId': {'type': 'string'},
15770 'VLANTag': {'type': 'integer'}},
15771 'required': ['DeviceIndex',
15776 'ProviderSubnetId',
15778 'ProviderAddressId',
15782 'ParentInterfaceName',
15786 'NotifyWatchResult': {'additionalProperties': False,
15787 'properties': {'Error': {'$ref': '#/definitions/Error'},
15788 'NotifyWatcherId': {'type': 'string'}},
15789 'required': ['NotifyWatcherId', 'Error'],
15791 'NotifyWatchResults': {'additionalProperties': False,
15792 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15794 'required': ['Results'],
15796 'PortRange': {'additionalProperties': False,
15797 'properties': {'FromPort': {'type': 'integer'},
15798 'Protocol': {'type': 'string'},
15799 'ToPort': {'type': 'integer'}},
15800 'required': ['FromPort', 'ToPort', 'Protocol'],
15802 'Relation': {'additionalProperties': False,
15803 'properties': {'Interface': {'type': 'string'},
15804 'Limit': {'type': 'integer'},
15805 'Name': {'type': 'string'},
15806 'Optional': {'type': 'boolean'},
15807 'Role': {'type': 'string'},
15808 'Scope': {'type': 'string'}},
15809 'required': ['Name',
15816 'RelationIds': {'additionalProperties': False,
15817 'properties': {'RelationIds': {'items': {'type': 'integer'},
15819 'required': ['RelationIds'],
15821 'RelationResult': {'additionalProperties': False,
15822 'properties': {'Endpoint': {'$ref': '#/definitions/Endpoint'},
15823 'Error': {'$ref': '#/definitions/Error'},
15824 'Id': {'type': 'integer'},
15825 'Key': {'type': 'string'},
15826 'Life': {'type': 'string'}},
15827 'required': ['Error',
15833 'RelationResults': {'additionalProperties': False,
15834 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
15836 'required': ['Results'],
15838 'RelationUnit': {'additionalProperties': False,
15839 'properties': {'Relation': {'type': 'string'},
15840 'Unit': {'type': 'string'}},
15841 'required': ['Relation', 'Unit'],
15843 'RelationUnitPair': {'additionalProperties': False,
15844 'properties': {'LocalUnit': {'type': 'string'},
15845 'Relation': {'type': 'string'},
15846 'RemoteUnit': {'type': 'string'}},
15847 'required': ['Relation',
15851 'RelationUnitPairs': {'additionalProperties': False,
15852 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
15854 'required': ['RelationUnitPairs'],
15856 'RelationUnitSettings': {'additionalProperties': False,
15857 'properties': {'Relation': {'type': 'string'},
15858 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15860 'Unit': {'type': 'string'}},
15861 'required': ['Relation',
15865 'RelationUnits': {'additionalProperties': False,
15866 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
15868 'required': ['RelationUnits'],
15870 'RelationUnitsChange': {'additionalProperties': False,
15871 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
15873 'Departed': {'items': {'type': 'string'},
15875 'required': ['Changed', 'Departed'],
15877 'RelationUnitsSettings': {'additionalProperties': False,
15878 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
15880 'required': ['RelationUnits'],
15882 'RelationUnitsWatchResult': {'additionalProperties': False,
15883 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
15884 'Error': {'$ref': '#/definitions/Error'},
15885 'RelationUnitsWatcherId': {'type': 'string'}},
15886 'required': ['RelationUnitsWatcherId',
15890 'RelationUnitsWatchResults': {'additionalProperties': False,
15891 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
15893 'required': ['Results'],
15895 'ResolvedModeResult': {'additionalProperties': False,
15896 'properties': {'Error': {'$ref': '#/definitions/Error'},
15897 'Mode': {'type': 'string'}},
15898 'required': ['Error', 'Mode'],
15900 'ResolvedModeResults': {'additionalProperties': False,
15901 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
15903 'required': ['Results'],
15905 'ServiceStatusResult': {'additionalProperties': False,
15906 'properties': {'Error': {'$ref': '#/definitions/Error'},
15907 'Service': {'$ref': '#/definitions/StatusResult'},
15908 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
15909 'type': 'object'}},
15910 'required': ['Service',
15914 'ServiceStatusResults': {'additionalProperties': False,
15915 'properties': {'Results': {'items': {'$ref': '#/definitions/ServiceStatusResult'},
15917 'required': ['Results'],
15919 'SetStatus': {'additionalProperties': False,
15920 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15922 'required': ['Entities'],
15924 'SettingsResult': {'additionalProperties': False,
15925 'properties': {'Error': {'$ref': '#/definitions/Error'},
15926 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15927 'type': 'object'}},
15928 'required': ['Error', 'Settings'],
15930 'SettingsResults': {'additionalProperties': False,
15931 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
15933 'required': ['Results'],
15935 'StatusResult': {'additionalProperties': False,
15936 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15937 'type': 'object'}},
15939 'Error': {'$ref': '#/definitions/Error'},
15940 'Id': {'type': 'string'},
15941 'Info': {'type': 'string'},
15942 'Life': {'type': 'string'},
15943 'Since': {'format': 'date-time',
15945 'Status': {'type': 'string'}},
15946 'required': ['Error',
15954 'StatusResults': {'additionalProperties': False,
15955 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
15957 'required': ['Results'],
15959 'StorageAddParams': {'additionalProperties': False,
15960 'properties': {'StorageName': {'type': 'string'},
15961 'storage': {'$ref': '#/definitions/StorageConstraints'},
15962 'unit': {'type': 'string'}},
15963 'required': ['unit',
15967 'StorageAttachment': {'additionalProperties': False,
15968 'properties': {'Kind': {'type': 'integer'},
15969 'Life': {'type': 'string'},
15970 'Location': {'type': 'string'},
15971 'OwnerTag': {'type': 'string'},
15972 'StorageTag': {'type': 'string'},
15973 'UnitTag': {'type': 'string'}},
15974 'required': ['StorageTag',
15981 'StorageAttachmentId': {'additionalProperties': False,
15982 'properties': {'storagetag': {'type': 'string'},
15983 'unittag': {'type': 'string'}},
15984 'required': ['storagetag', 'unittag'],
15986 'StorageAttachmentIds': {'additionalProperties': False,
15987 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
15989 'required': ['ids'],
15991 'StorageAttachmentIdsResult': {'additionalProperties': False,
15992 'properties': {'error': {'$ref': '#/definitions/Error'},
15993 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
15994 'required': ['result'],
15996 'StorageAttachmentIdsResults': {'additionalProperties': False,
15997 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
16000 'StorageAttachmentResult': {'additionalProperties': False,
16001 'properties': {'error': {'$ref': '#/definitions/Error'},
16002 'result': {'$ref': '#/definitions/StorageAttachment'}},
16003 'required': ['result'],
16005 'StorageAttachmentResults': {'additionalProperties': False,
16006 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
16009 'StorageConstraints': {'additionalProperties': False,
16010 'properties': {'Count': {'type': 'integer'},
16011 'Pool': {'type': 'string'},
16012 'Size': {'type': 'integer'}},
16013 'required': ['Pool', 'Size', 'Count'],
16015 'StoragesAddParams': {'additionalProperties': False,
16016 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16018 'required': ['storages'],
16020 'StringBoolResult': {'additionalProperties': False,
16021 'properties': {'Error': {'$ref': '#/definitions/Error'},
16022 'Ok': {'type': 'boolean'},
16023 'Result': {'type': 'string'}},
16024 'required': ['Error', 'Result', 'Ok'],
16026 'StringBoolResults': {'additionalProperties': False,
16027 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
16029 'required': ['Results'],
16031 'StringResult': {'additionalProperties': False,
16032 'properties': {'Error': {'$ref': '#/definitions/Error'},
16033 'Result': {'type': 'string'}},
16034 'required': ['Error', 'Result'],
16036 'StringResults': {'additionalProperties': False,
16037 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16039 'required': ['Results'],
16041 'StringsResult': {'additionalProperties': False,
16042 'properties': {'Error': {'$ref': '#/definitions/Error'},
16043 'Result': {'items': {'type': 'string'},
16045 'required': ['Error', 'Result'],
16047 'StringsResults': {'additionalProperties': False,
16048 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
16050 'required': ['Results'],
16052 'StringsWatchResult': {'additionalProperties': False,
16053 'properties': {'Changes': {'items': {'type': 'string'},
16055 'Error': {'$ref': '#/definitions/Error'},
16056 'StringsWatcherId': {'type': 'string'}},
16057 'required': ['StringsWatcherId',
16061 'StringsWatchResults': {'additionalProperties': False,
16062 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16064 'required': ['Results'],
16066 'UnitNetworkConfig': {'additionalProperties': False,
16067 'properties': {'BindingName': {'type': 'string'},
16068 'UnitTag': {'type': 'string'}},
16069 'required': ['UnitTag', 'BindingName'],
16071 'UnitNetworkConfigResult': {'additionalProperties': False,
16072 'properties': {'Error': {'$ref': '#/definitions/Error'},
16073 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
16075 'required': ['Error', 'Info'],
16077 'UnitNetworkConfigResults': {'additionalProperties': False,
16078 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
16080 'required': ['Results'],
16082 'UnitSettings': {'additionalProperties': False,
16083 'properties': {'Version': {'type': 'integer'}},
16084 'required': ['Version'],
16086 'UnitsNetworkConfig': {'additionalProperties': False,
16087 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
16089 'required': ['Args'],
16091 'caveat': {'additionalProperties': False,
16092 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16093 'location': {'$ref': '#/definitions/packet'},
16094 'verificationId': {'$ref': '#/definitions/packet'}},
16095 'required': ['location',
16099 'packet': {'additionalProperties': False,
16100 'properties': {'headerLen': {'type': 'integer'},
16101 'start': {'type': 'integer'},
16102 'totalLen': {'type': 'integer'}},
16103 'required': ['start', 'totalLen', 'headerLen'],
16104 'type': 'object'}},
16105 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
16107 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
16109 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16110 'Result': {'$ref': '#/definitions/ActionResults'}},
16112 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
16113 'Result': {'$ref': '#/definitions/ErrorResults'}},
16115 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
16116 'Result': {'$ref': '#/definitions/ErrorResults'}},
16118 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16119 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
16121 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16122 'Result': {'$ref': '#/definitions/StringResults'}},
16124 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16125 'Result': {'$ref': '#/definitions/StringResults'}},
16127 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16128 'Result': {'$ref': '#/definitions/ErrorResults'}},
16130 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
16132 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
16133 'Result': {'$ref': '#/definitions/StringResults'}},
16135 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16136 'Result': {'$ref': '#/definitions/IntResults'}},
16138 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16139 'Result': {'$ref': '#/definitions/StringBoolResults'}},
16141 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16142 'Result': {'$ref': '#/definitions/ErrorResults'}},
16144 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
16145 'Result': {'$ref': '#/definitions/ErrorResults'}},
16147 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16148 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
16150 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
16152 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16153 'Result': {'$ref': '#/definitions/ErrorResults'}},
16155 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16156 'Result': {'$ref': '#/definitions/ErrorResults'}},
16158 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16159 'Result': {'$ref': '#/definitions/ErrorResults'}},
16161 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16162 'Result': {'$ref': '#/definitions/ErrorResults'}},
16164 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16165 'Result': {'$ref': '#/definitions/ErrorResults'}},
16167 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
16168 'Result': {'$ref': '#/definitions/ErrorResults'}},
16170 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16171 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
16173 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16174 'Result': {'$ref': '#/definitions/StringBoolResults'}},
16176 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16177 'Result': {'$ref': '#/definitions/BoolResults'}},
16179 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16180 'Result': {'$ref': '#/definitions/StringsResults'}},
16182 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16183 'Result': {'$ref': '#/definitions/ErrorResults'}},
16185 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16186 'Result': {'$ref': '#/definitions/LifeResults'}},
16188 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
16189 'Result': {'$ref': '#/definitions/ErrorResults'}},
16191 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16193 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
16195 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
16196 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
16198 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
16199 'Result': {'$ref': '#/definitions/ErrorResults'}},
16201 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16202 'Result': {'$ref': '#/definitions/StringResults'}},
16204 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
16206 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16207 'Result': {'$ref': '#/definitions/StringResults'}},
16209 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16210 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
16212 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
16213 'Result': {'$ref': '#/definitions/SettingsResults'}},
16215 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16216 'Result': {'$ref': '#/definitions/SettingsResults'}},
16218 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16219 'Result': {'$ref': '#/definitions/RelationResults'}},
16221 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
16222 'Result': {'$ref': '#/definitions/RelationResults'}},
16224 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16225 'Result': {'$ref': '#/definitions/ErrorResults'}},
16227 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16228 'Result': {'$ref': '#/definitions/ErrorResults'}},
16230 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16231 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
16233 'ServiceOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16234 'Result': {'$ref': '#/definitions/StringResults'}},
16236 'ServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16237 'Result': {'$ref': '#/definitions/ServiceStatusResults'}},
16239 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16240 'Result': {'$ref': '#/definitions/ErrorResults'}},
16242 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
16243 'Result': {'$ref': '#/definitions/ErrorResults'}},
16245 'SetServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16246 'Result': {'$ref': '#/definitions/ErrorResults'}},
16248 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16249 'Result': {'$ref': '#/definitions/ErrorResults'}},
16251 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16252 'Result': {'$ref': '#/definitions/ErrorResults'}},
16254 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16255 'Result': {'$ref': '#/definitions/LifeResults'}},
16257 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16258 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
16260 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16261 'Result': {'$ref': '#/definitions/StatusResults'}},
16263 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16264 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
16266 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
16267 'Result': {'$ref': '#/definitions/ErrorResults'}},
16269 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16270 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16272 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16274 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16275 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16277 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16278 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16280 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16282 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16283 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16285 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16286 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16288 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16289 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
16291 'WatchServiceRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16292 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16294 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16295 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16297 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16298 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16300 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16301 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16302 'type': 'object'}},
16306 #@ReturnMapping(StringsResult)
16307 async def APIAddresses(self
):
16310 Returns -> typing.Union[~Error, typing.Sequence[str]]
16312 # map input types to rpc msg
16314 msg
= dict(Type
='Uniter', Request
='APIAddresses', Version
=3, Params
=params
)
16316 reply
= await self
.rpc(msg
)
16317 return self
._map
(reply
, APIAddresses
)
16321 #@ReturnMapping(APIHostPortsResult)
16322 async def APIHostPorts(self
):
16325 Returns -> typing.Sequence[~HostPort]
16327 # map input types to rpc msg
16329 msg
= dict(Type
='Uniter', Request
='APIHostPorts', Version
=3, Params
=params
)
16331 reply
= await self
.rpc(msg
)
16332 return self
._map
(reply
, APIHostPorts
)
16336 #@ReturnMapping(ActionResults)
16337 async def Actions(self
, entities
):
16339 entities : typing.Sequence[~Entity]
16340 Returns -> typing.Sequence[~ActionResult]
16342 # map input types to rpc msg
16344 msg
= dict(Type
='Uniter', Request
='Actions', Version
=3, Params
=params
)
16345 params
['Entities'] = entities
16346 reply
= await self
.rpc(msg
)
16347 return self
._map
(reply
, Actions
)
16351 #@ReturnMapping(ErrorResults)
16352 async def AddMetricBatches(self
, batches
):
16354 batches : typing.Sequence[~MetricBatchParam]
16355 Returns -> typing.Sequence[~ErrorResult]
16357 # map input types to rpc msg
16359 msg
= dict(Type
='Uniter', Request
='AddMetricBatches', Version
=3, Params
=params
)
16360 params
['Batches'] = batches
16361 reply
= await self
.rpc(msg
)
16362 return self
._map
(reply
, AddMetricBatches
)
16366 #@ReturnMapping(ErrorResults)
16367 async def AddUnitStorage(self
, storages
):
16369 storages : typing.Sequence[~StorageAddParams]
16370 Returns -> typing.Sequence[~ErrorResult]
16372 # map input types to rpc msg
16374 msg
= dict(Type
='Uniter', Request
='AddUnitStorage', Version
=3, Params
=params
)
16375 params
['storages'] = storages
16376 reply
= await self
.rpc(msg
)
16377 return self
._map
(reply
, AddUnitStorage
)
16381 #@ReturnMapping(MachinePortsResults)
16382 async def AllMachinePorts(self
, entities
):
16384 entities : typing.Sequence[~Entity]
16385 Returns -> typing.Sequence[~MachinePortsResult]
16387 # map input types to rpc msg
16389 msg
= dict(Type
='Uniter', Request
='AllMachinePorts', Version
=3, Params
=params
)
16390 params
['Entities'] = entities
16391 reply
= await self
.rpc(msg
)
16392 return self
._map
(reply
, AllMachinePorts
)
16396 #@ReturnMapping(StringResults)
16397 async def AssignedMachine(self
, entities
):
16399 entities : typing.Sequence[~Entity]
16400 Returns -> typing.Sequence[~StringResult]
16402 # map input types to rpc msg
16404 msg
= dict(Type
='Uniter', Request
='AssignedMachine', Version
=3, Params
=params
)
16405 params
['Entities'] = entities
16406 reply
= await self
.rpc(msg
)
16407 return self
._map
(reply
, AssignedMachine
)
16411 #@ReturnMapping(StringResults)
16412 async def AvailabilityZone(self
, entities
):
16414 entities : typing.Sequence[~Entity]
16415 Returns -> typing.Sequence[~StringResult]
16417 # map input types to rpc msg
16419 msg
= dict(Type
='Uniter', Request
='AvailabilityZone', Version
=3, Params
=params
)
16420 params
['Entities'] = entities
16421 reply
= await self
.rpc(msg
)
16422 return self
._map
(reply
, AvailabilityZone
)
16426 #@ReturnMapping(ErrorResults)
16427 async def BeginActions(self
, entities
):
16429 entities : typing.Sequence[~Entity]
16430 Returns -> typing.Sequence[~ErrorResult]
16432 # map input types to rpc msg
16434 msg
= dict(Type
='Uniter', Request
='BeginActions', Version
=3, Params
=params
)
16435 params
['Entities'] = entities
16436 reply
= await self
.rpc(msg
)
16437 return self
._map
(reply
, BeginActions
)
16441 #@ReturnMapping(BytesResult)
16442 async def CACert(self
):
16445 Returns -> typing.Sequence[int]
16447 # map input types to rpc msg
16449 msg
= dict(Type
='Uniter', Request
='CACert', Version
=3, Params
=params
)
16451 reply
= await self
.rpc(msg
)
16452 return self
._map
(reply
, CACert
)
16456 #@ReturnMapping(StringResults)
16457 async def CharmArchiveSha256(self
, urls
):
16459 urls : typing.Sequence[~CharmURL]
16460 Returns -> typing.Sequence[~StringResult]
16462 # map input types to rpc msg
16464 msg
= dict(Type
='Uniter', Request
='CharmArchiveSha256', Version
=3, Params
=params
)
16465 params
['URLs'] = urls
16466 reply
= await self
.rpc(msg
)
16467 return self
._map
(reply
, CharmArchiveSha256
)
16471 #@ReturnMapping(IntResults)
16472 async def CharmModifiedVersion(self
, entities
):
16474 entities : typing.Sequence[~Entity]
16475 Returns -> typing.Sequence[~IntResult]
16477 # map input types to rpc msg
16479 msg
= dict(Type
='Uniter', Request
='CharmModifiedVersion', Version
=3, Params
=params
)
16480 params
['Entities'] = entities
16481 reply
= await self
.rpc(msg
)
16482 return self
._map
(reply
, CharmModifiedVersion
)
16486 #@ReturnMapping(StringBoolResults)
16487 async def CharmURL(self
, entities
):
16489 entities : typing.Sequence[~Entity]
16490 Returns -> typing.Sequence[~StringBoolResult]
16492 # map input types to rpc msg
16494 msg
= dict(Type
='Uniter', Request
='CharmURL', Version
=3, Params
=params
)
16495 params
['Entities'] = entities
16496 reply
= await self
.rpc(msg
)
16497 return self
._map
(reply
, CharmURL
)
16501 #@ReturnMapping(ErrorResults)
16502 async def ClearResolved(self
, entities
):
16504 entities : typing.Sequence[~Entity]
16505 Returns -> typing.Sequence[~ErrorResult]
16507 # map input types to rpc msg
16509 msg
= dict(Type
='Uniter', Request
='ClearResolved', Version
=3, Params
=params
)
16510 params
['Entities'] = entities
16511 reply
= await self
.rpc(msg
)
16512 return self
._map
(reply
, ClearResolved
)
16516 #@ReturnMapping(ErrorResults)
16517 async def ClosePorts(self
, entities
):
16519 entities : typing.Sequence[~EntityPortRange]
16520 Returns -> typing.Sequence[~ErrorResult]
16522 # map input types to rpc msg
16524 msg
= dict(Type
='Uniter', Request
='ClosePorts', Version
=3, Params
=params
)
16525 params
['Entities'] = entities
16526 reply
= await self
.rpc(msg
)
16527 return self
._map
(reply
, ClosePorts
)
16531 #@ReturnMapping(ConfigSettingsResults)
16532 async def ConfigSettings(self
, entities
):
16534 entities : typing.Sequence[~Entity]
16535 Returns -> typing.Sequence[~ConfigSettingsResult]
16537 # map input types to rpc msg
16539 msg
= dict(Type
='Uniter', Request
='ConfigSettings', Version
=3, Params
=params
)
16540 params
['Entities'] = entities
16541 reply
= await self
.rpc(msg
)
16542 return self
._map
(reply
, ConfigSettings
)
16546 #@ReturnMapping(ModelResult)
16547 async def CurrentModel(self
):
16550 Returns -> typing.Union[str, ~Error]
16552 # map input types to rpc msg
16554 msg
= dict(Type
='Uniter', Request
='CurrentModel', Version
=3, Params
=params
)
16556 reply
= await self
.rpc(msg
)
16557 return self
._map
(reply
, CurrentModel
)
16561 #@ReturnMapping(ErrorResults)
16562 async def Destroy(self
, entities
):
16564 entities : typing.Sequence[~Entity]
16565 Returns -> typing.Sequence[~ErrorResult]
16567 # map input types to rpc msg
16569 msg
= dict(Type
='Uniter', Request
='Destroy', Version
=3, Params
=params
)
16570 params
['Entities'] = entities
16571 reply
= await self
.rpc(msg
)
16572 return self
._map
(reply
, Destroy
)
16576 #@ReturnMapping(ErrorResults)
16577 async def DestroyAllSubordinates(self
, entities
):
16579 entities : typing.Sequence[~Entity]
16580 Returns -> typing.Sequence[~ErrorResult]
16582 # map input types to rpc msg
16584 msg
= dict(Type
='Uniter', Request
='DestroyAllSubordinates', Version
=3, Params
=params
)
16585 params
['Entities'] = entities
16586 reply
= await self
.rpc(msg
)
16587 return self
._map
(reply
, DestroyAllSubordinates
)
16591 #@ReturnMapping(ErrorResults)
16592 async def DestroyUnitStorageAttachments(self
, entities
):
16594 entities : typing.Sequence[~Entity]
16595 Returns -> typing.Sequence[~ErrorResult]
16597 # map input types to rpc msg
16599 msg
= dict(Type
='Uniter', Request
='DestroyUnitStorageAttachments', Version
=3, Params
=params
)
16600 params
['Entities'] = entities
16601 reply
= await self
.rpc(msg
)
16602 return self
._map
(reply
, DestroyUnitStorageAttachments
)
16606 #@ReturnMapping(ErrorResults)
16607 async def EnsureDead(self
, entities
):
16609 entities : typing.Sequence[~Entity]
16610 Returns -> typing.Sequence[~ErrorResult]
16612 # map input types to rpc msg
16614 msg
= dict(Type
='Uniter', Request
='EnsureDead', Version
=3, Params
=params
)
16615 params
['Entities'] = entities
16616 reply
= await self
.rpc(msg
)
16617 return self
._map
(reply
, EnsureDead
)
16621 #@ReturnMapping(ErrorResults)
16622 async def EnterScope(self
, relationunits
):
16624 relationunits : typing.Sequence[~RelationUnit]
16625 Returns -> typing.Sequence[~ErrorResult]
16627 # map input types to rpc msg
16629 msg
= dict(Type
='Uniter', Request
='EnterScope', Version
=3, Params
=params
)
16630 params
['RelationUnits'] = relationunits
16631 reply
= await self
.rpc(msg
)
16632 return self
._map
(reply
, EnterScope
)
16636 #@ReturnMapping(ErrorResults)
16637 async def FinishActions(self
, results
):
16639 results : typing.Sequence[~ActionExecutionResult]
16640 Returns -> typing.Sequence[~ErrorResult]
16642 # map input types to rpc msg
16644 msg
= dict(Type
='Uniter', Request
='FinishActions', Version
=3, Params
=params
)
16645 params
['results'] = results
16646 reply
= await self
.rpc(msg
)
16647 return self
._map
(reply
, FinishActions
)
16651 #@ReturnMapping(MeterStatusResults)
16652 async def GetMeterStatus(self
, entities
):
16654 entities : typing.Sequence[~Entity]
16655 Returns -> typing.Sequence[~MeterStatusResult]
16657 # map input types to rpc msg
16659 msg
= dict(Type
='Uniter', Request
='GetMeterStatus', Version
=3, Params
=params
)
16660 params
['Entities'] = entities
16661 reply
= await self
.rpc(msg
)
16662 return self
._map
(reply
, GetMeterStatus
)
16666 #@ReturnMapping(StringBoolResults)
16667 async def GetPrincipal(self
, entities
):
16669 entities : typing.Sequence[~Entity]
16670 Returns -> typing.Sequence[~StringBoolResult]
16672 # map input types to rpc msg
16674 msg
= dict(Type
='Uniter', Request
='GetPrincipal', Version
=3, Params
=params
)
16675 params
['Entities'] = entities
16676 reply
= await self
.rpc(msg
)
16677 return self
._map
(reply
, GetPrincipal
)
16681 #@ReturnMapping(BoolResults)
16682 async def HasSubordinates(self
, entities
):
16684 entities : typing.Sequence[~Entity]
16685 Returns -> typing.Sequence[~BoolResult]
16687 # map input types to rpc msg
16689 msg
= dict(Type
='Uniter', Request
='HasSubordinates', Version
=3, Params
=params
)
16690 params
['Entities'] = entities
16691 reply
= await self
.rpc(msg
)
16692 return self
._map
(reply
, HasSubordinates
)
16696 #@ReturnMapping(StringsResults)
16697 async def JoinedRelations(self
, entities
):
16699 entities : typing.Sequence[~Entity]
16700 Returns -> typing.Sequence[~StringsResult]
16702 # map input types to rpc msg
16704 msg
= dict(Type
='Uniter', Request
='JoinedRelations', Version
=3, Params
=params
)
16705 params
['Entities'] = entities
16706 reply
= await self
.rpc(msg
)
16707 return self
._map
(reply
, JoinedRelations
)
16711 #@ReturnMapping(ErrorResults)
16712 async def LeaveScope(self
, relationunits
):
16714 relationunits : typing.Sequence[~RelationUnit]
16715 Returns -> typing.Sequence[~ErrorResult]
16717 # map input types to rpc msg
16719 msg
= dict(Type
='Uniter', Request
='LeaveScope', Version
=3, Params
=params
)
16720 params
['RelationUnits'] = relationunits
16721 reply
= await self
.rpc(msg
)
16722 return self
._map
(reply
, LeaveScope
)
16726 #@ReturnMapping(LifeResults)
16727 async def Life(self
, entities
):
16729 entities : typing.Sequence[~Entity]
16730 Returns -> typing.Sequence[~LifeResult]
16732 # map input types to rpc msg
16734 msg
= dict(Type
='Uniter', Request
='Life', Version
=3, Params
=params
)
16735 params
['Entities'] = entities
16736 reply
= await self
.rpc(msg
)
16737 return self
._map
(reply
, Life
)
16741 #@ReturnMapping(ErrorResults)
16742 async def Merge(self
, params
):
16744 params : typing.Sequence[~MergeLeadershipSettingsParam]
16745 Returns -> typing.Sequence[~ErrorResult]
16747 # map input types to rpc msg
16749 msg
= dict(Type
='Uniter', Request
='Merge', Version
=3, Params
=params
)
16750 params
['Params'] = params
16751 reply
= await self
.rpc(msg
)
16752 return self
._map
(reply
, Merge
)
16756 #@ReturnMapping(ModelConfigResult)
16757 async def ModelConfig(self
):
16760 Returns -> typing.Mapping[str, typing.Any]
16762 # map input types to rpc msg
16764 msg
= dict(Type
='Uniter', Request
='ModelConfig', Version
=3, Params
=params
)
16766 reply
= await self
.rpc(msg
)
16767 return self
._map
(reply
, ModelConfig
)
16771 #@ReturnMapping(StringResult)
16772 async def ModelUUID(self
):
16775 Returns -> typing.Union[~Error, str]
16777 # map input types to rpc msg
16779 msg
= dict(Type
='Uniter', Request
='ModelUUID', Version
=3, Params
=params
)
16781 reply
= await self
.rpc(msg
)
16782 return self
._map
(reply
, ModelUUID
)
16786 #@ReturnMapping(UnitNetworkConfigResults)
16787 async def NetworkConfig(self
, args
):
16789 args : typing.Sequence[~UnitNetworkConfig]
16790 Returns -> typing.Sequence[~UnitNetworkConfigResult]
16792 # map input types to rpc msg
16794 msg
= dict(Type
='Uniter', Request
='NetworkConfig', Version
=3, Params
=params
)
16795 params
['Args'] = args
16796 reply
= await self
.rpc(msg
)
16797 return self
._map
(reply
, NetworkConfig
)
16801 #@ReturnMapping(ErrorResults)
16802 async def OpenPorts(self
, entities
):
16804 entities : typing.Sequence[~EntityPortRange]
16805 Returns -> typing.Sequence[~ErrorResult]
16807 # map input types to rpc msg
16809 msg
= dict(Type
='Uniter', Request
='OpenPorts', Version
=3, Params
=params
)
16810 params
['Entities'] = entities
16811 reply
= await self
.rpc(msg
)
16812 return self
._map
(reply
, OpenPorts
)
16816 #@ReturnMapping(StringResults)
16817 async def PrivateAddress(self
, entities
):
16819 entities : typing.Sequence[~Entity]
16820 Returns -> typing.Sequence[~StringResult]
16822 # map input types to rpc msg
16824 msg
= dict(Type
='Uniter', Request
='PrivateAddress', Version
=3, Params
=params
)
16825 params
['Entities'] = entities
16826 reply
= await self
.rpc(msg
)
16827 return self
._map
(reply
, PrivateAddress
)
16831 #@ReturnMapping(StringResult)
16832 async def ProviderType(self
):
16835 Returns -> typing.Union[~Error, str]
16837 # map input types to rpc msg
16839 msg
= dict(Type
='Uniter', Request
='ProviderType', Version
=3, Params
=params
)
16841 reply
= await self
.rpc(msg
)
16842 return self
._map
(reply
, ProviderType
)
16846 #@ReturnMapping(StringResults)
16847 async def PublicAddress(self
, entities
):
16849 entities : typing.Sequence[~Entity]
16850 Returns -> typing.Sequence[~StringResult]
16852 # map input types to rpc msg
16854 msg
= dict(Type
='Uniter', Request
='PublicAddress', Version
=3, Params
=params
)
16855 params
['Entities'] = entities
16856 reply
= await self
.rpc(msg
)
16857 return self
._map
(reply
, PublicAddress
)
16861 #@ReturnMapping(GetLeadershipSettingsBulkResults)
16862 async def Read(self
, entities
):
16864 entities : typing.Sequence[~Entity]
16865 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
16867 # map input types to rpc msg
16869 msg
= dict(Type
='Uniter', Request
='Read', Version
=3, Params
=params
)
16870 params
['Entities'] = entities
16871 reply
= await self
.rpc(msg
)
16872 return self
._map
(reply
, Read
)
16876 #@ReturnMapping(SettingsResults)
16877 async def ReadRemoteSettings(self
, relationunitpairs
):
16879 relationunitpairs : typing.Sequence[~RelationUnitPair]
16880 Returns -> typing.Sequence[~SettingsResult]
16882 # map input types to rpc msg
16884 msg
= dict(Type
='Uniter', Request
='ReadRemoteSettings', Version
=3, Params
=params
)
16885 params
['RelationUnitPairs'] = relationunitpairs
16886 reply
= await self
.rpc(msg
)
16887 return self
._map
(reply
, ReadRemoteSettings
)
16891 #@ReturnMapping(SettingsResults)
16892 async def ReadSettings(self
, relationunits
):
16894 relationunits : typing.Sequence[~RelationUnit]
16895 Returns -> typing.Sequence[~SettingsResult]
16897 # map input types to rpc msg
16899 msg
= dict(Type
='Uniter', Request
='ReadSettings', Version
=3, Params
=params
)
16900 params
['RelationUnits'] = relationunits
16901 reply
= await self
.rpc(msg
)
16902 return self
._map
(reply
, ReadSettings
)
16906 #@ReturnMapping(RelationResults)
16907 async def Relation(self
, relationunits
):
16909 relationunits : typing.Sequence[~RelationUnit]
16910 Returns -> typing.Sequence[~RelationResult]
16912 # map input types to rpc msg
16914 msg
= dict(Type
='Uniter', Request
='Relation', Version
=3, Params
=params
)
16915 params
['RelationUnits'] = relationunits
16916 reply
= await self
.rpc(msg
)
16917 return self
._map
(reply
, Relation
)
16921 #@ReturnMapping(RelationResults)
16922 async def RelationById(self
, relationids
):
16924 relationids : typing.Sequence[int]
16925 Returns -> typing.Sequence[~RelationResult]
16927 # map input types to rpc msg
16929 msg
= dict(Type
='Uniter', Request
='RelationById', Version
=3, Params
=params
)
16930 params
['RelationIds'] = relationids
16931 reply
= await self
.rpc(msg
)
16932 return self
._map
(reply
, RelationById
)
16936 #@ReturnMapping(ErrorResults)
16937 async def RemoveStorageAttachments(self
, ids
):
16939 ids : typing.Sequence[~StorageAttachmentId]
16940 Returns -> typing.Sequence[~ErrorResult]
16942 # map input types to rpc msg
16944 msg
= dict(Type
='Uniter', Request
='RemoveStorageAttachments', Version
=3, Params
=params
)
16945 params
['ids'] = ids
16946 reply
= await self
.rpc(msg
)
16947 return self
._map
(reply
, RemoveStorageAttachments
)
16951 #@ReturnMapping(ErrorResults)
16952 async def RequestReboot(self
, entities
):
16954 entities : typing.Sequence[~Entity]
16955 Returns -> typing.Sequence[~ErrorResult]
16957 # map input types to rpc msg
16959 msg
= dict(Type
='Uniter', Request
='RequestReboot', Version
=3, Params
=params
)
16960 params
['Entities'] = entities
16961 reply
= await self
.rpc(msg
)
16962 return self
._map
(reply
, RequestReboot
)
16966 #@ReturnMapping(ResolvedModeResults)
16967 async def Resolved(self
, entities
):
16969 entities : typing.Sequence[~Entity]
16970 Returns -> typing.Sequence[~ResolvedModeResult]
16972 # map input types to rpc msg
16974 msg
= dict(Type
='Uniter', Request
='Resolved', Version
=3, Params
=params
)
16975 params
['Entities'] = entities
16976 reply
= await self
.rpc(msg
)
16977 return self
._map
(reply
, Resolved
)
16981 #@ReturnMapping(StringResults)
16982 async def ServiceOwner(self
, entities
):
16984 entities : typing.Sequence[~Entity]
16985 Returns -> typing.Sequence[~StringResult]
16987 # map input types to rpc msg
16989 msg
= dict(Type
='Uniter', Request
='ServiceOwner', Version
=3, Params
=params
)
16990 params
['Entities'] = entities
16991 reply
= await self
.rpc(msg
)
16992 return self
._map
(reply
, ServiceOwner
)
16996 #@ReturnMapping(ServiceStatusResults)
16997 async def ServiceStatus(self
, entities
):
16999 entities : typing.Sequence[~Entity]
17000 Returns -> typing.Sequence[~ServiceStatusResult]
17002 # map input types to rpc msg
17004 msg
= dict(Type
='Uniter', Request
='ServiceStatus', Version
=3, Params
=params
)
17005 params
['Entities'] = entities
17006 reply
= await self
.rpc(msg
)
17007 return self
._map
(reply
, ServiceStatus
)
17011 #@ReturnMapping(ErrorResults)
17012 async def SetAgentStatus(self
, entities
):
17014 entities : typing.Sequence[~EntityStatusArgs]
17015 Returns -> typing.Sequence[~ErrorResult]
17017 # map input types to rpc msg
17019 msg
= dict(Type
='Uniter', Request
='SetAgentStatus', Version
=3, Params
=params
)
17020 params
['Entities'] = entities
17021 reply
= await self
.rpc(msg
)
17022 return self
._map
(reply
, SetAgentStatus
)
17026 #@ReturnMapping(ErrorResults)
17027 async def SetCharmURL(self
, entities
):
17029 entities : typing.Sequence[~EntityCharmURL]
17030 Returns -> typing.Sequence[~ErrorResult]
17032 # map input types to rpc msg
17034 msg
= dict(Type
='Uniter', Request
='SetCharmURL', Version
=3, Params
=params
)
17035 params
['Entities'] = entities
17036 reply
= await self
.rpc(msg
)
17037 return self
._map
(reply
, SetCharmURL
)
17041 #@ReturnMapping(ErrorResults)
17042 async def SetServiceStatus(self
, entities
):
17044 entities : typing.Sequence[~EntityStatusArgs]
17045 Returns -> typing.Sequence[~ErrorResult]
17047 # map input types to rpc msg
17049 msg
= dict(Type
='Uniter', Request
='SetServiceStatus', Version
=3, Params
=params
)
17050 params
['Entities'] = entities
17051 reply
= await self
.rpc(msg
)
17052 return self
._map
(reply
, SetServiceStatus
)
17056 #@ReturnMapping(ErrorResults)
17057 async def SetStatus(self
, entities
):
17059 entities : typing.Sequence[~EntityStatusArgs]
17060 Returns -> typing.Sequence[~ErrorResult]
17062 # map input types to rpc msg
17064 msg
= dict(Type
='Uniter', Request
='SetStatus', Version
=3, Params
=params
)
17065 params
['Entities'] = entities
17066 reply
= await self
.rpc(msg
)
17067 return self
._map
(reply
, SetStatus
)
17071 #@ReturnMapping(ErrorResults)
17072 async def SetUnitStatus(self
, entities
):
17074 entities : typing.Sequence[~EntityStatusArgs]
17075 Returns -> typing.Sequence[~ErrorResult]
17077 # map input types to rpc msg
17079 msg
= dict(Type
='Uniter', Request
='SetUnitStatus', Version
=3, Params
=params
)
17080 params
['Entities'] = entities
17081 reply
= await self
.rpc(msg
)
17082 return self
._map
(reply
, SetUnitStatus
)
17086 #@ReturnMapping(LifeResults)
17087 async def StorageAttachmentLife(self
, ids
):
17089 ids : typing.Sequence[~StorageAttachmentId]
17090 Returns -> typing.Sequence[~LifeResult]
17092 # map input types to rpc msg
17094 msg
= dict(Type
='Uniter', Request
='StorageAttachmentLife', Version
=3, Params
=params
)
17095 params
['ids'] = ids
17096 reply
= await self
.rpc(msg
)
17097 return self
._map
(reply
, StorageAttachmentLife
)
17101 #@ReturnMapping(StorageAttachmentResults)
17102 async def StorageAttachments(self
, ids
):
17104 ids : typing.Sequence[~StorageAttachmentId]
17105 Returns -> typing.Sequence[~StorageAttachmentResult]
17107 # map input types to rpc msg
17109 msg
= dict(Type
='Uniter', Request
='StorageAttachments', Version
=3, Params
=params
)
17110 params
['ids'] = ids
17111 reply
= await self
.rpc(msg
)
17112 return self
._map
(reply
, StorageAttachments
)
17116 #@ReturnMapping(StatusResults)
17117 async def UnitStatus(self
, entities
):
17119 entities : typing.Sequence[~Entity]
17120 Returns -> typing.Sequence[~StatusResult]
17122 # map input types to rpc msg
17124 msg
= dict(Type
='Uniter', Request
='UnitStatus', Version
=3, Params
=params
)
17125 params
['Entities'] = entities
17126 reply
= await self
.rpc(msg
)
17127 return self
._map
(reply
, UnitStatus
)
17131 #@ReturnMapping(StorageAttachmentIdsResults)
17132 async def UnitStorageAttachments(self
, entities
):
17134 entities : typing.Sequence[~Entity]
17135 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
17137 # map input types to rpc msg
17139 msg
= dict(Type
='Uniter', Request
='UnitStorageAttachments', Version
=3, Params
=params
)
17140 params
['Entities'] = entities
17141 reply
= await self
.rpc(msg
)
17142 return self
._map
(reply
, UnitStorageAttachments
)
17146 #@ReturnMapping(ErrorResults)
17147 async def UpdateSettings(self
, relationunits
):
17149 relationunits : typing.Sequence[~RelationUnitSettings]
17150 Returns -> typing.Sequence[~ErrorResult]
17152 # map input types to rpc msg
17154 msg
= dict(Type
='Uniter', Request
='UpdateSettings', Version
=3, Params
=params
)
17155 params
['RelationUnits'] = relationunits
17156 reply
= await self
.rpc(msg
)
17157 return self
._map
(reply
, UpdateSettings
)
17161 #@ReturnMapping(NotifyWatchResults)
17162 async def Watch(self
, entities
):
17164 entities : typing.Sequence[~Entity]
17165 Returns -> typing.Sequence[~NotifyWatchResult]
17167 # map input types to rpc msg
17169 msg
= dict(Type
='Uniter', Request
='Watch', Version
=3, Params
=params
)
17170 params
['Entities'] = entities
17171 reply
= await self
.rpc(msg
)
17172 return self
._map
(reply
, Watch
)
17176 #@ReturnMapping(NotifyWatchResult)
17177 async def WatchAPIHostPorts(self
):
17180 Returns -> typing.Union[~Error, str]
17182 # map input types to rpc msg
17184 msg
= dict(Type
='Uniter', Request
='WatchAPIHostPorts', Version
=3, Params
=params
)
17186 reply
= await self
.rpc(msg
)
17187 return self
._map
(reply
, WatchAPIHostPorts
)
17191 #@ReturnMapping(StringsWatchResults)
17192 async def WatchActionNotifications(self
, entities
):
17194 entities : typing.Sequence[~Entity]
17195 Returns -> typing.Sequence[~StringsWatchResult]
17197 # map input types to rpc msg
17199 msg
= dict(Type
='Uniter', Request
='WatchActionNotifications', Version
=3, Params
=params
)
17200 params
['Entities'] = entities
17201 reply
= await self
.rpc(msg
)
17202 return self
._map
(reply
, WatchActionNotifications
)
17206 #@ReturnMapping(NotifyWatchResults)
17207 async def WatchConfigSettings(self
, entities
):
17209 entities : typing.Sequence[~Entity]
17210 Returns -> typing.Sequence[~NotifyWatchResult]
17212 # map input types to rpc msg
17214 msg
= dict(Type
='Uniter', Request
='WatchConfigSettings', Version
=3, Params
=params
)
17215 params
['Entities'] = entities
17216 reply
= await self
.rpc(msg
)
17217 return self
._map
(reply
, WatchConfigSettings
)
17221 #@ReturnMapping(NotifyWatchResult)
17222 async def WatchForModelConfigChanges(self
):
17225 Returns -> typing.Union[~Error, str]
17227 # map input types to rpc msg
17229 msg
= dict(Type
='Uniter', Request
='WatchForModelConfigChanges', Version
=3, Params
=params
)
17231 reply
= await self
.rpc(msg
)
17232 return self
._map
(reply
, WatchForModelConfigChanges
)
17236 #@ReturnMapping(NotifyWatchResults)
17237 async def WatchLeadershipSettings(self
, entities
):
17239 entities : typing.Sequence[~Entity]
17240 Returns -> typing.Sequence[~NotifyWatchResult]
17242 # map input types to rpc msg
17244 msg
= dict(Type
='Uniter', Request
='WatchLeadershipSettings', Version
=3, Params
=params
)
17245 params
['Entities'] = entities
17246 reply
= await self
.rpc(msg
)
17247 return self
._map
(reply
, WatchLeadershipSettings
)
17251 #@ReturnMapping(NotifyWatchResults)
17252 async def WatchMeterStatus(self
, entities
):
17254 entities : typing.Sequence[~Entity]
17255 Returns -> typing.Sequence[~NotifyWatchResult]
17257 # map input types to rpc msg
17259 msg
= dict(Type
='Uniter', Request
='WatchMeterStatus', Version
=3, Params
=params
)
17260 params
['Entities'] = entities
17261 reply
= await self
.rpc(msg
)
17262 return self
._map
(reply
, WatchMeterStatus
)
17266 #@ReturnMapping(RelationUnitsWatchResults)
17267 async def WatchRelationUnits(self
, relationunits
):
17269 relationunits : typing.Sequence[~RelationUnit]
17270 Returns -> typing.Sequence[~RelationUnitsWatchResult]
17272 # map input types to rpc msg
17274 msg
= dict(Type
='Uniter', Request
='WatchRelationUnits', Version
=3, Params
=params
)
17275 params
['RelationUnits'] = relationunits
17276 reply
= await self
.rpc(msg
)
17277 return self
._map
(reply
, WatchRelationUnits
)
17281 #@ReturnMapping(StringsWatchResults)
17282 async def WatchServiceRelations(self
, entities
):
17284 entities : typing.Sequence[~Entity]
17285 Returns -> typing.Sequence[~StringsWatchResult]
17287 # map input types to rpc msg
17289 msg
= dict(Type
='Uniter', Request
='WatchServiceRelations', Version
=3, Params
=params
)
17290 params
['Entities'] = entities
17291 reply
= await self
.rpc(msg
)
17292 return self
._map
(reply
, WatchServiceRelations
)
17296 #@ReturnMapping(NotifyWatchResults)
17297 async def WatchStorageAttachments(self
, ids
):
17299 ids : typing.Sequence[~StorageAttachmentId]
17300 Returns -> typing.Sequence[~NotifyWatchResult]
17302 # map input types to rpc msg
17304 msg
= dict(Type
='Uniter', Request
='WatchStorageAttachments', Version
=3, Params
=params
)
17305 params
['ids'] = ids
17306 reply
= await self
.rpc(msg
)
17307 return self
._map
(reply
, WatchStorageAttachments
)
17311 #@ReturnMapping(NotifyWatchResults)
17312 async def WatchUnitAddresses(self
, entities
):
17314 entities : typing.Sequence[~Entity]
17315 Returns -> typing.Sequence[~NotifyWatchResult]
17317 # map input types to rpc msg
17319 msg
= dict(Type
='Uniter', Request
='WatchUnitAddresses', Version
=3, Params
=params
)
17320 params
['Entities'] = entities
17321 reply
= await self
.rpc(msg
)
17322 return self
._map
(reply
, WatchUnitAddresses
)
17326 #@ReturnMapping(StringsWatchResults)
17327 async def WatchUnitStorageAttachments(self
, entities
):
17329 entities : typing.Sequence[~Entity]
17330 Returns -> typing.Sequence[~StringsWatchResult]
17332 # map input types to rpc msg
17334 msg
= dict(Type
='Uniter', Request
='WatchUnitStorageAttachments', Version
=3, Params
=params
)
17335 params
['Entities'] = entities
17336 reply
= await self
.rpc(msg
)
17337 return self
._map
(reply
, WatchUnitStorageAttachments
)
17340 class Upgrader(Type
):
17343 schema
= {'definitions': {'Binary': {'additionalProperties': False,
17344 'properties': {'Arch': {'type': 'string'},
17345 'Number': {'$ref': '#/definitions/Number'},
17346 'Series': {'type': 'string'}},
17347 'required': ['Number', 'Series', 'Arch'],
17349 'Entities': {'additionalProperties': False,
17350 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17352 'required': ['Entities'],
17354 'EntitiesVersion': {'additionalProperties': False,
17355 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
17357 'required': ['AgentTools'],
17359 'Entity': {'additionalProperties': False,
17360 'properties': {'Tag': {'type': 'string'}},
17361 'required': ['Tag'],
17363 'EntityVersion': {'additionalProperties': False,
17364 'properties': {'Tag': {'type': 'string'},
17365 'Tools': {'$ref': '#/definitions/Version'}},
17366 'required': ['Tag', 'Tools'],
17368 'Error': {'additionalProperties': False,
17369 'properties': {'Code': {'type': 'string'},
17370 'Info': {'$ref': '#/definitions/ErrorInfo'},
17371 'Message': {'type': 'string'}},
17372 'required': ['Message', 'Code'],
17374 'ErrorInfo': {'additionalProperties': False,
17375 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17376 'MacaroonPath': {'type': 'string'}},
17378 'ErrorResult': {'additionalProperties': False,
17379 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17380 'required': ['Error'],
17382 'ErrorResults': {'additionalProperties': False,
17383 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17385 'required': ['Results'],
17387 'Macaroon': {'additionalProperties': False,
17388 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17390 'data': {'items': {'type': 'integer'},
17392 'id': {'$ref': '#/definitions/packet'},
17393 'location': {'$ref': '#/definitions/packet'},
17394 'sig': {'items': {'type': 'integer'},
17396 'required': ['data',
17402 'NotifyWatchResult': {'additionalProperties': False,
17403 'properties': {'Error': {'$ref': '#/definitions/Error'},
17404 'NotifyWatcherId': {'type': 'string'}},
17405 'required': ['NotifyWatcherId', 'Error'],
17407 'NotifyWatchResults': {'additionalProperties': False,
17408 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17410 'required': ['Results'],
17412 'Number': {'additionalProperties': False,
17413 'properties': {'Build': {'type': 'integer'},
17414 'Major': {'type': 'integer'},
17415 'Minor': {'type': 'integer'},
17416 'Patch': {'type': 'integer'},
17417 'Tag': {'type': 'string'}},
17418 'required': ['Major',
17424 'Tools': {'additionalProperties': False,
17425 'properties': {'sha256': {'type': 'string'},
17426 'size': {'type': 'integer'},
17427 'url': {'type': 'string'},
17428 'version': {'$ref': '#/definitions/Binary'}},
17429 'required': ['version', 'url', 'size'],
17431 'ToolsResult': {'additionalProperties': False,
17432 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
17433 'Error': {'$ref': '#/definitions/Error'},
17434 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
17436 'required': ['ToolsList',
17437 'DisableSSLHostnameVerification',
17440 'ToolsResults': {'additionalProperties': False,
17441 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
17443 'required': ['Results'],
17445 'Version': {'additionalProperties': False,
17446 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
17447 'required': ['Version'],
17449 'VersionResult': {'additionalProperties': False,
17450 'properties': {'Error': {'$ref': '#/definitions/Error'},
17451 'Version': {'$ref': '#/definitions/Number'}},
17452 'required': ['Version', 'Error'],
17454 'VersionResults': {'additionalProperties': False,
17455 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
17457 'required': ['Results'],
17459 'caveat': {'additionalProperties': False,
17460 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17461 'location': {'$ref': '#/definitions/packet'},
17462 'verificationId': {'$ref': '#/definitions/packet'}},
17463 'required': ['location',
17467 'packet': {'additionalProperties': False,
17468 'properties': {'headerLen': {'type': 'integer'},
17469 'start': {'type': 'integer'},
17470 'totalLen': {'type': 'integer'}},
17471 'required': ['start', 'totalLen', 'headerLen'],
17472 'type': 'object'}},
17473 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17474 'Result': {'$ref': '#/definitions/VersionResults'}},
17476 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
17477 'Result': {'$ref': '#/definitions/ErrorResults'}},
17479 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17480 'Result': {'$ref': '#/definitions/ToolsResults'}},
17482 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17483 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17484 'type': 'object'}},
17488 #@ReturnMapping(VersionResults)
17489 async def DesiredVersion(self
, entities
):
17491 entities : typing.Sequence[~Entity]
17492 Returns -> typing.Sequence[~VersionResult]
17494 # map input types to rpc msg
17496 msg
= dict(Type
='Upgrader', Request
='DesiredVersion', Version
=1, Params
=params
)
17497 params
['Entities'] = entities
17498 reply
= await self
.rpc(msg
)
17499 return self
._map
(reply
, DesiredVersion
)
17503 #@ReturnMapping(ErrorResults)
17504 async def SetTools(self
, agenttools
):
17506 agenttools : typing.Sequence[~EntityVersion]
17507 Returns -> typing.Sequence[~ErrorResult]
17509 # map input types to rpc msg
17511 msg
= dict(Type
='Upgrader', Request
='SetTools', Version
=1, Params
=params
)
17512 params
['AgentTools'] = agenttools
17513 reply
= await self
.rpc(msg
)
17514 return self
._map
(reply
, SetTools
)
17518 #@ReturnMapping(ToolsResults)
17519 async def Tools(self
, entities
):
17521 entities : typing.Sequence[~Entity]
17522 Returns -> typing.Sequence[~ToolsResult]
17524 # map input types to rpc msg
17526 msg
= dict(Type
='Upgrader', Request
='Tools', Version
=1, Params
=params
)
17527 params
['Entities'] = entities
17528 reply
= await self
.rpc(msg
)
17529 return self
._map
(reply
, Tools
)
17533 #@ReturnMapping(NotifyWatchResults)
17534 async def WatchAPIVersion(self
, entities
):
17536 entities : typing.Sequence[~Entity]
17537 Returns -> typing.Sequence[~NotifyWatchResult]
17539 # map input types to rpc msg
17541 msg
= dict(Type
='Upgrader', Request
='WatchAPIVersion', Version
=1, Params
=params
)
17542 params
['Entities'] = entities
17543 reply
= await self
.rpc(msg
)
17544 return self
._map
(reply
, WatchAPIVersion
)
17547 class UserManager(Type
):
17548 name
= 'UserManager'
17550 schema
= {'definitions': {'AddUser': {'additionalProperties': False,
17551 'properties': {'display-name': {'type': 'string'},
17552 'model-access-permission': {'type': 'string'},
17553 'password': {'type': 'string'},
17554 'shared-model-tags': {'items': {'type': 'string'},
17556 'username': {'type': 'string'}},
17557 'required': ['username',
17559 'shared-model-tags'],
17561 'AddUserResult': {'additionalProperties': False,
17562 'properties': {'error': {'$ref': '#/definitions/Error'},
17563 'secret-key': {'items': {'type': 'integer'},
17565 'tag': {'type': 'string'}},
17567 'AddUserResults': {'additionalProperties': False,
17568 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
17570 'required': ['results'],
17572 'AddUsers': {'additionalProperties': False,
17573 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
17575 'required': ['users'],
17577 'Entities': {'additionalProperties': False,
17578 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17580 'required': ['Entities'],
17582 'Entity': {'additionalProperties': False,
17583 'properties': {'Tag': {'type': 'string'}},
17584 'required': ['Tag'],
17586 'EntityPassword': {'additionalProperties': False,
17587 'properties': {'Password': {'type': 'string'},
17588 'Tag': {'type': 'string'}},
17589 'required': ['Tag', 'Password'],
17591 'EntityPasswords': {'additionalProperties': False,
17592 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
17594 'required': ['Changes'],
17596 'Error': {'additionalProperties': False,
17597 'properties': {'Code': {'type': 'string'},
17598 'Info': {'$ref': '#/definitions/ErrorInfo'},
17599 'Message': {'type': 'string'}},
17600 'required': ['Message', 'Code'],
17602 'ErrorInfo': {'additionalProperties': False,
17603 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17604 'MacaroonPath': {'type': 'string'}},
17606 'ErrorResult': {'additionalProperties': False,
17607 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17608 'required': ['Error'],
17610 'ErrorResults': {'additionalProperties': False,
17611 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17613 'required': ['Results'],
17615 'Macaroon': {'additionalProperties': False,
17616 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17618 'data': {'items': {'type': 'integer'},
17620 'id': {'$ref': '#/definitions/packet'},
17621 'location': {'$ref': '#/definitions/packet'},
17622 'sig': {'items': {'type': 'integer'},
17624 'required': ['data',
17630 'MacaroonResult': {'additionalProperties': False,
17631 'properties': {'error': {'$ref': '#/definitions/Error'},
17632 'result': {'$ref': '#/definitions/Macaroon'}},
17634 'MacaroonResults': {'additionalProperties': False,
17635 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
17637 'required': ['results'],
17639 'UserInfo': {'additionalProperties': False,
17640 'properties': {'created-by': {'type': 'string'},
17641 'date-created': {'format': 'date-time',
17643 'disabled': {'type': 'boolean'},
17644 'display-name': {'type': 'string'},
17645 'last-connection': {'format': 'date-time',
17647 'username': {'type': 'string'}},
17648 'required': ['username',
17654 'UserInfoRequest': {'additionalProperties': False,
17655 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17657 'include-disabled': {'type': 'boolean'}},
17658 'required': ['entities',
17659 'include-disabled'],
17661 'UserInfoResult': {'additionalProperties': False,
17662 'properties': {'error': {'$ref': '#/definitions/Error'},
17663 'result': {'$ref': '#/definitions/UserInfo'}},
17665 'UserInfoResults': {'additionalProperties': False,
17666 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
17668 'required': ['results'],
17670 'caveat': {'additionalProperties': False,
17671 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17672 'location': {'$ref': '#/definitions/packet'},
17673 'verificationId': {'$ref': '#/definitions/packet'}},
17674 'required': ['location',
17678 'packet': {'additionalProperties': False,
17679 'properties': {'headerLen': {'type': 'integer'},
17680 'start': {'type': 'integer'},
17681 'totalLen': {'type': 'integer'}},
17682 'required': ['start', 'totalLen', 'headerLen'],
17683 'type': 'object'}},
17684 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
17685 'Result': {'$ref': '#/definitions/AddUserResults'}},
17687 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17688 'Result': {'$ref': '#/definitions/MacaroonResults'}},
17690 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17691 'Result': {'$ref': '#/definitions/ErrorResults'}},
17693 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17694 'Result': {'$ref': '#/definitions/ErrorResults'}},
17696 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
17697 'Result': {'$ref': '#/definitions/ErrorResults'}},
17699 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
17700 'Result': {'$ref': '#/definitions/UserInfoResults'}},
17701 'type': 'object'}},
17705 #@ReturnMapping(AddUserResults)
17706 async def AddUser(self
, users
):
17708 users : typing.Sequence[~AddUser]
17709 Returns -> typing.Sequence[~AddUserResult]
17711 # map input types to rpc msg
17713 msg
= dict(Type
='UserManager', Request
='AddUser', Version
=1, Params
=params
)
17714 params
['users'] = users
17715 reply
= await self
.rpc(msg
)
17716 return self
._map
(reply
, AddUser
)
17720 #@ReturnMapping(MacaroonResults)
17721 async def CreateLocalLoginMacaroon(self
, entities
):
17723 entities : typing.Sequence[~Entity]
17724 Returns -> typing.Sequence[~MacaroonResult]
17726 # map input types to rpc msg
17728 msg
= dict(Type
='UserManager', Request
='CreateLocalLoginMacaroon', Version
=1, Params
=params
)
17729 params
['Entities'] = entities
17730 reply
= await self
.rpc(msg
)
17731 return self
._map
(reply
, CreateLocalLoginMacaroon
)
17735 #@ReturnMapping(ErrorResults)
17736 async def DisableUser(self
, entities
):
17738 entities : typing.Sequence[~Entity]
17739 Returns -> typing.Sequence[~ErrorResult]
17741 # map input types to rpc msg
17743 msg
= dict(Type
='UserManager', Request
='DisableUser', Version
=1, Params
=params
)
17744 params
['Entities'] = entities
17745 reply
= await self
.rpc(msg
)
17746 return self
._map
(reply
, DisableUser
)
17750 #@ReturnMapping(ErrorResults)
17751 async def EnableUser(self
, entities
):
17753 entities : typing.Sequence[~Entity]
17754 Returns -> typing.Sequence[~ErrorResult]
17756 # map input types to rpc msg
17758 msg
= dict(Type
='UserManager', Request
='EnableUser', Version
=1, Params
=params
)
17759 params
['Entities'] = entities
17760 reply
= await self
.rpc(msg
)
17761 return self
._map
(reply
, EnableUser
)
17765 #@ReturnMapping(ErrorResults)
17766 async def SetPassword(self
, changes
):
17768 changes : typing.Sequence[~EntityPassword]
17769 Returns -> typing.Sequence[~ErrorResult]
17771 # map input types to rpc msg
17773 msg
= dict(Type
='UserManager', Request
='SetPassword', Version
=1, Params
=params
)
17774 params
['Changes'] = changes
17775 reply
= await self
.rpc(msg
)
17776 return self
._map
(reply
, SetPassword
)
17780 #@ReturnMapping(UserInfoResults)
17781 async def UserInfo(self
, entities
, include_disabled
):
17783 entities : typing.Sequence[~Entity]
17784 include_disabled : bool
17785 Returns -> typing.Sequence[~UserInfoResult]
17787 # map input types to rpc msg
17789 msg
= dict(Type
='UserManager', Request
='UserInfo', Version
=1, Params
=params
)
17790 params
['entities'] = entities
17791 params
['include-disabled'] = include_disabled
17792 reply
= await self
.rpc(msg
)
17793 return self
._map
(reply
, UserInfo
)
17796 class VolumeAttachmentsWatcher(Type
):
17797 name
= 'VolumeAttachmentsWatcher'
17799 schema
= {'definitions': {'Error': {'additionalProperties': False,
17800 'properties': {'Code': {'type': 'string'},
17801 'Info': {'$ref': '#/definitions/ErrorInfo'},
17802 'Message': {'type': 'string'}},
17803 'required': ['Message', 'Code'],
17805 'ErrorInfo': {'additionalProperties': False,
17806 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17807 'MacaroonPath': {'type': 'string'}},
17809 'Macaroon': {'additionalProperties': False,
17810 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17812 'data': {'items': {'type': 'integer'},
17814 'id': {'$ref': '#/definitions/packet'},
17815 'location': {'$ref': '#/definitions/packet'},
17816 'sig': {'items': {'type': 'integer'},
17818 'required': ['data',
17824 'MachineStorageId': {'additionalProperties': False,
17825 'properties': {'attachmenttag': {'type': 'string'},
17826 'machinetag': {'type': 'string'}},
17827 'required': ['machinetag',
17830 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17831 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17833 'Error': {'$ref': '#/definitions/Error'},
17834 'MachineStorageIdsWatcherId': {'type': 'string'}},
17835 'required': ['MachineStorageIdsWatcherId',
17839 'caveat': {'additionalProperties': False,
17840 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17841 'location': {'$ref': '#/definitions/packet'},
17842 'verificationId': {'$ref': '#/definitions/packet'}},
17843 'required': ['location',
17847 'packet': {'additionalProperties': False,
17848 'properties': {'headerLen': {'type': 'integer'},
17849 'start': {'type': 'integer'},
17850 'totalLen': {'type': 'integer'}},
17851 'required': ['start', 'totalLen', 'headerLen'],
17852 'type': 'object'}},
17853 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
17855 'Stop': {'type': 'object'}},
17859 #@ReturnMapping(MachineStorageIdsWatchResult)
17860 async def Next(self
):
17863 Returns -> typing.Union[~Error, typing.Sequence[~MachineStorageId]]
17865 # map input types to rpc msg
17867 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Next', Version
=2, Params
=params
)
17869 reply
= await self
.rpc(msg
)
17870 return self
._map
(reply
, Next
)
17874 #@ReturnMapping(None)
17875 async def Stop(self
):
17880 # map input types to rpc msg
17882 msg
= dict(Type
='VolumeAttachmentsWatcher', Request
='Stop', Version
=2, Params
=params
)
17884 reply
= await self
.rpc(msg
)
17885 return self
._map
(reply
, Stop
)