Add client code from bcsaller
[osm/N2VC.git] / juju / client / client.py
1
2 from libjuju.facade import Type, ReturnMapping
3
4 class Action(Type):
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):
8 '''
9 name : str
10 receiver : str
11 parameters : typing.Mapping[str, typing.Any]
12 tag : str
13 '''
14 self.name = name
15 self.receiver = receiver
16 self.parameters = parameters
17 self.tag = tag
18
19
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):
24 '''
25 action : ~Action
26 output : typing.Mapping[str, typing.Any]
27 enqueued : str
28 status : str
29 message : str
30 started : str
31 completed : str
32 error : ~Error
33 '''
34 self.action = action
35 self.output = output
36 self.enqueued = enqueued
37 self.status = status
38 self.message = message
39 self.started = started
40 self.completed = completed
41 self.error = error
42
43
44 class Actions(Type):
45 _toSchema = {'actions': 'actions'}
46 _toPy = {'actions': 'actions'}
47 def __init__(self, actions):
48 '''
49 actions : typing.Sequence[~Action]
50 '''
51 self.actions = actions
52
53
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):
58 '''
59 name : str
60 actions : typing.Sequence[~ActionResult]
61 error : ~Error
62 '''
63 self.name = name
64 self.actions = actions
65 self.error = error
66
67
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):
72 '''
73 receiver : str
74 actions : typing.Sequence[~ActionResult]
75 error : ~Error
76 '''
77 self.receiver = receiver
78 self.actions = actions
79 self.error = error
80
81
82 class Entity(Type):
83 _toSchema = {'tag': 'Tag'}
84 _toPy = {'Tag': 'tag'}
85 def __init__(self, tag):
86 '''
87 tag : str
88 '''
89 self.tag = tag
90
91
92 class Error(Type):
93 _toSchema = {'info': 'Info', 'code': 'Code', 'message': 'Message'}
94 _toPy = {'Info': 'info', 'Code': 'code', 'Message': 'message'}
95 def __init__(self, info, code, message):
96 '''
97 info : ~ErrorInfo
98 code : str
99 message : str
100 '''
101 self.info = info
102 self.code = code
103 self.message = message
104
105
106 class ErrorInfo(Type):
107 _toSchema = {'macaroonpath': 'MacaroonPath', 'macaroon': 'Macaroon'}
108 _toPy = {'Macaroon': 'macaroon', 'MacaroonPath': 'macaroonpath'}
109 def __init__(self, macaroon, macaroonpath):
110 '''
111 macaroon : ~Macaroon
112 macaroonpath : str
113 '''
114 self.macaroon = macaroon
115 self.macaroonpath = macaroonpath
116
117
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):
122 '''
123 caveats : typing.Sequence[~caveat]
124 id_ : ~packet
125 data : typing.Sequence[int]
126 location : ~packet
127 sig : typing.Sequence[int]
128 '''
129 self.caveats = caveats
130 self.id_ = id_
131 self.data = data
132 self.location = location
133 self.sig = sig
134
135
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):
140 '''
141 servicetag : str
142 actions : ~Actions
143 error : ~Error
144 '''
145 self.servicetag = servicetag
146 self.actions = actions
147 self.error = error
148
149
150 class caveat(Type):
151 _toSchema = {'location': 'location', 'caveatid': 'caveatId', 'verificationid': 'verificationId'}
152 _toPy = {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'}
153 def __init__(self, verificationid, location, caveatid):
154 '''
155 verificationid : ~packet
156 location : ~packet
157 caveatid : ~packet
158 '''
159 self.verificationid = verificationid
160 self.location = location
161 self.caveatid = caveatid
162
163
164 class packet(Type):
165 _toSchema = {'start': 'start', 'totallen': 'totalLen', 'headerlen': 'headerLen'}
166 _toPy = {'start': 'start', 'headerLen': 'headerlen', 'totalLen': 'totallen'}
167 def __init__(self, start, headerlen, totallen):
168 '''
169 start : int
170 headerlen : int
171 totallen : int
172 '''
173 self.start = start
174 self.headerlen = headerlen
175 self.totallen = totallen
176
177
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):
182 '''
183 life : str
184 error : ~Error
185 containertype : str
186 jobs : typing.Sequence[str]
187 '''
188 self.life = life
189 self.error = error
190 self.containertype = containertype
191 self.jobs = jobs
192
193
194 class EntityPassword(Type):
195 _toSchema = {'password': 'Password', 'tag': 'Tag'}
196 _toPy = {'Tag': 'tag', 'Password': 'password'}
197 def __init__(self, tag, password):
198 '''
199 tag : str
200 password : str
201 '''
202 self.tag = tag
203 self.password = password
204
205
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):
210 '''
211 info : ~ErrorInfo
212 code : str
213 message : str
214 '''
215 self.info = info
216 self.code = code
217 self.message = message
218
219
220 class Delta(Type):
221 _toSchema = {'removed': 'Removed'}
222 _toPy = {'Removed': 'removed'}
223 def __init__(self, removed):
224 '''
225 removed : bool
226 '''
227 self.removed = removed
228
229
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):
234 '''
235 error : ~ErrorResult
236 entitytag : str
237 annotations : typing.Mapping[str, str]
238 '''
239 self.error = error
240 self.entitytag = entitytag
241 self.annotations = annotations
242
243
244 class EntityAnnotations(Type):
245 _toSchema = {'annotations': 'Annotations', 'entitytag': 'EntityTag'}
246 _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag'}
247 def __init__(self, entitytag, annotations):
248 '''
249 entitytag : str
250 annotations : typing.Mapping[str, str]
251 '''
252 self.entitytag = entitytag
253 self.annotations = annotations
254
255
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):
260 '''
261 hostname : str
262 model : str
263 version : ~Number
264 checksum : str
265 stored : str
266 id_ : str
267 machine : str
268 size : int
269 started : str
270 notes : str
271 finished : str
272 cacert : str
273 checksumformat : str
274 caprivatekey : str
275 '''
276 self.hostname = hostname
277 self.model = model
278 self.version = version
279 self.checksum = checksum
280 self.stored = stored
281 self.id_ = id_
282 self.machine = machine
283 self.size = size
284 self.started = started
285 self.notes = notes
286 self.finished = finished
287 self.cacert = cacert
288 self.checksumformat = checksumformat
289 self.caprivatekey = caprivatekey
290
291
292 class Number(Type):
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):
296 '''
297 build : int
298 minor : int
299 tag : str
300 patch : int
301 major : int
302 '''
303 self.build = build
304 self.minor = minor
305 self.tag = tag
306 self.patch = patch
307 self.major = major
308
309
310 class Block(Type):
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):
314 '''
315 id_ : str
316 message : str
317 type_ : str
318 tag : str
319 '''
320 self.id_ = id_
321 self.message = message
322 self.type_ = type_
323 self.tag = tag
324
325
326 class BlockResult(Type):
327 _toSchema = {'error': 'error', 'result': 'result'}
328 _toPy = {'error': 'error', 'result': 'result'}
329 def __init__(self, error, result):
330 '''
331 error : ~Error
332 result : ~Block
333 '''
334 self.error = error
335 self.result = result
336
337
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):
342 '''
343 constraints : ~Value
344 parentid : str
345 containertype : str
346 addrs : typing.Sequence[~Address]
347 nonce : str
348 series : str
349 instanceid : str
350 disks : typing.Sequence[~Constraints]
351 placement : ~Placement
352 jobs : typing.Sequence[str]
353 hardwarecharacteristics : ~HardwareCharacteristics
354 '''
355 self.constraints = constraints
356 self.parentid = parentid
357 self.containertype = containertype
358 self.addrs = addrs
359 self.nonce = nonce
360 self.series = series
361 self.instanceid = instanceid
362 self.disks = disks
363 self.placement = placement
364 self.jobs = jobs
365 self.hardwarecharacteristics = hardwarecharacteristics
366
367
368 class AddMachinesResult(Type):
369 _toSchema = {'machine': 'Machine', 'error': 'Error'}
370 _toPy = {'Error': 'error', 'Machine': 'machine'}
371 def __init__(self, error, machine):
372 '''
373 error : ~Error
374 machine : str
375 '''
376 self.error = error
377 self.machine = machine
378
379
380 class Address(Type):
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):
384 '''
385 type_ : str
386 value : str
387 scope : str
388 spacename : str
389 '''
390 self.type_ = type_
391 self.value = value
392 self.scope = scope
393 self.spacename = spacename
394
395
396 class Binary(Type):
397 _toSchema = {'number': 'Number', 'arch': 'Arch', 'series': 'Series'}
398 _toPy = {'Series': 'series', 'Arch': 'arch', 'Number': 'number'}
399 def __init__(self, series, number, arch):
400 '''
401 series : str
402 number : ~Number
403 arch : str
404 '''
405 self.series = series
406 self.number = number
407 self.arch = arch
408
409
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):
414 '''
415 requires : typing.Sequence[str]
416 id_ : str
417 method : str
418 args : typing.Sequence[typing.Any]
419 '''
420 self.requires = requires
421 self.id_ = id_
422 self.method = method
423 self.args = args
424
425
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):
430 '''
431 count : int
432 pool : str
433 size : int
434 '''
435 self.count = count
436 self.pool = pool
437 self.size = size
438
439
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):
444 '''
445 data : typing.Mapping[str, typing.Any]
446 kind : str
447 version : str
448 life : str
449 info : str
450 status : str
451 since : str
452 '''
453 self.data = data
454 self.kind = kind
455 self.version = version
456 self.life = life
457 self.info = info
458 self.status = status
459 self.since = since
460
461
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):
466 '''
467 name : str
468 role : str
469 servicename : str
470 subordinate : bool
471 '''
472 self.name = name
473 self.role = role
474 self.servicename = servicename
475 self.subordinate = subordinate
476
477
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):
482 '''
483 info : str
484 data : typing.Mapping[str, typing.Any]
485 status : str
486 since : str
487 '''
488 self.info = info
489 self.data = data
490 self.status = status
491 self.since = since
492
493
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):
498 '''
499 mem : int
500 cpucores : int
501 cpupower : int
502 rootdisk : int
503 tags : typing.Sequence[str]
504 arch : str
505 availabilityzone : str
506 '''
507 self.mem = mem
508 self.cpucores = cpucores
509 self.cpupower = cpupower
510 self.rootdisk = rootdisk
511 self.tags = tags
512 self.arch = arch
513 self.availabilityzone = availabilityzone
514
515
516 class HostPort(Type):
517 _toSchema = {'port': 'Port', 'address': 'Address'}
518 _toPy = {'Port': 'port', 'Address': 'address'}
519 def __init__(self, port, address):
520 '''
521 port : int
522 address : ~Address
523 '''
524 self.port = port
525 self.address = address
526
527
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):
532 '''
533 id_ : str
534 hardware : str
535 series : str
536 instancestatus : ~DetailedStatus
537 instanceid : str
538 containers : typing.Mapping[str, ~MachineStatus]
539 wantsvote : bool
540 hasvote : bool
541 dnsname : str
542 jobs : typing.Sequence[str]
543 agentstatus : ~DetailedStatus
544 '''
545 self.id_ = id_
546 self.hardware = hardware
547 self.series = series
548 self.instancestatus = instancestatus
549 self.instanceid = instanceid
550 self.containers = containers
551 self.wantsvote = wantsvote
552 self.hasvote = hasvote
553 self.dnsname = dnsname
554 self.jobs = jobs
555 self.agentstatus = agentstatus
556
557
558 class MeterStatus(Type):
559 _toSchema = {'message': 'Message', 'color': 'Color'}
560 _toPy = {'Color': 'color', 'Message': 'message'}
561 def __init__(self, color, message):
562 '''
563 color : str
564 message : str
565 '''
566 self.color = color
567 self.message = message
568
569
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):
574 '''
575 lastconnection : str
576 displayname : str
577 access : str
578 user : str
579 '''
580 self.lastconnection = lastconnection
581 self.displayname = displayname
582 self.access = access
583 self.user = user
584
585
586 class ModelUserInfoResult(Type):
587 _toSchema = {'error': 'error', 'result': 'result'}
588 _toPy = {'error': 'error', 'result': 'result'}
589 def __init__(self, error, result):
590 '''
591 error : ~Error
592 result : ~ModelUserInfo
593 '''
594 self.error = error
595 self.result = result
596
597
598 class Placement(Type):
599 _toSchema = {'directive': 'Directive', 'scope': 'Scope'}
600 _toPy = {'Scope': 'scope', 'Directive': 'directive'}
601 def __init__(self, scope, directive):
602 '''
603 scope : str
604 directive : str
605 '''
606 self.scope = scope
607 self.directive = directive
608
609
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):
614 '''
615 interface : str
616 scope : str
617 id_ : int
618 key : str
619 endpoints : typing.Sequence[~EndpointStatus]
620 '''
621 self.interface = interface
622 self.scope = scope
623 self.id_ = id_
624 self.key = key
625 self.endpoints = endpoints
626
627
628 class ResolveCharmResult(Type):
629 _toSchema = {'url': 'URL', 'error': 'Error'}
630 _toPy = {'Error': 'error', 'URL': 'url'}
631 def __init__(self, error, url):
632 '''
633 error : str
634 url : ~URL
635 '''
636 self.error = error
637 self.url = url
638
639
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):
644 '''
645 exposed : bool
646 meterstatuses : typing.Mapping[str, ~MeterStatus]
647 units : typing.Mapping[str, ~UnitStatus]
648 life : str
649 canupgradeto : str
650 charm : str
651 relations : typing.Sequence[str]
652 status : ~DetailedStatus
653 subordinateto : typing.Sequence[str]
654 '''
655 self.exposed = exposed
656 self.meterstatuses = meterstatuses
657 self.units = units
658 self.life = life
659 self.canupgradeto = canupgradeto
660 self.charm = charm
661 self.relations = relations
662 self.status = status
663 self.subordinateto = subordinateto
664
665
666 class Tools(Type):
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):
670 '''
671 url : str
672 version : ~Binary
673 size : int
674 sha256 : str
675 '''
676 self.url = url
677 self.version = version
678 self.size = size
679 self.sha256 = sha256
680
681
682 class URL(Type):
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):
686 '''
687 user : str
688 channel : str
689 name : str
690 revision : int
691 schema : str
692 series : str
693 '''
694 self.user = user
695 self.channel = channel
696 self.name = name
697 self.revision = revision
698 self.schema = schema
699 self.series = series
700
701
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):
706 '''
707 openedports : typing.Sequence[str]
708 subordinates : typing.Mapping[str, ~UnitStatus]
709 workloadstatus : ~DetailedStatus
710 charm : str
711 publicaddress : str
712 machine : str
713 agentstatus : ~DetailedStatus
714 '''
715 self.openedports = openedports
716 self.subordinates = subordinates
717 self.workloadstatus = workloadstatus
718 self.charm = charm
719 self.publicaddress = publicaddress
720 self.machine = machine
721 self.agentstatus = agentstatus
722
723
724 class Value(Type):
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):
728 '''
729 arch : str
730 root_disk : int
731 container : str
732 cpu_power : int
733 virt_type : str
734 mem : int
735 spaces : typing.Sequence[str]
736 cpu_cores : int
737 instance_type : str
738 tags : typing.Sequence[str]
739 '''
740 self.arch = arch
741 self.root_disk = root_disk
742 self.container = container
743 self.cpu_power = cpu_power
744 self.virt_type = virt_type
745 self.mem = mem
746 self.spaces = spaces
747 self.cpu_cores = cpu_cores
748 self.instance_type = instance_type
749 self.tags = tags
750
751
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):
756 '''
757 id_ : str
758 error : ~Error
759 model_tag : str
760 '''
761 self.id_ = id_
762 self.error = error
763 self.model_tag = model_tag
764
765
766 class Model(Type):
767 _toSchema = {'uuid': 'UUID', 'name': 'Name', 'ownertag': 'OwnerTag'}
768 _toPy = {'Name': 'name', 'OwnerTag': 'ownertag', 'UUID': 'uuid'}
769 def __init__(self, name, ownertag, uuid):
770 '''
771 name : str
772 ownertag : str
773 uuid : str
774 '''
775 self.name = name
776 self.ownertag = ownertag
777 self.uuid = uuid
778
779
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):
784 '''
785 blocks : typing.Sequence[str]
786 model_uuid : str
787 owner_tag : str
788 name : str
789 '''
790 self.blocks = blocks
791 self.model_uuid = model_uuid
792 self.owner_tag = owner_tag
793 self.name = name
794
795
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):
800 '''
801 model_tag : str
802 target_info : ~ModelMigrationTargetInfo
803 '''
804 self.model_tag = model_tag
805 self.target_info = target_info
806
807
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):
812 '''
813 auth_tag : str
814 controller_tag : str
815 addrs : typing.Sequence[str]
816 ca_cert : str
817 password : str
818 '''
819 self.auth_tag = auth_tag
820 self.controller_tag = controller_tag
821 self.addrs = addrs
822 self.ca_cert = ca_cert
823 self.password = password
824
825
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):
830 '''
831 service_count : int
832 owner_tag : str
833 life : str
834 model_tag : str
835 hosted_machine_count : int
836 '''
837 self.service_count = service_count
838 self.owner_tag = owner_tag
839 self.life = life
840 self.model_tag = model_tag
841 self.hosted_machine_count = hosted_machine_count
842
843
844 class UserModel(Type):
845 _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'}
846 _toPy = {'Model': 'model', 'LastConnection': 'lastconnection'}
847 def __init__(self, model, lastconnection):
848 '''
849 model : ~Model
850 lastconnection : str
851 '''
852 self.model = model
853 self.lastconnection = lastconnection
854
855
856 class LifeResult(Type):
857 _toSchema = {'life': 'Life', 'error': 'Error'}
858 _toPy = {'Life': 'life', 'Error': 'error'}
859 def __init__(self, life, error):
860 '''
861 life : str
862 error : ~Error
863 '''
864 self.life = life
865 self.error = error
866
867
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):
872 '''
873 error : ~Error
874 changes : typing.Sequence[str]
875 stringswatcherid : str
876 '''
877 self.error = error
878 self.changes = changes
879 self.stringswatcherid = stringswatcherid
880
881
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):
886 '''
887 spacetag : str
888 subnettag : str
889 zones : typing.Sequence[str]
890 subnetproviderid : str
891 '''
892 self.spacetag = spacetag
893 self.subnettag = subnettag
894 self.zones = zones
895 self.subnetproviderid = subnetproviderid
896
897
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):
902 '''
903 spacetag : str
904 public : bool
905 providerid : str
906 subnettags : typing.Sequence[str]
907 '''
908 self.spacetag = spacetag
909 self.public = public
910 self.providerid = providerid
911 self.subnettags = subnettags
912
913
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):
918 '''
919 name : str
920 error : ~Error
921 providerid : str
922 subnets : typing.Sequence[~Subnet]
923 '''
924 self.name = name
925 self.error = error
926 self.providerid = providerid
927 self.subnets = subnets
928
929
930 class Subnet(Type):
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):
934 '''
935 spacetag : str
936 providerid : str
937 life : str
938 staticrangehighip : typing.Sequence[int]
939 cidr : str
940 staticrangelowip : typing.Sequence[int]
941 zones : typing.Sequence[str]
942 vlantag : int
943 status : str
944 '''
945 self.spacetag = spacetag
946 self.providerid = providerid
947 self.life = life
948 self.staticrangehighip = staticrangehighip
949 self.cidr = cidr
950 self.staticrangelowip = staticrangelowip
951 self.zones = zones
952 self.vlantag = vlantag
953 self.status = status
954
955
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):
960 '''
961 inuse : bool
962 busaddress : str
963 mountpoint : str
964 uuid : str
965 devicename : str
966 filesystemtype : str
967 hardwareid : str
968 label : str
969 devicelinks : typing.Sequence[str]
970 size : int
971 '''
972 self.inuse = inuse
973 self.busaddress = busaddress
974 self.mountpoint = mountpoint
975 self.uuid = uuid
976 self.devicename = devicename
977 self.filesystemtype = filesystemtype
978 self.hardwareid = hardwareid
979 self.label = label
980 self.devicelinks = devicelinks
981 self.size = size
982
983
984 class MachineBlockDevices(Type):
985 _toSchema = {'machine': 'machine', 'blockdevices': 'blockdevices'}
986 _toPy = {'machine': 'machine', 'blockdevices': 'blockdevices'}
987 def __init__(self, machine, blockdevices):
988 '''
989 machine : str
990 blockdevices : typing.Sequence[~BlockDevice]
991 '''
992 self.machine = machine
993 self.blockdevices = blockdevices
994
995
996 class MachineStorageId(Type):
997 _toSchema = {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
998 _toPy = {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
999 def __init__(self, attachmenttag, machinetag):
1000 '''
1001 attachmenttag : str
1002 machinetag : str
1003 '''
1004 self.attachmenttag = attachmenttag
1005 self.machinetag = machinetag
1006
1007
1008 class BoolResult(Type):
1009 _toSchema = {'error': 'Error', 'result': 'Result'}
1010 _toPy = {'Error': 'error', 'Result': 'result'}
1011 def __init__(self, error, result):
1012 '''
1013 error : ~Error
1014 result : bool
1015 '''
1016 self.error = error
1017 self.result = result
1018
1019
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):
1024 '''
1025 relationtag : str
1026 unittag : str
1027 portrange : ~PortRange
1028 '''
1029 self.relationtag = relationtag
1030 self.unittag = unittag
1031 self.portrange = portrange
1032
1033
1034 class MachinePorts(Type):
1035 _toSchema = {'subnettag': 'SubnetTag', 'machinetag': 'MachineTag'}
1036 _toPy = {'SubnetTag': 'subnettag', 'MachineTag': 'machinetag'}
1037 def __init__(self, subnettag, machinetag):
1038 '''
1039 subnettag : str
1040 machinetag : str
1041 '''
1042 self.subnettag = subnettag
1043 self.machinetag = machinetag
1044
1045
1046 class MachinePortsResult(Type):
1047 _toSchema = {'ports': 'Ports', 'error': 'Error'}
1048 _toPy = {'Error': 'error', 'Ports': 'ports'}
1049 def __init__(self, error, ports):
1050 '''
1051 error : ~Error
1052 ports : typing.Sequence[~MachinePortRange]
1053 '''
1054 self.error = error
1055 self.ports = ports
1056
1057
1058 class NotifyWatchResult(Type):
1059 _toSchema = {'error': 'Error', 'notifywatcherid': 'NotifyWatcherId'}
1060 _toPy = {'Error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
1061 def __init__(self, error, notifywatcherid):
1062 '''
1063 error : ~Error
1064 notifywatcherid : str
1065 '''
1066 self.error = error
1067 self.notifywatcherid = notifywatcherid
1068
1069
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):
1074 '''
1075 fromport : int
1076 toport : int
1077 protocol : str
1078 '''
1079 self.fromport = fromport
1080 self.toport = toport
1081 self.protocol = protocol
1082
1083
1084 class StringResult(Type):
1085 _toSchema = {'error': 'Error', 'result': 'Result'}
1086 _toPy = {'Error': 'error', 'Result': 'result'}
1087 def __init__(self, error, result):
1088 '''
1089 error : ~Error
1090 result : str
1091 '''
1092 self.error = error
1093 self.result = result
1094
1095
1096 class StringsResult(Type):
1097 _toSchema = {'error': 'Error', 'result': 'Result'}
1098 _toPy = {'Error': 'error', 'Result': 'result'}
1099 def __init__(self, error, result):
1100 '''
1101 error : ~Error
1102 result : typing.Sequence[str]
1103 '''
1104 self.error = error
1105 self.result = result
1106
1107
1108 class ControllersChangeResult(Type):
1109 _toSchema = {'error': 'Error', 'result': 'Result'}
1110 _toPy = {'Error': 'error', 'Result': 'result'}
1111 def __init__(self, error, result):
1112 '''
1113 error : ~Error
1114 result : ~ControllersChanges
1115 '''
1116 self.error = error
1117 self.result = result
1118
1119
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):
1124 '''
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]
1131 '''
1132 self.added = added
1133 self.removed = removed
1134 self.promoted = promoted
1135 self.maintained = maintained
1136 self.demoted = demoted
1137 self.converted = converted
1138
1139
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):
1144 '''
1145 modeltag : str
1146 num_controllers : int
1147 constraints : ~Value
1148 series : str
1149 placement : typing.Sequence[str]
1150 '''
1151 self.modeltag = modeltag
1152 self.num_controllers = num_controllers
1153 self.constraints = constraints
1154 self.series = series
1155 self.placement = placement
1156
1157
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):
1162 '''
1163 tag : str
1164 series : str
1165 publicaddress : ~Address
1166 '''
1167 self.tag = tag
1168 self.series = series
1169 self.publicaddress = publicaddress
1170
1171
1172 class Member(Type):
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):
1176 '''
1177 id_ : int
1178 hidden : bool
1179 votes : int
1180 slavedelay : int
1181 tags : typing.Mapping[str, str]
1182 priority : float
1183 arbiter : bool
1184 buildindexes : bool
1185 address : str
1186 '''
1187 self.id_ = id_
1188 self.hidden = hidden
1189 self.votes = votes
1190 self.slavedelay = slavedelay
1191 self.tags = tags
1192 self.priority = priority
1193 self.arbiter = arbiter
1194 self.buildindexes = buildindexes
1195 self.address = address
1196
1197
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):
1202 '''
1203 minor : int
1204 patch : str
1205 major : int
1206 storageengine : str
1207 '''
1208 self.minor = minor
1209 self.patch = patch
1210 self.major = major
1211 self.storageengine = storageengine
1212
1213
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):
1218 '''
1219 tag : str
1220 public_keys : typing.Sequence[str]
1221 '''
1222 self.tag = tag
1223 self.public_keys = public_keys
1224
1225
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):
1230 '''
1231 kind : str
1232 url : str
1233 arch : str
1234 series : str
1235 created : str
1236 '''
1237 self.kind = kind
1238 self.url = url
1239 self.arch = arch
1240 self.series = series
1241 self.created = created
1242
1243
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):
1248 '''
1249 kind : str
1250 arch : str
1251 series : str
1252 '''
1253 self.kind = kind
1254 self.arch = arch
1255 self.series = series
1256
1257
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):
1262 '''
1263 root_storage_type : str
1264 source : str
1265 arch : str
1266 image_id : str
1267 priority : int
1268 virt_type : str
1269 version : str
1270 series : str
1271 stream : str
1272 region : str
1273 root_storage_size : int
1274 '''
1275 self.root_storage_type = root_storage_type
1276 self.source = source
1277 self.arch = arch
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
1286
1287
1288 class CloudImageMetadataList(Type):
1289 _toSchema = {'metadata': 'metadata'}
1290 _toPy = {'metadata': 'metadata'}
1291 def __init__(self, metadata):
1292 '''
1293 metadata : typing.Sequence[~CloudImageMetadata]
1294 '''
1295 self.metadata = metadata
1296
1297
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):
1302 '''
1303 tag : str
1304 info : str
1305 data : typing.Mapping[str, typing.Any]
1306 status : str
1307 '''
1308 self.tag = tag
1309 self.info = info
1310 self.data = data
1311 self.status = status
1312
1313
1314 class MachineAddresses(Type):
1315 _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'}
1316 _toPy = {'Tag': 'tag', 'Addresses': 'addresses'}
1317 def __init__(self, tag, addresses):
1318 '''
1319 tag : str
1320 addresses : typing.Sequence[~Address]
1321 '''
1322 self.tag = tag
1323 self.addresses = addresses
1324
1325
1326 class MachineAddressesResult(Type):
1327 _toSchema = {'addresses': 'Addresses', 'error': 'Error'}
1328 _toPy = {'Addresses': 'addresses', 'Error': 'error'}
1329 def __init__(self, addresses, error):
1330 '''
1331 addresses : typing.Sequence[~Address]
1332 error : ~Error
1333 '''
1334 self.addresses = addresses
1335 self.error = error
1336
1337
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):
1342 '''
1343 info : str
1344 data : typing.Mapping[str, typing.Any]
1345 life : str
1346 error : ~Error
1347 id_ : str
1348 status : str
1349 since : str
1350 '''
1351 self.info = info
1352 self.data = data
1353 self.life = life
1354 self.error = error
1355 self.id_ = id_
1356 self.status = status
1357 self.since = since
1358
1359
1360 class Entities(Type):
1361 _toSchema = {'entities': 'Entities'}
1362 _toPy = {'Entities': 'entities'}
1363 def __init__(self, entities):
1364 '''
1365 entities : typing.Sequence[~Entity]
1366 '''
1367 self.entities = entities
1368
1369
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):
1374 '''
1375 durationseconds : float
1376 servicetag : str
1377 unittag : str
1378 '''
1379 self.durationseconds = durationseconds
1380 self.servicetag = servicetag
1381 self.unittag = unittag
1382
1383
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):
1388 '''
1389 status : str
1390 results : typing.Mapping[str, typing.Any]
1391 actiontag : str
1392 message : str
1393 '''
1394 self.status = status
1395 self.results = results
1396 self.actiontag = actiontag
1397 self.message = message
1398
1399
1400 class JobsResult(Type):
1401 _toSchema = {'error': 'Error', 'jobs': 'Jobs'}
1402 _toPy = {'Error': 'error', 'Jobs': 'jobs'}
1403 def __init__(self, error, jobs):
1404 '''
1405 error : ~Error
1406 jobs : typing.Sequence[str]
1407 '''
1408 self.error = error
1409 self.jobs = jobs
1410
1411
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):
1416 '''
1417 deviceindex : int
1418 provideraddressid : str
1419 mtu : int
1420 vlantag : int
1421 dnssearchdomains : typing.Sequence[str]
1422 cidr : str
1423 providervlanid : str
1424 dnsservers : typing.Sequence[str]
1425 noautostart : bool
1426 interfacetype : str
1427 address : str
1428 parentinterfacename : str
1429 configtype : str
1430 gatewayaddress : str
1431 providerspaceid : str
1432 providersubnetid : str
1433 disabled : bool
1434 interfacename : str
1435 macaddress : str
1436 providerid : str
1437 '''
1438 self.deviceindex = deviceindex
1439 self.provideraddressid = provideraddressid
1440 self.mtu = mtu
1441 self.vlantag = vlantag
1442 self.dnssearchdomains = dnssearchdomains
1443 self.cidr = cidr
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
1458
1459
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):
1464 '''
1465 info : str
1466 error : ~Error
1467 code : str
1468 '''
1469 self.info = info
1470 self.error = error
1471 self.code = code
1472
1473
1474 class Metric(Type):
1475 _toSchema = {'key': 'Key', 'value': 'Value', 'time': 'Time'}
1476 _toPy = {'Value': 'value', 'Key': 'key', 'Time': 'time'}
1477 def __init__(self, value, key, time):
1478 '''
1479 value : str
1480 key : str
1481 time : str
1482 '''
1483 self.value = value
1484 self.key = key
1485 self.time = time
1486
1487
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):
1492 '''
1493 created : str
1494 charmurl : str
1495 metrics : typing.Sequence[~Metric]
1496 uuid : str
1497 '''
1498 self.created = created
1499 self.charmurl = charmurl
1500 self.metrics = metrics
1501 self.uuid = uuid
1502
1503
1504 class MetricBatchParam(Type):
1505 _toSchema = {'batch': 'Batch', 'tag': 'Tag'}
1506 _toPy = {'Tag': 'tag', 'Batch': 'batch'}
1507 def __init__(self, tag, batch):
1508 '''
1509 tag : str
1510 batch : ~MetricBatch
1511 '''
1512 self.tag = tag
1513 self.batch = batch
1514
1515
1516 class EntityMetrics(Type):
1517 _toSchema = {'metrics': 'metrics', 'error': 'error'}
1518 _toPy = {'metrics': 'metrics', 'error': 'error'}
1519 def __init__(self, metrics, error):
1520 '''
1521 metrics : typing.Sequence[~MetricResult]
1522 error : ~Error
1523 '''
1524 self.metrics = metrics
1525 self.error = error
1526
1527
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):
1532 '''
1533 info : str
1534 code : str
1535 tag : str
1536 '''
1537 self.info = info
1538 self.code = code
1539 self.tag = tag
1540
1541
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):
1546 '''
1547 key : str
1548 value : str
1549 time : str
1550 '''
1551 self.key = key
1552 self.value = value
1553 self.time = time
1554
1555
1556 class PhaseResult(Type):
1557 _toSchema = {'phase': 'phase', 'error': 'Error'}
1558 _toPy = {'Error': 'error', 'phase': 'phase'}
1559 def __init__(self, error, phase):
1560 '''
1561 error : ~Error
1562 phase : str
1563 '''
1564 self.error = error
1565 self.phase = phase
1566
1567
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):
1572 '''
1573 defaultseries : str
1574 providertype : str
1575 serveruuid : str
1576 users : typing.Sequence[~ModelUserInfo]
1577 uuid : str
1578 name : str
1579 life : str
1580 ownertag : str
1581 status : ~EntityStatus
1582 '''
1583 self.defaultseries = defaultseries
1584 self.providertype = providertype
1585 self.serveruuid = serveruuid
1586 self.users = users
1587 self.uuid = uuid
1588 self.name = name
1589 self.life = life
1590 self.ownertag = ownertag
1591 self.status = status
1592
1593
1594 class ModelInfoResult(Type):
1595 _toSchema = {'error': 'error', 'result': 'result'}
1596 _toPy = {'error': 'error', 'result': 'result'}
1597 def __init__(self, error, result):
1598 '''
1599 error : ~Error
1600 result : ~ModelInfo
1601 '''
1602 self.error = error
1603 self.result = result
1604
1605
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):
1610 '''
1611 action : str
1612 user_tag : str
1613 access : str
1614 model_tag : str
1615 '''
1616 self.action = action
1617 self.user_tag = user_tag
1618 self.access = access
1619 self.model_tag = model_tag
1620
1621
1622 class ConstraintsResult(Type):
1623 _toSchema = {'constraints': 'Constraints', 'error': 'Error'}
1624 _toPy = {'Error': 'error', 'Constraints': 'constraints'}
1625 def __init__(self, error, constraints):
1626 '''
1627 error : ~Error
1628 constraints : ~Value
1629 '''
1630 self.error = error
1631 self.constraints = constraints
1632
1633
1634 class DistributionGroupResult(Type):
1635 _toSchema = {'error': 'Error', 'result': 'Result'}
1636 _toPy = {'Error': 'error', 'Result': 'result'}
1637 def __init__(self, error, result):
1638 '''
1639 error : ~Error
1640 result : typing.Sequence[str]
1641 '''
1642 self.error = error
1643 self.result = result
1644
1645
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):
1650 '''
1651 volumes : typing.Sequence[~Volume]
1652 characteristics : ~HardwareCharacteristics
1653 nonce : str
1654 tag : str
1655 instanceid : str
1656 networkconfig : typing.Sequence[~NetworkConfig]
1657 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
1658 '''
1659 self.volumes = volumes
1660 self.characteristics = characteristics
1661 self.nonce = nonce
1662 self.tag = tag
1663 self.instanceid = instanceid
1664 self.networkconfig = networkconfig
1665 self.volumeattachments = volumeattachments
1666
1667
1668 class MachineContainers(Type):
1669 _toSchema = {'containertypes': 'ContainerTypes', 'machinetag': 'MachineTag'}
1670 _toPy = {'ContainerTypes': 'containertypes', 'MachineTag': 'machinetag'}
1671 def __init__(self, containertypes, machinetag):
1672 '''
1673 containertypes : typing.Sequence[str]
1674 machinetag : str
1675 '''
1676 self.containertypes = containertypes
1677 self.machinetag = machinetag
1678
1679
1680 class MachineNetworkConfigResult(Type):
1681 _toSchema = {'info': 'Info', 'error': 'Error'}
1682 _toPy = {'Error': 'error', 'Info': 'info'}
1683 def __init__(self, error, info):
1684 '''
1685 error : ~Error
1686 info : typing.Sequence[~NetworkConfig]
1687 '''
1688 self.error = error
1689 self.info = info
1690
1691
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):
1696 '''
1697 series : str
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]
1703 placement : str
1704 jobs : typing.Sequence[str]
1705 imagemetadata : typing.Sequence[~CloudImageMetadata]
1706 '''
1707 self.series = series
1708 self.constraints = constraints
1709 self.subnetstozones = subnetstozones
1710 self.tags = tags
1711 self.volumes = volumes
1712 self.endpointbindings = endpointbindings
1713 self.placement = placement
1714 self.jobs = jobs
1715 self.imagemetadata = imagemetadata
1716
1717
1718 class ProvisioningInfoResult(Type):
1719 _toSchema = {'error': 'Error', 'result': 'Result'}
1720 _toPy = {'Error': 'error', 'Result': 'result'}
1721 def __init__(self, error, result):
1722 '''
1723 error : ~Error
1724 result : ~ProvisioningInfo
1725 '''
1726 self.error = error
1727 self.result = result
1728
1729
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):
1734 '''
1735 https : str
1736 ftp : str
1737 noproxy : str
1738 http : str
1739 '''
1740 self.https = https
1741 self.ftp = ftp
1742 self.noproxy = noproxy
1743 self.http = http
1744
1745
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):
1750 '''
1751 disablesslhostnameverification : bool
1752 error : ~Error
1753 toolslist : typing.Sequence[~Tools]
1754 '''
1755 self.disablesslhostnameverification = disablesslhostnameverification
1756 self.error = error
1757 self.toolslist = toolslist
1758
1759
1760 class UpdateBehavior(Type):
1761 _toSchema = {'enableosupgrade': 'EnableOSUpgrade', 'enableosrefreshupdate': 'EnableOSRefreshUpdate'}
1762 _toPy = {'EnableOSUpgrade': 'enableosupgrade', 'EnableOSRefreshUpdate': 'enableosrefreshupdate'}
1763 def __init__(self, enableosupgrade, enableosrefreshupdate):
1764 '''
1765 enableosupgrade : bool
1766 enableosrefreshupdate : bool
1767 '''
1768 self.enableosupgrade = enableosupgrade
1769 self.enableosrefreshupdate = enableosrefreshupdate
1770
1771
1772 class Volume(Type):
1773 _toSchema = {'info': 'info', 'volumetag': 'volumetag'}
1774 _toPy = {'info': 'info', 'volumetag': 'volumetag'}
1775 def __init__(self, info, volumetag):
1776 '''
1777 info : ~VolumeInfo
1778 volumetag : str
1779 '''
1780 self.info = info
1781 self.volumetag = volumetag
1782
1783
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):
1788 '''
1789 busaddress : str
1790 devicelink : str
1791 read_only : bool
1792 devicename : str
1793 '''
1794 self.busaddress = busaddress
1795 self.devicelink = devicelink
1796 self.read_only = read_only
1797 self.devicename = devicename
1798
1799
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):
1804 '''
1805 volumetag : str
1806 provider : str
1807 instanceid : str
1808 read_only : bool
1809 volumeid : str
1810 machinetag : str
1811 '''
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
1818
1819
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):
1824 '''
1825 hardwareid : str
1826 persistent : bool
1827 size : int
1828 volumeid : str
1829 '''
1830 self.hardwareid = hardwareid
1831 self.persistent = persistent
1832 self.size = size
1833 self.volumeid = volumeid
1834
1835
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):
1840 '''
1841 provider : str
1842 size : int
1843 volumetag : str
1844 attachment : ~VolumeAttachmentParams
1845 attributes : typing.Mapping[str, typing.Any]
1846 tags : typing.Mapping[str, str]
1847 '''
1848 self.provider = provider
1849 self.size = size
1850 self.volumetag = volumetag
1851 self.attachment = attachment
1852 self.attributes = attributes
1853 self.tags = tags
1854
1855
1856 class WatchContainer(Type):
1857 _toSchema = {'containertype': 'ContainerType', 'machinetag': 'MachineTag'}
1858 _toPy = {'ContainerType': 'containertype', 'MachineTag': 'machinetag'}
1859 def __init__(self, machinetag, containertype):
1860 '''
1861 machinetag : str
1862 containertype : str
1863 '''
1864 self.machinetag = machinetag
1865 self.containertype = containertype
1866
1867
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):
1872 '''
1873 http : str
1874 ftp : str
1875 noproxy : str
1876 https : str
1877 '''
1878 self.http = http
1879 self.ftp = ftp
1880 self.noproxy = noproxy
1881 self.https = https
1882
1883
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):
1888 '''
1889 aptproxysettings : ~ProxyConfig
1890 error : ~Error
1891 proxysettings : ~ProxyConfig
1892 '''
1893 self.aptproxysettings = aptproxysettings
1894 self.error = error
1895 self.proxysettings = proxysettings
1896
1897
1898 class RebootActionResult(Type):
1899 _toSchema = {'error': 'error', 'result': 'result'}
1900 _toPy = {'error': 'error', 'result': 'result'}
1901 def __init__(self, error, result):
1902 '''
1903 error : ~Error
1904 result : str
1905 '''
1906 self.error = error
1907 self.result = result
1908
1909
1910 class RelationUnitsChange(Type):
1911 _toSchema = {'departed': 'Departed', 'changed': 'Changed'}
1912 _toPy = {'Departed': 'departed', 'Changed': 'changed'}
1913 def __init__(self, departed, changed):
1914 '''
1915 departed : typing.Sequence[str]
1916 changed : typing.Mapping[str, ~UnitSettings]
1917 '''
1918 self.departed = departed
1919 self.changed = changed
1920
1921
1922 class UnitSettings(Type):
1923 _toSchema = {'version': 'Version'}
1924 _toPy = {'Version': 'version'}
1925 def __init__(self, version):
1926 '''
1927 version : int
1928 '''
1929 self.version = version
1930
1931
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):
1936 '''
1937 jitterretrytime : bool
1938 minretrytime : int
1939 shouldretry : bool
1940 retrytimefactor : int
1941 maxretrytime : int
1942 '''
1943 self.jitterretrytime = jitterretrytime
1944 self.minretrytime = minretrytime
1945 self.shouldretry = shouldretry
1946 self.retrytimefactor = retrytimefactor
1947 self.maxretrytime = maxretrytime
1948
1949
1950 class RetryStrategyResult(Type):
1951 _toSchema = {'error': 'Error', 'result': 'Result'}
1952 _toPy = {'Error': 'error', 'Result': 'result'}
1953 def __init__(self, error, result):
1954 '''
1955 error : ~Error
1956 result : ~RetryStrategy
1957 '''
1958 self.error = error
1959 self.result = result
1960
1961
1962 class SSHAddressResult(Type):
1963 _toSchema = {'error': 'error', 'address': 'address'}
1964 _toPy = {'error': 'error', 'address': 'address'}
1965 def __init__(self, error, address):
1966 '''
1967 error : ~Error
1968 address : str
1969 '''
1970 self.error = error
1971 self.address = address
1972
1973
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):
1978 '''
1979 error : ~Error
1980 public_keys : typing.Sequence[str]
1981 '''
1982 self.error = error
1983 self.public_keys = public_keys
1984
1985
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):
1990 '''
1991 interface : str
1992 limit : int
1993 role : str
1994 name : str
1995 scope : str
1996 optional : bool
1997 '''
1998 self.interface = interface
1999 self.limit = limit
2000 self.role = role
2001 self.name = name
2002 self.scope = scope
2003 self.optional = optional
2004
2005
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):
2010 '''
2011 charmurl : str
2012 resources : typing.Mapping[str, str]
2013 channel : str
2014 constraints : ~Value
2015 placement : typing.Sequence[~Placement]
2016 endpointbindings : typing.Mapping[str, str]
2017 configyaml : str
2018 servicename : str
2019 series : str
2020 config : typing.Mapping[str, str]
2021 numunits : int
2022 storage : typing.Mapping[str, ~Constraints]
2023 '''
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
2036
2037
2038 class ServiceMetricCredential(Type):
2039 _toSchema = {'servicename': 'ServiceName', 'metriccredentials': 'MetricCredentials'}
2040 _toPy = {'MetricCredentials': 'metriccredentials', 'ServiceName': 'servicename'}
2041 def __init__(self, metriccredentials, servicename):
2042 '''
2043 metriccredentials : typing.Sequence[int]
2044 servicename : str
2045 '''
2046 self.metriccredentials = metriccredentials
2047 self.servicename = servicename
2048
2049
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):
2054 '''
2055 modeltag : str
2056 controllertag : str
2057 duration : int
2058 '''
2059 self.modeltag = modeltag
2060 self.controllertag = controllertag
2061 self.duration = duration
2062
2063
2064 class Space(Type):
2065 _toSchema = {'name': 'Name', 'error': 'Error', 'subnets': 'Subnets'}
2066 _toPy = {'Name': 'name', 'Error': 'error', 'Subnets': 'subnets'}
2067 def __init__(self, name, error, subnets):
2068 '''
2069 name : str
2070 error : ~Error
2071 subnets : typing.Sequence[~Subnet]
2072 '''
2073 self.name = name
2074 self.error = error
2075 self.subnets = subnets
2076
2077
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):
2082 '''
2083 read_only : bool
2084 mountpoint : str
2085 '''
2086 self.read_only = read_only
2087 self.mountpoint = mountpoint
2088
2089
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):
2094 '''
2095 info : ~FilesystemInfo
2096 status : ~EntityStatus
2097 filesystemtag : str
2098 storage : ~StorageDetails
2099 volumetag : str
2100 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
2101 '''
2102 self.info = info
2103 self.status = status
2104 self.filesystemtag = filesystemtag
2105 self.storage = storage
2106 self.volumetag = volumetag
2107 self.machineattachments = machineattachments
2108
2109
2110 class FilesystemDetailsListResult(Type):
2111 _toSchema = {'error': 'error', 'result': 'result'}
2112 _toPy = {'error': 'error', 'result': 'result'}
2113 def __init__(self, error, result):
2114 '''
2115 error : ~Error
2116 result : typing.Sequence[~FilesystemDetails]
2117 '''
2118 self.error = error
2119 self.result = result
2120
2121
2122 class FilesystemFilter(Type):
2123 _toSchema = {'machines': 'machines'}
2124 _toPy = {'machines': 'machines'}
2125 def __init__(self, machines):
2126 '''
2127 machines : typing.Sequence[str]
2128 '''
2129 self.machines = machines
2130
2131
2132 class FilesystemInfo(Type):
2133 _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'}
2134 _toPy = {'filesystemid': 'filesystemid', 'size': 'size'}
2135 def __init__(self, filesystemid, size):
2136 '''
2137 filesystemid : str
2138 size : int
2139 '''
2140 self.filesystemid = filesystemid
2141 self.size = size
2142
2143
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):
2148 '''
2149 storagename : str
2150 unit : str
2151 storage : ~StorageConstraints
2152 '''
2153 self.storagename = storagename
2154 self.unit = unit
2155 self.storage = storage
2156
2157
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):
2162 '''
2163 unittag : str
2164 location : str
2165 storagetag : str
2166 machinetag : str
2167 '''
2168 self.unittag = unittag
2169 self.location = location
2170 self.storagetag = storagetag
2171 self.machinetag = machinetag
2172
2173
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):
2178 '''
2179 count : int
2180 pool : str
2181 size : int
2182 '''
2183 self.count = count
2184 self.pool = pool
2185 self.size = size
2186
2187
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):
2192 '''
2193 ownertag : str
2194 kind : int
2195 status : ~EntityStatus
2196 storagetag : str
2197 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
2198 persistent : bool
2199 '''
2200 self.ownertag = ownertag
2201 self.kind = kind
2202 self.status = status
2203 self.storagetag = storagetag
2204 self.attachments = attachments
2205 self.persistent = persistent
2206
2207
2208 class StorageDetailsListResult(Type):
2209 _toSchema = {'error': 'error', 'result': 'result'}
2210 _toPy = {'error': 'error', 'result': 'result'}
2211 def __init__(self, error, result):
2212 '''
2213 error : ~Error
2214 result : typing.Sequence[~StorageDetails]
2215 '''
2216 self.error = error
2217 self.result = result
2218
2219
2220 class StorageDetailsResult(Type):
2221 _toSchema = {'error': 'error', 'result': 'result'}
2222 _toPy = {'error': 'error', 'result': 'result'}
2223 def __init__(self, error, result):
2224 '''
2225 error : ~Error
2226 result : ~StorageDetails
2227 '''
2228 self.error = error
2229 self.result = result
2230
2231
2232 class StorageFilter(Type):
2233 _toSchema = {}
2234 _toPy = {}
2235 def __init__(self):
2236 '''
2237
2238 '''
2239 pass
2240
2241
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):
2246 '''
2247 name : str
2248 provider : str
2249 attrs : typing.Mapping[str, typing.Any]
2250 '''
2251 self.name = name
2252 self.provider = provider
2253 self.attrs = attrs
2254
2255
2256 class StoragePoolFilter(Type):
2257 _toSchema = {'names': 'names', 'providers': 'providers'}
2258 _toPy = {'names': 'names', 'providers': 'providers'}
2259 def __init__(self, names, providers):
2260 '''
2261 names : typing.Sequence[str]
2262 providers : typing.Sequence[str]
2263 '''
2264 self.names = names
2265 self.providers = providers
2266
2267
2268 class StoragePoolsResult(Type):
2269 _toSchema = {'storagepools': 'storagepools', 'error': 'error'}
2270 _toPy = {'storagepools': 'storagepools', 'error': 'error'}
2271 def __init__(self, storagepools, error):
2272 '''
2273 storagepools : typing.Sequence[~StoragePool]
2274 error : ~Error
2275 '''
2276 self.storagepools = storagepools
2277 self.error = error
2278
2279
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):
2284 '''
2285 info : ~VolumeInfo
2286 volumetag : str
2287 status : ~EntityStatus
2288 storage : ~StorageDetails
2289 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
2290 '''
2291 self.info = info
2292 self.volumetag = volumetag
2293 self.status = status
2294 self.storage = storage
2295 self.machineattachments = machineattachments
2296
2297
2298 class VolumeDetailsListResult(Type):
2299 _toSchema = {'error': 'error', 'result': 'result'}
2300 _toPy = {'error': 'error', 'result': 'result'}
2301 def __init__(self, error, result):
2302 '''
2303 error : ~Error
2304 result : typing.Sequence[~VolumeDetails]
2305 '''
2306 self.error = error
2307 self.result = result
2308
2309
2310 class VolumeFilter(Type):
2311 _toSchema = {'machines': 'machines'}
2312 _toPy = {'machines': 'machines'}
2313 def __init__(self, machines):
2314 '''
2315 machines : typing.Sequence[str]
2316 '''
2317 self.machines = machines
2318
2319
2320 class BlockDeviceResult(Type):
2321 _toSchema = {'error': 'error', 'result': 'result'}
2322 _toPy = {'error': 'error', 'result': 'result'}
2323 def __init__(self, error, result):
2324 '''
2325 error : ~Error
2326 result : ~BlockDevice
2327 '''
2328 self.error = error
2329 self.result = result
2330
2331
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):
2336 '''
2337 info : ~FilesystemInfo
2338 volumetag : str
2339 filesystemtag : str
2340 '''
2341 self.info = info
2342 self.volumetag = volumetag
2343 self.filesystemtag = filesystemtag
2344
2345
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):
2350 '''
2351 info : ~FilesystemAttachmentInfo
2352 machinetag : str
2353 filesystemtag : str
2354 '''
2355 self.info = info
2356 self.machinetag = machinetag
2357 self.filesystemtag = filesystemtag
2358
2359
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):
2364 '''
2365 provider : str
2366 filesystemtag : str
2367 filesystemid : str
2368 instanceid : str
2369 read_only : bool
2370 mountpoint : str
2371 machinetag : str
2372 '''
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
2380
2381
2382 class FilesystemAttachmentParamsResult(Type):
2383 _toSchema = {'error': 'error', 'result': 'result'}
2384 _toPy = {'error': 'error', 'result': 'result'}
2385 def __init__(self, error, result):
2386 '''
2387 error : ~Error
2388 result : ~FilesystemAttachmentParams
2389 '''
2390 self.error = error
2391 self.result = result
2392
2393
2394 class FilesystemAttachmentResult(Type):
2395 _toSchema = {'error': 'error', 'result': 'result'}
2396 _toPy = {'error': 'error', 'result': 'result'}
2397 def __init__(self, error, result):
2398 '''
2399 error : ~Error
2400 result : ~FilesystemAttachment
2401 '''
2402 self.error = error
2403 self.result = result
2404
2405
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):
2410 '''
2411 provider : str
2412 size : int
2413 volumetag : str
2414 attachment : ~FilesystemAttachmentParams
2415 attributes : typing.Mapping[str, typing.Any]
2416 filesystemtag : str
2417 tags : typing.Mapping[str, str]
2418 '''
2419 self.provider = provider
2420 self.size = size
2421 self.volumetag = volumetag
2422 self.attachment = attachment
2423 self.attributes = attributes
2424 self.filesystemtag = filesystemtag
2425 self.tags = tags
2426
2427
2428 class FilesystemParamsResult(Type):
2429 _toSchema = {'error': 'error', 'result': 'result'}
2430 _toPy = {'error': 'error', 'result': 'result'}
2431 def __init__(self, error, result):
2432 '''
2433 error : ~Error
2434 result : ~FilesystemParams
2435 '''
2436 self.error = error
2437 self.result = result
2438
2439
2440 class FilesystemResult(Type):
2441 _toSchema = {'error': 'error', 'result': 'result'}
2442 _toPy = {'error': 'error', 'result': 'result'}
2443 def __init__(self, error, result):
2444 '''
2445 error : ~Error
2446 result : ~Filesystem
2447 '''
2448 self.error = error
2449 self.result = result
2450
2451
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):
2456 '''
2457 error : ~Error
2458 changes : typing.Sequence[~MachineStorageId]
2459 machinestorageidswatcherid : str
2460 '''
2461 self.error = error
2462 self.changes = changes
2463 self.machinestorageidswatcherid = machinestorageidswatcherid
2464
2465
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):
2470 '''
2471 info : ~VolumeAttachmentInfo
2472 volumetag : str
2473 machinetag : str
2474 '''
2475 self.info = info
2476 self.volumetag = volumetag
2477 self.machinetag = machinetag
2478
2479
2480 class VolumeAttachmentParamsResult(Type):
2481 _toSchema = {'error': 'error', 'result': 'result'}
2482 _toPy = {'error': 'error', 'result': 'result'}
2483 def __init__(self, error, result):
2484 '''
2485 error : ~Error
2486 result : ~VolumeAttachmentParams
2487 '''
2488 self.error = error
2489 self.result = result
2490
2491
2492 class VolumeAttachmentResult(Type):
2493 _toSchema = {'error': 'error', 'result': 'result'}
2494 _toPy = {'error': 'error', 'result': 'result'}
2495 def __init__(self, error, result):
2496 '''
2497 error : ~Error
2498 result : ~VolumeAttachment
2499 '''
2500 self.error = error
2501 self.result = result
2502
2503
2504 class VolumeParamsResult(Type):
2505 _toSchema = {'error': 'error', 'result': 'result'}
2506 _toPy = {'error': 'error', 'result': 'result'}
2507 def __init__(self, error, result):
2508 '''
2509 error : ~Error
2510 result : ~VolumeParams
2511 '''
2512 self.error = error
2513 self.result = result
2514
2515
2516 class VolumeResult(Type):
2517 _toSchema = {'error': 'error', 'result': 'result'}
2518 _toPy = {'error': 'error', 'result': 'result'}
2519 def __init__(self, error, result):
2520 '''
2521 error : ~Error
2522 result : ~Volume
2523 '''
2524 self.error = error
2525 self.result = result
2526
2527
2528 class SpaceResult(Type):
2529 _toSchema = {'error': 'Error', 'tag': 'Tag'}
2530 _toPy = {'Tag': 'tag', 'Error': 'error'}
2531 def __init__(self, tag, error):
2532 '''
2533 tag : str
2534 error : ~Error
2535 '''
2536 self.tag = tag
2537 self.error = error
2538
2539
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):
2544 '''
2545 name : str
2546 error : ~Error
2547 available : bool
2548 '''
2549 self.name = name
2550 self.error = error
2551 self.available = available
2552
2553
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):
2558 '''
2559 name : str
2560 life : str
2561 globalname : str
2562 uuid : str
2563 issystem : bool
2564 '''
2565 self.name = name
2566 self.life = life
2567 self.globalname = globalname
2568 self.uuid = uuid
2569 self.issystem = issystem
2570
2571
2572 class CharmURL(Type):
2573 _toSchema = {'url': 'URL'}
2574 _toPy = {'URL': 'url'}
2575 def __init__(self, url):
2576 '''
2577 url : str
2578 '''
2579 self.url = url
2580
2581
2582 class ConfigSettingsResult(Type):
2583 _toSchema = {'settings': 'Settings', 'error': 'Error'}
2584 _toPy = {'Error': 'error', 'Settings': 'settings'}
2585 def __init__(self, error, settings):
2586 '''
2587 error : ~Error
2588 settings : typing.Mapping[str, typing.Any]
2589 '''
2590 self.error = error
2591 self.settings = settings
2592
2593
2594 class Endpoint(Type):
2595 _toSchema = {'servicename': 'ServiceName', 'relation': 'Relation'}
2596 _toPy = {'Relation': 'relation', 'ServiceName': 'servicename'}
2597 def __init__(self, relation, servicename):
2598 '''
2599 relation : ~Relation
2600 servicename : str
2601 '''
2602 self.relation = relation
2603 self.servicename = servicename
2604
2605
2606 class EntityCharmURL(Type):
2607 _toSchema = {'charmurl': 'CharmURL', 'tag': 'Tag'}
2608 _toPy = {'Tag': 'tag', 'CharmURL': 'charmurl'}
2609 def __init__(self, tag, charmurl):
2610 '''
2611 tag : str
2612 charmurl : str
2613 '''
2614 self.tag = tag
2615 self.charmurl = charmurl
2616
2617
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):
2622 '''
2623 tag : str
2624 fromport : int
2625 toport : int
2626 protocol : str
2627 '''
2628 self.tag = tag
2629 self.fromport = fromport
2630 self.toport = toport
2631 self.protocol = protocol
2632
2633
2634 class GetLeadershipSettingsResult(Type):
2635 _toSchema = {'settings': 'Settings', 'error': 'Error'}
2636 _toPy = {'Error': 'error', 'Settings': 'settings'}
2637 def __init__(self, error, settings):
2638 '''
2639 error : ~Error
2640 settings : typing.Mapping[str, str]
2641 '''
2642 self.error = error
2643 self.settings = settings
2644
2645
2646 class IntResult(Type):
2647 _toSchema = {'error': 'Error', 'result': 'Result'}
2648 _toPy = {'Error': 'error', 'Result': 'result'}
2649 def __init__(self, error, result):
2650 '''
2651 error : ~Error
2652 result : int
2653 '''
2654 self.error = error
2655 self.result = result
2656
2657
2658 class MergeLeadershipSettingsParam(Type):
2659 _toSchema = {'servicetag': 'ServiceTag', 'settings': 'Settings'}
2660 _toPy = {'ServiceTag': 'servicetag', 'Settings': 'settings'}
2661 def __init__(self, servicetag, settings):
2662 '''
2663 servicetag : str
2664 settings : typing.Mapping[str, str]
2665 '''
2666 self.servicetag = servicetag
2667 self.settings = settings
2668
2669
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_):
2674 '''
2675 life : str
2676 error : ~Error
2677 endpoint : ~Endpoint
2678 key : str
2679 id_ : int
2680 '''
2681 self.life = life
2682 self.error = error
2683 self.endpoint = endpoint
2684 self.key = key
2685 self.id_ = id_
2686
2687
2688 class RelationUnit(Type):
2689 _toSchema = {'relation': 'Relation', 'unit': 'Unit'}
2690 _toPy = {'Relation': 'relation', 'Unit': 'unit'}
2691 def __init__(self, relation, unit):
2692 '''
2693 relation : str
2694 unit : str
2695 '''
2696 self.relation = relation
2697 self.unit = unit
2698
2699
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):
2704 '''
2705 localunit : str
2706 remoteunit : str
2707 relation : str
2708 '''
2709 self.localunit = localunit
2710 self.remoteunit = remoteunit
2711 self.relation = relation
2712
2713
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):
2718 '''
2719 relation : str
2720 unit : str
2721 settings : typing.Mapping[str, str]
2722 '''
2723 self.relation = relation
2724 self.unit = unit
2725 self.settings = settings
2726
2727
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):
2732 '''
2733 error : ~Error
2734 relationunitswatcherid : str
2735 changes : ~RelationUnitsChange
2736 '''
2737 self.error = error
2738 self.relationunitswatcherid = relationunitswatcherid
2739 self.changes = changes
2740
2741
2742 class ResolvedModeResult(Type):
2743 _toSchema = {'mode': 'Mode', 'error': 'Error'}
2744 _toPy = {'Error': 'error', 'Mode': 'mode'}
2745 def __init__(self, error, mode):
2746 '''
2747 error : ~Error
2748 mode : str
2749 '''
2750 self.error = error
2751 self.mode = mode
2752
2753
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):
2758 '''
2759 units : typing.Mapping[str, ~StatusResult]
2760 error : ~Error
2761 service : ~StatusResult
2762 '''
2763 self.units = units
2764 self.error = error
2765 self.service = service
2766
2767
2768 class SettingsResult(Type):
2769 _toSchema = {'settings': 'Settings', 'error': 'Error'}
2770 _toPy = {'Error': 'error', 'Settings': 'settings'}
2771 def __init__(self, error, settings):
2772 '''
2773 error : ~Error
2774 settings : typing.Mapping[str, str]
2775 '''
2776 self.error = error
2777 self.settings = settings
2778
2779
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):
2784 '''
2785 kind : int
2786 storagetag : str
2787 location : str
2788 life : str
2789 ownertag : str
2790 unittag : str
2791 '''
2792 self.kind = kind
2793 self.storagetag = storagetag
2794 self.location = location
2795 self.life = life
2796 self.ownertag = ownertag
2797 self.unittag = unittag
2798
2799
2800 class StorageAttachmentId(Type):
2801 _toSchema = {'unittag': 'unittag', 'storagetag': 'storagetag'}
2802 _toPy = {'unittag': 'unittag', 'storagetag': 'storagetag'}
2803 def __init__(self, unittag, storagetag):
2804 '''
2805 unittag : str
2806 storagetag : str
2807 '''
2808 self.unittag = unittag
2809 self.storagetag = storagetag
2810
2811
2812 class StorageAttachmentIds(Type):
2813 _toSchema = {'ids': 'ids'}
2814 _toPy = {'ids': 'ids'}
2815 def __init__(self, ids):
2816 '''
2817 ids : typing.Sequence[~StorageAttachmentId]
2818 '''
2819 self.ids = ids
2820
2821
2822 class StorageAttachmentIdsResult(Type):
2823 _toSchema = {'error': 'error', 'result': 'result'}
2824 _toPy = {'error': 'error', 'result': 'result'}
2825 def __init__(self, error, result):
2826 '''
2827 error : ~Error
2828 result : ~StorageAttachmentIds
2829 '''
2830 self.error = error
2831 self.result = result
2832
2833
2834 class StorageAttachmentResult(Type):
2835 _toSchema = {'error': 'error', 'result': 'result'}
2836 _toPy = {'error': 'error', 'result': 'result'}
2837 def __init__(self, error, result):
2838 '''
2839 error : ~Error
2840 result : ~StorageAttachment
2841 '''
2842 self.error = error
2843 self.result = result
2844
2845
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):
2850 '''
2851 error : ~Error
2852 ok : bool
2853 result : str
2854 '''
2855 self.error = error
2856 self.ok = ok
2857 self.result = result
2858
2859
2860 class UnitNetworkConfig(Type):
2861 _toSchema = {'unittag': 'UnitTag', 'bindingname': 'BindingName'}
2862 _toPy = {'BindingName': 'bindingname', 'UnitTag': 'unittag'}
2863 def __init__(self, bindingname, unittag):
2864 '''
2865 bindingname : str
2866 unittag : str
2867 '''
2868 self.bindingname = bindingname
2869 self.unittag = unittag
2870
2871
2872 class UnitNetworkConfigResult(Type):
2873 _toSchema = {'info': 'Info', 'error': 'Error'}
2874 _toPy = {'Error': 'error', 'Info': 'info'}
2875 def __init__(self, error, info):
2876 '''
2877 error : ~Error
2878 info : typing.Sequence[~NetworkConfig]
2879 '''
2880 self.error = error
2881 self.info = info
2882
2883
2884 class EntityVersion(Type):
2885 _toSchema = {'tools': 'Tools', 'tag': 'Tag'}
2886 _toPy = {'Tag': 'tag', 'Tools': 'tools'}
2887 def __init__(self, tag, tools):
2888 '''
2889 tag : str
2890 tools : ~Version
2891 '''
2892 self.tag = tag
2893 self.tools = tools
2894
2895
2896 class VersionResult(Type):
2897 _toSchema = {'version': 'Version', 'error': 'Error'}
2898 _toPy = {'Error': 'error', 'Version': 'version'}
2899 def __init__(self, error, version):
2900 '''
2901 error : ~Error
2902 version : ~Number
2903 '''
2904 self.error = error
2905 self.version = version
2906
2907
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):
2912 '''
2913 username : str
2914 password : str
2915 shared_model_tags : typing.Sequence[str]
2916 model_access_permission : str
2917 display_name : str
2918 '''
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
2924
2925
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):
2930 '''
2931 error : ~Error
2932 secret_key : typing.Sequence[int]
2933 tag : str
2934 '''
2935 self.error = error
2936 self.secret_key = secret_key
2937 self.tag = tag
2938
2939
2940 class MacaroonResult(Type):
2941 _toSchema = {'error': 'error', 'result': 'result'}
2942 _toPy = {'error': 'error', 'result': 'result'}
2943 def __init__(self, error, result):
2944 '''
2945 error : ~Error
2946 result : ~Macaroon
2947 '''
2948 self.error = error
2949 self.result = result
2950
2951
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):
2956 '''
2957 disabled : bool
2958 username : str
2959 created_by : str
2960 last_connection : str
2961 date_created : str
2962 display_name : str
2963 '''
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
2970
2971
2972 class UserInfoResult(Type):
2973 _toSchema = {'error': 'error', 'result': 'result'}
2974 _toPy = {'error': 'error', 'result': 'result'}
2975 def __init__(self, error, result):
2976 '''
2977 error : ~Error
2978 result : ~UserInfo
2979 '''
2980 self.error = error
2981 self.result = result
2982
2983
2984 class Action(Type):
2985 name = 'Action'
2986 version = 1
2987 schema = {'definitions': {'Action': {'additionalProperties': False,
2988 'properties': {'name': {'type': 'string'},
2989 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
2990 'type': 'object'}},
2991 'type': 'object'},
2992 'receiver': {'type': 'string'},
2993 'tag': {'type': 'string'}},
2994 'required': ['tag', 'receiver', 'name'],
2995 'type': 'object'},
2996 'ActionResult': {'additionalProperties': False,
2997 'properties': {'action': {'$ref': '#/definitions/Action'},
2998 'completed': {'format': 'date-time',
2999 'type': 'string'},
3000 'enqueued': {'format': 'date-time',
3001 'type': 'string'},
3002 'error': {'$ref': '#/definitions/Error'},
3003 'message': {'type': 'string'},
3004 'output': {'patternProperties': {'.*': {'additionalProperties': True,
3005 'type': 'object'}},
3006 'type': 'object'},
3007 'started': {'format': 'date-time',
3008 'type': 'string'},
3009 'status': {'type': 'string'}},
3010 'type': 'object'},
3011 'ActionResults': {'additionalProperties': False,
3012 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
3013 'type': 'array'}},
3014 'type': 'object'},
3015 'Actions': {'additionalProperties': False,
3016 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
3017 'type': 'array'}},
3018 'type': 'object'},
3019 'ActionsByName': {'additionalProperties': False,
3020 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
3021 'type': 'array'},
3022 'error': {'$ref': '#/definitions/Error'},
3023 'name': {'type': 'string'}},
3024 'type': 'object'},
3025 'ActionsByNames': {'additionalProperties': False,
3026 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
3027 'type': 'array'}},
3028 'type': 'object'},
3029 'ActionsByReceiver': {'additionalProperties': False,
3030 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
3031 'type': 'array'},
3032 'error': {'$ref': '#/definitions/Error'},
3033 'receiver': {'type': 'string'}},
3034 'type': 'object'},
3035 'ActionsByReceivers': {'additionalProperties': False,
3036 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
3037 'type': 'array'}},
3038 'type': 'object'},
3039 'Entities': {'additionalProperties': False,
3040 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3041 'type': 'array'}},
3042 'required': ['Entities'],
3043 'type': 'object'},
3044 'Entity': {'additionalProperties': False,
3045 'properties': {'Tag': {'type': 'string'}},
3046 'required': ['Tag'],
3047 'type': 'object'},
3048 'Error': {'additionalProperties': False,
3049 'properties': {'Code': {'type': 'string'},
3050 'Info': {'$ref': '#/definitions/ErrorInfo'},
3051 'Message': {'type': 'string'}},
3052 'required': ['Message', 'Code'],
3053 'type': 'object'},
3054 'ErrorInfo': {'additionalProperties': False,
3055 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3056 'MacaroonPath': {'type': 'string'}},
3057 'type': 'object'},
3058 'FindActionsByNames': {'additionalProperties': False,
3059 'properties': {'names': {'items': {'type': 'string'},
3060 'type': 'array'}},
3061 'type': 'object'},
3062 'FindTags': {'additionalProperties': False,
3063 'properties': {'prefixes': {'items': {'type': 'string'},
3064 'type': 'array'}},
3065 'required': ['prefixes'],
3066 'type': 'object'},
3067 'FindTagsResults': {'additionalProperties': False,
3068 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
3069 'type': 'array'}},
3070 'type': 'object'}},
3071 'required': ['matches'],
3072 'type': 'object'},
3073 'Macaroon': {'additionalProperties': False,
3074 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3075 'type': 'array'},
3076 'data': {'items': {'type': 'integer'},
3077 'type': 'array'},
3078 'id': {'$ref': '#/definitions/packet'},
3079 'location': {'$ref': '#/definitions/packet'},
3080 'sig': {'items': {'type': 'integer'},
3081 'type': 'array'}},
3082 'required': ['data',
3083 'location',
3084 'id',
3085 'caveats',
3086 'sig'],
3087 'type': 'object'},
3088 'RunParams': {'additionalProperties': False,
3089 'properties': {'Commands': {'type': 'string'},
3090 'Machines': {'items': {'type': 'string'},
3091 'type': 'array'},
3092 'Services': {'items': {'type': 'string'},
3093 'type': 'array'},
3094 'Timeout': {'type': 'integer'},
3095 'Units': {'items': {'type': 'string'},
3096 'type': 'array'}},
3097 'required': ['Commands',
3098 'Timeout',
3099 'Machines',
3100 'Services',
3101 'Units'],
3102 'type': 'object'},
3103 'ServiceCharmActionsResult': {'additionalProperties': False,
3104 'properties': {'actions': {'$ref': '#/definitions/Actions'},
3105 'error': {'$ref': '#/definitions/Error'},
3106 'servicetag': {'type': 'string'}},
3107 'type': 'object'},
3108 'ServicesCharmActionsResults': {'additionalProperties': False,
3109 'properties': {'results': {'items': {'$ref': '#/definitions/ServiceCharmActionsResult'},
3110 'type': 'array'}},
3111 'type': 'object'},
3112 'caveat': {'additionalProperties': False,
3113 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3114 'location': {'$ref': '#/definitions/packet'},
3115 'verificationId': {'$ref': '#/definitions/packet'}},
3116 'required': ['location',
3117 'caveatId',
3118 'verificationId'],
3119 'type': 'object'},
3120 'packet': {'additionalProperties': False,
3121 'properties': {'headerLen': {'type': 'integer'},
3122 'start': {'type': 'integer'},
3123 'totalLen': {'type': 'integer'}},
3124 'required': ['start', 'totalLen', 'headerLen'],
3125 'type': 'object'}},
3126 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3127 'Result': {'$ref': '#/definitions/ActionResults'}},
3128 'type': 'object'},
3129 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3130 'Result': {'$ref': '#/definitions/ActionResults'}},
3131 'type': 'object'},
3132 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
3133 'Result': {'$ref': '#/definitions/ActionResults'}},
3134 'type': 'object'},
3135 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
3136 'Result': {'$ref': '#/definitions/FindTagsResults'}},
3137 'type': 'object'},
3138 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
3139 'Result': {'$ref': '#/definitions/ActionsByNames'}},
3140 'type': 'object'},
3141 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3142 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3143 'type': 'object'},
3144 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3145 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3146 'type': 'object'},
3147 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3148 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3149 'type': 'object'},
3150 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3151 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
3152 'type': 'object'},
3153 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
3154 'Result': {'$ref': '#/definitions/ActionResults'}},
3155 'type': 'object'},
3156 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
3157 'Result': {'$ref': '#/definitions/ActionResults'}},
3158 'type': 'object'},
3159 'ServicesCharmActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3160 'Result': {'$ref': '#/definitions/ServicesCharmActionsResults'}},
3161 'type': 'object'}},
3162 'type': 'object'}
3163
3164
3165 #@ReturnMapping(ActionResults)
3166 async def Actions(self, entities):
3167 '''
3168 entities : typing.Sequence[~Entity]
3169 Returns -> typing.Sequence[~ActionResult]
3170 '''
3171 # map input types to rpc msg
3172 params = dict()
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)
3177
3178
3179
3180 #@ReturnMapping(ActionResults)
3181 async def Cancel(self, entities):
3182 '''
3183 entities : typing.Sequence[~Entity]
3184 Returns -> typing.Sequence[~ActionResult]
3185 '''
3186 # map input types to rpc msg
3187 params = dict()
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)
3192
3193
3194
3195 #@ReturnMapping(ActionResults)
3196 async def Enqueue(self, actions):
3197 '''
3198 actions : typing.Sequence[~Action]
3199 Returns -> typing.Sequence[~ActionResult]
3200 '''
3201 # map input types to rpc msg
3202 params = dict()
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)
3207
3208
3209
3210 #@ReturnMapping(FindTagsResults)
3211 async def FindActionTagsByPrefix(self, prefixes):
3212 '''
3213 prefixes : typing.Sequence[str]
3214 Returns -> typing.Sequence[~Entity]
3215 '''
3216 # map input types to rpc msg
3217 params = dict()
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)
3222
3223
3224
3225 #@ReturnMapping(ActionsByNames)
3226 async def FindActionsByNames(self, names):
3227 '''
3228 names : typing.Sequence[str]
3229 Returns -> typing.Sequence[~ActionsByName]
3230 '''
3231 # map input types to rpc msg
3232 params = dict()
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)
3237
3238
3239
3240 #@ReturnMapping(ActionsByReceivers)
3241 async def ListAll(self, entities):
3242 '''
3243 entities : typing.Sequence[~Entity]
3244 Returns -> typing.Sequence[~ActionsByReceiver]
3245 '''
3246 # map input types to rpc msg
3247 params = dict()
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)
3252
3253
3254
3255 #@ReturnMapping(ActionsByReceivers)
3256 async def ListCompleted(self, entities):
3257 '''
3258 entities : typing.Sequence[~Entity]
3259 Returns -> typing.Sequence[~ActionsByReceiver]
3260 '''
3261 # map input types to rpc msg
3262 params = dict()
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)
3267
3268
3269
3270 #@ReturnMapping(ActionsByReceivers)
3271 async def ListPending(self, entities):
3272 '''
3273 entities : typing.Sequence[~Entity]
3274 Returns -> typing.Sequence[~ActionsByReceiver]
3275 '''
3276 # map input types to rpc msg
3277 params = dict()
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)
3282
3283
3284
3285 #@ReturnMapping(ActionsByReceivers)
3286 async def ListRunning(self, entities):
3287 '''
3288 entities : typing.Sequence[~Entity]
3289 Returns -> typing.Sequence[~ActionsByReceiver]
3290 '''
3291 # map input types to rpc msg
3292 params = dict()
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)
3297
3298
3299
3300 #@ReturnMapping(ActionResults)
3301 async def Run(self, services, timeout, units, commands, machines):
3302 '''
3303 services : typing.Sequence[str]
3304 timeout : int
3305 units : typing.Sequence[str]
3306 commands : str
3307 machines : typing.Sequence[str]
3308 Returns -> typing.Sequence[~ActionResult]
3309 '''
3310 # map input types to rpc msg
3311 params = dict()
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)
3320
3321
3322
3323 #@ReturnMapping(ActionResults)
3324 async def RunOnAllMachines(self, services, timeout, units, commands, machines):
3325 '''
3326 services : typing.Sequence[str]
3327 timeout : int
3328 units : typing.Sequence[str]
3329 commands : str
3330 machines : typing.Sequence[str]
3331 Returns -> typing.Sequence[~ActionResult]
3332 '''
3333 # map input types to rpc msg
3334 params = dict()
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)
3343
3344
3345
3346 #@ReturnMapping(ServicesCharmActionsResults)
3347 async def ServicesCharmActions(self, entities):
3348 '''
3349 entities : typing.Sequence[~Entity]
3350 Returns -> typing.Sequence[~ServiceCharmActionsResult]
3351 '''
3352 # map input types to rpc msg
3353 params = dict()
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)
3358
3359
3360 class Addresser(Type):
3361 name = 'Addresser'
3362 version = 2
3363 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
3364 'properties': {'Error': {'$ref': '#/definitions/Error'},
3365 'Result': {'type': 'boolean'}},
3366 'required': ['Error', 'Result'],
3367 'type': 'object'},
3368 'EntitiesWatchResult': {'additionalProperties': False,
3369 'properties': {'Changes': {'items': {'type': 'string'},
3370 'type': 'array'},
3371 'EntityWatcherId': {'type': 'string'},
3372 'Error': {'$ref': '#/definitions/Error'}},
3373 'required': ['EntityWatcherId',
3374 'Changes',
3375 'Error'],
3376 'type': 'object'},
3377 'Error': {'additionalProperties': False,
3378 'properties': {'Code': {'type': 'string'},
3379 'Info': {'$ref': '#/definitions/ErrorInfo'},
3380 'Message': {'type': 'string'}},
3381 'required': ['Message', 'Code'],
3382 'type': 'object'},
3383 'ErrorInfo': {'additionalProperties': False,
3384 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3385 'MacaroonPath': {'type': 'string'}},
3386 'type': 'object'},
3387 'ErrorResult': {'additionalProperties': False,
3388 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3389 'required': ['Error'],
3390 'type': 'object'},
3391 'Macaroon': {'additionalProperties': False,
3392 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3393 'type': 'array'},
3394 'data': {'items': {'type': 'integer'},
3395 'type': 'array'},
3396 'id': {'$ref': '#/definitions/packet'},
3397 'location': {'$ref': '#/definitions/packet'},
3398 'sig': {'items': {'type': 'integer'},
3399 'type': 'array'}},
3400 'required': ['data',
3401 'location',
3402 'id',
3403 'caveats',
3404 'sig'],
3405 'type': 'object'},
3406 'caveat': {'additionalProperties': False,
3407 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3408 'location': {'$ref': '#/definitions/packet'},
3409 'verificationId': {'$ref': '#/definitions/packet'}},
3410 'required': ['location',
3411 'caveatId',
3412 'verificationId'],
3413 'type': 'object'},
3414 'packet': {'additionalProperties': False,
3415 'properties': {'headerLen': {'type': 'integer'},
3416 'start': {'type': 'integer'},
3417 'totalLen': {'type': 'integer'}},
3418 'required': ['start', 'totalLen', 'headerLen'],
3419 'type': 'object'}},
3420 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
3421 'type': 'object'},
3422 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
3423 'type': 'object'},
3424 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
3425 'type': 'object'}},
3426 'type': 'object'}
3427
3428
3429 #@ReturnMapping(BoolResult)
3430 async def CanDeallocateAddresses(self):
3431 '''
3432
3433 Returns -> typing.Union[~Error, bool]
3434 '''
3435 # map input types to rpc msg
3436 params = dict()
3437 msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params)
3438
3439 reply = await self.rpc(msg)
3440 return self._map(reply, CanDeallocateAddresses)
3441
3442
3443
3444 #@ReturnMapping(ErrorResult)
3445 async def CleanupIPAddresses(self):
3446 '''
3447
3448 Returns -> ~Error
3449 '''
3450 # map input types to rpc msg
3451 params = dict()
3452 msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params)
3453
3454 reply = await self.rpc(msg)
3455 return self._map(reply, CleanupIPAddresses)
3456
3457
3458
3459 #@ReturnMapping(EntitiesWatchResult)
3460 async def WatchIPAddresses(self):
3461 '''
3462
3463 Returns -> typing.Union[~Error, typing.Sequence[str]]
3464 '''
3465 # map input types to rpc msg
3466 params = dict()
3467 msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params)
3468
3469 reply = await self.rpc(msg)
3470 return self._map(reply, WatchIPAddresses)
3471
3472
3473 class Agent(Type):
3474 name = 'Agent'
3475 version = 2
3476 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
3477 'properties': {'ContainerType': {'type': 'string'},
3478 'Error': {'$ref': '#/definitions/Error'},
3479 'Jobs': {'items': {'type': 'string'},
3480 'type': 'array'},
3481 'Life': {'type': 'string'}},
3482 'required': ['Life',
3483 'Jobs',
3484 'ContainerType',
3485 'Error'],
3486 'type': 'object'},
3487 'AgentGetEntitiesResults': {'additionalProperties': False,
3488 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
3489 'type': 'array'}},
3490 'required': ['Entities'],
3491 'type': 'object'},
3492 'Entities': {'additionalProperties': False,
3493 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3494 'type': 'array'}},
3495 'required': ['Entities'],
3496 'type': 'object'},
3497 'Entity': {'additionalProperties': False,
3498 'properties': {'Tag': {'type': 'string'}},
3499 'required': ['Tag'],
3500 'type': 'object'},
3501 'EntityPassword': {'additionalProperties': False,
3502 'properties': {'Password': {'type': 'string'},
3503 'Tag': {'type': 'string'}},
3504 'required': ['Tag', 'Password'],
3505 'type': 'object'},
3506 'EntityPasswords': {'additionalProperties': False,
3507 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
3508 'type': 'array'}},
3509 'required': ['Changes'],
3510 'type': 'object'},
3511 'Error': {'additionalProperties': False,
3512 'properties': {'Code': {'type': 'string'},
3513 'Info': {'$ref': '#/definitions/ErrorInfo'},
3514 'Message': {'type': 'string'}},
3515 'required': ['Message', 'Code'],
3516 'type': 'object'},
3517 'ErrorInfo': {'additionalProperties': False,
3518 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3519 'MacaroonPath': {'type': 'string'}},
3520 'type': 'object'},
3521 'ErrorResult': {'additionalProperties': False,
3522 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3523 'required': ['Error'],
3524 'type': 'object'},
3525 'ErrorResults': {'additionalProperties': False,
3526 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
3527 'type': 'array'}},
3528 'required': ['Results'],
3529 'type': 'object'},
3530 'IsMasterResult': {'additionalProperties': False,
3531 'properties': {'Master': {'type': 'boolean'}},
3532 'required': ['Master'],
3533 'type': 'object'},
3534 'Macaroon': {'additionalProperties': False,
3535 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3536 'type': 'array'},
3537 'data': {'items': {'type': 'integer'},
3538 'type': 'array'},
3539 'id': {'$ref': '#/definitions/packet'},
3540 'location': {'$ref': '#/definitions/packet'},
3541 'sig': {'items': {'type': 'integer'},
3542 'type': 'array'}},
3543 'required': ['data',
3544 'location',
3545 'id',
3546 'caveats',
3547 'sig'],
3548 'type': 'object'},
3549 'ModelConfigResult': {'additionalProperties': False,
3550 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
3551 'type': 'object'}},
3552 'type': 'object'}},
3553 'required': ['Config'],
3554 'type': 'object'},
3555 'NotifyWatchResult': {'additionalProperties': False,
3556 'properties': {'Error': {'$ref': '#/definitions/Error'},
3557 'NotifyWatcherId': {'type': 'string'}},
3558 'required': ['NotifyWatcherId', 'Error'],
3559 'type': 'object'},
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',
3569 'StatePort',
3570 'Cert',
3571 'PrivateKey',
3572 'CAPrivateKey',
3573 'SharedSecret',
3574 'SystemIdentity'],
3575 'type': 'object'},
3576 'caveat': {'additionalProperties': False,
3577 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3578 'location': {'$ref': '#/definitions/packet'},
3579 'verificationId': {'$ref': '#/definitions/packet'}},
3580 'required': ['location',
3581 'caveatId',
3582 'verificationId'],
3583 'type': 'object'},
3584 'packet': {'additionalProperties': False,
3585 'properties': {'headerLen': {'type': 'integer'},
3586 'start': {'type': 'integer'},
3587 'totalLen': {'type': 'integer'}},
3588 'required': ['start', 'totalLen', 'headerLen'],
3589 'type': 'object'}},
3590 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3591 'Result': {'$ref': '#/definitions/ErrorResults'}},
3592 'type': 'object'},
3593 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3594 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
3595 'type': 'object'},
3596 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
3597 'type': 'object'},
3598 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
3599 'type': 'object'},
3600 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
3601 'Result': {'$ref': '#/definitions/ErrorResults'}},
3602 'type': 'object'},
3603 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
3604 'type': 'object'},
3605 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
3606 'type': 'object'}},
3607 'type': 'object'}
3608
3609
3610 #@ReturnMapping(ErrorResults)
3611 async def ClearReboot(self, entities):
3612 '''
3613 entities : typing.Sequence[~Entity]
3614 Returns -> typing.Sequence[~ErrorResult]
3615 '''
3616 # map input types to rpc msg
3617 params = dict()
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)
3622
3623
3624
3625 #@ReturnMapping(AgentGetEntitiesResults)
3626 async def GetEntities(self, entities):
3627 '''
3628 entities : typing.Sequence[~Entity]
3629 Returns -> typing.Sequence[~AgentGetEntitiesResult]
3630 '''
3631 # map input types to rpc msg
3632 params = dict()
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)
3637
3638
3639
3640 #@ReturnMapping(IsMasterResult)
3641 async def IsMaster(self):
3642 '''
3643
3644 Returns -> bool
3645 '''
3646 # map input types to rpc msg
3647 params = dict()
3648 msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params)
3649
3650 reply = await self.rpc(msg)
3651 return self._map(reply, IsMaster)
3652
3653
3654
3655 #@ReturnMapping(ModelConfigResult)
3656 async def ModelConfig(self):
3657 '''
3658
3659 Returns -> typing.Mapping[str, typing.Any]
3660 '''
3661 # map input types to rpc msg
3662 params = dict()
3663 msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params)
3664
3665 reply = await self.rpc(msg)
3666 return self._map(reply, ModelConfig)
3667
3668
3669
3670 #@ReturnMapping(ErrorResults)
3671 async def SetPasswords(self, changes):
3672 '''
3673 changes : typing.Sequence[~EntityPassword]
3674 Returns -> typing.Sequence[~ErrorResult]
3675 '''
3676 # map input types to rpc msg
3677 params = dict()
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)
3682
3683
3684
3685 #@ReturnMapping(StateServingInfo)
3686 async def StateServingInfo(self):
3687 '''
3688
3689 Returns -> typing.Union[int, str]
3690 '''
3691 # map input types to rpc msg
3692 params = dict()
3693 msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params)
3694
3695 reply = await self.rpc(msg)
3696 return self._map(reply, StateServingInfo)
3697
3698
3699
3700 #@ReturnMapping(NotifyWatchResult)
3701 async def WatchForModelConfigChanges(self):
3702 '''
3703
3704 Returns -> typing.Union[~Error, str]
3705 '''
3706 # map input types to rpc msg
3707 params = dict()
3708 msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params)
3709
3710 reply = await self.rpc(msg)
3711 return self._map(reply, WatchForModelConfigChanges)
3712
3713
3714 class AgentTools(Type):
3715 name = 'AgentTools'
3716 version = 1
3717 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
3718
3719
3720 #@ReturnMapping(None)
3721 async def UpdateToolsAvailable(self):
3722 '''
3723
3724 Returns -> None
3725 '''
3726 # map input types to rpc msg
3727 params = dict()
3728 msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params)
3729
3730 reply = await self.rpc(msg)
3731 return self._map(reply, UpdateToolsAvailable)
3732
3733
3734 class AllModelWatcher(Type):
3735 name = 'AllModelWatcher'
3736 version = 2
3737 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
3738 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
3739 'type': 'array'}},
3740 'required': ['Deltas'],
3741 'type': 'object'},
3742 'Delta': {'additionalProperties': False,
3743 'properties': {'Entity': {'additionalProperties': True,
3744 'type': 'object'},
3745 'Removed': {'type': 'boolean'}},
3746 'required': ['Removed', 'Entity'],
3747 'type': 'object'}},
3748 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
3749 'type': 'object'},
3750 'Stop': {'type': 'object'}},
3751 'type': 'object'}
3752
3753
3754 #@ReturnMapping(AllWatcherNextResults)
3755 async def Next(self):
3756 '''
3757
3758 Returns -> typing.Sequence[~Delta]
3759 '''
3760 # map input types to rpc msg
3761 params = dict()
3762 msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params)
3763
3764 reply = await self.rpc(msg)
3765 return self._map(reply, Next)
3766
3767
3768
3769 #@ReturnMapping(None)
3770 async def Stop(self):
3771 '''
3772
3773 Returns -> None
3774 '''
3775 # map input types to rpc msg
3776 params = dict()
3777 msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params)
3778
3779 reply = await self.rpc(msg)
3780 return self._map(reply, Stop)
3781
3782
3783 class AllWatcher(Type):
3784 name = 'AllWatcher'
3785 version = 1
3786 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
3787 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
3788 'type': 'array'}},
3789 'required': ['Deltas'],
3790 'type': 'object'},
3791 'Delta': {'additionalProperties': False,
3792 'properties': {'Entity': {'additionalProperties': True,
3793 'type': 'object'},
3794 'Removed': {'type': 'boolean'}},
3795 'required': ['Removed', 'Entity'],
3796 'type': 'object'}},
3797 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
3798 'type': 'object'},
3799 'Stop': {'type': 'object'}},
3800 'type': 'object'}
3801
3802
3803 #@ReturnMapping(AllWatcherNextResults)
3804 async def Next(self):
3805 '''
3806
3807 Returns -> typing.Sequence[~Delta]
3808 '''
3809 # map input types to rpc msg
3810 params = dict()
3811 msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params)
3812
3813 reply = await self.rpc(msg)
3814 return self._map(reply, Next)
3815
3816
3817
3818 #@ReturnMapping(None)
3819 async def Stop(self):
3820 '''
3821
3822 Returns -> None
3823 '''
3824 # map input types to rpc msg
3825 params = dict()
3826 msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params)
3827
3828 reply = await self.rpc(msg)
3829 return self._map(reply, Stop)
3830
3831
3832 class Annotations(Type):
3833 name = 'Annotations'
3834 version = 2
3835 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
3836 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
3837 'type': 'object'},
3838 'EntityTag': {'type': 'string'},
3839 'Error': {'$ref': '#/definitions/ErrorResult'}},
3840 'required': ['EntityTag',
3841 'Annotations',
3842 'Error'],
3843 'type': 'object'},
3844 'AnnotationsGetResults': {'additionalProperties': False,
3845 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
3846 'type': 'array'}},
3847 'required': ['Results'],
3848 'type': 'object'},
3849 'AnnotationsSet': {'additionalProperties': False,
3850 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
3851 'type': 'array'}},
3852 'required': ['Annotations'],
3853 'type': 'object'},
3854 'Entities': {'additionalProperties': False,
3855 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
3856 'type': 'array'}},
3857 'required': ['Entities'],
3858 'type': 'object'},
3859 'Entity': {'additionalProperties': False,
3860 'properties': {'Tag': {'type': 'string'}},
3861 'required': ['Tag'],
3862 'type': 'object'},
3863 'EntityAnnotations': {'additionalProperties': False,
3864 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
3865 'type': 'object'},
3866 'EntityTag': {'type': 'string'}},
3867 'required': ['EntityTag', 'Annotations'],
3868 'type': 'object'},
3869 'Error': {'additionalProperties': False,
3870 'properties': {'Code': {'type': 'string'},
3871 'Info': {'$ref': '#/definitions/ErrorInfo'},
3872 'Message': {'type': 'string'}},
3873 'required': ['Message', 'Code'],
3874 'type': 'object'},
3875 'ErrorInfo': {'additionalProperties': False,
3876 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
3877 'MacaroonPath': {'type': 'string'}},
3878 'type': 'object'},
3879 'ErrorResult': {'additionalProperties': False,
3880 'properties': {'Error': {'$ref': '#/definitions/Error'}},
3881 'required': ['Error'],
3882 'type': 'object'},
3883 'ErrorResults': {'additionalProperties': False,
3884 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
3885 'type': 'array'}},
3886 'required': ['Results'],
3887 'type': 'object'},
3888 'Macaroon': {'additionalProperties': False,
3889 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
3890 'type': 'array'},
3891 'data': {'items': {'type': 'integer'},
3892 'type': 'array'},
3893 'id': {'$ref': '#/definitions/packet'},
3894 'location': {'$ref': '#/definitions/packet'},
3895 'sig': {'items': {'type': 'integer'},
3896 'type': 'array'}},
3897 'required': ['data',
3898 'location',
3899 'id',
3900 'caveats',
3901 'sig'],
3902 'type': 'object'},
3903 'caveat': {'additionalProperties': False,
3904 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
3905 'location': {'$ref': '#/definitions/packet'},
3906 'verificationId': {'$ref': '#/definitions/packet'}},
3907 'required': ['location',
3908 'caveatId',
3909 'verificationId'],
3910 'type': 'object'},
3911 'packet': {'additionalProperties': False,
3912 'properties': {'headerLen': {'type': 'integer'},
3913 'start': {'type': 'integer'},
3914 'totalLen': {'type': 'integer'}},
3915 'required': ['start', 'totalLen', 'headerLen'],
3916 'type': 'object'}},
3917 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
3918 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
3919 'type': 'object'},
3920 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
3921 'Result': {'$ref': '#/definitions/ErrorResults'}},
3922 'type': 'object'}},
3923 'type': 'object'}
3924
3925
3926 #@ReturnMapping(AnnotationsGetResults)
3927 async def Get(self, entities):
3928 '''
3929 entities : typing.Sequence[~Entity]
3930 Returns -> typing.Sequence[~AnnotationsGetResult]
3931 '''
3932 # map input types to rpc msg
3933 params = dict()
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)
3938
3939
3940
3941 #@ReturnMapping(ErrorResults)
3942 async def Set(self, annotations):
3943 '''
3944 annotations : typing.Sequence[~EntityAnnotations]
3945 Returns -> typing.Sequence[~ErrorResult]
3946 '''
3947 # map input types to rpc msg
3948 params = dict()
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)
3953
3954
3955 class Backups(Type):
3956 name = 'Backups'
3957 version = 1
3958 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
3959 'properties': {'Notes': {'type': 'string'}},
3960 'required': ['Notes'],
3961 'type': 'object'},
3962 'BackupsInfoArgs': {'additionalProperties': False,
3963 'properties': {'ID': {'type': 'string'}},
3964 'required': ['ID'],
3965 'type': 'object'},
3966 'BackupsListArgs': {'additionalProperties': False,
3967 'type': 'object'},
3968 'BackupsListResult': {'additionalProperties': False,
3969 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
3970 'type': 'array'}},
3971 'required': ['List'],
3972 'type': 'object'},
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',
3979 'type': 'string'},
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',
3987 'type': 'string'},
3988 'Stored': {'format': 'date-time',
3989 'type': 'string'},
3990 'Version': {'$ref': '#/definitions/Number'}},
3991 'required': ['ID',
3992 'Checksum',
3993 'ChecksumFormat',
3994 'Size',
3995 'Stored',
3996 'Started',
3997 'Finished',
3998 'Notes',
3999 'Model',
4000 'Machine',
4001 'Hostname',
4002 'Version',
4003 'CACert',
4004 'CAPrivateKey'],
4005 'type': 'object'},
4006 'BackupsRemoveArgs': {'additionalProperties': False,
4007 'properties': {'ID': {'type': 'string'}},
4008 'required': ['ID'],
4009 'type': 'object'},
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',
4017 'Minor',
4018 'Tag',
4019 'Patch',
4020 'Build'],
4021 'type': 'object'},
4022 'RestoreArgs': {'additionalProperties': False,
4023 'properties': {'BackupId': {'type': 'string'}},
4024 'required': ['BackupId'],
4025 'type': 'object'}},
4026 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
4027 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
4028 'type': 'object'},
4029 'FinishRestore': {'type': 'object'},
4030 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
4031 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
4032 'type': 'object'},
4033 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
4034 'Result': {'$ref': '#/definitions/BackupsListResult'}},
4035 'type': 'object'},
4036 'PrepareRestore': {'type': 'object'},
4037 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
4038 'type': 'object'},
4039 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
4040 'type': 'object'}},
4041 'type': 'object'}
4042
4043
4044 #@ReturnMapping(BackupsMetadataResult)
4045 async def Create(self, notes):
4046 '''
4047 notes : str
4048 Returns -> typing.Union[str, ~Number, int]
4049 '''
4050 # map input types to rpc msg
4051 params = dict()
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)
4056
4057
4058
4059 #@ReturnMapping(None)
4060 async def FinishRestore(self):
4061 '''
4062
4063 Returns -> None
4064 '''
4065 # map input types to rpc msg
4066 params = dict()
4067 msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params)
4068
4069 reply = await self.rpc(msg)
4070 return self._map(reply, FinishRestore)
4071
4072
4073
4074 #@ReturnMapping(BackupsMetadataResult)
4075 async def Info(self, id_):
4076 '''
4077 id_ : str
4078 Returns -> typing.Union[str, ~Number, int]
4079 '''
4080 # map input types to rpc msg
4081 params = dict()
4082 msg = dict(Type='Backups', Request='Info', Version=1, Params=params)
4083 params['ID'] = id_
4084 reply = await self.rpc(msg)
4085 return self._map(reply, Info)
4086
4087
4088
4089 #@ReturnMapping(BackupsListResult)
4090 async def List(self):
4091 '''
4092
4093 Returns -> typing.Sequence[~BackupsMetadataResult]
4094 '''
4095 # map input types to rpc msg
4096 params = dict()
4097 msg = dict(Type='Backups', Request='List', Version=1, Params=params)
4098
4099 reply = await self.rpc(msg)
4100 return self._map(reply, List)
4101
4102
4103
4104 #@ReturnMapping(None)
4105 async def PrepareRestore(self):
4106 '''
4107
4108 Returns -> None
4109 '''
4110 # map input types to rpc msg
4111 params = dict()
4112 msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params)
4113
4114 reply = await self.rpc(msg)
4115 return self._map(reply, PrepareRestore)
4116
4117
4118
4119 #@ReturnMapping(None)
4120 async def Remove(self, id_):
4121 '''
4122 id_ : str
4123 Returns -> None
4124 '''
4125 # map input types to rpc msg
4126 params = dict()
4127 msg = dict(Type='Backups', Request='Remove', Version=1, Params=params)
4128 params['ID'] = id_
4129 reply = await self.rpc(msg)
4130 return self._map(reply, Remove)
4131
4132
4133
4134 #@ReturnMapping(None)
4135 async def Restore(self, backupid):
4136 '''
4137 backupid : str
4138 Returns -> None
4139 '''
4140 # map input types to rpc msg
4141 params = dict()
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)
4146
4147
4148 class Block(Type):
4149 name = 'Block'
4150 version = 2
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'],
4157 'type': 'object'},
4158 'BlockResult': {'additionalProperties': False,
4159 'properties': {'error': {'$ref': '#/definitions/Error'},
4160 'result': {'$ref': '#/definitions/Block'}},
4161 'required': ['result'],
4162 'type': 'object'},
4163 'BlockResults': {'additionalProperties': False,
4164 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
4165 'type': 'array'}},
4166 'type': 'object'},
4167 'BlockSwitchParams': {'additionalProperties': False,
4168 'properties': {'message': {'type': 'string'},
4169 'type': {'type': 'string'}},
4170 'required': ['type'],
4171 'type': 'object'},
4172 'Error': {'additionalProperties': False,
4173 'properties': {'Code': {'type': 'string'},
4174 'Info': {'$ref': '#/definitions/ErrorInfo'},
4175 'Message': {'type': 'string'}},
4176 'required': ['Message', 'Code'],
4177 'type': 'object'},
4178 'ErrorInfo': {'additionalProperties': False,
4179 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4180 'MacaroonPath': {'type': 'string'}},
4181 'type': 'object'},
4182 'ErrorResult': {'additionalProperties': False,
4183 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4184 'required': ['Error'],
4185 'type': 'object'},
4186 'Macaroon': {'additionalProperties': False,
4187 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4188 'type': 'array'},
4189 'data': {'items': {'type': 'integer'},
4190 'type': 'array'},
4191 'id': {'$ref': '#/definitions/packet'},
4192 'location': {'$ref': '#/definitions/packet'},
4193 'sig': {'items': {'type': 'integer'},
4194 'type': 'array'}},
4195 'required': ['data',
4196 'location',
4197 'id',
4198 'caveats',
4199 'sig'],
4200 'type': 'object'},
4201 'caveat': {'additionalProperties': False,
4202 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4203 'location': {'$ref': '#/definitions/packet'},
4204 'verificationId': {'$ref': '#/definitions/packet'}},
4205 'required': ['location',
4206 'caveatId',
4207 'verificationId'],
4208 'type': 'object'},
4209 'packet': {'additionalProperties': False,
4210 'properties': {'headerLen': {'type': 'integer'},
4211 'start': {'type': 'integer'},
4212 'totalLen': {'type': 'integer'}},
4213 'required': ['start', 'totalLen', 'headerLen'],
4214 'type': 'object'}},
4215 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
4216 'type': 'object'},
4217 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
4218 'Result': {'$ref': '#/definitions/ErrorResult'}},
4219 'type': 'object'},
4220 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
4221 'Result': {'$ref': '#/definitions/ErrorResult'}},
4222 'type': 'object'}},
4223 'type': 'object'}
4224
4225
4226 #@ReturnMapping(BlockResults)
4227 async def List(self):
4228 '''
4229
4230 Returns -> typing.Sequence[~BlockResult]
4231 '''
4232 # map input types to rpc msg
4233 params = dict()
4234 msg = dict(Type='Block', Request='List', Version=2, Params=params)
4235
4236 reply = await self.rpc(msg)
4237 return self._map(reply, List)
4238
4239
4240
4241 #@ReturnMapping(ErrorResult)
4242 async def SwitchBlockOff(self, message, type_):
4243 '''
4244 message : str
4245 type_ : str
4246 Returns -> ~Error
4247 '''
4248 # map input types to rpc msg
4249 params = dict()
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)
4255
4256
4257
4258 #@ReturnMapping(ErrorResult)
4259 async def SwitchBlockOn(self, message, type_):
4260 '''
4261 message : str
4262 type_ : str
4263 Returns -> ~Error
4264 '''
4265 # map input types to rpc msg
4266 params = dict()
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)
4272
4273
4274 class CharmRevisionUpdater(Type):
4275 name = 'CharmRevisionUpdater'
4276 version = 1
4277 schema = {'definitions': {'Error': {'additionalProperties': False,
4278 'properties': {'Code': {'type': 'string'},
4279 'Info': {'$ref': '#/definitions/ErrorInfo'},
4280 'Message': {'type': 'string'}},
4281 'required': ['Message', 'Code'],
4282 'type': 'object'},
4283 'ErrorInfo': {'additionalProperties': False,
4284 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4285 'MacaroonPath': {'type': 'string'}},
4286 'type': 'object'},
4287 'ErrorResult': {'additionalProperties': False,
4288 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4289 'required': ['Error'],
4290 'type': 'object'},
4291 'Macaroon': {'additionalProperties': False,
4292 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4293 'type': 'array'},
4294 'data': {'items': {'type': 'integer'},
4295 'type': 'array'},
4296 'id': {'$ref': '#/definitions/packet'},
4297 'location': {'$ref': '#/definitions/packet'},
4298 'sig': {'items': {'type': 'integer'},
4299 'type': 'array'}},
4300 'required': ['data',
4301 'location',
4302 'id',
4303 'caveats',
4304 'sig'],
4305 'type': 'object'},
4306 'caveat': {'additionalProperties': False,
4307 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4308 'location': {'$ref': '#/definitions/packet'},
4309 'verificationId': {'$ref': '#/definitions/packet'}},
4310 'required': ['location',
4311 'caveatId',
4312 'verificationId'],
4313 'type': 'object'},
4314 'packet': {'additionalProperties': False,
4315 'properties': {'headerLen': {'type': 'integer'},
4316 'start': {'type': 'integer'},
4317 'totalLen': {'type': 'integer'}},
4318 'required': ['start', 'totalLen', 'headerLen'],
4319 'type': 'object'}},
4320 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
4321 'type': 'object'}},
4322 'type': 'object'}
4323
4324
4325 #@ReturnMapping(ErrorResult)
4326 async def UpdateLatestRevisions(self):
4327 '''
4328
4329 Returns -> ~Error
4330 '''
4331 # map input types to rpc msg
4332 params = dict()
4333 msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=1, Params=params)
4334
4335 reply = await self.rpc(msg)
4336 return self._map(reply, UpdateLatestRevisions)
4337
4338
4339 class Charms(Type):
4340 name = 'Charms'
4341 version = 2
4342 schema = {'definitions': {'CharmInfo': {'additionalProperties': False,
4343 'properties': {'CharmURL': {'type': 'string'}},
4344 'required': ['CharmURL'],
4345 'type': 'object'},
4346 'CharmsList': {'additionalProperties': False,
4347 'properties': {'Names': {'items': {'type': 'string'},
4348 'type': 'array'}},
4349 'required': ['Names'],
4350 'type': 'object'},
4351 'CharmsListResult': {'additionalProperties': False,
4352 'properties': {'CharmURLs': {'items': {'type': 'string'},
4353 'type': 'array'}},
4354 'required': ['CharmURLs'],
4355 'type': 'object'},
4356 'IsMeteredResult': {'additionalProperties': False,
4357 'properties': {'Metered': {'type': 'boolean'}},
4358 'required': ['Metered'],
4359 'type': 'object'}},
4360 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
4361 'Result': {'$ref': '#/definitions/CharmInfo'}},
4362 'type': 'object'},
4363 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
4364 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
4365 'type': 'object'},
4366 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
4367 'Result': {'$ref': '#/definitions/CharmsListResult'}},
4368 'type': 'object'}},
4369 'type': 'object'}
4370
4371
4372 #@ReturnMapping(CharmInfo)
4373 async def CharmInfo(self, charmurl):
4374 '''
4375 charmurl : str
4376 Returns -> str
4377 '''
4378 # map input types to rpc msg
4379 params = dict()
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)
4384
4385
4386
4387 #@ReturnMapping(IsMeteredResult)
4388 async def IsMetered(self, charmurl):
4389 '''
4390 charmurl : str
4391 Returns -> bool
4392 '''
4393 # map input types to rpc msg
4394 params = dict()
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)
4399
4400
4401
4402 #@ReturnMapping(CharmsListResult)
4403 async def List(self, names):
4404 '''
4405 names : typing.Sequence[str]
4406 Returns -> typing.Sequence[str]
4407 '''
4408 # map input types to rpc msg
4409 params = dict()
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)
4414
4415
4416 class Cleaner(Type):
4417 name = 'Cleaner'
4418 version = 2
4419 schema = {'definitions': {'Error': {'additionalProperties': False,
4420 'properties': {'Code': {'type': 'string'},
4421 'Info': {'$ref': '#/definitions/ErrorInfo'},
4422 'Message': {'type': 'string'}},
4423 'required': ['Message', 'Code'],
4424 'type': 'object'},
4425 'ErrorInfo': {'additionalProperties': False,
4426 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4427 'MacaroonPath': {'type': 'string'}},
4428 'type': 'object'},
4429 'Macaroon': {'additionalProperties': False,
4430 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4431 'type': 'array'},
4432 'data': {'items': {'type': 'integer'},
4433 'type': 'array'},
4434 'id': {'$ref': '#/definitions/packet'},
4435 'location': {'$ref': '#/definitions/packet'},
4436 'sig': {'items': {'type': 'integer'},
4437 'type': 'array'}},
4438 'required': ['data',
4439 'location',
4440 'id',
4441 'caveats',
4442 'sig'],
4443 'type': 'object'},
4444 'NotifyWatchResult': {'additionalProperties': False,
4445 'properties': {'Error': {'$ref': '#/definitions/Error'},
4446 'NotifyWatcherId': {'type': 'string'}},
4447 'required': ['NotifyWatcherId', 'Error'],
4448 'type': 'object'},
4449 'caveat': {'additionalProperties': False,
4450 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
4451 'location': {'$ref': '#/definitions/packet'},
4452 'verificationId': {'$ref': '#/definitions/packet'}},
4453 'required': ['location',
4454 'caveatId',
4455 'verificationId'],
4456 'type': 'object'},
4457 'packet': {'additionalProperties': False,
4458 'properties': {'headerLen': {'type': 'integer'},
4459 'start': {'type': 'integer'},
4460 'totalLen': {'type': 'integer'}},
4461 'required': ['start', 'totalLen', 'headerLen'],
4462 'type': 'object'}},
4463 'properties': {'Cleanup': {'type': 'object'},
4464 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
4465 'type': 'object'}},
4466 'type': 'object'}
4467
4468
4469 #@ReturnMapping(None)
4470 async def Cleanup(self):
4471 '''
4472
4473 Returns -> None
4474 '''
4475 # map input types to rpc msg
4476 params = dict()
4477 msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params)
4478
4479 reply = await self.rpc(msg)
4480 return self._map(reply, Cleanup)
4481
4482
4483
4484 #@ReturnMapping(NotifyWatchResult)
4485 async def WatchCleanups(self):
4486 '''
4487
4488 Returns -> typing.Union[~Error, str]
4489 '''
4490 # map input types to rpc msg
4491 params = dict()
4492 msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params)
4493
4494 reply = await self.rpc(msg)
4495 return self._map(reply, WatchCleanups)
4496
4497
4498 class Client(Type):
4499 name = 'Client'
4500 version = 1
4501 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
4502 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
4503 'type': 'array'},
4504 'type': 'array'}},
4505 'required': ['Servers'],
4506 'type': 'object'},
4507 'AddCharm': {'additionalProperties': False,
4508 'properties': {'Channel': {'type': 'string'},
4509 'URL': {'type': 'string'}},
4510 'required': ['URL', 'Channel'],
4511 'type': 'object'},
4512 'AddCharmWithAuthorization': {'additionalProperties': False,
4513 'properties': {'Channel': {'type': 'string'},
4514 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
4515 'URL': {'type': 'string'}},
4516 'required': ['URL',
4517 'Channel',
4518 'CharmStoreMacaroon'],
4519 'type': 'object'},
4520 'AddMachineParams': {'additionalProperties': False,
4521 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
4522 'type': 'array'},
4523 'Constraints': {'$ref': '#/definitions/Value'},
4524 'ContainerType': {'type': 'string'},
4525 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
4526 'type': 'array'},
4527 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
4528 'InstanceId': {'type': 'string'},
4529 'Jobs': {'items': {'type': 'string'},
4530 'type': 'array'},
4531 'Nonce': {'type': 'string'},
4532 'ParentId': {'type': 'string'},
4533 'Placement': {'$ref': '#/definitions/Placement'},
4534 'Series': {'type': 'string'}},
4535 'required': ['Series',
4536 'Constraints',
4537 'Jobs',
4538 'Disks',
4539 'Placement',
4540 'ParentId',
4541 'ContainerType',
4542 'InstanceId',
4543 'Nonce',
4544 'HardwareCharacteristics',
4545 'Addrs'],
4546 'type': 'object'},
4547 'AddMachines': {'additionalProperties': False,
4548 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
4549 'type': 'array'}},
4550 'required': ['MachineParams'],
4551 'type': 'object'},
4552 'AddMachinesResult': {'additionalProperties': False,
4553 'properties': {'Error': {'$ref': '#/definitions/Error'},
4554 'Machine': {'type': 'string'}},
4555 'required': ['Machine', 'Error'],
4556 'type': 'object'},
4557 'AddMachinesResults': {'additionalProperties': False,
4558 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
4559 'type': 'array'}},
4560 'required': ['Machines'],
4561 'type': 'object'},
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'],
4568 'type': 'object'},
4569 'AgentVersionResult': {'additionalProperties': False,
4570 'properties': {'Version': {'$ref': '#/definitions/Number'}},
4571 'required': ['Version'],
4572 'type': 'object'},
4573 'AllWatcherId': {'additionalProperties': False,
4574 'properties': {'AllWatcherId': {'type': 'string'}},
4575 'required': ['AllWatcherId'],
4576 'type': 'object'},
4577 'Binary': {'additionalProperties': False,
4578 'properties': {'Arch': {'type': 'string'},
4579 'Number': {'$ref': '#/definitions/Number'},
4580 'Series': {'type': 'string'}},
4581 'required': ['Number', 'Series', 'Arch'],
4582 'type': 'object'},
4583 'BundleChangesChange': {'additionalProperties': False,
4584 'properties': {'args': {'items': {'additionalProperties': True,
4585 'type': 'object'},
4586 'type': 'array'},
4587 'id': {'type': 'string'},
4588 'method': {'type': 'string'},
4589 'requires': {'items': {'type': 'string'},
4590 'type': 'array'}},
4591 'required': ['id',
4592 'method',
4593 'args',
4594 'requires'],
4595 'type': 'object'},
4596 'CharmInfo': {'additionalProperties': False,
4597 'properties': {'CharmURL': {'type': 'string'}},
4598 'required': ['CharmURL'],
4599 'type': 'object'},
4600 'Constraints': {'additionalProperties': False,
4601 'properties': {'Count': {'type': 'integer'},
4602 'Pool': {'type': 'string'},
4603 'Size': {'type': 'integer'}},
4604 'required': ['Pool', 'Size', 'Count'],
4605 'type': 'object'},
4606 'DestroyMachines': {'additionalProperties': False,
4607 'properties': {'Force': {'type': 'boolean'},
4608 'MachineNames': {'items': {'type': 'string'},
4609 'type': 'array'}},
4610 'required': ['MachineNames', 'Force'],
4611 'type': 'object'},
4612 'DetailedStatus': {'additionalProperties': False,
4613 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
4614 'type': 'object'}},
4615 'type': 'object'},
4616 'Err': {'additionalProperties': True,
4617 'type': 'object'},
4618 'Info': {'type': 'string'},
4619 'Kind': {'type': 'string'},
4620 'Life': {'type': 'string'},
4621 'Since': {'format': 'date-time',
4622 'type': 'string'},
4623 'Status': {'type': 'string'},
4624 'Version': {'type': 'string'}},
4625 'required': ['Status',
4626 'Info',
4627 'Data',
4628 'Since',
4629 'Kind',
4630 'Version',
4631 'Life',
4632 'Err'],
4633 'type': 'object'},
4634 'EndpointStatus': {'additionalProperties': False,
4635 'properties': {'Name': {'type': 'string'},
4636 'Role': {'type': 'string'},
4637 'ServiceName': {'type': 'string'},
4638 'Subordinate': {'type': 'boolean'}},
4639 'required': ['ServiceName',
4640 'Name',
4641 'Role',
4642 'Subordinate'],
4643 'type': 'object'},
4644 'Entities': {'additionalProperties': False,
4645 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
4646 'type': 'array'}},
4647 'required': ['Entities'],
4648 'type': 'object'},
4649 'Entity': {'additionalProperties': False,
4650 'properties': {'Tag': {'type': 'string'}},
4651 'required': ['Tag'],
4652 'type': 'object'},
4653 'EntityStatus': {'additionalProperties': False,
4654 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
4655 'type': 'object'}},
4656 'type': 'object'},
4657 'Info': {'type': 'string'},
4658 'Since': {'format': 'date-time',
4659 'type': 'string'},
4660 'Status': {'type': 'string'}},
4661 'required': ['Status',
4662 'Info',
4663 'Data',
4664 'Since'],
4665 'type': 'object'},
4666 'Error': {'additionalProperties': False,
4667 'properties': {'Code': {'type': 'string'},
4668 'Info': {'$ref': '#/definitions/ErrorInfo'},
4669 'Message': {'type': 'string'}},
4670 'required': ['Message', 'Code'],
4671 'type': 'object'},
4672 'ErrorInfo': {'additionalProperties': False,
4673 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
4674 'MacaroonPath': {'type': 'string'}},
4675 'type': 'object'},
4676 'ErrorResult': {'additionalProperties': False,
4677 'properties': {'Error': {'$ref': '#/definitions/Error'}},
4678 'required': ['Error'],
4679 'type': 'object'},
4680 'ErrorResults': {'additionalProperties': False,
4681 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
4682 'type': 'array'}},
4683 'required': ['Results'],
4684 'type': 'object'},
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',
4692 'MajorVersion',
4693 'MinorVersion',
4694 'Arch',
4695 'Series'],
4696 'type': 'object'},
4697 'FindToolsResult': {'additionalProperties': False,
4698 'properties': {'Error': {'$ref': '#/definitions/Error'},
4699 'List': {'items': {'$ref': '#/definitions/Tools'},
4700 'type': 'array'}},
4701 'required': ['List', 'Error'],
4702 'type': 'object'},
4703 'FullStatus': {'additionalProperties': False,
4704 'properties': {'AvailableVersion': {'type': 'string'},
4705 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
4706 'type': 'object'},
4707 'ModelName': {'type': 'string'},
4708 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
4709 'type': 'array'},
4710 'Services': {'patternProperties': {'.*': {'$ref': '#/definitions/ServiceStatus'}},
4711 'type': 'object'}},
4712 'required': ['ModelName',
4713 'AvailableVersion',
4714 'Machines',
4715 'Services',
4716 'Relations'],
4717 'type': 'object'},
4718 'GetBundleChangesParams': {'additionalProperties': False,
4719 'properties': {'yaml': {'type': 'string'}},
4720 'required': ['yaml'],
4721 'type': 'object'},
4722 'GetBundleChangesResults': {'additionalProperties': False,
4723 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
4724 'type': 'array'},
4725 'errors': {'items': {'type': 'string'},
4726 'type': 'array'}},
4727 'type': 'object'},
4728 'GetConstraintsResults': {'additionalProperties': False,
4729 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
4730 'required': ['Constraints'],
4731 'type': 'object'},
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'},
4740 'type': 'array'}},
4741 'type': 'object'},
4742 'HostPort': {'additionalProperties': False,
4743 'properties': {'Address': {'$ref': '#/definitions/Address'},
4744 'Port': {'type': 'integer'}},
4745 'required': ['Address', 'Port'],
4746 'type': 'object'},
4747 'Macaroon': {'additionalProperties': False,
4748 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
4749 'type': 'array'},
4750 'data': {'items': {'type': 'integer'},
4751 'type': 'array'},
4752 'id': {'$ref': '#/definitions/packet'},
4753 'location': {'$ref': '#/definitions/packet'},
4754 'sig': {'items': {'type': 'integer'},
4755 'type': 'array'}},
4756 'required': ['data',
4757 'location',
4758 'id',
4759 'caveats',
4760 'sig'],
4761 'type': 'object'},
4762 'MachineStatus': {'additionalProperties': False,
4763 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
4764 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
4765 'type': 'object'},
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'},
4773 'type': 'array'},
4774 'Series': {'type': 'string'},
4775 'WantsVote': {'type': 'boolean'}},
4776 'required': ['AgentStatus',
4777 'InstanceStatus',
4778 'DNSName',
4779 'InstanceId',
4780 'Series',
4781 'Id',
4782 'Containers',
4783 'Hardware',
4784 'Jobs',
4785 'HasVote',
4786 'WantsVote'],
4787 'type': 'object'},
4788 'MeterStatus': {'additionalProperties': False,
4789 'properties': {'Color': {'type': 'string'},
4790 'Message': {'type': 'string'}},
4791 'required': ['Color', 'Message'],
4792 'type': 'object'},
4793 'ModelConfigResults': {'additionalProperties': False,
4794 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
4795 'type': 'object'}},
4796 'type': 'object'}},
4797 'required': ['Config'],
4798 'type': 'object'},
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'},
4809 'type': 'array'}},
4810 'required': ['Name',
4811 'UUID',
4812 'ServerUUID',
4813 'ProviderType',
4814 'DefaultSeries',
4815 'OwnerTag',
4816 'Life',
4817 'Status',
4818 'Users'],
4819 'type': 'object'},
4820 'ModelSet': {'additionalProperties': False,
4821 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
4822 'type': 'object'}},
4823 'type': 'object'}},
4824 'required': ['Config'],
4825 'type': 'object'},
4826 'ModelUnset': {'additionalProperties': False,
4827 'properties': {'Keys': {'items': {'type': 'string'},
4828 'type': 'array'}},
4829 'required': ['Keys'],
4830 'type': 'object'},
4831 'ModelUserInfo': {'additionalProperties': False,
4832 'properties': {'access': {'type': 'string'},
4833 'displayname': {'type': 'string'},
4834 'lastconnection': {'format': 'date-time',
4835 'type': 'string'},
4836 'user': {'type': 'string'}},
4837 'required': ['user',
4838 'displayname',
4839 'lastconnection',
4840 'access'],
4841 'type': 'object'},
4842 'ModelUserInfoResult': {'additionalProperties': False,
4843 'properties': {'error': {'$ref': '#/definitions/Error'},
4844 'result': {'$ref': '#/definitions/ModelUserInfo'}},
4845 'type': 'object'},
4846 'ModelUserInfoResults': {'additionalProperties': False,
4847 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
4848 'type': 'array'}},
4849 'required': ['results'],
4850 'type': 'object'},
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',
4858 'Minor',
4859 'Tag',
4860 'Patch',
4861 'Build'],
4862 'type': 'object'},
4863 'Placement': {'additionalProperties': False,
4864 'properties': {'Directive': {'type': 'string'},
4865 'Scope': {'type': 'string'}},
4866 'required': ['Scope', 'Directive'],
4867 'type': 'object'},
4868 'PrivateAddress': {'additionalProperties': False,
4869 'properties': {'Target': {'type': 'string'}},
4870 'required': ['Target'],
4871 'type': 'object'},
4872 'PrivateAddressResults': {'additionalProperties': False,
4873 'properties': {'PrivateAddress': {'type': 'string'}},
4874 'required': ['PrivateAddress'],
4875 'type': 'object'},
4876 'ProvisioningScriptParams': {'additionalProperties': False,
4877 'properties': {'DataDir': {'type': 'string'},
4878 'DisablePackageCommands': {'type': 'boolean'},
4879 'MachineId': {'type': 'string'},
4880 'Nonce': {'type': 'string'}},
4881 'required': ['MachineId',
4882 'Nonce',
4883 'DataDir',
4884 'DisablePackageCommands'],
4885 'type': 'object'},
4886 'ProvisioningScriptResult': {'additionalProperties': False,
4887 'properties': {'Script': {'type': 'string'}},
4888 'required': ['Script'],
4889 'type': 'object'},
4890 'PublicAddress': {'additionalProperties': False,
4891 'properties': {'Target': {'type': 'string'}},
4892 'required': ['Target'],
4893 'type': 'object'},
4894 'PublicAddressResults': {'additionalProperties': False,
4895 'properties': {'PublicAddress': {'type': 'string'}},
4896 'required': ['PublicAddress'],
4897 'type': 'object'},
4898 'RelationStatus': {'additionalProperties': False,
4899 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
4900 'type': 'array'},
4901 'Id': {'type': 'integer'},
4902 'Interface': {'type': 'string'},
4903 'Key': {'type': 'string'},
4904 'Scope': {'type': 'string'}},
4905 'required': ['Id',
4906 'Key',
4907 'Interface',
4908 'Scope',
4909 'Endpoints'],
4910 'type': 'object'},
4911 'ResolveCharmResult': {'additionalProperties': False,
4912 'properties': {'Error': {'type': 'string'},
4913 'URL': {'$ref': '#/definitions/URL'}},
4914 'type': 'object'},
4915 'ResolveCharmResults': {'additionalProperties': False,
4916 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
4917 'type': 'array'}},
4918 'required': ['URLs'],
4919 'type': 'object'},
4920 'ResolveCharms': {'additionalProperties': False,
4921 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
4922 'type': 'array'}},
4923 'required': ['References'],
4924 'type': 'object'},
4925 'Resolved': {'additionalProperties': False,
4926 'properties': {'Retry': {'type': 'boolean'},
4927 'UnitName': {'type': 'string'}},
4928 'required': ['UnitName', 'Retry'],
4929 'type': 'object'},
4930 'ServiceStatus': {'additionalProperties': False,
4931 'properties': {'CanUpgradeTo': {'type': 'string'},
4932 'Charm': {'type': 'string'},
4933 'Err': {'additionalProperties': True,
4934 'type': 'object'},
4935 'Exposed': {'type': 'boolean'},
4936 'Life': {'type': 'string'},
4937 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
4938 'type': 'object'},
4939 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
4940 'type': 'array'}},
4941 'type': 'object'},
4942 'Status': {'$ref': '#/definitions/DetailedStatus'},
4943 'SubordinateTo': {'items': {'type': 'string'},
4944 'type': 'array'},
4945 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
4946 'type': 'object'}},
4947 'required': ['Err',
4948 'Charm',
4949 'Exposed',
4950 'Life',
4951 'Relations',
4952 'CanUpgradeTo',
4953 'SubordinateTo',
4954 'Units',
4955 'MeterStatuses',
4956 'Status'],
4957 'type': 'object'},
4958 'SetConstraints': {'additionalProperties': False,
4959 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
4960 'ServiceName': {'type': 'string'}},
4961 'required': ['ServiceName', 'Constraints'],
4962 'type': 'object'},
4963 'SetModelAgentVersion': {'additionalProperties': False,
4964 'properties': {'Version': {'$ref': '#/definitions/Number'}},
4965 'required': ['Version'],
4966 'type': 'object'},
4967 'StatusHistoryArgs': {'additionalProperties': False,
4968 'properties': {'Kind': {'type': 'string'},
4969 'Name': {'type': 'string'},
4970 'Size': {'type': 'integer'}},
4971 'required': ['Kind', 'Size', 'Name'],
4972 'type': 'object'},
4973 'StatusHistoryResults': {'additionalProperties': False,
4974 'properties': {'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
4975 'type': 'array'}},
4976 'required': ['Statuses'],
4977 'type': 'object'},
4978 'StatusParams': {'additionalProperties': False,
4979 'properties': {'Patterns': {'items': {'type': 'string'},
4980 'type': 'array'}},
4981 'required': ['Patterns'],
4982 'type': 'object'},
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'],
4989 'type': 'object'},
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',
4998 'User',
4999 'Name',
5000 'Revision',
5001 'Series',
5002 'Channel'],
5003 'type': 'object'},
5004 'UnitStatus': {'additionalProperties': False,
5005 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
5006 'Charm': {'type': 'string'},
5007 'Machine': {'type': 'string'},
5008 'OpenedPorts': {'items': {'type': 'string'},
5009 'type': 'array'},
5010 'PublicAddress': {'type': 'string'},
5011 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
5012 'type': 'object'},
5013 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
5014 'required': ['AgentStatus',
5015 'WorkloadStatus',
5016 'Machine',
5017 'OpenedPorts',
5018 'PublicAddress',
5019 'Charm',
5020 'Subordinates'],
5021 'type': 'object'},
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'},
5031 'type': 'array'},
5032 'tags': {'items': {'type': 'string'},
5033 'type': 'array'},
5034 'virt-type': {'type': 'string'}},
5035 'type': 'object'},
5036 'caveat': {'additionalProperties': False,
5037 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5038 'location': {'$ref': '#/definitions/packet'},
5039 'verificationId': {'$ref': '#/definitions/packet'}},
5040 'required': ['location',
5041 'caveatId',
5042 'verificationId'],
5043 'type': 'object'},
5044 'packet': {'additionalProperties': False,
5045 'properties': {'headerLen': {'type': 'integer'},
5046 'start': {'type': 'integer'},
5047 'totalLen': {'type': 'integer'}},
5048 'required': ['start', 'totalLen', 'headerLen'],
5049 'type': 'object'}},
5050 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
5051 'type': 'object'},
5052 'AbortCurrentUpgrade': {'type': 'object'},
5053 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
5054 'type': 'object'},
5055 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
5056 'type': 'object'},
5057 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5058 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5059 'type': 'object'},
5060 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5061 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5062 'type': 'object'},
5063 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
5064 'type': 'object'},
5065 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
5066 'Result': {'$ref': '#/definitions/CharmInfo'}},
5067 'type': 'object'},
5068 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
5069 'type': 'object'},
5070 'DestroyModel': {'type': 'object'},
5071 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
5072 'Result': {'$ref': '#/definitions/FindToolsResult'}},
5073 'type': 'object'},
5074 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
5075 'Result': {'$ref': '#/definitions/FullStatus'}},
5076 'type': 'object'},
5077 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
5078 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
5079 'type': 'object'},
5080 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
5081 'type': 'object'},
5082 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
5083 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
5084 'type': 'object'},
5085 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5086 'type': 'object'},
5087 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
5088 'type': 'object'},
5089 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
5090 'type': 'object'},
5091 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
5092 'type': 'object'},
5093 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
5094 'type': 'object'},
5095 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
5096 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
5097 'type': 'object'},
5098 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
5099 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
5100 'type': 'object'},
5101 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
5102 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
5103 'type': 'object'},
5104 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
5105 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
5106 'type': 'object'},
5107 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
5108 'type': 'object'},
5109 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5110 'Result': {'$ref': '#/definitions/ErrorResults'}},
5111 'type': 'object'},
5112 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
5113 'type': 'object'},
5114 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
5115 'type': 'object'},
5116 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryArgs'},
5117 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
5118 'type': 'object'},
5119 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
5120 'type': 'object'}},
5121 'type': 'object'}
5122
5123
5124 #@ReturnMapping(APIHostPortsResult)
5125 async def APIHostPorts(self):
5126 '''
5127
5128 Returns -> typing.Sequence[~HostPort]
5129 '''
5130 # map input types to rpc msg
5131 params = dict()
5132 msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params)
5133
5134 reply = await self.rpc(msg)
5135 return self._map(reply, APIHostPorts)
5136
5137
5138
5139 #@ReturnMapping(None)
5140 async def AbortCurrentUpgrade(self):
5141 '''
5142
5143 Returns -> None
5144 '''
5145 # map input types to rpc msg
5146 params = dict()
5147 msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params)
5148
5149 reply = await self.rpc(msg)
5150 return self._map(reply, AbortCurrentUpgrade)
5151
5152
5153
5154 #@ReturnMapping(None)
5155 async def AddCharm(self, channel, url):
5156 '''
5157 channel : str
5158 url : str
5159 Returns -> None
5160 '''
5161 # map input types to rpc msg
5162 params = dict()
5163 msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params)
5164 params['Channel'] = channel
5165 params['URL'] = url
5166 reply = await self.rpc(msg)
5167 return self._map(reply, AddCharm)
5168
5169
5170
5171 #@ReturnMapping(None)
5172 async def AddCharmWithAuthorization(self, charmstoremacaroon, channel, url):
5173 '''
5174 charmstoremacaroon : ~Macaroon
5175 channel : str
5176 url : str
5177 Returns -> None
5178 '''
5179 # map input types to rpc msg
5180 params = dict()
5181 msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params)
5182 params['CharmStoreMacaroon'] = charmstoremacaroon
5183 params['Channel'] = channel
5184 params['URL'] = url
5185 reply = await self.rpc(msg)
5186 return self._map(reply, AddCharmWithAuthorization)
5187
5188
5189
5190 #@ReturnMapping(AddMachinesResults)
5191 async def AddMachines(self, machineparams):
5192 '''
5193 machineparams : typing.Sequence[~AddMachineParams]
5194 Returns -> typing.Sequence[~AddMachinesResult]
5195 '''
5196 # map input types to rpc msg
5197 params = dict()
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)
5202
5203
5204
5205 #@ReturnMapping(AddMachinesResults)
5206 async def AddMachinesV2(self, machineparams):
5207 '''
5208 machineparams : typing.Sequence[~AddMachineParams]
5209 Returns -> typing.Sequence[~AddMachinesResult]
5210 '''
5211 # map input types to rpc msg
5212 params = dict()
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)
5217
5218
5219
5220 #@ReturnMapping(AgentVersionResult)
5221 async def AgentVersion(self):
5222 '''
5223
5224 Returns -> ~Number
5225 '''
5226 # map input types to rpc msg
5227 params = dict()
5228 msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params)
5229
5230 reply = await self.rpc(msg)
5231 return self._map(reply, AgentVersion)
5232
5233
5234
5235 #@ReturnMapping(CharmInfo)
5236 async def CharmInfo(self, charmurl):
5237 '''
5238 charmurl : str
5239 Returns -> str
5240 '''
5241 # map input types to rpc msg
5242 params = dict()
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)
5247
5248
5249
5250 #@ReturnMapping(None)
5251 async def DestroyMachines(self, machinenames, force):
5252 '''
5253 machinenames : typing.Sequence[str]
5254 force : bool
5255 Returns -> None
5256 '''
5257 # map input types to rpc msg
5258 params = dict()
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)
5264
5265
5266
5267 #@ReturnMapping(None)
5268 async def DestroyModel(self):
5269 '''
5270
5271 Returns -> None
5272 '''
5273 # map input types to rpc msg
5274 params = dict()
5275 msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params)
5276
5277 reply = await self.rpc(msg)
5278 return self._map(reply, DestroyModel)
5279
5280
5281
5282 #@ReturnMapping(FindToolsResult)
5283 async def FindTools(self, majorversion, series, minorversion, arch, number):
5284 '''
5285 majorversion : int
5286 series : str
5287 minorversion : int
5288 arch : str
5289 number : ~Number
5290 Returns -> typing.Union[~Error, typing.Sequence[~Tools]]
5291 '''
5292 # map input types to rpc msg
5293 params = dict()
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)
5302
5303
5304
5305 #@ReturnMapping(FullStatus)
5306 async def FullStatus(self, patterns):
5307 '''
5308 patterns : typing.Sequence[str]
5309 Returns -> typing.Union[typing.Mapping[str, ~MachineStatus], typing.Sequence[~RelationStatus]]
5310 '''
5311 # map input types to rpc msg
5312 params = dict()
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)
5317
5318
5319
5320 #@ReturnMapping(GetBundleChangesResults)
5321 async def GetBundleChanges(self, yaml):
5322 '''
5323 yaml : str
5324 Returns -> typing.Sequence[~BundleChangesChange]
5325 '''
5326 # map input types to rpc msg
5327 params = dict()
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)
5332
5333
5334
5335 #@ReturnMapping(GetConstraintsResults)
5336 async def GetModelConstraints(self):
5337 '''
5338
5339 Returns -> ~Value
5340 '''
5341 # map input types to rpc msg
5342 params = dict()
5343 msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params)
5344
5345 reply = await self.rpc(msg)
5346 return self._map(reply, GetModelConstraints)
5347
5348
5349
5350 #@ReturnMapping(AddMachinesResults)
5351 async def InjectMachines(self, machineparams):
5352 '''
5353 machineparams : typing.Sequence[~AddMachineParams]
5354 Returns -> typing.Sequence[~AddMachinesResult]
5355 '''
5356 # map input types to rpc msg
5357 params = dict()
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)
5362
5363
5364
5365 #@ReturnMapping(ModelConfigResults)
5366 async def ModelGet(self):
5367 '''
5368
5369 Returns -> typing.Mapping[str, typing.Any]
5370 '''
5371 # map input types to rpc msg
5372 params = dict()
5373 msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params)
5374
5375 reply = await self.rpc(msg)
5376 return self._map(reply, ModelGet)
5377
5378
5379
5380 #@ReturnMapping(ModelInfo)
5381 async def ModelInfo(self):
5382 '''
5383
5384 Returns -> typing.Union[typing.Sequence[~ModelUserInfo], ~EntityStatus]
5385 '''
5386 # map input types to rpc msg
5387 params = dict()
5388 msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params)
5389
5390 reply = await self.rpc(msg)
5391 return self._map(reply, ModelInfo)
5392
5393
5394
5395 #@ReturnMapping(None)
5396 async def ModelSet(self, config):
5397 '''
5398 config : typing.Mapping[str, typing.Any]
5399 Returns -> None
5400 '''
5401 # map input types to rpc msg
5402 params = dict()
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)
5407
5408
5409
5410 #@ReturnMapping(None)
5411 async def ModelUnset(self, keys):
5412 '''
5413 keys : typing.Sequence[str]
5414 Returns -> None
5415 '''
5416 # map input types to rpc msg
5417 params = dict()
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)
5422
5423
5424
5425 #@ReturnMapping(ModelUserInfoResults)
5426 async def ModelUserInfo(self):
5427 '''
5428
5429 Returns -> typing.Sequence[~ModelUserInfoResult]
5430 '''
5431 # map input types to rpc msg
5432 params = dict()
5433 msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params)
5434
5435 reply = await self.rpc(msg)
5436 return self._map(reply, ModelUserInfo)
5437
5438
5439
5440 #@ReturnMapping(PrivateAddressResults)
5441 async def PrivateAddress(self, target):
5442 '''
5443 target : str
5444 Returns -> str
5445 '''
5446 # map input types to rpc msg
5447 params = dict()
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)
5452
5453
5454
5455 #@ReturnMapping(ProvisioningScriptResult)
5456 async def ProvisioningScript(self, datadir, disablepackagecommands, nonce, machineid):
5457 '''
5458 datadir : str
5459 disablepackagecommands : bool
5460 nonce : str
5461 machineid : str
5462 Returns -> str
5463 '''
5464 # map input types to rpc msg
5465 params = dict()
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)
5473
5474
5475
5476 #@ReturnMapping(PublicAddressResults)
5477 async def PublicAddress(self, target):
5478 '''
5479 target : str
5480 Returns -> str
5481 '''
5482 # map input types to rpc msg
5483 params = dict()
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)
5488
5489
5490
5491 #@ReturnMapping(ResolveCharmResults)
5492 async def ResolveCharms(self, references):
5493 '''
5494 references : typing.Sequence[~URL]
5495 Returns -> typing.Sequence[~ResolveCharmResult]
5496 '''
5497 # map input types to rpc msg
5498 params = dict()
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)
5503
5504
5505
5506 #@ReturnMapping(None)
5507 async def Resolved(self, unitname, retry):
5508 '''
5509 unitname : str
5510 retry : bool
5511 Returns -> None
5512 '''
5513 # map input types to rpc msg
5514 params = dict()
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)
5520
5521
5522
5523 #@ReturnMapping(ErrorResults)
5524 async def RetryProvisioning(self, entities):
5525 '''
5526 entities : typing.Sequence[~Entity]
5527 Returns -> typing.Sequence[~ErrorResult]
5528 '''
5529 # map input types to rpc msg
5530 params = dict()
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)
5535
5536
5537
5538 #@ReturnMapping(None)
5539 async def SetModelAgentVersion(self, build, minor, tag, patch, major):
5540 '''
5541 build : int
5542 minor : int
5543 tag : str
5544 patch : int
5545 major : int
5546 Returns -> None
5547 '''
5548 # map input types to rpc msg
5549 params = dict()
5550 msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params)
5551 params['Build'] = build
5552 params['Minor'] = minor
5553 params['Tag'] = tag
5554 params['Patch'] = patch
5555 params['Major'] = major
5556 reply = await self.rpc(msg)
5557 return self._map(reply, SetModelAgentVersion)
5558
5559
5560
5561 #@ReturnMapping(None)
5562 async def SetModelConstraints(self, constraints, servicename):
5563 '''
5564 constraints : ~Value
5565 servicename : str
5566 Returns -> None
5567 '''
5568 # map input types to rpc msg
5569 params = dict()
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)
5575
5576
5577
5578 #@ReturnMapping(StatusHistoryResults)
5579 async def StatusHistory(self, name, kind, size):
5580 '''
5581 name : str
5582 kind : str
5583 size : int
5584 Returns -> typing.Sequence[~DetailedStatus]
5585 '''
5586 # map input types to rpc msg
5587 params = dict()
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)
5594
5595
5596
5597 #@ReturnMapping(AllWatcherId)
5598 async def WatchAll(self):
5599 '''
5600
5601 Returns -> str
5602 '''
5603 # map input types to rpc msg
5604 params = dict()
5605 msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params)
5606
5607 reply = await self.rpc(msg)
5608 return self._map(reply, WatchAll)
5609
5610
5611 class Controller(Type):
5612 name = 'Controller'
5613 version = 2
5614 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
5615 'properties': {'AllWatcherId': {'type': 'string'}},
5616 'required': ['AllWatcherId'],
5617 'type': 'object'},
5618 'DestroyControllerArgs': {'additionalProperties': False,
5619 'properties': {'destroy-models': {'type': 'boolean'}},
5620 'required': ['destroy-models'],
5621 'type': 'object'},
5622 'Entities': {'additionalProperties': False,
5623 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5624 'type': 'array'}},
5625 'required': ['Entities'],
5626 'type': 'object'},
5627 'Entity': {'additionalProperties': False,
5628 'properties': {'Tag': {'type': 'string'}},
5629 'required': ['Tag'],
5630 'type': 'object'},
5631 'Error': {'additionalProperties': False,
5632 'properties': {'Code': {'type': 'string'},
5633 'Info': {'$ref': '#/definitions/ErrorInfo'},
5634 'Message': {'type': 'string'}},
5635 'required': ['Message', 'Code'],
5636 'type': 'object'},
5637 'ErrorInfo': {'additionalProperties': False,
5638 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5639 'MacaroonPath': {'type': 'string'}},
5640 'type': 'object'},
5641 'InitiateModelMigrationArgs': {'additionalProperties': False,
5642 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
5643 'type': 'array'}},
5644 'required': ['specs'],
5645 'type': 'object'},
5646 'InitiateModelMigrationResult': {'additionalProperties': False,
5647 'properties': {'error': {'$ref': '#/definitions/Error'},
5648 'id': {'type': 'string'},
5649 'model-tag': {'type': 'string'}},
5650 'required': ['model-tag',
5651 'error',
5652 'id'],
5653 'type': 'object'},
5654 'InitiateModelMigrationResults': {'additionalProperties': False,
5655 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
5656 'type': 'array'}},
5657 'required': ['results'],
5658 'type': 'object'},
5659 'Macaroon': {'additionalProperties': False,
5660 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5661 'type': 'array'},
5662 'data': {'items': {'type': 'integer'},
5663 'type': 'array'},
5664 'id': {'$ref': '#/definitions/packet'},
5665 'location': {'$ref': '#/definitions/packet'},
5666 'sig': {'items': {'type': 'integer'},
5667 'type': 'array'}},
5668 'required': ['data',
5669 'location',
5670 'id',
5671 'caveats',
5672 'sig'],
5673 'type': 'object'},
5674 'Model': {'additionalProperties': False,
5675 'properties': {'Name': {'type': 'string'},
5676 'OwnerTag': {'type': 'string'},
5677 'UUID': {'type': 'string'}},
5678 'required': ['Name', 'UUID', 'OwnerTag'],
5679 'type': 'object'},
5680 'ModelBlockInfo': {'additionalProperties': False,
5681 'properties': {'blocks': {'items': {'type': 'string'},
5682 'type': 'array'},
5683 'model-uuid': {'type': 'string'},
5684 'name': {'type': 'string'},
5685 'owner-tag': {'type': 'string'}},
5686 'required': ['name',
5687 'model-uuid',
5688 'owner-tag',
5689 'blocks'],
5690 'type': 'object'},
5691 'ModelBlockInfoList': {'additionalProperties': False,
5692 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
5693 'type': 'array'}},
5694 'type': 'object'},
5695 'ModelConfigResults': {'additionalProperties': False,
5696 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
5697 'type': 'object'}},
5698 'type': 'object'}},
5699 'required': ['Config'],
5700 'type': 'object'},
5701 'ModelMigrationSpec': {'additionalProperties': False,
5702 'properties': {'model-tag': {'type': 'string'},
5703 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
5704 'required': ['model-tag',
5705 'target-info'],
5706 'type': 'object'},
5707 'ModelMigrationTargetInfo': {'additionalProperties': False,
5708 'properties': {'addrs': {'items': {'type': 'string'},
5709 'type': 'array'},
5710 'auth-tag': {'type': 'string'},
5711 'ca-cert': {'type': 'string'},
5712 'controller-tag': {'type': 'string'},
5713 'password': {'type': 'string'}},
5714 'required': ['controller-tag',
5715 'addrs',
5716 'ca-cert',
5717 'auth-tag',
5718 'password'],
5719 'type': 'object'},
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',
5727 'life',
5728 'hosted-machine-count',
5729 'service-count',
5730 'owner-tag'],
5731 'type': 'object'},
5732 'ModelStatusResults': {'additionalProperties': False,
5733 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
5734 'type': 'array'}},
5735 'required': ['models'],
5736 'type': 'object'},
5737 'RemoveBlocksArgs': {'additionalProperties': False,
5738 'properties': {'all': {'type': 'boolean'}},
5739 'required': ['all'],
5740 'type': 'object'},
5741 'UserModel': {'additionalProperties': False,
5742 'properties': {'LastConnection': {'format': 'date-time',
5743 'type': 'string'},
5744 'Model': {'$ref': '#/definitions/Model'}},
5745 'required': ['Model', 'LastConnection'],
5746 'type': 'object'},
5747 'UserModelList': {'additionalProperties': False,
5748 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
5749 'type': 'array'}},
5750 'required': ['UserModels'],
5751 'type': 'object'},
5752 'caveat': {'additionalProperties': False,
5753 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5754 'location': {'$ref': '#/definitions/packet'},
5755 'verificationId': {'$ref': '#/definitions/packet'}},
5756 'required': ['location',
5757 'caveatId',
5758 'verificationId'],
5759 'type': 'object'},
5760 'packet': {'additionalProperties': False,
5761 'properties': {'headerLen': {'type': 'integer'},
5762 'start': {'type': 'integer'},
5763 'totalLen': {'type': 'integer'}},
5764 'required': ['start', 'totalLen', 'headerLen'],
5765 'type': 'object'}},
5766 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
5767 'type': 'object'},
5768 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
5769 'type': 'object'},
5770 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
5771 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
5772 'type': 'object'},
5773 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
5774 'type': 'object'},
5775 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
5776 'type': 'object'},
5777 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5778 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
5779 'type': 'object'},
5780 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
5781 'type': 'object'},
5782 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
5783 'type': 'object'}},
5784 'type': 'object'}
5785
5786
5787 #@ReturnMapping(UserModelList)
5788 async def AllModels(self):
5789 '''
5790
5791 Returns -> typing.Sequence[~UserModel]
5792 '''
5793 # map input types to rpc msg
5794 params = dict()
5795 msg = dict(Type='Controller', Request='AllModels', Version=2, Params=params)
5796
5797 reply = await self.rpc(msg)
5798 return self._map(reply, AllModels)
5799
5800
5801
5802 #@ReturnMapping(None)
5803 async def DestroyController(self, destroy_models):
5804 '''
5805 destroy_models : bool
5806 Returns -> None
5807 '''
5808 # map input types to rpc msg
5809 params = dict()
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)
5814
5815
5816
5817 #@ReturnMapping(InitiateModelMigrationResults)
5818 async def InitiateModelMigration(self, specs):
5819 '''
5820 specs : typing.Sequence[~ModelMigrationSpec]
5821 Returns -> typing.Sequence[~InitiateModelMigrationResult]
5822 '''
5823 # map input types to rpc msg
5824 params = dict()
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)
5829
5830
5831
5832 #@ReturnMapping(ModelBlockInfoList)
5833 async def ListBlockedModels(self):
5834 '''
5835
5836 Returns -> typing.Sequence[~ModelBlockInfo]
5837 '''
5838 # map input types to rpc msg
5839 params = dict()
5840 msg = dict(Type='Controller', Request='ListBlockedModels', Version=2, Params=params)
5841
5842 reply = await self.rpc(msg)
5843 return self._map(reply, ListBlockedModels)
5844
5845
5846
5847 #@ReturnMapping(ModelConfigResults)
5848 async def ModelConfig(self):
5849 '''
5850
5851 Returns -> typing.Mapping[str, typing.Any]
5852 '''
5853 # map input types to rpc msg
5854 params = dict()
5855 msg = dict(Type='Controller', Request='ModelConfig', Version=2, Params=params)
5856
5857 reply = await self.rpc(msg)
5858 return self._map(reply, ModelConfig)
5859
5860
5861
5862 #@ReturnMapping(ModelStatusResults)
5863 async def ModelStatus(self, entities):
5864 '''
5865 entities : typing.Sequence[~Entity]
5866 Returns -> typing.Sequence[~ModelStatus]
5867 '''
5868 # map input types to rpc msg
5869 params = dict()
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)
5874
5875
5876
5877 #@ReturnMapping(None)
5878 async def RemoveBlocks(self, all_):
5879 '''
5880 all_ : bool
5881 Returns -> None
5882 '''
5883 # map input types to rpc msg
5884 params = dict()
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)
5889
5890
5891
5892 #@ReturnMapping(AllWatcherId)
5893 async def WatchAllModels(self):
5894 '''
5895
5896 Returns -> str
5897 '''
5898 # map input types to rpc msg
5899 params = dict()
5900 msg = dict(Type='Controller', Request='WatchAllModels', Version=2, Params=params)
5901
5902 reply = await self.rpc(msg)
5903 return self._map(reply, WatchAllModels)
5904
5905
5906 class Deployer(Type):
5907 name = 'Deployer'
5908 version = 1
5909 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
5910 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
5911 'type': 'array'},
5912 'type': 'array'}},
5913 'required': ['Servers'],
5914 'type': 'object'},
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'],
5921 'type': 'object'},
5922 'BytesResult': {'additionalProperties': False,
5923 'properties': {'Result': {'items': {'type': 'integer'},
5924 'type': 'array'}},
5925 'required': ['Result'],
5926 'type': 'object'},
5927 'DeployerConnectionValues': {'additionalProperties': False,
5928 'properties': {'APIAddresses': {'items': {'type': 'string'},
5929 'type': 'array'},
5930 'StateAddresses': {'items': {'type': 'string'},
5931 'type': 'array'}},
5932 'required': ['StateAddresses',
5933 'APIAddresses'],
5934 'type': 'object'},
5935 'Entities': {'additionalProperties': False,
5936 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5937 'type': 'array'}},
5938 'required': ['Entities'],
5939 'type': 'object'},
5940 'Entity': {'additionalProperties': False,
5941 'properties': {'Tag': {'type': 'string'}},
5942 'required': ['Tag'],
5943 'type': 'object'},
5944 'EntityPassword': {'additionalProperties': False,
5945 'properties': {'Password': {'type': 'string'},
5946 'Tag': {'type': 'string'}},
5947 'required': ['Tag', 'Password'],
5948 'type': 'object'},
5949 'EntityPasswords': {'additionalProperties': False,
5950 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5951 'type': 'array'}},
5952 'required': ['Changes'],
5953 'type': 'object'},
5954 'Error': {'additionalProperties': False,
5955 'properties': {'Code': {'type': 'string'},
5956 'Info': {'$ref': '#/definitions/ErrorInfo'},
5957 'Message': {'type': 'string'}},
5958 'required': ['Message', 'Code'],
5959 'type': 'object'},
5960 'ErrorInfo': {'additionalProperties': False,
5961 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5962 'MacaroonPath': {'type': 'string'}},
5963 'type': 'object'},
5964 'ErrorResult': {'additionalProperties': False,
5965 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5966 'required': ['Error'],
5967 'type': 'object'},
5968 'ErrorResults': {'additionalProperties': False,
5969 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
5970 'type': 'array'}},
5971 'required': ['Results'],
5972 'type': 'object'},
5973 'HostPort': {'additionalProperties': False,
5974 'properties': {'Address': {'$ref': '#/definitions/Address'},
5975 'Port': {'type': 'integer'}},
5976 'required': ['Address', 'Port'],
5977 'type': 'object'},
5978 'LifeResult': {'additionalProperties': False,
5979 'properties': {'Error': {'$ref': '#/definitions/Error'},
5980 'Life': {'type': 'string'}},
5981 'required': ['Life', 'Error'],
5982 'type': 'object'},
5983 'LifeResults': {'additionalProperties': False,
5984 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
5985 'type': 'array'}},
5986 'required': ['Results'],
5987 'type': 'object'},
5988 'Macaroon': {'additionalProperties': False,
5989 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5990 'type': 'array'},
5991 'data': {'items': {'type': 'integer'},
5992 'type': 'array'},
5993 'id': {'$ref': '#/definitions/packet'},
5994 'location': {'$ref': '#/definitions/packet'},
5995 'sig': {'items': {'type': 'integer'},
5996 'type': 'array'}},
5997 'required': ['data',
5998 'location',
5999 'id',
6000 'caveats',
6001 'sig'],
6002 'type': 'object'},
6003 'NotifyWatchResult': {'additionalProperties': False,
6004 'properties': {'Error': {'$ref': '#/definitions/Error'},
6005 'NotifyWatcherId': {'type': 'string'}},
6006 'required': ['NotifyWatcherId', 'Error'],
6007 'type': 'object'},
6008 'StringResult': {'additionalProperties': False,
6009 'properties': {'Error': {'$ref': '#/definitions/Error'},
6010 'Result': {'type': 'string'}},
6011 'required': ['Error', 'Result'],
6012 'type': 'object'},
6013 'StringsResult': {'additionalProperties': False,
6014 'properties': {'Error': {'$ref': '#/definitions/Error'},
6015 'Result': {'items': {'type': 'string'},
6016 'type': 'array'}},
6017 'required': ['Error', 'Result'],
6018 'type': 'object'},
6019 'StringsWatchResult': {'additionalProperties': False,
6020 'properties': {'Changes': {'items': {'type': 'string'},
6021 'type': 'array'},
6022 'Error': {'$ref': '#/definitions/Error'},
6023 'StringsWatcherId': {'type': 'string'}},
6024 'required': ['StringsWatcherId',
6025 'Changes',
6026 'Error'],
6027 'type': 'object'},
6028 'StringsWatchResults': {'additionalProperties': False,
6029 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
6030 'type': 'array'}},
6031 'required': ['Results'],
6032 'type': 'object'},
6033 'caveat': {'additionalProperties': False,
6034 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6035 'location': {'$ref': '#/definitions/packet'},
6036 'verificationId': {'$ref': '#/definitions/packet'}},
6037 'required': ['location',
6038 'caveatId',
6039 'verificationId'],
6040 'type': 'object'},
6041 'packet': {'additionalProperties': False,
6042 'properties': {'headerLen': {'type': 'integer'},
6043 'start': {'type': 'integer'},
6044 'totalLen': {'type': 'integer'}},
6045 'required': ['start', 'totalLen', 'headerLen'],
6046 'type': 'object'}},
6047 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6048 'type': 'object'},
6049 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
6050 'type': 'object'},
6051 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
6052 'type': 'object'},
6053 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
6054 'type': 'object'},
6055 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6056 'Result': {'$ref': '#/definitions/LifeResults'}},
6057 'type': 'object'},
6058 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
6059 'type': 'object'},
6060 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6061 'Result': {'$ref': '#/definitions/ErrorResults'}},
6062 'type': 'object'},
6063 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6064 'Result': {'$ref': '#/definitions/ErrorResults'}},
6065 'type': 'object'},
6066 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
6067 'type': 'object'},
6068 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6069 'type': 'object'},
6070 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6071 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6072 'type': 'object'}},
6073 'type': 'object'}
6074
6075
6076 #@ReturnMapping(StringsResult)
6077 async def APIAddresses(self):
6078 '''
6079
6080 Returns -> typing.Union[~Error, typing.Sequence[str]]
6081 '''
6082 # map input types to rpc msg
6083 params = dict()
6084 msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params)
6085
6086 reply = await self.rpc(msg)
6087 return self._map(reply, APIAddresses)
6088
6089
6090
6091 #@ReturnMapping(APIHostPortsResult)
6092 async def APIHostPorts(self):
6093 '''
6094
6095 Returns -> typing.Sequence[~HostPort]
6096 '''
6097 # map input types to rpc msg
6098 params = dict()
6099 msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params)
6100
6101 reply = await self.rpc(msg)
6102 return self._map(reply, APIHostPorts)
6103
6104
6105
6106 #@ReturnMapping(BytesResult)
6107 async def CACert(self):
6108 '''
6109
6110 Returns -> typing.Sequence[int]
6111 '''
6112 # map input types to rpc msg
6113 params = dict()
6114 msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params)
6115
6116 reply = await self.rpc(msg)
6117 return self._map(reply, CACert)
6118
6119
6120
6121 #@ReturnMapping(DeployerConnectionValues)
6122 async def ConnectionInfo(self):
6123 '''
6124
6125 Returns -> typing.Sequence[str]
6126 '''
6127 # map input types to rpc msg
6128 params = dict()
6129 msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params)
6130
6131 reply = await self.rpc(msg)
6132 return self._map(reply, ConnectionInfo)
6133
6134
6135
6136 #@ReturnMapping(LifeResults)
6137 async def Life(self, entities):
6138 '''
6139 entities : typing.Sequence[~Entity]
6140 Returns -> typing.Sequence[~LifeResult]
6141 '''
6142 # map input types to rpc msg
6143 params = dict()
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)
6148
6149
6150
6151 #@ReturnMapping(StringResult)
6152 async def ModelUUID(self):
6153 '''
6154
6155 Returns -> typing.Union[~Error, str]
6156 '''
6157 # map input types to rpc msg
6158 params = dict()
6159 msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params)
6160
6161 reply = await self.rpc(msg)
6162 return self._map(reply, ModelUUID)
6163
6164
6165
6166 #@ReturnMapping(ErrorResults)
6167 async def Remove(self, entities):
6168 '''
6169 entities : typing.Sequence[~Entity]
6170 Returns -> typing.Sequence[~ErrorResult]
6171 '''
6172 # map input types to rpc msg
6173 params = dict()
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)
6178
6179
6180
6181 #@ReturnMapping(ErrorResults)
6182 async def SetPasswords(self, changes):
6183 '''
6184 changes : typing.Sequence[~EntityPassword]
6185 Returns -> typing.Sequence[~ErrorResult]
6186 '''
6187 # map input types to rpc msg
6188 params = dict()
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)
6193
6194
6195
6196 #@ReturnMapping(StringsResult)
6197 async def StateAddresses(self):
6198 '''
6199
6200 Returns -> typing.Union[~Error, typing.Sequence[str]]
6201 '''
6202 # map input types to rpc msg
6203 params = dict()
6204 msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params)
6205
6206 reply = await self.rpc(msg)
6207 return self._map(reply, StateAddresses)
6208
6209
6210
6211 #@ReturnMapping(NotifyWatchResult)
6212 async def WatchAPIHostPorts(self):
6213 '''
6214
6215 Returns -> typing.Union[~Error, str]
6216 '''
6217 # map input types to rpc msg
6218 params = dict()
6219 msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params)
6220
6221 reply = await self.rpc(msg)
6222 return self._map(reply, WatchAPIHostPorts)
6223
6224
6225
6226 #@ReturnMapping(StringsWatchResults)
6227 async def WatchUnits(self, entities):
6228 '''
6229 entities : typing.Sequence[~Entity]
6230 Returns -> typing.Sequence[~StringsWatchResult]
6231 '''
6232 # map input types to rpc msg
6233 params = dict()
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)
6238
6239
6240 class DiscoverSpaces(Type):
6241 name = 'DiscoverSpaces'
6242 version = 2
6243 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
6244 'properties': {'SpaceTag': {'type': 'string'},
6245 'SubnetProviderId': {'type': 'string'},
6246 'SubnetTag': {'type': 'string'},
6247 'Zones': {'items': {'type': 'string'},
6248 'type': 'array'}},
6249 'required': ['SpaceTag'],
6250 'type': 'object'},
6251 'AddSubnetsParams': {'additionalProperties': False,
6252 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
6253 'type': 'array'}},
6254 'required': ['Subnets'],
6255 'type': 'object'},
6256 'CreateSpaceParams': {'additionalProperties': False,
6257 'properties': {'ProviderId': {'type': 'string'},
6258 'Public': {'type': 'boolean'},
6259 'SpaceTag': {'type': 'string'},
6260 'SubnetTags': {'items': {'type': 'string'},
6261 'type': 'array'}},
6262 'required': ['SubnetTags',
6263 'SpaceTag',
6264 'Public'],
6265 'type': 'object'},
6266 'CreateSpacesParams': {'additionalProperties': False,
6267 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
6268 'type': 'array'}},
6269 'required': ['Spaces'],
6270 'type': 'object'},
6271 'DiscoverSpacesResults': {'additionalProperties': False,
6272 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
6273 'type': 'array'}},
6274 'required': ['Results'],
6275 'type': 'object'},
6276 'Error': {'additionalProperties': False,
6277 'properties': {'Code': {'type': 'string'},
6278 'Info': {'$ref': '#/definitions/ErrorInfo'},
6279 'Message': {'type': 'string'}},
6280 'required': ['Message', 'Code'],
6281 'type': 'object'},
6282 'ErrorInfo': {'additionalProperties': False,
6283 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6284 'MacaroonPath': {'type': 'string'}},
6285 'type': 'object'},
6286 'ErrorResult': {'additionalProperties': False,
6287 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6288 'required': ['Error'],
6289 'type': 'object'},
6290 'ErrorResults': {'additionalProperties': False,
6291 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6292 'type': 'array'}},
6293 'required': ['Results'],
6294 'type': 'object'},
6295 'ListSubnetsResults': {'additionalProperties': False,
6296 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
6297 'type': 'array'}},
6298 'required': ['Results'],
6299 'type': 'object'},
6300 'Macaroon': {'additionalProperties': False,
6301 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6302 'type': 'array'},
6303 'data': {'items': {'type': 'integer'},
6304 'type': 'array'},
6305 'id': {'$ref': '#/definitions/packet'},
6306 'location': {'$ref': '#/definitions/packet'},
6307 'sig': {'items': {'type': 'integer'},
6308 'type': 'array'}},
6309 'required': ['data',
6310 'location',
6311 'id',
6312 'caveats',
6313 'sig'],
6314 'type': 'object'},
6315 'ModelConfigResult': {'additionalProperties': False,
6316 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6317 'type': 'object'}},
6318 'type': 'object'}},
6319 'required': ['Config'],
6320 'type': 'object'},
6321 'ProviderSpace': {'additionalProperties': False,
6322 'properties': {'Error': {'$ref': '#/definitions/Error'},
6323 'Name': {'type': 'string'},
6324 'ProviderId': {'type': 'string'},
6325 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
6326 'type': 'array'}},
6327 'required': ['Name',
6328 'ProviderId',
6329 'Subnets'],
6330 'type': 'object'},
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'},
6337 'type': 'array'},
6338 'StaticRangeLowIP': {'items': {'type': 'integer'},
6339 'type': 'array'},
6340 'Status': {'type': 'string'},
6341 'VLANTag': {'type': 'integer'},
6342 'Zones': {'items': {'type': 'string'},
6343 'type': 'array'}},
6344 'required': ['CIDR',
6345 'VLANTag',
6346 'Life',
6347 'SpaceTag',
6348 'Zones'],
6349 'type': 'object'},
6350 'SubnetsFilters': {'additionalProperties': False,
6351 'properties': {'SpaceTag': {'type': 'string'},
6352 'Zone': {'type': 'string'}},
6353 'type': 'object'},
6354 'caveat': {'additionalProperties': False,
6355 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6356 'location': {'$ref': '#/definitions/packet'},
6357 'verificationId': {'$ref': '#/definitions/packet'}},
6358 'required': ['location',
6359 'caveatId',
6360 'verificationId'],
6361 'type': 'object'},
6362 'packet': {'additionalProperties': False,
6363 'properties': {'headerLen': {'type': 'integer'},
6364 'start': {'type': 'integer'},
6365 'totalLen': {'type': 'integer'}},
6366 'required': ['start', 'totalLen', 'headerLen'],
6367 'type': 'object'}},
6368 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
6369 'Result': {'$ref': '#/definitions/ErrorResults'}},
6370 'type': 'object'},
6371 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
6372 'Result': {'$ref': '#/definitions/ErrorResults'}},
6373 'type': 'object'},
6374 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
6375 'type': 'object'},
6376 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
6377 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
6378 'type': 'object'},
6379 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6380 'type': 'object'}},
6381 'type': 'object'}
6382
6383
6384 #@ReturnMapping(ErrorResults)
6385 async def AddSubnets(self, subnets):
6386 '''
6387 subnets : typing.Sequence[~AddSubnetParams]
6388 Returns -> typing.Sequence[~ErrorResult]
6389 '''
6390 # map input types to rpc msg
6391 params = dict()
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)
6396
6397
6398
6399 #@ReturnMapping(ErrorResults)
6400 async def CreateSpaces(self, spaces):
6401 '''
6402 spaces : typing.Sequence[~CreateSpaceParams]
6403 Returns -> typing.Sequence[~ErrorResult]
6404 '''
6405 # map input types to rpc msg
6406 params = dict()
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)
6411
6412
6413
6414 #@ReturnMapping(DiscoverSpacesResults)
6415 async def ListSpaces(self):
6416 '''
6417
6418 Returns -> typing.Sequence[~ProviderSpace]
6419 '''
6420 # map input types to rpc msg
6421 params = dict()
6422 msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params)
6423
6424 reply = await self.rpc(msg)
6425 return self._map(reply, ListSpaces)
6426
6427
6428
6429 #@ReturnMapping(ListSubnetsResults)
6430 async def ListSubnets(self, spacetag, zone):
6431 '''
6432 spacetag : str
6433 zone : str
6434 Returns -> typing.Sequence[~Subnet]
6435 '''
6436 # map input types to rpc msg
6437 params = dict()
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)
6443
6444
6445
6446 #@ReturnMapping(ModelConfigResult)
6447 async def ModelConfig(self):
6448 '''
6449
6450 Returns -> typing.Mapping[str, typing.Any]
6451 '''
6452 # map input types to rpc msg
6453 params = dict()
6454 msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params)
6455
6456 reply = await self.rpc(msg)
6457 return self._map(reply, ModelConfig)
6458
6459
6460 class DiskManager(Type):
6461 name = 'DiskManager'
6462 version = 2
6463 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
6464 'properties': {'BusAddress': {'type': 'string'},
6465 'DeviceLinks': {'items': {'type': 'string'},
6466 'type': 'array'},
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',
6476 'DeviceLinks',
6477 'Label',
6478 'UUID',
6479 'HardwareId',
6480 'BusAddress',
6481 'Size',
6482 'FilesystemType',
6483 'InUse',
6484 'MountPoint'],
6485 'type': 'object'},
6486 'Error': {'additionalProperties': False,
6487 'properties': {'Code': {'type': 'string'},
6488 'Info': {'$ref': '#/definitions/ErrorInfo'},
6489 'Message': {'type': 'string'}},
6490 'required': ['Message', 'Code'],
6491 'type': 'object'},
6492 'ErrorInfo': {'additionalProperties': False,
6493 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6494 'MacaroonPath': {'type': 'string'}},
6495 'type': 'object'},
6496 'ErrorResult': {'additionalProperties': False,
6497 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6498 'required': ['Error'],
6499 'type': 'object'},
6500 'ErrorResults': {'additionalProperties': False,
6501 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6502 'type': 'array'}},
6503 'required': ['Results'],
6504 'type': 'object'},
6505 'Macaroon': {'additionalProperties': False,
6506 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6507 'type': 'array'},
6508 'data': {'items': {'type': 'integer'},
6509 'type': 'array'},
6510 'id': {'$ref': '#/definitions/packet'},
6511 'location': {'$ref': '#/definitions/packet'},
6512 'sig': {'items': {'type': 'integer'},
6513 'type': 'array'}},
6514 'required': ['data',
6515 'location',
6516 'id',
6517 'caveats',
6518 'sig'],
6519 'type': 'object'},
6520 'MachineBlockDevices': {'additionalProperties': False,
6521 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
6522 'type': 'array'},
6523 'machine': {'type': 'string'}},
6524 'required': ['machine'],
6525 'type': 'object'},
6526 'SetMachineBlockDevices': {'additionalProperties': False,
6527 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
6528 'type': 'array'}},
6529 'required': ['machineblockdevices'],
6530 'type': 'object'},
6531 'caveat': {'additionalProperties': False,
6532 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6533 'location': {'$ref': '#/definitions/packet'},
6534 'verificationId': {'$ref': '#/definitions/packet'}},
6535 'required': ['location',
6536 'caveatId',
6537 'verificationId'],
6538 'type': 'object'},
6539 'packet': {'additionalProperties': False,
6540 'properties': {'headerLen': {'type': 'integer'},
6541 'start': {'type': 'integer'},
6542 'totalLen': {'type': 'integer'}},
6543 'required': ['start', 'totalLen', 'headerLen'],
6544 'type': 'object'}},
6545 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
6546 'Result': {'$ref': '#/definitions/ErrorResults'}},
6547 'type': 'object'}},
6548 'type': 'object'}
6549
6550
6551 #@ReturnMapping(ErrorResults)
6552 async def SetMachineBlockDevices(self, machineblockdevices):
6553 '''
6554 machineblockdevices : typing.Sequence[~MachineBlockDevices]
6555 Returns -> typing.Sequence[~ErrorResult]
6556 '''
6557 # map input types to rpc msg
6558 params = dict()
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)
6563
6564
6565 class EntityWatcher(Type):
6566 name = 'EntityWatcher'
6567 version = 2
6568 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
6569 'properties': {'Changes': {'items': {'type': 'string'},
6570 'type': 'array'},
6571 'EntityWatcherId': {'type': 'string'},
6572 'Error': {'$ref': '#/definitions/Error'}},
6573 'required': ['EntityWatcherId',
6574 'Changes',
6575 'Error'],
6576 'type': 'object'},
6577 'Error': {'additionalProperties': False,
6578 'properties': {'Code': {'type': 'string'},
6579 'Info': {'$ref': '#/definitions/ErrorInfo'},
6580 'Message': {'type': 'string'}},
6581 'required': ['Message', 'Code'],
6582 'type': 'object'},
6583 'ErrorInfo': {'additionalProperties': False,
6584 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6585 'MacaroonPath': {'type': 'string'}},
6586 'type': 'object'},
6587 'Macaroon': {'additionalProperties': False,
6588 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6589 'type': 'array'},
6590 'data': {'items': {'type': 'integer'},
6591 'type': 'array'},
6592 'id': {'$ref': '#/definitions/packet'},
6593 'location': {'$ref': '#/definitions/packet'},
6594 'sig': {'items': {'type': 'integer'},
6595 'type': 'array'}},
6596 'required': ['data',
6597 'location',
6598 'id',
6599 'caveats',
6600 'sig'],
6601 'type': 'object'},
6602 'caveat': {'additionalProperties': False,
6603 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6604 'location': {'$ref': '#/definitions/packet'},
6605 'verificationId': {'$ref': '#/definitions/packet'}},
6606 'required': ['location',
6607 'caveatId',
6608 'verificationId'],
6609 'type': 'object'},
6610 'packet': {'additionalProperties': False,
6611 'properties': {'headerLen': {'type': 'integer'},
6612 'start': {'type': 'integer'},
6613 'totalLen': {'type': 'integer'}},
6614 'required': ['start', 'totalLen', 'headerLen'],
6615 'type': 'object'}},
6616 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
6617 'type': 'object'},
6618 'Stop': {'type': 'object'}},
6619 'type': 'object'}
6620
6621
6622 #@ReturnMapping(EntitiesWatchResult)
6623 async def Next(self):
6624 '''
6625
6626 Returns -> typing.Union[~Error, typing.Sequence[str]]
6627 '''
6628 # map input types to rpc msg
6629 params = dict()
6630 msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params)
6631
6632 reply = await self.rpc(msg)
6633 return self._map(reply, Next)
6634
6635
6636
6637 #@ReturnMapping(None)
6638 async def Stop(self):
6639 '''
6640
6641 Returns -> None
6642 '''
6643 # map input types to rpc msg
6644 params = dict()
6645 msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params)
6646
6647 reply = await self.rpc(msg)
6648 return self._map(reply, Stop)
6649
6650
6651 class FilesystemAttachmentsWatcher(Type):
6652 name = 'FilesystemAttachmentsWatcher'
6653 version = 2
6654 schema = {'definitions': {'Error': {'additionalProperties': False,
6655 'properties': {'Code': {'type': 'string'},
6656 'Info': {'$ref': '#/definitions/ErrorInfo'},
6657 'Message': {'type': 'string'}},
6658 'required': ['Message', 'Code'],
6659 'type': 'object'},
6660 'ErrorInfo': {'additionalProperties': False,
6661 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6662 'MacaroonPath': {'type': 'string'}},
6663 'type': 'object'},
6664 'Macaroon': {'additionalProperties': False,
6665 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6666 'type': 'array'},
6667 'data': {'items': {'type': 'integer'},
6668 'type': 'array'},
6669 'id': {'$ref': '#/definitions/packet'},
6670 'location': {'$ref': '#/definitions/packet'},
6671 'sig': {'items': {'type': 'integer'},
6672 'type': 'array'}},
6673 'required': ['data',
6674 'location',
6675 'id',
6676 'caveats',
6677 'sig'],
6678 'type': 'object'},
6679 'MachineStorageId': {'additionalProperties': False,
6680 'properties': {'attachmenttag': {'type': 'string'},
6681 'machinetag': {'type': 'string'}},
6682 'required': ['machinetag',
6683 'attachmenttag'],
6684 'type': 'object'},
6685 'MachineStorageIdsWatchResult': {'additionalProperties': False,
6686 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
6687 'type': 'array'},
6688 'Error': {'$ref': '#/definitions/Error'},
6689 'MachineStorageIdsWatcherId': {'type': 'string'}},
6690 'required': ['MachineStorageIdsWatcherId',
6691 'Changes',
6692 'Error'],
6693 'type': 'object'},
6694 'caveat': {'additionalProperties': False,
6695 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6696 'location': {'$ref': '#/definitions/packet'},
6697 'verificationId': {'$ref': '#/definitions/packet'}},
6698 'required': ['location',
6699 'caveatId',
6700 'verificationId'],
6701 'type': 'object'},
6702 'packet': {'additionalProperties': False,
6703 'properties': {'headerLen': {'type': 'integer'},
6704 'start': {'type': 'integer'},
6705 'totalLen': {'type': 'integer'}},
6706 'required': ['start', 'totalLen', 'headerLen'],
6707 'type': 'object'}},
6708 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
6709 'type': 'object'},
6710 'Stop': {'type': 'object'}},
6711 'type': 'object'}
6712
6713
6714 #@ReturnMapping(MachineStorageIdsWatchResult)
6715 async def Next(self):
6716 '''
6717
6718 Returns -> typing.Union[~Error, typing.Sequence[~MachineStorageId]]
6719 '''
6720 # map input types to rpc msg
6721 params = dict()
6722 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params)
6723
6724 reply = await self.rpc(msg)
6725 return self._map(reply, Next)
6726
6727
6728
6729 #@ReturnMapping(None)
6730 async def Stop(self):
6731 '''
6732
6733 Returns -> None
6734 '''
6735 # map input types to rpc msg
6736 params = dict()
6737 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params)
6738
6739 reply = await self.rpc(msg)
6740 return self._map(reply, Stop)
6741
6742
6743 class Firewaller(Type):
6744 name = 'Firewaller'
6745 version = 2
6746 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
6747 'properties': {'Error': {'$ref': '#/definitions/Error'},
6748 'Result': {'type': 'boolean'}},
6749 'required': ['Error', 'Result'],
6750 'type': 'object'},
6751 'BoolResults': {'additionalProperties': False,
6752 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
6753 'type': 'array'}},
6754 'required': ['Results'],
6755 'type': 'object'},
6756 'Entities': {'additionalProperties': False,
6757 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6758 'type': 'array'}},
6759 'required': ['Entities'],
6760 'type': 'object'},
6761 'Entity': {'additionalProperties': False,
6762 'properties': {'Tag': {'type': 'string'}},
6763 'required': ['Tag'],
6764 'type': 'object'},
6765 'Error': {'additionalProperties': False,
6766 'properties': {'Code': {'type': 'string'},
6767 'Info': {'$ref': '#/definitions/ErrorInfo'},
6768 'Message': {'type': 'string'}},
6769 'required': ['Message', 'Code'],
6770 'type': 'object'},
6771 'ErrorInfo': {'additionalProperties': False,
6772 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6773 'MacaroonPath': {'type': 'string'}},
6774 'type': 'object'},
6775 'LifeResult': {'additionalProperties': False,
6776 'properties': {'Error': {'$ref': '#/definitions/Error'},
6777 'Life': {'type': 'string'}},
6778 'required': ['Life', 'Error'],
6779 'type': 'object'},
6780 'LifeResults': {'additionalProperties': False,
6781 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
6782 'type': 'array'}},
6783 'required': ['Results'],
6784 'type': 'object'},
6785 'Macaroon': {'additionalProperties': False,
6786 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6787 'type': 'array'},
6788 'data': {'items': {'type': 'integer'},
6789 'type': 'array'},
6790 'id': {'$ref': '#/definitions/packet'},
6791 'location': {'$ref': '#/definitions/packet'},
6792 'sig': {'items': {'type': 'integer'},
6793 'type': 'array'}},
6794 'required': ['data',
6795 'location',
6796 'id',
6797 'caveats',
6798 'sig'],
6799 'type': 'object'},
6800 'MachinePortRange': {'additionalProperties': False,
6801 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
6802 'RelationTag': {'type': 'string'},
6803 'UnitTag': {'type': 'string'}},
6804 'required': ['UnitTag',
6805 'RelationTag',
6806 'PortRange'],
6807 'type': 'object'},
6808 'MachinePorts': {'additionalProperties': False,
6809 'properties': {'MachineTag': {'type': 'string'},
6810 'SubnetTag': {'type': 'string'}},
6811 'required': ['MachineTag', 'SubnetTag'],
6812 'type': 'object'},
6813 'MachinePortsParams': {'additionalProperties': False,
6814 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
6815 'type': 'array'}},
6816 'required': ['Params'],
6817 'type': 'object'},
6818 'MachinePortsResult': {'additionalProperties': False,
6819 'properties': {'Error': {'$ref': '#/definitions/Error'},
6820 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
6821 'type': 'array'}},
6822 'required': ['Error', 'Ports'],
6823 'type': 'object'},
6824 'MachinePortsResults': {'additionalProperties': False,
6825 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
6826 'type': 'array'}},
6827 'required': ['Results'],
6828 'type': 'object'},
6829 'ModelConfigResult': {'additionalProperties': False,
6830 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
6831 'type': 'object'}},
6832 'type': 'object'}},
6833 'required': ['Config'],
6834 'type': 'object'},
6835 'NotifyWatchResult': {'additionalProperties': False,
6836 'properties': {'Error': {'$ref': '#/definitions/Error'},
6837 'NotifyWatcherId': {'type': 'string'}},
6838 'required': ['NotifyWatcherId', 'Error'],
6839 'type': 'object'},
6840 'NotifyWatchResults': {'additionalProperties': False,
6841 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
6842 'type': 'array'}},
6843 'required': ['Results'],
6844 'type': 'object'},
6845 'PortRange': {'additionalProperties': False,
6846 'properties': {'FromPort': {'type': 'integer'},
6847 'Protocol': {'type': 'string'},
6848 'ToPort': {'type': 'integer'}},
6849 'required': ['FromPort', 'ToPort', 'Protocol'],
6850 'type': 'object'},
6851 'StringResult': {'additionalProperties': False,
6852 'properties': {'Error': {'$ref': '#/definitions/Error'},
6853 'Result': {'type': 'string'}},
6854 'required': ['Error', 'Result'],
6855 'type': 'object'},
6856 'StringResults': {'additionalProperties': False,
6857 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
6858 'type': 'array'}},
6859 'required': ['Results'],
6860 'type': 'object'},
6861 'StringsResult': {'additionalProperties': False,
6862 'properties': {'Error': {'$ref': '#/definitions/Error'},
6863 'Result': {'items': {'type': 'string'},
6864 'type': 'array'}},
6865 'required': ['Error', 'Result'],
6866 'type': 'object'},
6867 'StringsResults': {'additionalProperties': False,
6868 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
6869 'type': 'array'}},
6870 'required': ['Results'],
6871 'type': 'object'},
6872 'StringsWatchResult': {'additionalProperties': False,
6873 'properties': {'Changes': {'items': {'type': 'string'},
6874 'type': 'array'},
6875 'Error': {'$ref': '#/definitions/Error'},
6876 'StringsWatcherId': {'type': 'string'}},
6877 'required': ['StringsWatcherId',
6878 'Changes',
6879 'Error'],
6880 'type': 'object'},
6881 'StringsWatchResults': {'additionalProperties': False,
6882 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
6883 'type': 'array'}},
6884 'required': ['Results'],
6885 'type': 'object'},
6886 'caveat': {'additionalProperties': False,
6887 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6888 'location': {'$ref': '#/definitions/packet'},
6889 'verificationId': {'$ref': '#/definitions/packet'}},
6890 'required': ['location',
6891 'caveatId',
6892 'verificationId'],
6893 'type': 'object'},
6894 'packet': {'additionalProperties': False,
6895 'properties': {'headerLen': {'type': 'integer'},
6896 'start': {'type': 'integer'},
6897 'totalLen': {'type': 'integer'}},
6898 'required': ['start', 'totalLen', 'headerLen'],
6899 'type': 'object'}},
6900 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6901 'Result': {'$ref': '#/definitions/StringResults'}},
6902 'type': 'object'},
6903 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6904 'Result': {'$ref': '#/definitions/BoolResults'}},
6905 'type': 'object'},
6906 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6907 'Result': {'$ref': '#/definitions/StringsResults'}},
6908 'type': 'object'},
6909 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
6910 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
6911 'type': 'object'},
6912 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6913 'Result': {'$ref': '#/definitions/StringResults'}},
6914 'type': 'object'},
6915 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6916 'Result': {'$ref': '#/definitions/LifeResults'}},
6917 'type': 'object'},
6918 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6919 'type': 'object'},
6920 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6921 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
6922 'type': 'object'},
6923 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6924 'type': 'object'},
6925 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
6926 'type': 'object'},
6927 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6928 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6929 'type': 'object'},
6930 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6931 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
6932 'type': 'object'}},
6933 'type': 'object'}
6934
6935
6936 #@ReturnMapping(StringResults)
6937 async def GetAssignedMachine(self, entities):
6938 '''
6939 entities : typing.Sequence[~Entity]
6940 Returns -> typing.Sequence[~StringResult]
6941 '''
6942 # map input types to rpc msg
6943 params = dict()
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)
6948
6949
6950
6951 #@ReturnMapping(BoolResults)
6952 async def GetExposed(self, entities):
6953 '''
6954 entities : typing.Sequence[~Entity]
6955 Returns -> typing.Sequence[~BoolResult]
6956 '''
6957 # map input types to rpc msg
6958 params = dict()
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)
6963
6964
6965
6966 #@ReturnMapping(StringsResults)
6967 async def GetMachineActiveSubnets(self, entities):
6968 '''
6969 entities : typing.Sequence[~Entity]
6970 Returns -> typing.Sequence[~StringsResult]
6971 '''
6972 # map input types to rpc msg
6973 params = dict()
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)
6978
6979
6980
6981 #@ReturnMapping(MachinePortsResults)
6982 async def GetMachinePorts(self, params):
6983 '''
6984 params : typing.Sequence[~MachinePorts]
6985 Returns -> typing.Sequence[~MachinePortsResult]
6986 '''
6987 # map input types to rpc msg
6988 params = dict()
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)
6993
6994
6995
6996 #@ReturnMapping(StringResults)
6997 async def InstanceId(self, entities):
6998 '''
6999 entities : typing.Sequence[~Entity]
7000 Returns -> typing.Sequence[~StringResult]
7001 '''
7002 # map input types to rpc msg
7003 params = dict()
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)
7008
7009
7010
7011 #@ReturnMapping(LifeResults)
7012 async def Life(self, entities):
7013 '''
7014 entities : typing.Sequence[~Entity]
7015 Returns -> typing.Sequence[~LifeResult]
7016 '''
7017 # map input types to rpc msg
7018 params = dict()
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)
7023
7024
7025
7026 #@ReturnMapping(ModelConfigResult)
7027 async def ModelConfig(self):
7028 '''
7029
7030 Returns -> typing.Mapping[str, typing.Any]
7031 '''
7032 # map input types to rpc msg
7033 params = dict()
7034 msg = dict(Type='Firewaller', Request='ModelConfig', Version=2, Params=params)
7035
7036 reply = await self.rpc(msg)
7037 return self._map(reply, ModelConfig)
7038
7039
7040
7041 #@ReturnMapping(NotifyWatchResults)
7042 async def Watch(self, entities):
7043 '''
7044 entities : typing.Sequence[~Entity]
7045 Returns -> typing.Sequence[~NotifyWatchResult]
7046 '''
7047 # map input types to rpc msg
7048 params = dict()
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)
7053
7054
7055
7056 #@ReturnMapping(NotifyWatchResult)
7057 async def WatchForModelConfigChanges(self):
7058 '''
7059
7060 Returns -> typing.Union[~Error, str]
7061 '''
7062 # map input types to rpc msg
7063 params = dict()
7064 msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=2, Params=params)
7065
7066 reply = await self.rpc(msg)
7067 return self._map(reply, WatchForModelConfigChanges)
7068
7069
7070
7071 #@ReturnMapping(StringsWatchResult)
7072 async def WatchModelMachines(self):
7073 '''
7074
7075 Returns -> typing.Union[~Error, typing.Sequence[str]]
7076 '''
7077 # map input types to rpc msg
7078 params = dict()
7079 msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=2, Params=params)
7080
7081 reply = await self.rpc(msg)
7082 return self._map(reply, WatchModelMachines)
7083
7084
7085
7086 #@ReturnMapping(StringsWatchResults)
7087 async def WatchOpenedPorts(self, entities):
7088 '''
7089 entities : typing.Sequence[~Entity]
7090 Returns -> typing.Sequence[~StringsWatchResult]
7091 '''
7092 # map input types to rpc msg
7093 params = dict()
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)
7098
7099
7100
7101 #@ReturnMapping(StringsWatchResults)
7102 async def WatchUnits(self, entities):
7103 '''
7104 entities : typing.Sequence[~Entity]
7105 Returns -> typing.Sequence[~StringsWatchResult]
7106 '''
7107 # map input types to rpc msg
7108 params = dict()
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)
7113
7114
7115 class HighAvailability(Type):
7116 name = 'HighAvailability'
7117 version = 2
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',
7125 'Type',
7126 'Scope',
7127 'SpaceName',
7128 'SpaceProviderId'],
7129 'type': 'object'},
7130 'ControllersChangeResult': {'additionalProperties': False,
7131 'properties': {'Error': {'$ref': '#/definitions/Error'},
7132 'Result': {'$ref': '#/definitions/ControllersChanges'}},
7133 'required': ['Result', 'Error'],
7134 'type': 'object'},
7135 'ControllersChangeResults': {'additionalProperties': False,
7136 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
7137 'type': 'array'}},
7138 'required': ['Results'],
7139 'type': 'object'},
7140 'ControllersChanges': {'additionalProperties': False,
7141 'properties': {'added': {'items': {'type': 'string'},
7142 'type': 'array'},
7143 'converted': {'items': {'type': 'string'},
7144 'type': 'array'},
7145 'demoted': {'items': {'type': 'string'},
7146 'type': 'array'},
7147 'maintained': {'items': {'type': 'string'},
7148 'type': 'array'},
7149 'promoted': {'items': {'type': 'string'},
7150 'type': 'array'},
7151 'removed': {'items': {'type': 'string'},
7152 'type': 'array'}},
7153 'type': 'object'},
7154 'ControllersSpec': {'additionalProperties': False,
7155 'properties': {'ModelTag': {'type': 'string'},
7156 'constraints': {'$ref': '#/definitions/Value'},
7157 'num-controllers': {'type': 'integer'},
7158 'placement': {'items': {'type': 'string'},
7159 'type': 'array'},
7160 'series': {'type': 'string'}},
7161 'required': ['ModelTag',
7162 'num-controllers'],
7163 'type': 'object'},
7164 'ControllersSpecs': {'additionalProperties': False,
7165 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
7166 'type': 'array'}},
7167 'required': ['Specs'],
7168 'type': 'object'},
7169 'Error': {'additionalProperties': False,
7170 'properties': {'Code': {'type': 'string'},
7171 'Info': {'$ref': '#/definitions/ErrorInfo'},
7172 'Message': {'type': 'string'}},
7173 'required': ['Message', 'Code'],
7174 'type': 'object'},
7175 'ErrorInfo': {'additionalProperties': False,
7176 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7177 'MacaroonPath': {'type': 'string'}},
7178 'type': 'object'},
7179 'HAMember': {'additionalProperties': False,
7180 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
7181 'Series': {'type': 'string'},
7182 'Tag': {'type': 'string'}},
7183 'required': ['Tag', 'PublicAddress', 'Series'],
7184 'type': 'object'},
7185 'Macaroon': {'additionalProperties': False,
7186 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7187 'type': 'array'},
7188 'data': {'items': {'type': 'integer'},
7189 'type': 'array'},
7190 'id': {'$ref': '#/definitions/packet'},
7191 'location': {'$ref': '#/definitions/packet'},
7192 'sig': {'items': {'type': 'integer'},
7193 'type': 'array'}},
7194 'required': ['data',
7195 'location',
7196 'id',
7197 'caveats',
7198 'sig'],
7199 'type': 'object'},
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'}},
7209 'type': 'object'},
7210 'Votes': {'type': 'integer'}},
7211 'required': ['Id',
7212 'Address',
7213 'Arbiter',
7214 'BuildIndexes',
7215 'Hidden',
7216 'Priority',
7217 'Tags',
7218 'SlaveDelay',
7219 'Votes'],
7220 'type': 'object'},
7221 'MongoUpgradeResults': {'additionalProperties': False,
7222 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
7223 'Members': {'items': {'$ref': '#/definitions/HAMember'},
7224 'type': 'array'},
7225 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
7226 'type': 'array'}},
7227 'required': ['RsMembers',
7228 'Master',
7229 'Members'],
7230 'type': 'object'},
7231 'ResumeReplicationParams': {'additionalProperties': False,
7232 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
7233 'type': 'array'}},
7234 'required': ['Members'],
7235 'type': 'object'},
7236 'UpgradeMongoParams': {'additionalProperties': False,
7237 'properties': {'Target': {'$ref': '#/definitions/Version'}},
7238 'required': ['Target'],
7239 'type': 'object'},
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'},
7249 'type': 'array'},
7250 'tags': {'items': {'type': 'string'},
7251 'type': 'array'},
7252 'virt-type': {'type': 'string'}},
7253 'type': 'object'},
7254 'Version': {'additionalProperties': False,
7255 'properties': {'Major': {'type': 'integer'},
7256 'Minor': {'type': 'integer'},
7257 'Patch': {'type': 'string'},
7258 'StorageEngine': {'type': 'string'}},
7259 'required': ['Major',
7260 'Minor',
7261 'Patch',
7262 'StorageEngine'],
7263 'type': 'object'},
7264 'caveat': {'additionalProperties': False,
7265 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7266 'location': {'$ref': '#/definitions/packet'},
7267 'verificationId': {'$ref': '#/definitions/packet'}},
7268 'required': ['location',
7269 'caveatId',
7270 'verificationId'],
7271 'type': 'object'},
7272 'packet': {'additionalProperties': False,
7273 'properties': {'headerLen': {'type': 'integer'},
7274 'start': {'type': 'integer'},
7275 'totalLen': {'type': 'integer'}},
7276 'required': ['start', 'totalLen', 'headerLen'],
7277 'type': 'object'}},
7278 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
7279 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
7280 'type': 'object'},
7281 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
7282 'type': 'object'},
7283 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
7284 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
7285 'type': 'object'}},
7286 'type': 'object'}
7287
7288
7289 #@ReturnMapping(ControllersChangeResults)
7290 async def EnableHA(self, specs):
7291 '''
7292 specs : typing.Sequence[~ControllersSpec]
7293 Returns -> typing.Sequence[~ControllersChangeResult]
7294 '''
7295 # map input types to rpc msg
7296 params = dict()
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)
7301
7302
7303
7304 #@ReturnMapping(None)
7305 async def ResumeHAReplicationAfterUpgrade(self, members):
7306 '''
7307 members : typing.Sequence[~Member]
7308 Returns -> None
7309 '''
7310 # map input types to rpc msg
7311 params = dict()
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)
7316
7317
7318
7319 #@ReturnMapping(MongoUpgradeResults)
7320 async def StopHAReplicationForUpgrade(self, minor, patch, major, storageengine):
7321 '''
7322 minor : int
7323 patch : str
7324 major : int
7325 storageengine : str
7326 Returns -> typing.Union[~HAMember, typing.Sequence[~Member]]
7327 '''
7328 # map input types to rpc msg
7329 params = dict()
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)
7337
7338
7339 class HostKeyReporter(Type):
7340 name = 'HostKeyReporter'
7341 version = 1
7342 schema = {'definitions': {'Error': {'additionalProperties': False,
7343 'properties': {'Code': {'type': 'string'},
7344 'Info': {'$ref': '#/definitions/ErrorInfo'},
7345 'Message': {'type': 'string'}},
7346 'required': ['Message', 'Code'],
7347 'type': 'object'},
7348 'ErrorInfo': {'additionalProperties': False,
7349 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7350 'MacaroonPath': {'type': 'string'}},
7351 'type': 'object'},
7352 'ErrorResult': {'additionalProperties': False,
7353 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7354 'required': ['Error'],
7355 'type': 'object'},
7356 'ErrorResults': {'additionalProperties': False,
7357 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7358 'type': 'array'}},
7359 'required': ['Results'],
7360 'type': 'object'},
7361 'Macaroon': {'additionalProperties': False,
7362 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7363 'type': 'array'},
7364 'data': {'items': {'type': 'integer'},
7365 'type': 'array'},
7366 'id': {'$ref': '#/definitions/packet'},
7367 'location': {'$ref': '#/definitions/packet'},
7368 'sig': {'items': {'type': 'integer'},
7369 'type': 'array'}},
7370 'required': ['data',
7371 'location',
7372 'id',
7373 'caveats',
7374 'sig'],
7375 'type': 'object'},
7376 'SSHHostKeySet': {'additionalProperties': False,
7377 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
7378 'type': 'array'}},
7379 'required': ['entity-keys'],
7380 'type': 'object'},
7381 'SSHHostKeys': {'additionalProperties': False,
7382 'properties': {'public-keys': {'items': {'type': 'string'},
7383 'type': 'array'},
7384 'tag': {'type': 'string'}},
7385 'required': ['tag', 'public-keys'],
7386 'type': 'object'},
7387 'caveat': {'additionalProperties': False,
7388 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7389 'location': {'$ref': '#/definitions/packet'},
7390 'verificationId': {'$ref': '#/definitions/packet'}},
7391 'required': ['location',
7392 'caveatId',
7393 'verificationId'],
7394 'type': 'object'},
7395 'packet': {'additionalProperties': False,
7396 'properties': {'headerLen': {'type': 'integer'},
7397 'start': {'type': 'integer'},
7398 'totalLen': {'type': 'integer'}},
7399 'required': ['start', 'totalLen', 'headerLen'],
7400 'type': 'object'}},
7401 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
7402 'Result': {'$ref': '#/definitions/ErrorResults'}},
7403 'type': 'object'}},
7404 'type': 'object'}
7405
7406
7407 #@ReturnMapping(ErrorResults)
7408 async def ReportKeys(self, entity_keys):
7409 '''
7410 entity_keys : typing.Sequence[~SSHHostKeys]
7411 Returns -> typing.Sequence[~ErrorResult]
7412 '''
7413 # map input types to rpc msg
7414 params = dict()
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)
7419
7420
7421 class ImageManager(Type):
7422 name = 'ImageManager'
7423 version = 2
7424 schema = {'definitions': {'Error': {'additionalProperties': False,
7425 'properties': {'Code': {'type': 'string'},
7426 'Info': {'$ref': '#/definitions/ErrorInfo'},
7427 'Message': {'type': 'string'}},
7428 'required': ['Message', 'Code'],
7429 'type': 'object'},
7430 'ErrorInfo': {'additionalProperties': False,
7431 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7432 'MacaroonPath': {'type': 'string'}},
7433 'type': 'object'},
7434 'ErrorResult': {'additionalProperties': False,
7435 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7436 'required': ['Error'],
7437 'type': 'object'},
7438 'ErrorResults': {'additionalProperties': False,
7439 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7440 'type': 'array'}},
7441 'required': ['Results'],
7442 'type': 'object'},
7443 'ImageFilterParams': {'additionalProperties': False,
7444 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
7445 'type': 'array'}},
7446 'required': ['images'],
7447 'type': 'object'},
7448 'ImageMetadata': {'additionalProperties': False,
7449 'properties': {'arch': {'type': 'string'},
7450 'created': {'format': 'date-time',
7451 'type': 'string'},
7452 'kind': {'type': 'string'},
7453 'series': {'type': 'string'},
7454 'url': {'type': 'string'}},
7455 'required': ['kind',
7456 'arch',
7457 'series',
7458 'url',
7459 'created'],
7460 'type': 'object'},
7461 'ImageSpec': {'additionalProperties': False,
7462 'properties': {'arch': {'type': 'string'},
7463 'kind': {'type': 'string'},
7464 'series': {'type': 'string'}},
7465 'required': ['kind', 'arch', 'series'],
7466 'type': 'object'},
7467 'ListImageResult': {'additionalProperties': False,
7468 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
7469 'type': 'array'}},
7470 'required': ['result'],
7471 'type': 'object'},
7472 'Macaroon': {'additionalProperties': False,
7473 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7474 'type': 'array'},
7475 'data': {'items': {'type': 'integer'},
7476 'type': 'array'},
7477 'id': {'$ref': '#/definitions/packet'},
7478 'location': {'$ref': '#/definitions/packet'},
7479 'sig': {'items': {'type': 'integer'},
7480 'type': 'array'}},
7481 'required': ['data',
7482 'location',
7483 'id',
7484 'caveats',
7485 'sig'],
7486 'type': 'object'},
7487 'caveat': {'additionalProperties': False,
7488 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7489 'location': {'$ref': '#/definitions/packet'},
7490 'verificationId': {'$ref': '#/definitions/packet'}},
7491 'required': ['location',
7492 'caveatId',
7493 'verificationId'],
7494 'type': 'object'},
7495 'packet': {'additionalProperties': False,
7496 'properties': {'headerLen': {'type': 'integer'},
7497 'start': {'type': 'integer'},
7498 'totalLen': {'type': 'integer'}},
7499 'required': ['start', 'totalLen', 'headerLen'],
7500 'type': 'object'}},
7501 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
7502 'Result': {'$ref': '#/definitions/ErrorResults'}},
7503 'type': 'object'},
7504 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
7505 'Result': {'$ref': '#/definitions/ListImageResult'}},
7506 'type': 'object'}},
7507 'type': 'object'}
7508
7509
7510 #@ReturnMapping(ErrorResults)
7511 async def DeleteImages(self, images):
7512 '''
7513 images : typing.Sequence[~ImageSpec]
7514 Returns -> typing.Sequence[~ErrorResult]
7515 '''
7516 # map input types to rpc msg
7517 params = dict()
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)
7522
7523
7524
7525 #@ReturnMapping(ListImageResult)
7526 async def ListImages(self, images):
7527 '''
7528 images : typing.Sequence[~ImageSpec]
7529 Returns -> typing.Sequence[~ImageMetadata]
7530 '''
7531 # map input types to rpc msg
7532 params = dict()
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)
7537
7538
7539 class ImageMetadata(Type):
7540 name = 'ImageMetadata'
7541 version = 2
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',
7555 'region',
7556 'version',
7557 'series',
7558 'arch',
7559 'source',
7560 'priority'],
7561 'type': 'object'},
7562 'CloudImageMetadataList': {'additionalProperties': False,
7563 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
7564 'type': 'array'}},
7565 'type': 'object'},
7566 'Error': {'additionalProperties': False,
7567 'properties': {'Code': {'type': 'string'},
7568 'Info': {'$ref': '#/definitions/ErrorInfo'},
7569 'Message': {'type': 'string'}},
7570 'required': ['Message', 'Code'],
7571 'type': 'object'},
7572 'ErrorInfo': {'additionalProperties': False,
7573 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7574 'MacaroonPath': {'type': 'string'}},
7575 'type': 'object'},
7576 'ErrorResult': {'additionalProperties': False,
7577 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7578 'required': ['Error'],
7579 'type': 'object'},
7580 'ErrorResults': {'additionalProperties': False,
7581 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7582 'type': 'array'}},
7583 'required': ['Results'],
7584 'type': 'object'},
7585 'ImageMetadataFilter': {'additionalProperties': False,
7586 'properties': {'arches': {'items': {'type': 'string'},
7587 'type': 'array'},
7588 'region': {'type': 'string'},
7589 'root-storage-type': {'type': 'string'},
7590 'series': {'items': {'type': 'string'},
7591 'type': 'array'},
7592 'stream': {'type': 'string'},
7593 'virt_type': {'type': 'string'}},
7594 'type': 'object'},
7595 'ListCloudImageMetadataResult': {'additionalProperties': False,
7596 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
7597 'type': 'array'}},
7598 'required': ['result'],
7599 'type': 'object'},
7600 'Macaroon': {'additionalProperties': False,
7601 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7602 'type': 'array'},
7603 'data': {'items': {'type': 'integer'},
7604 'type': 'array'},
7605 'id': {'$ref': '#/definitions/packet'},
7606 'location': {'$ref': '#/definitions/packet'},
7607 'sig': {'items': {'type': 'integer'},
7608 'type': 'array'}},
7609 'required': ['data',
7610 'location',
7611 'id',
7612 'caveats',
7613 'sig'],
7614 'type': 'object'},
7615 'MetadataImageIds': {'additionalProperties': False,
7616 'properties': {'image_ids': {'items': {'type': 'string'},
7617 'type': 'array'}},
7618 'required': ['image_ids'],
7619 'type': 'object'},
7620 'MetadataSaveParams': {'additionalProperties': False,
7621 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
7622 'type': 'array'}},
7623 'type': 'object'},
7624 'caveat': {'additionalProperties': False,
7625 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7626 'location': {'$ref': '#/definitions/packet'},
7627 'verificationId': {'$ref': '#/definitions/packet'}},
7628 'required': ['location',
7629 'caveatId',
7630 'verificationId'],
7631 'type': 'object'},
7632 'packet': {'additionalProperties': False,
7633 'properties': {'headerLen': {'type': 'integer'},
7634 'start': {'type': 'integer'},
7635 'totalLen': {'type': 'integer'}},
7636 'required': ['start', 'totalLen', 'headerLen'],
7637 'type': 'object'}},
7638 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
7639 'Result': {'$ref': '#/definitions/ErrorResults'}},
7640 'type': 'object'},
7641 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
7642 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
7643 'type': 'object'},
7644 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
7645 'Result': {'$ref': '#/definitions/ErrorResults'}},
7646 'type': 'object'},
7647 'UpdateFromPublishedImages': {'type': 'object'}},
7648 'type': 'object'}
7649
7650
7651 #@ReturnMapping(ErrorResults)
7652 async def Delete(self, image_ids):
7653 '''
7654 image_ids : typing.Sequence[str]
7655 Returns -> typing.Sequence[~ErrorResult]
7656 '''
7657 # map input types to rpc msg
7658 params = dict()
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)
7663
7664
7665
7666 #@ReturnMapping(ListCloudImageMetadataResult)
7667 async def List(self, root_storage_type, arches, virt_type, series, stream, region):
7668 '''
7669 root_storage_type : str
7670 arches : typing.Sequence[str]
7671 virt_type : str
7672 series : typing.Sequence[str]
7673 stream : str
7674 region : str
7675 Returns -> typing.Sequence[~CloudImageMetadata]
7676 '''
7677 # map input types to rpc msg
7678 params = dict()
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)
7688
7689
7690
7691 #@ReturnMapping(ErrorResults)
7692 async def Save(self, metadata):
7693 '''
7694 metadata : typing.Sequence[~CloudImageMetadataList]
7695 Returns -> typing.Sequence[~ErrorResult]
7696 '''
7697 # map input types to rpc msg
7698 params = dict()
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)
7703
7704
7705
7706 #@ReturnMapping(None)
7707 async def UpdateFromPublishedImages(self):
7708 '''
7709
7710 Returns -> None
7711 '''
7712 # map input types to rpc msg
7713 params = dict()
7714 msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params)
7715
7716 reply = await self.rpc(msg)
7717 return self._map(reply, UpdateFromPublishedImages)
7718
7719
7720 class InstancePoller(Type):
7721 name = 'InstancePoller'
7722 version = 2
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'],
7729 'type': 'object'},
7730 'BoolResult': {'additionalProperties': False,
7731 'properties': {'Error': {'$ref': '#/definitions/Error'},
7732 'Result': {'type': 'boolean'}},
7733 'required': ['Error', 'Result'],
7734 'type': 'object'},
7735 'BoolResults': {'additionalProperties': False,
7736 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
7737 'type': 'array'}},
7738 'required': ['Results'],
7739 'type': 'object'},
7740 'Entities': {'additionalProperties': False,
7741 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7742 'type': 'array'}},
7743 'required': ['Entities'],
7744 'type': 'object'},
7745 'Entity': {'additionalProperties': False,
7746 'properties': {'Tag': {'type': 'string'}},
7747 'required': ['Tag'],
7748 'type': 'object'},
7749 'EntityStatusArgs': {'additionalProperties': False,
7750 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7751 'type': 'object'}},
7752 'type': 'object'},
7753 'Info': {'type': 'string'},
7754 'Status': {'type': 'string'},
7755 'Tag': {'type': 'string'}},
7756 'required': ['Tag',
7757 'Status',
7758 'Info',
7759 'Data'],
7760 'type': 'object'},
7761 'Error': {'additionalProperties': False,
7762 'properties': {'Code': {'type': 'string'},
7763 'Info': {'$ref': '#/definitions/ErrorInfo'},
7764 'Message': {'type': 'string'}},
7765 'required': ['Message', 'Code'],
7766 'type': 'object'},
7767 'ErrorInfo': {'additionalProperties': False,
7768 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7769 'MacaroonPath': {'type': 'string'}},
7770 'type': 'object'},
7771 'ErrorResult': {'additionalProperties': False,
7772 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7773 'required': ['Error'],
7774 'type': 'object'},
7775 'ErrorResults': {'additionalProperties': False,
7776 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7777 'type': 'array'}},
7778 'required': ['Results'],
7779 'type': 'object'},
7780 'LifeResult': {'additionalProperties': False,
7781 'properties': {'Error': {'$ref': '#/definitions/Error'},
7782 'Life': {'type': 'string'}},
7783 'required': ['Life', 'Error'],
7784 'type': 'object'},
7785 'LifeResults': {'additionalProperties': False,
7786 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
7787 'type': 'array'}},
7788 'required': ['Results'],
7789 'type': 'object'},
7790 'Macaroon': {'additionalProperties': False,
7791 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7792 'type': 'array'},
7793 'data': {'items': {'type': 'integer'},
7794 'type': 'array'},
7795 'id': {'$ref': '#/definitions/packet'},
7796 'location': {'$ref': '#/definitions/packet'},
7797 'sig': {'items': {'type': 'integer'},
7798 'type': 'array'}},
7799 'required': ['data',
7800 'location',
7801 'id',
7802 'caveats',
7803 'sig'],
7804 'type': 'object'},
7805 'MachineAddresses': {'additionalProperties': False,
7806 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
7807 'type': 'array'},
7808 'Tag': {'type': 'string'}},
7809 'required': ['Tag', 'Addresses'],
7810 'type': 'object'},
7811 'MachineAddressesResult': {'additionalProperties': False,
7812 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
7813 'type': 'array'},
7814 'Error': {'$ref': '#/definitions/Error'}},
7815 'required': ['Error', 'Addresses'],
7816 'type': 'object'},
7817 'MachineAddressesResults': {'additionalProperties': False,
7818 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
7819 'type': 'array'}},
7820 'required': ['Results'],
7821 'type': 'object'},
7822 'ModelConfigResult': {'additionalProperties': False,
7823 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7824 'type': 'object'}},
7825 'type': 'object'}},
7826 'required': ['Config'],
7827 'type': 'object'},
7828 'NotifyWatchResult': {'additionalProperties': False,
7829 'properties': {'Error': {'$ref': '#/definitions/Error'},
7830 'NotifyWatcherId': {'type': 'string'}},
7831 'required': ['NotifyWatcherId', 'Error'],
7832 'type': 'object'},
7833 'SetMachinesAddresses': {'additionalProperties': False,
7834 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
7835 'type': 'array'}},
7836 'required': ['MachineAddresses'],
7837 'type': 'object'},
7838 'SetStatus': {'additionalProperties': False,
7839 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
7840 'type': 'array'}},
7841 'required': ['Entities'],
7842 'type': 'object'},
7843 'StatusResult': {'additionalProperties': False,
7844 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7845 'type': 'object'}},
7846 'type': 'object'},
7847 'Error': {'$ref': '#/definitions/Error'},
7848 'Id': {'type': 'string'},
7849 'Info': {'type': 'string'},
7850 'Life': {'type': 'string'},
7851 'Since': {'format': 'date-time',
7852 'type': 'string'},
7853 'Status': {'type': 'string'}},
7854 'required': ['Error',
7855 'Id',
7856 'Life',
7857 'Status',
7858 'Info',
7859 'Data',
7860 'Since'],
7861 'type': 'object'},
7862 'StatusResults': {'additionalProperties': False,
7863 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
7864 'type': 'array'}},
7865 'required': ['Results'],
7866 'type': 'object'},
7867 'StringResult': {'additionalProperties': False,
7868 'properties': {'Error': {'$ref': '#/definitions/Error'},
7869 'Result': {'type': 'string'}},
7870 'required': ['Error', 'Result'],
7871 'type': 'object'},
7872 'StringResults': {'additionalProperties': False,
7873 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
7874 'type': 'array'}},
7875 'required': ['Results'],
7876 'type': 'object'},
7877 'StringsWatchResult': {'additionalProperties': False,
7878 'properties': {'Changes': {'items': {'type': 'string'},
7879 'type': 'array'},
7880 'Error': {'$ref': '#/definitions/Error'},
7881 'StringsWatcherId': {'type': 'string'}},
7882 'required': ['StringsWatcherId',
7883 'Changes',
7884 'Error'],
7885 'type': 'object'},
7886 'caveat': {'additionalProperties': False,
7887 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7888 'location': {'$ref': '#/definitions/packet'},
7889 'verificationId': {'$ref': '#/definitions/packet'}},
7890 'required': ['location',
7891 'caveatId',
7892 'verificationId'],
7893 'type': 'object'},
7894 'packet': {'additionalProperties': False,
7895 'properties': {'headerLen': {'type': 'integer'},
7896 'start': {'type': 'integer'},
7897 'totalLen': {'type': 'integer'}},
7898 'required': ['start', 'totalLen', 'headerLen'],
7899 'type': 'object'}},
7900 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7901 'Result': {'$ref': '#/definitions/BoolResults'}},
7902 'type': 'object'},
7903 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7904 'Result': {'$ref': '#/definitions/StringResults'}},
7905 'type': 'object'},
7906 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7907 'Result': {'$ref': '#/definitions/StatusResults'}},
7908 'type': 'object'},
7909 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7910 'Result': {'$ref': '#/definitions/LifeResults'}},
7911 'type': 'object'},
7912 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
7913 'type': 'object'},
7914 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7915 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
7916 'type': 'object'},
7917 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
7918 'Result': {'$ref': '#/definitions/ErrorResults'}},
7919 'type': 'object'},
7920 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
7921 'Result': {'$ref': '#/definitions/ErrorResults'}},
7922 'type': 'object'},
7923 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7924 'Result': {'$ref': '#/definitions/StatusResults'}},
7925 'type': 'object'},
7926 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
7927 'type': 'object'},
7928 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
7929 'type': 'object'}},
7930 'type': 'object'}
7931
7932
7933 #@ReturnMapping(BoolResults)
7934 async def AreManuallyProvisioned(self, entities):
7935 '''
7936 entities : typing.Sequence[~Entity]
7937 Returns -> typing.Sequence[~BoolResult]
7938 '''
7939 # map input types to rpc msg
7940 params = dict()
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)
7945
7946
7947
7948 #@ReturnMapping(StringResults)
7949 async def InstanceId(self, entities):
7950 '''
7951 entities : typing.Sequence[~Entity]
7952 Returns -> typing.Sequence[~StringResult]
7953 '''
7954 # map input types to rpc msg
7955 params = dict()
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)
7960
7961
7962
7963 #@ReturnMapping(StatusResults)
7964 async def InstanceStatus(self, entities):
7965 '''
7966 entities : typing.Sequence[~Entity]
7967 Returns -> typing.Sequence[~StatusResult]
7968 '''
7969 # map input types to rpc msg
7970 params = dict()
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)
7975
7976
7977
7978 #@ReturnMapping(LifeResults)
7979 async def Life(self, entities):
7980 '''
7981 entities : typing.Sequence[~Entity]
7982 Returns -> typing.Sequence[~LifeResult]
7983 '''
7984 # map input types to rpc msg
7985 params = dict()
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)
7990
7991
7992
7993 #@ReturnMapping(ModelConfigResult)
7994 async def ModelConfig(self):
7995 '''
7996
7997 Returns -> typing.Mapping[str, typing.Any]
7998 '''
7999 # map input types to rpc msg
8000 params = dict()
8001 msg = dict(Type='InstancePoller', Request='ModelConfig', Version=2, Params=params)
8002
8003 reply = await self.rpc(msg)
8004 return self._map(reply, ModelConfig)
8005
8006
8007
8008 #@ReturnMapping(MachineAddressesResults)
8009 async def ProviderAddresses(self, entities):
8010 '''
8011 entities : typing.Sequence[~Entity]
8012 Returns -> typing.Sequence[~MachineAddressesResult]
8013 '''
8014 # map input types to rpc msg
8015 params = dict()
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)
8020
8021
8022
8023 #@ReturnMapping(ErrorResults)
8024 async def SetInstanceStatus(self, entities):
8025 '''
8026 entities : typing.Sequence[~EntityStatusArgs]
8027 Returns -> typing.Sequence[~ErrorResult]
8028 '''
8029 # map input types to rpc msg
8030 params = dict()
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)
8035
8036
8037
8038 #@ReturnMapping(ErrorResults)
8039 async def SetProviderAddresses(self, machineaddresses):
8040 '''
8041 machineaddresses : typing.Sequence[~MachineAddresses]
8042 Returns -> typing.Sequence[~ErrorResult]
8043 '''
8044 # map input types to rpc msg
8045 params = dict()
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)
8050
8051
8052
8053 #@ReturnMapping(StatusResults)
8054 async def Status(self, entities):
8055 '''
8056 entities : typing.Sequence[~Entity]
8057 Returns -> typing.Sequence[~StatusResult]
8058 '''
8059 # map input types to rpc msg
8060 params = dict()
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)
8065
8066
8067
8068 #@ReturnMapping(NotifyWatchResult)
8069 async def WatchForModelConfigChanges(self):
8070 '''
8071
8072 Returns -> typing.Union[~Error, str]
8073 '''
8074 # map input types to rpc msg
8075 params = dict()
8076 msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=2, Params=params)
8077
8078 reply = await self.rpc(msg)
8079 return self._map(reply, WatchForModelConfigChanges)
8080
8081
8082
8083 #@ReturnMapping(StringsWatchResult)
8084 async def WatchModelMachines(self):
8085 '''
8086
8087 Returns -> typing.Union[~Error, typing.Sequence[str]]
8088 '''
8089 # map input types to rpc msg
8090 params = dict()
8091 msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=2, Params=params)
8092
8093 reply = await self.rpc(msg)
8094 return self._map(reply, WatchModelMachines)
8095
8096
8097 class KeyManager(Type):
8098 name = 'KeyManager'
8099 version = 1
8100 schema = {'definitions': {'Entities': {'additionalProperties': False,
8101 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8102 'type': 'array'}},
8103 'required': ['Entities'],
8104 'type': 'object'},
8105 'Entity': {'additionalProperties': False,
8106 'properties': {'Tag': {'type': 'string'}},
8107 'required': ['Tag'],
8108 'type': 'object'},
8109 'Error': {'additionalProperties': False,
8110 'properties': {'Code': {'type': 'string'},
8111 'Info': {'$ref': '#/definitions/ErrorInfo'},
8112 'Message': {'type': 'string'}},
8113 'required': ['Message', 'Code'],
8114 'type': 'object'},
8115 'ErrorInfo': {'additionalProperties': False,
8116 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8117 'MacaroonPath': {'type': 'string'}},
8118 'type': 'object'},
8119 'ErrorResult': {'additionalProperties': False,
8120 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8121 'required': ['Error'],
8122 'type': 'object'},
8123 'ErrorResults': {'additionalProperties': False,
8124 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8125 'type': 'array'}},
8126 'required': ['Results'],
8127 'type': 'object'},
8128 'ListSSHKeys': {'additionalProperties': False,
8129 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
8130 'Mode': {'type': 'boolean'}},
8131 'required': ['Entities', 'Mode'],
8132 'type': 'object'},
8133 'Macaroon': {'additionalProperties': False,
8134 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8135 'type': 'array'},
8136 'data': {'items': {'type': 'integer'},
8137 'type': 'array'},
8138 'id': {'$ref': '#/definitions/packet'},
8139 'location': {'$ref': '#/definitions/packet'},
8140 'sig': {'items': {'type': 'integer'},
8141 'type': 'array'}},
8142 'required': ['data',
8143 'location',
8144 'id',
8145 'caveats',
8146 'sig'],
8147 'type': 'object'},
8148 'ModifyUserSSHKeys': {'additionalProperties': False,
8149 'properties': {'Keys': {'items': {'type': 'string'},
8150 'type': 'array'},
8151 'User': {'type': 'string'}},
8152 'required': ['User', 'Keys'],
8153 'type': 'object'},
8154 'StringsResult': {'additionalProperties': False,
8155 'properties': {'Error': {'$ref': '#/definitions/Error'},
8156 'Result': {'items': {'type': 'string'},
8157 'type': 'array'}},
8158 'required': ['Error', 'Result'],
8159 'type': 'object'},
8160 'StringsResults': {'additionalProperties': False,
8161 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
8162 'type': 'array'}},
8163 'required': ['Results'],
8164 'type': 'object'},
8165 'caveat': {'additionalProperties': False,
8166 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8167 'location': {'$ref': '#/definitions/packet'},
8168 'verificationId': {'$ref': '#/definitions/packet'}},
8169 'required': ['location',
8170 'caveatId',
8171 'verificationId'],
8172 'type': 'object'},
8173 'packet': {'additionalProperties': False,
8174 'properties': {'headerLen': {'type': 'integer'},
8175 'start': {'type': 'integer'},
8176 'totalLen': {'type': 'integer'}},
8177 'required': ['start', 'totalLen', 'headerLen'],
8178 'type': 'object'}},
8179 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8180 'Result': {'$ref': '#/definitions/ErrorResults'}},
8181 'type': 'object'},
8182 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8183 'Result': {'$ref': '#/definitions/ErrorResults'}},
8184 'type': 'object'},
8185 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
8186 'Result': {'$ref': '#/definitions/ErrorResults'}},
8187 'type': 'object'},
8188 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
8189 'Result': {'$ref': '#/definitions/StringsResults'}},
8190 'type': 'object'}},
8191 'type': 'object'}
8192
8193
8194 #@ReturnMapping(ErrorResults)
8195 async def AddKeys(self, user, keys):
8196 '''
8197 user : str
8198 keys : typing.Sequence[str]
8199 Returns -> typing.Sequence[~ErrorResult]
8200 '''
8201 # map input types to rpc msg
8202 params = dict()
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)
8208
8209
8210
8211 #@ReturnMapping(ErrorResults)
8212 async def DeleteKeys(self, user, keys):
8213 '''
8214 user : str
8215 keys : typing.Sequence[str]
8216 Returns -> typing.Sequence[~ErrorResult]
8217 '''
8218 # map input types to rpc msg
8219 params = dict()
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)
8225
8226
8227
8228 #@ReturnMapping(ErrorResults)
8229 async def ImportKeys(self, user, keys):
8230 '''
8231 user : str
8232 keys : typing.Sequence[str]
8233 Returns -> typing.Sequence[~ErrorResult]
8234 '''
8235 # map input types to rpc msg
8236 params = dict()
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)
8242
8243
8244
8245 #@ReturnMapping(StringsResults)
8246 async def ListKeys(self, entities, mode):
8247 '''
8248 entities : ~Entities
8249 mode : bool
8250 Returns -> typing.Sequence[~StringsResult]
8251 '''
8252 # map input types to rpc msg
8253 params = dict()
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)
8259
8260
8261 class KeyUpdater(Type):
8262 name = 'KeyUpdater'
8263 version = 1
8264 schema = {'definitions': {'Entities': {'additionalProperties': False,
8265 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8266 'type': 'array'}},
8267 'required': ['Entities'],
8268 'type': 'object'},
8269 'Entity': {'additionalProperties': False,
8270 'properties': {'Tag': {'type': 'string'}},
8271 'required': ['Tag'],
8272 'type': 'object'},
8273 'Error': {'additionalProperties': False,
8274 'properties': {'Code': {'type': 'string'},
8275 'Info': {'$ref': '#/definitions/ErrorInfo'},
8276 'Message': {'type': 'string'}},
8277 'required': ['Message', 'Code'],
8278 'type': 'object'},
8279 'ErrorInfo': {'additionalProperties': False,
8280 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8281 'MacaroonPath': {'type': 'string'}},
8282 'type': 'object'},
8283 'Macaroon': {'additionalProperties': False,
8284 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8285 'type': 'array'},
8286 'data': {'items': {'type': 'integer'},
8287 'type': 'array'},
8288 'id': {'$ref': '#/definitions/packet'},
8289 'location': {'$ref': '#/definitions/packet'},
8290 'sig': {'items': {'type': 'integer'},
8291 'type': 'array'}},
8292 'required': ['data',
8293 'location',
8294 'id',
8295 'caveats',
8296 'sig'],
8297 'type': 'object'},
8298 'NotifyWatchResult': {'additionalProperties': False,
8299 'properties': {'Error': {'$ref': '#/definitions/Error'},
8300 'NotifyWatcherId': {'type': 'string'}},
8301 'required': ['NotifyWatcherId', 'Error'],
8302 'type': 'object'},
8303 'NotifyWatchResults': {'additionalProperties': False,
8304 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8305 'type': 'array'}},
8306 'required': ['Results'],
8307 'type': 'object'},
8308 'StringsResult': {'additionalProperties': False,
8309 'properties': {'Error': {'$ref': '#/definitions/Error'},
8310 'Result': {'items': {'type': 'string'},
8311 'type': 'array'}},
8312 'required': ['Error', 'Result'],
8313 'type': 'object'},
8314 'StringsResults': {'additionalProperties': False,
8315 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
8316 'type': 'array'}},
8317 'required': ['Results'],
8318 'type': 'object'},
8319 'caveat': {'additionalProperties': False,
8320 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8321 'location': {'$ref': '#/definitions/packet'},
8322 'verificationId': {'$ref': '#/definitions/packet'}},
8323 'required': ['location',
8324 'caveatId',
8325 'verificationId'],
8326 'type': 'object'},
8327 'packet': {'additionalProperties': False,
8328 'properties': {'headerLen': {'type': 'integer'},
8329 'start': {'type': 'integer'},
8330 'totalLen': {'type': 'integer'}},
8331 'required': ['start', 'totalLen', 'headerLen'],
8332 'type': 'object'}},
8333 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8334 'Result': {'$ref': '#/definitions/StringsResults'}},
8335 'type': 'object'},
8336 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8337 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8338 'type': 'object'}},
8339 'type': 'object'}
8340
8341
8342 #@ReturnMapping(StringsResults)
8343 async def AuthorisedKeys(self, entities):
8344 '''
8345 entities : typing.Sequence[~Entity]
8346 Returns -> typing.Sequence[~StringsResult]
8347 '''
8348 # map input types to rpc msg
8349 params = dict()
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)
8354
8355
8356
8357 #@ReturnMapping(NotifyWatchResults)
8358 async def WatchAuthorisedKeys(self, entities):
8359 '''
8360 entities : typing.Sequence[~Entity]
8361 Returns -> typing.Sequence[~NotifyWatchResult]
8362 '''
8363 # map input types to rpc msg
8364 params = dict()
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)
8369
8370
8371 class LeadershipService(Type):
8372 name = 'LeadershipService'
8373 version = 2
8374 schema = {'definitions': {'ClaimLeadershipBulkParams': {'additionalProperties': False,
8375 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
8376 'type': 'array'}},
8377 'required': ['Params'],
8378 'type': 'object'},
8379 'ClaimLeadershipBulkResults': {'additionalProperties': False,
8380 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8381 'type': 'array'}},
8382 'required': ['Results'],
8383 'type': 'object'},
8384 'ClaimLeadershipParams': {'additionalProperties': False,
8385 'properties': {'DurationSeconds': {'type': 'number'},
8386 'ServiceTag': {'type': 'string'},
8387 'UnitTag': {'type': 'string'}},
8388 'required': ['ServiceTag',
8389 'UnitTag',
8390 'DurationSeconds'],
8391 'type': 'object'},
8392 'Error': {'additionalProperties': False,
8393 'properties': {'Code': {'type': 'string'},
8394 'Info': {'$ref': '#/definitions/ErrorInfo'},
8395 'Message': {'type': 'string'}},
8396 'required': ['Message', 'Code'],
8397 'type': 'object'},
8398 'ErrorInfo': {'additionalProperties': False,
8399 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8400 'MacaroonPath': {'type': 'string'}},
8401 'type': 'object'},
8402 'ErrorResult': {'additionalProperties': False,
8403 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8404 'required': ['Error'],
8405 'type': 'object'},
8406 'Macaroon': {'additionalProperties': False,
8407 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8408 'type': 'array'},
8409 'data': {'items': {'type': 'integer'},
8410 'type': 'array'},
8411 'id': {'$ref': '#/definitions/packet'},
8412 'location': {'$ref': '#/definitions/packet'},
8413 'sig': {'items': {'type': 'integer'},
8414 'type': 'array'}},
8415 'required': ['data',
8416 'location',
8417 'id',
8418 'caveats',
8419 'sig'],
8420 'type': 'object'},
8421 'ServiceTag': {'additionalProperties': False,
8422 'properties': {'Name': {'type': 'string'}},
8423 'required': ['Name'],
8424 'type': 'object'},
8425 'caveat': {'additionalProperties': False,
8426 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8427 'location': {'$ref': '#/definitions/packet'},
8428 'verificationId': {'$ref': '#/definitions/packet'}},
8429 'required': ['location',
8430 'caveatId',
8431 'verificationId'],
8432 'type': 'object'},
8433 'packet': {'additionalProperties': False,
8434 'properties': {'headerLen': {'type': 'integer'},
8435 'start': {'type': 'integer'},
8436 'totalLen': {'type': 'integer'}},
8437 'required': ['start', 'totalLen', 'headerLen'],
8438 'type': 'object'}},
8439 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ServiceTag'},
8440 'Result': {'$ref': '#/definitions/ErrorResult'}},
8441 'type': 'object'},
8442 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
8443 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
8444 'type': 'object'}},
8445 'type': 'object'}
8446
8447
8448 #@ReturnMapping(ErrorResult)
8449 async def BlockUntilLeadershipReleased(self, name):
8450 '''
8451 name : str
8452 Returns -> ~Error
8453 '''
8454 # map input types to rpc msg
8455 params = dict()
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)
8460
8461
8462
8463 #@ReturnMapping(ClaimLeadershipBulkResults)
8464 async def ClaimLeadership(self, params):
8465 '''
8466 params : typing.Sequence[~ClaimLeadershipParams]
8467 Returns -> typing.Sequence[~ErrorResult]
8468 '''
8469 # map input types to rpc msg
8470 params = dict()
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)
8475
8476
8477 class LifeFlag(Type):
8478 name = 'LifeFlag'
8479 version = 1
8480 schema = {'definitions': {'Entities': {'additionalProperties': False,
8481 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8482 'type': 'array'}},
8483 'required': ['Entities'],
8484 'type': 'object'},
8485 'Entity': {'additionalProperties': False,
8486 'properties': {'Tag': {'type': 'string'}},
8487 'required': ['Tag'],
8488 'type': 'object'},
8489 'Error': {'additionalProperties': False,
8490 'properties': {'Code': {'type': 'string'},
8491 'Info': {'$ref': '#/definitions/ErrorInfo'},
8492 'Message': {'type': 'string'}},
8493 'required': ['Message', 'Code'],
8494 'type': 'object'},
8495 'ErrorInfo': {'additionalProperties': False,
8496 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8497 'MacaroonPath': {'type': 'string'}},
8498 'type': 'object'},
8499 'LifeResult': {'additionalProperties': False,
8500 'properties': {'Error': {'$ref': '#/definitions/Error'},
8501 'Life': {'type': 'string'}},
8502 'required': ['Life', 'Error'],
8503 'type': 'object'},
8504 'LifeResults': {'additionalProperties': False,
8505 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
8506 'type': 'array'}},
8507 'required': ['Results'],
8508 'type': 'object'},
8509 'Macaroon': {'additionalProperties': False,
8510 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8511 'type': 'array'},
8512 'data': {'items': {'type': 'integer'},
8513 'type': 'array'},
8514 'id': {'$ref': '#/definitions/packet'},
8515 'location': {'$ref': '#/definitions/packet'},
8516 'sig': {'items': {'type': 'integer'},
8517 'type': 'array'}},
8518 'required': ['data',
8519 'location',
8520 'id',
8521 'caveats',
8522 'sig'],
8523 'type': 'object'},
8524 'NotifyWatchResult': {'additionalProperties': False,
8525 'properties': {'Error': {'$ref': '#/definitions/Error'},
8526 'NotifyWatcherId': {'type': 'string'}},
8527 'required': ['NotifyWatcherId', 'Error'],
8528 'type': 'object'},
8529 'NotifyWatchResults': {'additionalProperties': False,
8530 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8531 'type': 'array'}},
8532 'required': ['Results'],
8533 'type': 'object'},
8534 'caveat': {'additionalProperties': False,
8535 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8536 'location': {'$ref': '#/definitions/packet'},
8537 'verificationId': {'$ref': '#/definitions/packet'}},
8538 'required': ['location',
8539 'caveatId',
8540 'verificationId'],
8541 'type': 'object'},
8542 'packet': {'additionalProperties': False,
8543 'properties': {'headerLen': {'type': 'integer'},
8544 'start': {'type': 'integer'},
8545 'totalLen': {'type': 'integer'}},
8546 'required': ['start', 'totalLen', 'headerLen'],
8547 'type': 'object'}},
8548 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8549 'Result': {'$ref': '#/definitions/LifeResults'}},
8550 'type': 'object'},
8551 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8552 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8553 'type': 'object'}},
8554 'type': 'object'}
8555
8556
8557 #@ReturnMapping(LifeResults)
8558 async def Life(self, entities):
8559 '''
8560 entities : typing.Sequence[~Entity]
8561 Returns -> typing.Sequence[~LifeResult]
8562 '''
8563 # map input types to rpc msg
8564 params = dict()
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)
8569
8570
8571
8572 #@ReturnMapping(NotifyWatchResults)
8573 async def Watch(self, entities):
8574 '''
8575 entities : typing.Sequence[~Entity]
8576 Returns -> typing.Sequence[~NotifyWatchResult]
8577 '''
8578 # map input types to rpc msg
8579 params = dict()
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)
8584
8585
8586 class Logger(Type):
8587 name = 'Logger'
8588 version = 1
8589 schema = {'definitions': {'Entities': {'additionalProperties': False,
8590 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8591 'type': 'array'}},
8592 'required': ['Entities'],
8593 'type': 'object'},
8594 'Entity': {'additionalProperties': False,
8595 'properties': {'Tag': {'type': 'string'}},
8596 'required': ['Tag'],
8597 'type': 'object'},
8598 'Error': {'additionalProperties': False,
8599 'properties': {'Code': {'type': 'string'},
8600 'Info': {'$ref': '#/definitions/ErrorInfo'},
8601 'Message': {'type': 'string'}},
8602 'required': ['Message', 'Code'],
8603 'type': 'object'},
8604 'ErrorInfo': {'additionalProperties': False,
8605 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8606 'MacaroonPath': {'type': 'string'}},
8607 'type': 'object'},
8608 'Macaroon': {'additionalProperties': False,
8609 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8610 'type': 'array'},
8611 'data': {'items': {'type': 'integer'},
8612 'type': 'array'},
8613 'id': {'$ref': '#/definitions/packet'},
8614 'location': {'$ref': '#/definitions/packet'},
8615 'sig': {'items': {'type': 'integer'},
8616 'type': 'array'}},
8617 'required': ['data',
8618 'location',
8619 'id',
8620 'caveats',
8621 'sig'],
8622 'type': 'object'},
8623 'NotifyWatchResult': {'additionalProperties': False,
8624 'properties': {'Error': {'$ref': '#/definitions/Error'},
8625 'NotifyWatcherId': {'type': 'string'}},
8626 'required': ['NotifyWatcherId', 'Error'],
8627 'type': 'object'},
8628 'NotifyWatchResults': {'additionalProperties': False,
8629 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
8630 'type': 'array'}},
8631 'required': ['Results'],
8632 'type': 'object'},
8633 'StringResult': {'additionalProperties': False,
8634 'properties': {'Error': {'$ref': '#/definitions/Error'},
8635 'Result': {'type': 'string'}},
8636 'required': ['Error', 'Result'],
8637 'type': 'object'},
8638 'StringResults': {'additionalProperties': False,
8639 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
8640 'type': 'array'}},
8641 'required': ['Results'],
8642 'type': 'object'},
8643 'caveat': {'additionalProperties': False,
8644 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8645 'location': {'$ref': '#/definitions/packet'},
8646 'verificationId': {'$ref': '#/definitions/packet'}},
8647 'required': ['location',
8648 'caveatId',
8649 'verificationId'],
8650 'type': 'object'},
8651 'packet': {'additionalProperties': False,
8652 'properties': {'headerLen': {'type': 'integer'},
8653 'start': {'type': 'integer'},
8654 'totalLen': {'type': 'integer'}},
8655 'required': ['start', 'totalLen', 'headerLen'],
8656 'type': 'object'}},
8657 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8658 'Result': {'$ref': '#/definitions/StringResults'}},
8659 'type': 'object'},
8660 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8661 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
8662 'type': 'object'}},
8663 'type': 'object'}
8664
8665
8666 #@ReturnMapping(StringResults)
8667 async def LoggingConfig(self, entities):
8668 '''
8669 entities : typing.Sequence[~Entity]
8670 Returns -> typing.Sequence[~StringResult]
8671 '''
8672 # map input types to rpc msg
8673 params = dict()
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)
8678
8679
8680
8681 #@ReturnMapping(NotifyWatchResults)
8682 async def WatchLoggingConfig(self, entities):
8683 '''
8684 entities : typing.Sequence[~Entity]
8685 Returns -> typing.Sequence[~NotifyWatchResult]
8686 '''
8687 # map input types to rpc msg
8688 params = dict()
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)
8693
8694
8695 class MachineActions(Type):
8696 name = 'MachineActions'
8697 version = 1
8698 schema = {'definitions': {'Action': {'additionalProperties': False,
8699 'properties': {'name': {'type': 'string'},
8700 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
8701 'type': 'object'}},
8702 'type': 'object'},
8703 'receiver': {'type': 'string'},
8704 'tag': {'type': 'string'}},
8705 'required': ['tag', 'receiver', 'name'],
8706 'type': 'object'},
8707 'ActionExecutionResult': {'additionalProperties': False,
8708 'properties': {'actiontag': {'type': 'string'},
8709 'message': {'type': 'string'},
8710 'results': {'patternProperties': {'.*': {'additionalProperties': True,
8711 'type': 'object'}},
8712 'type': 'object'},
8713 'status': {'type': 'string'}},
8714 'required': ['actiontag', 'status'],
8715 'type': 'object'},
8716 'ActionExecutionResults': {'additionalProperties': False,
8717 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
8718 'type': 'array'}},
8719 'type': 'object'},
8720 'ActionResult': {'additionalProperties': False,
8721 'properties': {'action': {'$ref': '#/definitions/Action'},
8722 'completed': {'format': 'date-time',
8723 'type': 'string'},
8724 'enqueued': {'format': 'date-time',
8725 'type': 'string'},
8726 'error': {'$ref': '#/definitions/Error'},
8727 'message': {'type': 'string'},
8728 'output': {'patternProperties': {'.*': {'additionalProperties': True,
8729 'type': 'object'}},
8730 'type': 'object'},
8731 'started': {'format': 'date-time',
8732 'type': 'string'},
8733 'status': {'type': 'string'}},
8734 'type': 'object'},
8735 'ActionResults': {'additionalProperties': False,
8736 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
8737 'type': 'array'}},
8738 'type': 'object'},
8739 'ActionsByReceiver': {'additionalProperties': False,
8740 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
8741 'type': 'array'},
8742 'error': {'$ref': '#/definitions/Error'},
8743 'receiver': {'type': 'string'}},
8744 'type': 'object'},
8745 'ActionsByReceivers': {'additionalProperties': False,
8746 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
8747 'type': 'array'}},
8748 'type': 'object'},
8749 'Entities': {'additionalProperties': False,
8750 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8751 'type': 'array'}},
8752 'required': ['Entities'],
8753 'type': 'object'},
8754 'Entity': {'additionalProperties': False,
8755 'properties': {'Tag': {'type': 'string'}},
8756 'required': ['Tag'],
8757 'type': 'object'},
8758 'Error': {'additionalProperties': False,
8759 'properties': {'Code': {'type': 'string'},
8760 'Info': {'$ref': '#/definitions/ErrorInfo'},
8761 'Message': {'type': 'string'}},
8762 'required': ['Message', 'Code'],
8763 'type': 'object'},
8764 'ErrorInfo': {'additionalProperties': False,
8765 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8766 'MacaroonPath': {'type': 'string'}},
8767 'type': 'object'},
8768 'ErrorResult': {'additionalProperties': False,
8769 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8770 'required': ['Error'],
8771 'type': 'object'},
8772 'ErrorResults': {'additionalProperties': False,
8773 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8774 'type': 'array'}},
8775 'required': ['Results'],
8776 'type': 'object'},
8777 'Macaroon': {'additionalProperties': False,
8778 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8779 'type': 'array'},
8780 'data': {'items': {'type': 'integer'},
8781 'type': 'array'},
8782 'id': {'$ref': '#/definitions/packet'},
8783 'location': {'$ref': '#/definitions/packet'},
8784 'sig': {'items': {'type': 'integer'},
8785 'type': 'array'}},
8786 'required': ['data',
8787 'location',
8788 'id',
8789 'caveats',
8790 'sig'],
8791 'type': 'object'},
8792 'StringsWatchResult': {'additionalProperties': False,
8793 'properties': {'Changes': {'items': {'type': 'string'},
8794 'type': 'array'},
8795 'Error': {'$ref': '#/definitions/Error'},
8796 'StringsWatcherId': {'type': 'string'}},
8797 'required': ['StringsWatcherId',
8798 'Changes',
8799 'Error'],
8800 'type': 'object'},
8801 'StringsWatchResults': {'additionalProperties': False,
8802 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8803 'type': 'array'}},
8804 'required': ['Results'],
8805 'type': 'object'},
8806 'caveat': {'additionalProperties': False,
8807 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8808 'location': {'$ref': '#/definitions/packet'},
8809 'verificationId': {'$ref': '#/definitions/packet'}},
8810 'required': ['location',
8811 'caveatId',
8812 'verificationId'],
8813 'type': 'object'},
8814 'packet': {'additionalProperties': False,
8815 'properties': {'headerLen': {'type': 'integer'},
8816 'start': {'type': 'integer'},
8817 'totalLen': {'type': 'integer'}},
8818 'required': ['start', 'totalLen', 'headerLen'],
8819 'type': 'object'}},
8820 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8821 'Result': {'$ref': '#/definitions/ActionResults'}},
8822 'type': 'object'},
8823 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8824 'Result': {'$ref': '#/definitions/ErrorResults'}},
8825 'type': 'object'},
8826 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
8827 'Result': {'$ref': '#/definitions/ErrorResults'}},
8828 'type': 'object'},
8829 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8830 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
8831 'type': 'object'},
8832 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8833 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8834 'type': 'object'}},
8835 'type': 'object'}
8836
8837
8838 #@ReturnMapping(ActionResults)
8839 async def Actions(self, entities):
8840 '''
8841 entities : typing.Sequence[~Entity]
8842 Returns -> typing.Sequence[~ActionResult]
8843 '''
8844 # map input types to rpc msg
8845 params = dict()
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)
8850
8851
8852
8853 #@ReturnMapping(ErrorResults)
8854 async def BeginActions(self, entities):
8855 '''
8856 entities : typing.Sequence[~Entity]
8857 Returns -> typing.Sequence[~ErrorResult]
8858 '''
8859 # map input types to rpc msg
8860 params = dict()
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)
8865
8866
8867
8868 #@ReturnMapping(ErrorResults)
8869 async def FinishActions(self, results):
8870 '''
8871 results : typing.Sequence[~ActionExecutionResult]
8872 Returns -> typing.Sequence[~ErrorResult]
8873 '''
8874 # map input types to rpc msg
8875 params = dict()
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)
8880
8881
8882
8883 #@ReturnMapping(ActionsByReceivers)
8884 async def RunningActions(self, entities):
8885 '''
8886 entities : typing.Sequence[~Entity]
8887 Returns -> typing.Sequence[~ActionsByReceiver]
8888 '''
8889 # map input types to rpc msg
8890 params = dict()
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)
8895
8896
8897
8898 #@ReturnMapping(StringsWatchResults)
8899 async def WatchActionNotifications(self, entities):
8900 '''
8901 entities : typing.Sequence[~Entity]
8902 Returns -> typing.Sequence[~StringsWatchResult]
8903 '''
8904 # map input types to rpc msg
8905 params = dict()
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)
8910
8911
8912 class MachineManager(Type):
8913 name = 'MachineManager'
8914 version = 2
8915 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
8916 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
8917 'type': 'array'},
8918 'Constraints': {'$ref': '#/definitions/Value'},
8919 'ContainerType': {'type': 'string'},
8920 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
8921 'type': 'array'},
8922 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
8923 'InstanceId': {'type': 'string'},
8924 'Jobs': {'items': {'type': 'string'},
8925 'type': 'array'},
8926 'Nonce': {'type': 'string'},
8927 'ParentId': {'type': 'string'},
8928 'Placement': {'$ref': '#/definitions/Placement'},
8929 'Series': {'type': 'string'}},
8930 'required': ['Series',
8931 'Constraints',
8932 'Jobs',
8933 'Disks',
8934 'Placement',
8935 'ParentId',
8936 'ContainerType',
8937 'InstanceId',
8938 'Nonce',
8939 'HardwareCharacteristics',
8940 'Addrs'],
8941 'type': 'object'},
8942 'AddMachines': {'additionalProperties': False,
8943 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
8944 'type': 'array'}},
8945 'required': ['MachineParams'],
8946 'type': 'object'},
8947 'AddMachinesResult': {'additionalProperties': False,
8948 'properties': {'Error': {'$ref': '#/definitions/Error'},
8949 'Machine': {'type': 'string'}},
8950 'required': ['Machine', 'Error'],
8951 'type': 'object'},
8952 'AddMachinesResults': {'additionalProperties': False,
8953 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
8954 'type': 'array'}},
8955 'required': ['Machines'],
8956 'type': 'object'},
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'],
8963 'type': 'object'},
8964 'Constraints': {'additionalProperties': False,
8965 'properties': {'Count': {'type': 'integer'},
8966 'Pool': {'type': 'string'},
8967 'Size': {'type': 'integer'}},
8968 'required': ['Pool', 'Size', 'Count'],
8969 'type': 'object'},
8970 'Error': {'additionalProperties': False,
8971 'properties': {'Code': {'type': 'string'},
8972 'Info': {'$ref': '#/definitions/ErrorInfo'},
8973 'Message': {'type': 'string'}},
8974 'required': ['Message', 'Code'],
8975 'type': 'object'},
8976 'ErrorInfo': {'additionalProperties': False,
8977 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8978 'MacaroonPath': {'type': 'string'}},
8979 'type': 'object'},
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'},
8988 'type': 'array'}},
8989 'type': 'object'},
8990 'Macaroon': {'additionalProperties': False,
8991 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8992 'type': 'array'},
8993 'data': {'items': {'type': 'integer'},
8994 'type': 'array'},
8995 'id': {'$ref': '#/definitions/packet'},
8996 'location': {'$ref': '#/definitions/packet'},
8997 'sig': {'items': {'type': 'integer'},
8998 'type': 'array'}},
8999 'required': ['data',
9000 'location',
9001 'id',
9002 'caveats',
9003 'sig'],
9004 'type': 'object'},
9005 'Placement': {'additionalProperties': False,
9006 'properties': {'Directive': {'type': 'string'},
9007 'Scope': {'type': 'string'}},
9008 'required': ['Scope', 'Directive'],
9009 'type': 'object'},
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'},
9019 'type': 'array'},
9020 'tags': {'items': {'type': 'string'},
9021 'type': 'array'},
9022 'virt-type': {'type': 'string'}},
9023 'type': 'object'},
9024 'caveat': {'additionalProperties': False,
9025 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9026 'location': {'$ref': '#/definitions/packet'},
9027 'verificationId': {'$ref': '#/definitions/packet'}},
9028 'required': ['location',
9029 'caveatId',
9030 'verificationId'],
9031 'type': 'object'},
9032 'packet': {'additionalProperties': False,
9033 'properties': {'headerLen': {'type': 'integer'},
9034 'start': {'type': 'integer'},
9035 'totalLen': {'type': 'integer'}},
9036 'required': ['start', 'totalLen', 'headerLen'],
9037 'type': 'object'}},
9038 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
9039 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
9040 'type': 'object'}},
9041 'type': 'object'}
9042
9043
9044 #@ReturnMapping(AddMachinesResults)
9045 async def AddMachines(self, machineparams):
9046 '''
9047 machineparams : typing.Sequence[~AddMachineParams]
9048 Returns -> typing.Sequence[~AddMachinesResult]
9049 '''
9050 # map input types to rpc msg
9051 params = dict()
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)
9056
9057
9058 class Machiner(Type):
9059 name = 'Machiner'
9060 version = 1
9061 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
9062 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
9063 'type': 'array'},
9064 'type': 'array'}},
9065 'required': ['Servers'],
9066 'type': 'object'},
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'],
9073 'type': 'object'},
9074 'BytesResult': {'additionalProperties': False,
9075 'properties': {'Result': {'items': {'type': 'integer'},
9076 'type': 'array'}},
9077 'required': ['Result'],
9078 'type': 'object'},
9079 'Entities': {'additionalProperties': False,
9080 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9081 'type': 'array'}},
9082 'required': ['Entities'],
9083 'type': 'object'},
9084 'Entity': {'additionalProperties': False,
9085 'properties': {'Tag': {'type': 'string'}},
9086 'required': ['Tag'],
9087 'type': 'object'},
9088 'EntityStatusArgs': {'additionalProperties': False,
9089 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
9090 'type': 'object'}},
9091 'type': 'object'},
9092 'Info': {'type': 'string'},
9093 'Status': {'type': 'string'},
9094 'Tag': {'type': 'string'}},
9095 'required': ['Tag',
9096 'Status',
9097 'Info',
9098 'Data'],
9099 'type': 'object'},
9100 'Error': {'additionalProperties': False,
9101 'properties': {'Code': {'type': 'string'},
9102 'Info': {'$ref': '#/definitions/ErrorInfo'},
9103 'Message': {'type': 'string'}},
9104 'required': ['Message', 'Code'],
9105 'type': 'object'},
9106 'ErrorInfo': {'additionalProperties': False,
9107 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9108 'MacaroonPath': {'type': 'string'}},
9109 'type': 'object'},
9110 'ErrorResult': {'additionalProperties': False,
9111 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9112 'required': ['Error'],
9113 'type': 'object'},
9114 'ErrorResults': {'additionalProperties': False,
9115 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9116 'type': 'array'}},
9117 'required': ['Results'],
9118 'type': 'object'},
9119 'HostPort': {'additionalProperties': False,
9120 'properties': {'Address': {'$ref': '#/definitions/Address'},
9121 'Port': {'type': 'integer'}},
9122 'required': ['Address', 'Port'],
9123 'type': 'object'},
9124 'JobsResult': {'additionalProperties': False,
9125 'properties': {'Error': {'$ref': '#/definitions/Error'},
9126 'Jobs': {'items': {'type': 'string'},
9127 'type': 'array'}},
9128 'required': ['Jobs', 'Error'],
9129 'type': 'object'},
9130 'JobsResults': {'additionalProperties': False,
9131 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
9132 'type': 'array'}},
9133 'required': ['Results'],
9134 'type': 'object'},
9135 'LifeResult': {'additionalProperties': False,
9136 'properties': {'Error': {'$ref': '#/definitions/Error'},
9137 'Life': {'type': 'string'}},
9138 'required': ['Life', 'Error'],
9139 'type': 'object'},
9140 'LifeResults': {'additionalProperties': False,
9141 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9142 'type': 'array'}},
9143 'required': ['Results'],
9144 'type': 'object'},
9145 'Macaroon': {'additionalProperties': False,
9146 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9147 'type': 'array'},
9148 'data': {'items': {'type': 'integer'},
9149 'type': 'array'},
9150 'id': {'$ref': '#/definitions/packet'},
9151 'location': {'$ref': '#/definitions/packet'},
9152 'sig': {'items': {'type': 'integer'},
9153 'type': 'array'}},
9154 'required': ['data',
9155 'location',
9156 'id',
9157 'caveats',
9158 'sig'],
9159 'type': 'object'},
9160 'MachineAddresses': {'additionalProperties': False,
9161 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
9162 'type': 'array'},
9163 'Tag': {'type': 'string'}},
9164 'required': ['Tag', 'Addresses'],
9165 'type': 'object'},
9166 'NetworkConfig': {'additionalProperties': False,
9167 'properties': {'Address': {'type': 'string'},
9168 'CIDR': {'type': 'string'},
9169 'ConfigType': {'type': 'string'},
9170 'DNSSearchDomains': {'items': {'type': 'string'},
9171 'type': 'array'},
9172 'DNSServers': {'items': {'type': 'string'},
9173 'type': 'array'},
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',
9190 'MACAddress',
9191 'CIDR',
9192 'MTU',
9193 'ProviderId',
9194 'ProviderSubnetId',
9195 'ProviderSpaceId',
9196 'ProviderAddressId',
9197 'ProviderVLANId',
9198 'VLANTag',
9199 'InterfaceName',
9200 'ParentInterfaceName',
9201 'InterfaceType',
9202 'Disabled'],
9203 'type': 'object'},
9204 'NotifyWatchResult': {'additionalProperties': False,
9205 'properties': {'Error': {'$ref': '#/definitions/Error'},
9206 'NotifyWatcherId': {'type': 'string'}},
9207 'required': ['NotifyWatcherId', 'Error'],
9208 'type': 'object'},
9209 'NotifyWatchResults': {'additionalProperties': False,
9210 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9211 'type': 'array'}},
9212 'required': ['Results'],
9213 'type': 'object'},
9214 'SetMachineNetworkConfig': {'additionalProperties': False,
9215 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
9216 'type': 'array'},
9217 'Tag': {'type': 'string'}},
9218 'required': ['Tag', 'Config'],
9219 'type': 'object'},
9220 'SetMachinesAddresses': {'additionalProperties': False,
9221 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
9222 'type': 'array'}},
9223 'required': ['MachineAddresses'],
9224 'type': 'object'},
9225 'SetStatus': {'additionalProperties': False,
9226 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
9227 'type': 'array'}},
9228 'required': ['Entities'],
9229 'type': 'object'},
9230 'StringResult': {'additionalProperties': False,
9231 'properties': {'Error': {'$ref': '#/definitions/Error'},
9232 'Result': {'type': 'string'}},
9233 'required': ['Error', 'Result'],
9234 'type': 'object'},
9235 'StringsResult': {'additionalProperties': False,
9236 'properties': {'Error': {'$ref': '#/definitions/Error'},
9237 'Result': {'items': {'type': 'string'},
9238 'type': 'array'}},
9239 'required': ['Error', 'Result'],
9240 'type': 'object'},
9241 'caveat': {'additionalProperties': False,
9242 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9243 'location': {'$ref': '#/definitions/packet'},
9244 'verificationId': {'$ref': '#/definitions/packet'}},
9245 'required': ['location',
9246 'caveatId',
9247 'verificationId'],
9248 'type': 'object'},
9249 'packet': {'additionalProperties': False,
9250 'properties': {'headerLen': {'type': 'integer'},
9251 'start': {'type': 'integer'},
9252 'totalLen': {'type': 'integer'}},
9253 'required': ['start', 'totalLen', 'headerLen'],
9254 'type': 'object'}},
9255 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
9256 'type': 'object'},
9257 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
9258 'type': 'object'},
9259 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
9260 'type': 'object'},
9261 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9262 'Result': {'$ref': '#/definitions/ErrorResults'}},
9263 'type': 'object'},
9264 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9265 'Result': {'$ref': '#/definitions/JobsResults'}},
9266 'type': 'object'},
9267 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9268 'Result': {'$ref': '#/definitions/LifeResults'}},
9269 'type': 'object'},
9270 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
9271 'type': 'object'},
9272 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
9273 'Result': {'$ref': '#/definitions/ErrorResults'}},
9274 'type': 'object'},
9275 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
9276 'type': 'object'},
9277 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9278 'Result': {'$ref': '#/definitions/ErrorResults'}},
9279 'type': 'object'},
9280 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9281 'Result': {'$ref': '#/definitions/ErrorResults'}},
9282 'type': 'object'},
9283 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
9284 'Result': {'$ref': '#/definitions/ErrorResults'}},
9285 'type': 'object'},
9286 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9287 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9288 'type': 'object'},
9289 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9290 'type': 'object'}},
9291 'type': 'object'}
9292
9293
9294 #@ReturnMapping(StringsResult)
9295 async def APIAddresses(self):
9296 '''
9297
9298 Returns -> typing.Union[~Error, typing.Sequence[str]]
9299 '''
9300 # map input types to rpc msg
9301 params = dict()
9302 msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params)
9303
9304 reply = await self.rpc(msg)
9305 return self._map(reply, APIAddresses)
9306
9307
9308
9309 #@ReturnMapping(APIHostPortsResult)
9310 async def APIHostPorts(self):
9311 '''
9312
9313 Returns -> typing.Sequence[~HostPort]
9314 '''
9315 # map input types to rpc msg
9316 params = dict()
9317 msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params)
9318
9319 reply = await self.rpc(msg)
9320 return self._map(reply, APIHostPorts)
9321
9322
9323
9324 #@ReturnMapping(BytesResult)
9325 async def CACert(self):
9326 '''
9327
9328 Returns -> typing.Sequence[int]
9329 '''
9330 # map input types to rpc msg
9331 params = dict()
9332 msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params)
9333
9334 reply = await self.rpc(msg)
9335 return self._map(reply, CACert)
9336
9337
9338
9339 #@ReturnMapping(ErrorResults)
9340 async def EnsureDead(self, entities):
9341 '''
9342 entities : typing.Sequence[~Entity]
9343 Returns -> typing.Sequence[~ErrorResult]
9344 '''
9345 # map input types to rpc msg
9346 params = dict()
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)
9351
9352
9353
9354 #@ReturnMapping(JobsResults)
9355 async def Jobs(self, entities):
9356 '''
9357 entities : typing.Sequence[~Entity]
9358 Returns -> typing.Sequence[~JobsResult]
9359 '''
9360 # map input types to rpc msg
9361 params = dict()
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)
9366
9367
9368
9369 #@ReturnMapping(LifeResults)
9370 async def Life(self, entities):
9371 '''
9372 entities : typing.Sequence[~Entity]
9373 Returns -> typing.Sequence[~LifeResult]
9374 '''
9375 # map input types to rpc msg
9376 params = dict()
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)
9381
9382
9383
9384 #@ReturnMapping(StringResult)
9385 async def ModelUUID(self):
9386 '''
9387
9388 Returns -> typing.Union[~Error, str]
9389 '''
9390 # map input types to rpc msg
9391 params = dict()
9392 msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params)
9393
9394 reply = await self.rpc(msg)
9395 return self._map(reply, ModelUUID)
9396
9397
9398
9399 #@ReturnMapping(ErrorResults)
9400 async def SetMachineAddresses(self, machineaddresses):
9401 '''
9402 machineaddresses : typing.Sequence[~MachineAddresses]
9403 Returns -> typing.Sequence[~ErrorResult]
9404 '''
9405 # map input types to rpc msg
9406 params = dict()
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)
9411
9412
9413
9414 #@ReturnMapping(None)
9415 async def SetObservedNetworkConfig(self, tag, config):
9416 '''
9417 tag : str
9418 config : typing.Sequence[~NetworkConfig]
9419 Returns -> None
9420 '''
9421 # map input types to rpc msg
9422 params = dict()
9423 msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params)
9424 params['Tag'] = tag
9425 params['Config'] = config
9426 reply = await self.rpc(msg)
9427 return self._map(reply, SetObservedNetworkConfig)
9428
9429
9430
9431 #@ReturnMapping(ErrorResults)
9432 async def SetProviderNetworkConfig(self, entities):
9433 '''
9434 entities : typing.Sequence[~Entity]
9435 Returns -> typing.Sequence[~ErrorResult]
9436 '''
9437 # map input types to rpc msg
9438 params = dict()
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)
9443
9444
9445
9446 #@ReturnMapping(ErrorResults)
9447 async def SetStatus(self, entities):
9448 '''
9449 entities : typing.Sequence[~EntityStatusArgs]
9450 Returns -> typing.Sequence[~ErrorResult]
9451 '''
9452 # map input types to rpc msg
9453 params = dict()
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)
9458
9459
9460
9461 #@ReturnMapping(ErrorResults)
9462 async def UpdateStatus(self, entities):
9463 '''
9464 entities : typing.Sequence[~EntityStatusArgs]
9465 Returns -> typing.Sequence[~ErrorResult]
9466 '''
9467 # map input types to rpc msg
9468 params = dict()
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)
9473
9474
9475
9476 #@ReturnMapping(NotifyWatchResults)
9477 async def Watch(self, entities):
9478 '''
9479 entities : typing.Sequence[~Entity]
9480 Returns -> typing.Sequence[~NotifyWatchResult]
9481 '''
9482 # map input types to rpc msg
9483 params = dict()
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)
9488
9489
9490
9491 #@ReturnMapping(NotifyWatchResult)
9492 async def WatchAPIHostPorts(self):
9493 '''
9494
9495 Returns -> typing.Union[~Error, str]
9496 '''
9497 # map input types to rpc msg
9498 params = dict()
9499 msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params)
9500
9501 reply = await self.rpc(msg)
9502 return self._map(reply, WatchAPIHostPorts)
9503
9504
9505 class MeterStatus(Type):
9506 name = 'MeterStatus'
9507 version = 1
9508 schema = {'definitions': {'Entities': {'additionalProperties': False,
9509 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9510 'type': 'array'}},
9511 'required': ['Entities'],
9512 'type': 'object'},
9513 'Entity': {'additionalProperties': False,
9514 'properties': {'Tag': {'type': 'string'}},
9515 'required': ['Tag'],
9516 'type': 'object'},
9517 'Error': {'additionalProperties': False,
9518 'properties': {'Code': {'type': 'string'},
9519 'Info': {'$ref': '#/definitions/ErrorInfo'},
9520 'Message': {'type': 'string'}},
9521 'required': ['Message', 'Code'],
9522 'type': 'object'},
9523 'ErrorInfo': {'additionalProperties': False,
9524 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9525 'MacaroonPath': {'type': 'string'}},
9526 'type': 'object'},
9527 'Macaroon': {'additionalProperties': False,
9528 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9529 'type': 'array'},
9530 'data': {'items': {'type': 'integer'},
9531 'type': 'array'},
9532 'id': {'$ref': '#/definitions/packet'},
9533 'location': {'$ref': '#/definitions/packet'},
9534 'sig': {'items': {'type': 'integer'},
9535 'type': 'array'}},
9536 'required': ['data',
9537 'location',
9538 'id',
9539 'caveats',
9540 'sig'],
9541 'type': 'object'},
9542 'MeterStatusResult': {'additionalProperties': False,
9543 'properties': {'Code': {'type': 'string'},
9544 'Error': {'$ref': '#/definitions/Error'},
9545 'Info': {'type': 'string'}},
9546 'required': ['Code', 'Info', 'Error'],
9547 'type': 'object'},
9548 'MeterStatusResults': {'additionalProperties': False,
9549 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
9550 'type': 'array'}},
9551 'required': ['Results'],
9552 'type': 'object'},
9553 'NotifyWatchResult': {'additionalProperties': False,
9554 'properties': {'Error': {'$ref': '#/definitions/Error'},
9555 'NotifyWatcherId': {'type': 'string'}},
9556 'required': ['NotifyWatcherId', 'Error'],
9557 'type': 'object'},
9558 'NotifyWatchResults': {'additionalProperties': False,
9559 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9560 'type': 'array'}},
9561 'required': ['Results'],
9562 'type': 'object'},
9563 'caveat': {'additionalProperties': False,
9564 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9565 'location': {'$ref': '#/definitions/packet'},
9566 'verificationId': {'$ref': '#/definitions/packet'}},
9567 'required': ['location',
9568 'caveatId',
9569 'verificationId'],
9570 'type': 'object'},
9571 'packet': {'additionalProperties': False,
9572 'properties': {'headerLen': {'type': 'integer'},
9573 'start': {'type': 'integer'},
9574 'totalLen': {'type': 'integer'}},
9575 'required': ['start', 'totalLen', 'headerLen'],
9576 'type': 'object'}},
9577 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9578 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
9579 'type': 'object'},
9580 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9581 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9582 'type': 'object'}},
9583 'type': 'object'}
9584
9585
9586 #@ReturnMapping(MeterStatusResults)
9587 async def GetMeterStatus(self, entities):
9588 '''
9589 entities : typing.Sequence[~Entity]
9590 Returns -> typing.Sequence[~MeterStatusResult]
9591 '''
9592 # map input types to rpc msg
9593 params = dict()
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)
9598
9599
9600
9601 #@ReturnMapping(NotifyWatchResults)
9602 async def WatchMeterStatus(self, entities):
9603 '''
9604 entities : typing.Sequence[~Entity]
9605 Returns -> typing.Sequence[~NotifyWatchResult]
9606 '''
9607 # map input types to rpc msg
9608 params = dict()
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)
9613
9614
9615 class MetricsAdder(Type):
9616 name = 'MetricsAdder'
9617 version = 2
9618 schema = {'definitions': {'Error': {'additionalProperties': False,
9619 'properties': {'Code': {'type': 'string'},
9620 'Info': {'$ref': '#/definitions/ErrorInfo'},
9621 'Message': {'type': 'string'}},
9622 'required': ['Message', 'Code'],
9623 'type': 'object'},
9624 'ErrorInfo': {'additionalProperties': False,
9625 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9626 'MacaroonPath': {'type': 'string'}},
9627 'type': 'object'},
9628 'ErrorResult': {'additionalProperties': False,
9629 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9630 'required': ['Error'],
9631 'type': 'object'},
9632 'ErrorResults': {'additionalProperties': False,
9633 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9634 'type': 'array'}},
9635 'required': ['Results'],
9636 'type': 'object'},
9637 'Macaroon': {'additionalProperties': False,
9638 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9639 'type': 'array'},
9640 'data': {'items': {'type': 'integer'},
9641 'type': 'array'},
9642 'id': {'$ref': '#/definitions/packet'},
9643 'location': {'$ref': '#/definitions/packet'},
9644 'sig': {'items': {'type': 'integer'},
9645 'type': 'array'}},
9646 'required': ['data',
9647 'location',
9648 'id',
9649 'caveats',
9650 'sig'],
9651 'type': 'object'},
9652 'Metric': {'additionalProperties': False,
9653 'properties': {'Key': {'type': 'string'},
9654 'Time': {'format': 'date-time',
9655 'type': 'string'},
9656 'Value': {'type': 'string'}},
9657 'required': ['Key', 'Value', 'Time'],
9658 'type': 'object'},
9659 'MetricBatch': {'additionalProperties': False,
9660 'properties': {'CharmURL': {'type': 'string'},
9661 'Created': {'format': 'date-time',
9662 'type': 'string'},
9663 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
9664 'type': 'array'},
9665 'UUID': {'type': 'string'}},
9666 'required': ['UUID',
9667 'CharmURL',
9668 'Created',
9669 'Metrics'],
9670 'type': 'object'},
9671 'MetricBatchParam': {'additionalProperties': False,
9672 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
9673 'Tag': {'type': 'string'}},
9674 'required': ['Tag', 'Batch'],
9675 'type': 'object'},
9676 'MetricBatchParams': {'additionalProperties': False,
9677 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
9678 'type': 'array'}},
9679 'required': ['Batches'],
9680 'type': 'object'},
9681 'caveat': {'additionalProperties': False,
9682 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9683 'location': {'$ref': '#/definitions/packet'},
9684 'verificationId': {'$ref': '#/definitions/packet'}},
9685 'required': ['location',
9686 'caveatId',
9687 'verificationId'],
9688 'type': 'object'},
9689 'packet': {'additionalProperties': False,
9690 'properties': {'headerLen': {'type': 'integer'},
9691 'start': {'type': 'integer'},
9692 'totalLen': {'type': 'integer'}},
9693 'required': ['start', 'totalLen', 'headerLen'],
9694 'type': 'object'}},
9695 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
9696 'Result': {'$ref': '#/definitions/ErrorResults'}},
9697 'type': 'object'}},
9698 'type': 'object'}
9699
9700
9701 #@ReturnMapping(ErrorResults)
9702 async def AddMetricBatches(self, batches):
9703 '''
9704 batches : typing.Sequence[~MetricBatchParam]
9705 Returns -> typing.Sequence[~ErrorResult]
9706 '''
9707 # map input types to rpc msg
9708 params = dict()
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)
9713
9714
9715 class MetricsDebug(Type):
9716 name = 'MetricsDebug'
9717 version = 1
9718 schema = {'definitions': {'Entities': {'additionalProperties': False,
9719 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9720 'type': 'array'}},
9721 'required': ['Entities'],
9722 'type': 'object'},
9723 'Entity': {'additionalProperties': False,
9724 'properties': {'Tag': {'type': 'string'}},
9725 'required': ['Tag'],
9726 'type': 'object'},
9727 'EntityMetrics': {'additionalProperties': False,
9728 'properties': {'error': {'$ref': '#/definitions/Error'},
9729 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
9730 'type': 'array'}},
9731 'type': 'object'},
9732 'Error': {'additionalProperties': False,
9733 'properties': {'Code': {'type': 'string'},
9734 'Info': {'$ref': '#/definitions/ErrorInfo'},
9735 'Message': {'type': 'string'}},
9736 'required': ['Message', 'Code'],
9737 'type': 'object'},
9738 'ErrorInfo': {'additionalProperties': False,
9739 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9740 'MacaroonPath': {'type': 'string'}},
9741 'type': 'object'},
9742 'ErrorResult': {'additionalProperties': False,
9743 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9744 'required': ['Error'],
9745 'type': 'object'},
9746 'ErrorResults': {'additionalProperties': False,
9747 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9748 'type': 'array'}},
9749 'required': ['Results'],
9750 'type': 'object'},
9751 'Macaroon': {'additionalProperties': False,
9752 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9753 'type': 'array'},
9754 'data': {'items': {'type': 'integer'},
9755 'type': 'array'},
9756 'id': {'$ref': '#/definitions/packet'},
9757 'location': {'$ref': '#/definitions/packet'},
9758 'sig': {'items': {'type': 'integer'},
9759 'type': 'array'}},
9760 'required': ['data',
9761 'location',
9762 'id',
9763 'caveats',
9764 'sig'],
9765 'type': 'object'},
9766 'MeterStatusParam': {'additionalProperties': False,
9767 'properties': {'code': {'type': 'string'},
9768 'info': {'type': 'string'},
9769 'tag': {'type': 'string'}},
9770 'required': ['tag', 'code', 'info'],
9771 'type': 'object'},
9772 'MeterStatusParams': {'additionalProperties': False,
9773 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
9774 'type': 'array'}},
9775 'required': ['statues'],
9776 'type': 'object'},
9777 'MetricResult': {'additionalProperties': False,
9778 'properties': {'key': {'type': 'string'},
9779 'time': {'format': 'date-time',
9780 'type': 'string'},
9781 'value': {'type': 'string'}},
9782 'required': ['time', 'key', 'value'],
9783 'type': 'object'},
9784 'MetricResults': {'additionalProperties': False,
9785 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
9786 'type': 'array'}},
9787 'required': ['results'],
9788 'type': 'object'},
9789 'caveat': {'additionalProperties': False,
9790 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9791 'location': {'$ref': '#/definitions/packet'},
9792 'verificationId': {'$ref': '#/definitions/packet'}},
9793 'required': ['location',
9794 'caveatId',
9795 'verificationId'],
9796 'type': 'object'},
9797 'packet': {'additionalProperties': False,
9798 'properties': {'headerLen': {'type': 'integer'},
9799 'start': {'type': 'integer'},
9800 'totalLen': {'type': 'integer'}},
9801 'required': ['start', 'totalLen', 'headerLen'],
9802 'type': 'object'}},
9803 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9804 'Result': {'$ref': '#/definitions/MetricResults'}},
9805 'type': 'object'},
9806 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
9807 'Result': {'$ref': '#/definitions/ErrorResults'}},
9808 'type': 'object'}},
9809 'type': 'object'}
9810
9811
9812 #@ReturnMapping(MetricResults)
9813 async def GetMetrics(self, entities):
9814 '''
9815 entities : typing.Sequence[~Entity]
9816 Returns -> typing.Sequence[~EntityMetrics]
9817 '''
9818 # map input types to rpc msg
9819 params = dict()
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)
9824
9825
9826
9827 #@ReturnMapping(ErrorResults)
9828 async def SetMeterStatus(self, statues):
9829 '''
9830 statues : typing.Sequence[~MeterStatusParam]
9831 Returns -> typing.Sequence[~ErrorResult]
9832 '''
9833 # map input types to rpc msg
9834 params = dict()
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)
9839
9840
9841 class MetricsManager(Type):
9842 name = 'MetricsManager'
9843 version = 1
9844 schema = {'definitions': {'Entities': {'additionalProperties': False,
9845 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9846 'type': 'array'}},
9847 'required': ['Entities'],
9848 'type': 'object'},
9849 'Entity': {'additionalProperties': False,
9850 'properties': {'Tag': {'type': 'string'}},
9851 'required': ['Tag'],
9852 'type': 'object'},
9853 'Error': {'additionalProperties': False,
9854 'properties': {'Code': {'type': 'string'},
9855 'Info': {'$ref': '#/definitions/ErrorInfo'},
9856 'Message': {'type': 'string'}},
9857 'required': ['Message', 'Code'],
9858 'type': 'object'},
9859 'ErrorInfo': {'additionalProperties': False,
9860 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9861 'MacaroonPath': {'type': 'string'}},
9862 'type': 'object'},
9863 'ErrorResult': {'additionalProperties': False,
9864 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9865 'required': ['Error'],
9866 'type': 'object'},
9867 'ErrorResults': {'additionalProperties': False,
9868 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9869 'type': 'array'}},
9870 'required': ['Results'],
9871 'type': 'object'},
9872 'Macaroon': {'additionalProperties': False,
9873 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9874 'type': 'array'},
9875 'data': {'items': {'type': 'integer'},
9876 'type': 'array'},
9877 'id': {'$ref': '#/definitions/packet'},
9878 'location': {'$ref': '#/definitions/packet'},
9879 'sig': {'items': {'type': 'integer'},
9880 'type': 'array'}},
9881 'required': ['data',
9882 'location',
9883 'id',
9884 'caveats',
9885 'sig'],
9886 'type': 'object'},
9887 'caveat': {'additionalProperties': False,
9888 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9889 'location': {'$ref': '#/definitions/packet'},
9890 'verificationId': {'$ref': '#/definitions/packet'}},
9891 'required': ['location',
9892 'caveatId',
9893 'verificationId'],
9894 'type': 'object'},
9895 'packet': {'additionalProperties': False,
9896 'properties': {'headerLen': {'type': 'integer'},
9897 'start': {'type': 'integer'},
9898 'totalLen': {'type': 'integer'}},
9899 'required': ['start', 'totalLen', 'headerLen'],
9900 'type': 'object'}},
9901 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9902 'Result': {'$ref': '#/definitions/ErrorResults'}},
9903 'type': 'object'},
9904 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9905 'Result': {'$ref': '#/definitions/ErrorResults'}},
9906 'type': 'object'}},
9907 'type': 'object'}
9908
9909
9910 #@ReturnMapping(ErrorResults)
9911 async def CleanupOldMetrics(self, entities):
9912 '''
9913 entities : typing.Sequence[~Entity]
9914 Returns -> typing.Sequence[~ErrorResult]
9915 '''
9916 # map input types to rpc msg
9917 params = dict()
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)
9922
9923
9924
9925 #@ReturnMapping(ErrorResults)
9926 async def SendMetrics(self, entities):
9927 '''
9928 entities : typing.Sequence[~Entity]
9929 Returns -> typing.Sequence[~ErrorResult]
9930 '''
9931 # map input types to rpc msg
9932 params = dict()
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)
9937
9938
9939 class MigrationFlag(Type):
9940 name = 'MigrationFlag'
9941 version = 1
9942 schema = {'definitions': {'Entities': {'additionalProperties': False,
9943 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9944 'type': 'array'}},
9945 'required': ['Entities'],
9946 'type': 'object'},
9947 'Entity': {'additionalProperties': False,
9948 'properties': {'Tag': {'type': 'string'}},
9949 'required': ['Tag'],
9950 'type': 'object'},
9951 'Error': {'additionalProperties': False,
9952 'properties': {'Code': {'type': 'string'},
9953 'Info': {'$ref': '#/definitions/ErrorInfo'},
9954 'Message': {'type': 'string'}},
9955 'required': ['Message', 'Code'],
9956 'type': 'object'},
9957 'ErrorInfo': {'additionalProperties': False,
9958 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9959 'MacaroonPath': {'type': 'string'}},
9960 'type': 'object'},
9961 'Macaroon': {'additionalProperties': False,
9962 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9963 'type': 'array'},
9964 'data': {'items': {'type': 'integer'},
9965 'type': 'array'},
9966 'id': {'$ref': '#/definitions/packet'},
9967 'location': {'$ref': '#/definitions/packet'},
9968 'sig': {'items': {'type': 'integer'},
9969 'type': 'array'}},
9970 'required': ['data',
9971 'location',
9972 'id',
9973 'caveats',
9974 'sig'],
9975 'type': 'object'},
9976 'NotifyWatchResult': {'additionalProperties': False,
9977 'properties': {'Error': {'$ref': '#/definitions/Error'},
9978 'NotifyWatcherId': {'type': 'string'}},
9979 'required': ['NotifyWatcherId', 'Error'],
9980 'type': 'object'},
9981 'NotifyWatchResults': {'additionalProperties': False,
9982 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9983 'type': 'array'}},
9984 'required': ['Results'],
9985 'type': 'object'},
9986 'PhaseResult': {'additionalProperties': False,
9987 'properties': {'Error': {'$ref': '#/definitions/Error'},
9988 'phase': {'type': 'string'}},
9989 'required': ['phase', 'Error'],
9990 'type': 'object'},
9991 'PhaseResults': {'additionalProperties': False,
9992 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
9993 'type': 'array'}},
9994 'required': ['Results'],
9995 'type': 'object'},
9996 'caveat': {'additionalProperties': False,
9997 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9998 'location': {'$ref': '#/definitions/packet'},
9999 'verificationId': {'$ref': '#/definitions/packet'}},
10000 'required': ['location',
10001 'caveatId',
10002 'verificationId'],
10003 'type': 'object'},
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'}},
10012 'type': 'object'},
10013 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10014 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10015 'type': 'object'}},
10016 'type': 'object'}
10017
10018
10019 #@ReturnMapping(PhaseResults)
10020 async def Phase(self, entities):
10021 '''
10022 entities : typing.Sequence[~Entity]
10023 Returns -> typing.Sequence[~PhaseResult]
10024 '''
10025 # map input types to rpc msg
10026 params = dict()
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)
10031
10032
10033
10034 #@ReturnMapping(NotifyWatchResults)
10035 async def Watch(self, entities):
10036 '''
10037 entities : typing.Sequence[~Entity]
10038 Returns -> typing.Sequence[~NotifyWatchResult]
10039 '''
10040 # map input types to rpc msg
10041 params = dict()
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)
10046
10047
10048 class MigrationMaster(Type):
10049 name = 'MigrationMaster'
10050 version = 1
10051 schema = {'definitions': {'Error': {'additionalProperties': False,
10052 'properties': {'Code': {'type': 'string'},
10053 'Info': {'$ref': '#/definitions/ErrorInfo'},
10054 'Message': {'type': 'string'}},
10055 'required': ['Message', 'Code'],
10056 'type': 'object'},
10057 'ErrorInfo': {'additionalProperties': False,
10058 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10059 'MacaroonPath': {'type': 'string'}},
10060 'type': 'object'},
10061 'FullMigrationStatus': {'additionalProperties': False,
10062 'properties': {'attempt': {'type': 'integer'},
10063 'phase': {'type': 'string'},
10064 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
10065 'required': ['spec',
10066 'attempt',
10067 'phase'],
10068 'type': 'object'},
10069 'Macaroon': {'additionalProperties': False,
10070 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10071 'type': 'array'},
10072 'data': {'items': {'type': 'integer'},
10073 'type': 'array'},
10074 'id': {'$ref': '#/definitions/packet'},
10075 'location': {'$ref': '#/definitions/packet'},
10076 'sig': {'items': {'type': 'integer'},
10077 'type': 'array'}},
10078 'required': ['data',
10079 'location',
10080 'id',
10081 'caveats',
10082 'sig'],
10083 'type': 'object'},
10084 'ModelMigrationSpec': {'additionalProperties': False,
10085 'properties': {'model-tag': {'type': 'string'},
10086 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
10087 'required': ['model-tag',
10088 'target-info'],
10089 'type': 'object'},
10090 'ModelMigrationTargetInfo': {'additionalProperties': False,
10091 'properties': {'addrs': {'items': {'type': 'string'},
10092 'type': 'array'},
10093 'auth-tag': {'type': 'string'},
10094 'ca-cert': {'type': 'string'},
10095 'controller-tag': {'type': 'string'},
10096 'password': {'type': 'string'}},
10097 'required': ['controller-tag',
10098 'addrs',
10099 'ca-cert',
10100 'auth-tag',
10101 'password'],
10102 'type': 'object'},
10103 'NotifyWatchResult': {'additionalProperties': False,
10104 'properties': {'Error': {'$ref': '#/definitions/Error'},
10105 'NotifyWatcherId': {'type': 'string'}},
10106 'required': ['NotifyWatcherId', 'Error'],
10107 'type': 'object'},
10108 'SerializedModel': {'additionalProperties': False,
10109 'properties': {'bytes': {'items': {'type': 'integer'},
10110 'type': 'array'}},
10111 'required': ['bytes'],
10112 'type': 'object'},
10113 'SetMigrationPhaseArgs': {'additionalProperties': False,
10114 'properties': {'phase': {'type': 'string'}},
10115 'required': ['phase'],
10116 'type': 'object'},
10117 'caveat': {'additionalProperties': False,
10118 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10119 'location': {'$ref': '#/definitions/packet'},
10120 'verificationId': {'$ref': '#/definitions/packet'}},
10121 'required': ['location',
10122 'caveatId',
10123 'verificationId'],
10124 'type': 'object'},
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'}},
10132 'type': 'object'},
10133 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
10134 'type': 'object'},
10135 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
10136 'type': 'object'},
10137 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10138 'type': 'object'}},
10139 'type': 'object'}
10140
10141
10142 #@ReturnMapping(SerializedModel)
10143 async def Export(self):
10144 '''
10145
10146 Returns -> typing.Sequence[int]
10147 '''
10148 # map input types to rpc msg
10149 params = dict()
10150 msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params)
10151
10152 reply = await self.rpc(msg)
10153 return self._map(reply, Export)
10154
10155
10156
10157 #@ReturnMapping(FullMigrationStatus)
10158 async def GetMigrationStatus(self):
10159 '''
10160
10161 Returns -> typing.Union[str, ~ModelMigrationSpec, int]
10162 '''
10163 # map input types to rpc msg
10164 params = dict()
10165 msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params)
10166
10167 reply = await self.rpc(msg)
10168 return self._map(reply, GetMigrationStatus)
10169
10170
10171
10172 #@ReturnMapping(None)
10173 async def SetPhase(self, phase):
10174 '''
10175 phase : str
10176 Returns -> None
10177 '''
10178 # map input types to rpc msg
10179 params = dict()
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)
10184
10185
10186
10187 #@ReturnMapping(NotifyWatchResult)
10188 async def Watch(self):
10189 '''
10190
10191 Returns -> typing.Union[~Error, str]
10192 '''
10193 # map input types to rpc msg
10194 params = dict()
10195 msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params)
10196
10197 reply = await self.rpc(msg)
10198 return self._map(reply, Watch)
10199
10200
10201 class MigrationMinion(Type):
10202 name = 'MigrationMinion'
10203 version = 1
10204 schema = {'definitions': {'Error': {'additionalProperties': False,
10205 'properties': {'Code': {'type': 'string'},
10206 'Info': {'$ref': '#/definitions/ErrorInfo'},
10207 'Message': {'type': 'string'}},
10208 'required': ['Message', 'Code'],
10209 'type': 'object'},
10210 'ErrorInfo': {'additionalProperties': False,
10211 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10212 'MacaroonPath': {'type': 'string'}},
10213 'type': 'object'},
10214 'Macaroon': {'additionalProperties': False,
10215 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10216 'type': 'array'},
10217 'data': {'items': {'type': 'integer'},
10218 'type': 'array'},
10219 'id': {'$ref': '#/definitions/packet'},
10220 'location': {'$ref': '#/definitions/packet'},
10221 'sig': {'items': {'type': 'integer'},
10222 'type': 'array'}},
10223 'required': ['data',
10224 'location',
10225 'id',
10226 'caveats',
10227 'sig'],
10228 'type': 'object'},
10229 'NotifyWatchResult': {'additionalProperties': False,
10230 'properties': {'Error': {'$ref': '#/definitions/Error'},
10231 'NotifyWatcherId': {'type': 'string'}},
10232 'required': ['NotifyWatcherId', 'Error'],
10233 'type': 'object'},
10234 'caveat': {'additionalProperties': False,
10235 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10236 'location': {'$ref': '#/definitions/packet'},
10237 'verificationId': {'$ref': '#/definitions/packet'}},
10238 'required': ['location',
10239 'caveatId',
10240 'verificationId'],
10241 'type': 'object'},
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'}},
10250 'type': 'object'}
10251
10252
10253 #@ReturnMapping(NotifyWatchResult)
10254 async def Watch(self):
10255 '''
10256
10257 Returns -> typing.Union[~Error, str]
10258 '''
10259 # map input types to rpc msg
10260 params = dict()
10261 msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params)
10262
10263 reply = await self.rpc(msg)
10264 return self._map(reply, Watch)
10265
10266
10267 class MigrationStatusWatcher(Type):
10268 name = 'MigrationStatusWatcher'
10269 version = 1
10270 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
10271 'properties': {'attempt': {'type': 'integer'},
10272 'phase': {'type': 'string'},
10273 'source-api-addrs': {'items': {'type': 'string'},
10274 'type': 'array'},
10275 'source-ca-cert': {'type': 'string'},
10276 'target-api-addrs': {'items': {'type': 'string'},
10277 'type': 'array'},
10278 'target-ca-cert': {'type': 'string'}},
10279 'required': ['attempt',
10280 'phase',
10281 'source-api-addrs',
10282 'source-ca-cert',
10283 'target-api-addrs',
10284 'target-ca-cert'],
10285 'type': 'object'}},
10286 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
10287 'type': 'object'},
10288 'Stop': {'type': 'object'}},
10289 'type': 'object'}
10290
10291
10292 #@ReturnMapping(MigrationStatus)
10293 async def Next(self):
10294 '''
10295
10296 Returns -> typing.Union[typing.Sequence[str], int]
10297 '''
10298 # map input types to rpc msg
10299 params = dict()
10300 msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params)
10301
10302 reply = await self.rpc(msg)
10303 return self._map(reply, Next)
10304
10305
10306
10307 #@ReturnMapping(None)
10308 async def Stop(self):
10309 '''
10310
10311 Returns -> None
10312 '''
10313 # map input types to rpc msg
10314 params = dict()
10315 msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params)
10316
10317 reply = await self.rpc(msg)
10318 return self._map(reply, Stop)
10319
10320
10321 class MigrationTarget(Type):
10322 name = 'MigrationTarget'
10323 version = 1
10324 schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
10325 'properties': {'model-tag': {'type': 'string'}},
10326 'required': ['model-tag'],
10327 'type': 'object'},
10328 'SerializedModel': {'additionalProperties': False,
10329 'properties': {'bytes': {'items': {'type': 'integer'},
10330 'type': 'array'}},
10331 'required': ['bytes'],
10332 'type': 'object'}},
10333 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
10334 'type': 'object'},
10335 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
10336 'type': 'object'},
10337 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
10338 'type': 'object'}},
10339 'type': 'object'}
10340
10341
10342 #@ReturnMapping(None)
10343 async def Abort(self, model_tag):
10344 '''
10345 model_tag : str
10346 Returns -> None
10347 '''
10348 # map input types to rpc msg
10349 params = dict()
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)
10354
10355
10356
10357 #@ReturnMapping(None)
10358 async def Activate(self, model_tag):
10359 '''
10360 model_tag : str
10361 Returns -> None
10362 '''
10363 # map input types to rpc msg
10364 params = dict()
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)
10369
10370
10371
10372 #@ReturnMapping(None)
10373 async def Import(self, bytes_):
10374 '''
10375 bytes_ : typing.Sequence[int]
10376 Returns -> None
10377 '''
10378 # map input types to rpc msg
10379 params = dict()
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)
10384
10385
10386 class ModelManager(Type):
10387 name = 'ModelManager'
10388 version = 2
10389 schema = {'definitions': {'Entities': {'additionalProperties': False,
10390 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10391 'type': 'array'}},
10392 'required': ['Entities'],
10393 'type': 'object'},
10394 'Entity': {'additionalProperties': False,
10395 'properties': {'Tag': {'type': 'string'}},
10396 'required': ['Tag'],
10397 'type': 'object'},
10398 'EntityStatus': {'additionalProperties': False,
10399 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10400 'type': 'object'}},
10401 'type': 'object'},
10402 'Info': {'type': 'string'},
10403 'Since': {'format': 'date-time',
10404 'type': 'string'},
10405 'Status': {'type': 'string'}},
10406 'required': ['Status',
10407 'Info',
10408 'Data',
10409 'Since'],
10410 'type': 'object'},
10411 'Error': {'additionalProperties': False,
10412 'properties': {'Code': {'type': 'string'},
10413 'Info': {'$ref': '#/definitions/ErrorInfo'},
10414 'Message': {'type': 'string'}},
10415 'required': ['Message', 'Code'],
10416 'type': 'object'},
10417 'ErrorInfo': {'additionalProperties': False,
10418 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10419 'MacaroonPath': {'type': 'string'}},
10420 'type': 'object'},
10421 'ErrorResult': {'additionalProperties': False,
10422 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10423 'required': ['Error'],
10424 'type': 'object'},
10425 'ErrorResults': {'additionalProperties': False,
10426 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10427 'type': 'array'}},
10428 'required': ['Results'],
10429 'type': 'object'},
10430 'Macaroon': {'additionalProperties': False,
10431 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10432 'type': 'array'},
10433 'data': {'items': {'type': 'integer'},
10434 'type': 'array'},
10435 'id': {'$ref': '#/definitions/packet'},
10436 'location': {'$ref': '#/definitions/packet'},
10437 'sig': {'items': {'type': 'integer'},
10438 'type': 'array'}},
10439 'required': ['data',
10440 'location',
10441 'id',
10442 'caveats',
10443 'sig'],
10444 'type': 'object'},
10445 'Model': {'additionalProperties': False,
10446 'properties': {'Name': {'type': 'string'},
10447 'OwnerTag': {'type': 'string'},
10448 'UUID': {'type': 'string'}},
10449 'required': ['Name', 'UUID', 'OwnerTag'],
10450 'type': 'object'},
10451 'ModelConfigResult': {'additionalProperties': False,
10452 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10453 'type': 'object'}},
10454 'type': 'object'}},
10455 'required': ['Config'],
10456 'type': 'object'},
10457 'ModelCreateArgs': {'additionalProperties': False,
10458 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
10459 'type': 'object'}},
10460 'type': 'object'},
10461 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10462 'type': 'object'}},
10463 'type': 'object'},
10464 'OwnerTag': {'type': 'string'}},
10465 'required': ['OwnerTag',
10466 'Account',
10467 'Config'],
10468 'type': 'object'},
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'},
10479 'type': 'array'}},
10480 'required': ['Name',
10481 'UUID',
10482 'ServerUUID',
10483 'ProviderType',
10484 'DefaultSeries',
10485 'OwnerTag',
10486 'Life',
10487 'Status',
10488 'Users'],
10489 'type': 'object'},
10490 'ModelInfoResult': {'additionalProperties': False,
10491 'properties': {'error': {'$ref': '#/definitions/Error'},
10492 'result': {'$ref': '#/definitions/ModelInfo'}},
10493 'type': 'object'},
10494 'ModelInfoResults': {'additionalProperties': False,
10495 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
10496 'type': 'array'}},
10497 'required': ['results'],
10498 'type': 'object'},
10499 'ModelSkeletonConfigArgs': {'additionalProperties': False,
10500 'properties': {'Provider': {'type': 'string'},
10501 'Region': {'type': 'string'}},
10502 'required': ['Provider', 'Region'],
10503 'type': 'object'},
10504 'ModelUserInfo': {'additionalProperties': False,
10505 'properties': {'access': {'type': 'string'},
10506 'displayname': {'type': 'string'},
10507 'lastconnection': {'format': 'date-time',
10508 'type': 'string'},
10509 'user': {'type': 'string'}},
10510 'required': ['user',
10511 'displayname',
10512 'lastconnection',
10513 'access'],
10514 'type': 'object'},
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',
10521 'action',
10522 'access',
10523 'model-tag'],
10524 'type': 'object'},
10525 'ModifyModelAccessRequest': {'additionalProperties': False,
10526 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
10527 'type': 'array'}},
10528 'required': ['changes'],
10529 'type': 'object'},
10530 'UserModel': {'additionalProperties': False,
10531 'properties': {'LastConnection': {'format': 'date-time',
10532 'type': 'string'},
10533 'Model': {'$ref': '#/definitions/Model'}},
10534 'required': ['Model', 'LastConnection'],
10535 'type': 'object'},
10536 'UserModelList': {'additionalProperties': False,
10537 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
10538 'type': 'array'}},
10539 'required': ['UserModels'],
10540 'type': 'object'},
10541 'caveat': {'additionalProperties': False,
10542 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10543 'location': {'$ref': '#/definitions/packet'},
10544 'verificationId': {'$ref': '#/definitions/packet'}},
10545 'required': ['location',
10546 'caveatId',
10547 'verificationId'],
10548 'type': 'object'},
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'}},
10557 'type': 'object'},
10558 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
10559 'Result': {'$ref': '#/definitions/Model'}},
10560 'type': 'object'},
10561 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
10562 'Result': {'$ref': '#/definitions/UserModelList'}},
10563 'type': 'object'},
10564 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10565 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
10566 'type': 'object'},
10567 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
10568 'Result': {'$ref': '#/definitions/ErrorResults'}},
10569 'type': 'object'}},
10570 'type': 'object'}
10571
10572
10573 #@ReturnMapping(ModelConfigResult)
10574 async def ConfigSkeleton(self, region, provider):
10575 '''
10576 region : str
10577 provider : str
10578 Returns -> typing.Mapping[str, typing.Any]
10579 '''
10580 # map input types to rpc msg
10581 params = dict()
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)
10587
10588
10589
10590 #@ReturnMapping(Model)
10591 async def CreateModel(self, account, ownertag, config):
10592 '''
10593 account : typing.Mapping[str, typing.Any]
10594 ownertag : str
10595 config : typing.Mapping[str, typing.Any]
10596 Returns -> <class 'str'>
10597 '''
10598 # map input types to rpc msg
10599 params = dict()
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)
10606
10607
10608
10609 #@ReturnMapping(UserModelList)
10610 async def ListModels(self, tag):
10611 '''
10612 tag : str
10613 Returns -> typing.Sequence[~UserModel]
10614 '''
10615 # map input types to rpc msg
10616 params = dict()
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)
10621
10622
10623
10624 #@ReturnMapping(ModelInfoResults)
10625 async def ModelInfo(self, entities):
10626 '''
10627 entities : typing.Sequence[~Entity]
10628 Returns -> typing.Sequence[~ModelInfoResult]
10629 '''
10630 # map input types to rpc msg
10631 params = dict()
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)
10636
10637
10638
10639 #@ReturnMapping(ErrorResults)
10640 async def ModifyModelAccess(self, changes):
10641 '''
10642 changes : typing.Sequence[~ModifyModelAccess]
10643 Returns -> typing.Sequence[~ErrorResult]
10644 '''
10645 # map input types to rpc msg
10646 params = dict()
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)
10651
10652
10653 class NotifyWatcher(Type):
10654 name = 'NotifyWatcher'
10655 version = 1
10656 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
10657 'type': 'object'}
10658
10659
10660 #@ReturnMapping(None)
10661 async def Next(self):
10662 '''
10663
10664 Returns -> None
10665 '''
10666 # map input types to rpc msg
10667 params = dict()
10668 msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params)
10669
10670 reply = await self.rpc(msg)
10671 return self._map(reply, Next)
10672
10673
10674
10675 #@ReturnMapping(None)
10676 async def Stop(self):
10677 '''
10678
10679 Returns -> None
10680 '''
10681 # map input types to rpc msg
10682 params = dict()
10683 msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params)
10684
10685 reply = await self.rpc(msg)
10686 return self._map(reply, Stop)
10687
10688
10689 class Pinger(Type):
10690 name = 'Pinger'
10691 version = 1
10692 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
10693 'type': 'object'}
10694
10695
10696 #@ReturnMapping(None)
10697 async def Ping(self):
10698 '''
10699
10700 Returns -> None
10701 '''
10702 # map input types to rpc msg
10703 params = dict()
10704 msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params)
10705
10706 reply = await self.rpc(msg)
10707 return self._map(reply, Ping)
10708
10709
10710
10711 #@ReturnMapping(None)
10712 async def Stop(self):
10713 '''
10714
10715 Returns -> None
10716 '''
10717 # map input types to rpc msg
10718 params = dict()
10719 msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params)
10720
10721 reply = await self.rpc(msg)
10722 return self._map(reply, Stop)
10723
10724
10725 class Provisioner(Type):
10726 name = 'Provisioner'
10727 version = 2
10728 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
10729 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
10730 'type': 'array'},
10731 'type': 'array'}},
10732 'required': ['Servers'],
10733 'type': 'object'},
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'],
10740 'type': 'object'},
10741 'Binary': {'additionalProperties': False,
10742 'properties': {'Arch': {'type': 'string'},
10743 'Number': {'$ref': '#/definitions/Number'},
10744 'Series': {'type': 'string'}},
10745 'required': ['Number', 'Series', 'Arch'],
10746 'type': 'object'},
10747 'BytesResult': {'additionalProperties': False,
10748 'properties': {'Result': {'items': {'type': 'integer'},
10749 'type': 'array'}},
10750 'required': ['Result'],
10751 'type': 'object'},
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',
10765 'region',
10766 'version',
10767 'series',
10768 'arch',
10769 'source',
10770 'priority'],
10771 'type': 'object'},
10772 'ConstraintsResult': {'additionalProperties': False,
10773 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
10774 'Error': {'$ref': '#/definitions/Error'}},
10775 'required': ['Error', 'Constraints'],
10776 'type': 'object'},
10777 'ConstraintsResults': {'additionalProperties': False,
10778 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
10779 'type': 'array'}},
10780 'required': ['Results'],
10781 'type': 'object'},
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',
10793 'AuthorizedKeys',
10794 'SSLHostnameVerification',
10795 'Proxy',
10796 'AptProxy',
10797 'AptMirror',
10798 'PreferIPv6',
10799 'AllowLXCLoopMounts',
10800 'UpdateBehavior'],
10801 'type': 'object'},
10802 'ContainerManagerConfig': {'additionalProperties': False,
10803 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
10804 'type': 'object'}},
10805 'required': ['ManagerConfig'],
10806 'type': 'object'},
10807 'ContainerManagerConfigParams': {'additionalProperties': False,
10808 'properties': {'Type': {'type': 'string'}},
10809 'required': ['Type'],
10810 'type': 'object'},
10811 'DistributionGroupResult': {'additionalProperties': False,
10812 'properties': {'Error': {'$ref': '#/definitions/Error'},
10813 'Result': {'items': {'type': 'string'},
10814 'type': 'array'}},
10815 'required': ['Error', 'Result'],
10816 'type': 'object'},
10817 'DistributionGroupResults': {'additionalProperties': False,
10818 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
10819 'type': 'array'}},
10820 'required': ['Results'],
10821 'type': 'object'},
10822 'Entities': {'additionalProperties': False,
10823 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10824 'type': 'array'}},
10825 'required': ['Entities'],
10826 'type': 'object'},
10827 'Entity': {'additionalProperties': False,
10828 'properties': {'Tag': {'type': 'string'}},
10829 'required': ['Tag'],
10830 'type': 'object'},
10831 'EntityPassword': {'additionalProperties': False,
10832 'properties': {'Password': {'type': 'string'},
10833 'Tag': {'type': 'string'}},
10834 'required': ['Tag', 'Password'],
10835 'type': 'object'},
10836 'EntityPasswords': {'additionalProperties': False,
10837 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
10838 'type': 'array'}},
10839 'required': ['Changes'],
10840 'type': 'object'},
10841 'EntityStatusArgs': {'additionalProperties': False,
10842 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10843 'type': 'object'}},
10844 'type': 'object'},
10845 'Info': {'type': 'string'},
10846 'Status': {'type': 'string'},
10847 'Tag': {'type': 'string'}},
10848 'required': ['Tag',
10849 'Status',
10850 'Info',
10851 'Data'],
10852 'type': 'object'},
10853 'Error': {'additionalProperties': False,
10854 'properties': {'Code': {'type': 'string'},
10855 'Info': {'$ref': '#/definitions/ErrorInfo'},
10856 'Message': {'type': 'string'}},
10857 'required': ['Message', 'Code'],
10858 'type': 'object'},
10859 'ErrorInfo': {'additionalProperties': False,
10860 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10861 'MacaroonPath': {'type': 'string'}},
10862 'type': 'object'},
10863 'ErrorResult': {'additionalProperties': False,
10864 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10865 'required': ['Error'],
10866 'type': 'object'},
10867 'ErrorResults': {'additionalProperties': False,
10868 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10869 'type': 'array'}},
10870 'required': ['Results'],
10871 'type': 'object'},
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',
10879 'MajorVersion',
10880 'MinorVersion',
10881 'Arch',
10882 'Series'],
10883 'type': 'object'},
10884 'FindToolsResult': {'additionalProperties': False,
10885 'properties': {'Error': {'$ref': '#/definitions/Error'},
10886 'List': {'items': {'$ref': '#/definitions/Tools'},
10887 'type': 'array'}},
10888 'required': ['List', 'Error'],
10889 'type': 'object'},
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'},
10898 'type': 'array'}},
10899 'type': 'object'},
10900 'HostPort': {'additionalProperties': False,
10901 'properties': {'Address': {'$ref': '#/definitions/Address'},
10902 'Port': {'type': 'integer'}},
10903 'required': ['Address', 'Port'],
10904 'type': 'object'},
10905 'InstanceInfo': {'additionalProperties': False,
10906 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
10907 'InstanceId': {'type': 'string'},
10908 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
10909 'type': 'array'},
10910 'Nonce': {'type': 'string'},
10911 'Tag': {'type': 'string'},
10912 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
10913 'type': 'object'},
10914 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
10915 'type': 'array'}},
10916 'required': ['Tag',
10917 'InstanceId',
10918 'Nonce',
10919 'Characteristics',
10920 'Volumes',
10921 'VolumeAttachments',
10922 'NetworkConfig'],
10923 'type': 'object'},
10924 'InstancesInfo': {'additionalProperties': False,
10925 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
10926 'type': 'array'}},
10927 'required': ['Machines'],
10928 'type': 'object'},
10929 'LifeResult': {'additionalProperties': False,
10930 'properties': {'Error': {'$ref': '#/definitions/Error'},
10931 'Life': {'type': 'string'}},
10932 'required': ['Life', 'Error'],
10933 'type': 'object'},
10934 'LifeResults': {'additionalProperties': False,
10935 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10936 'type': 'array'}},
10937 'required': ['Results'],
10938 'type': 'object'},
10939 'Macaroon': {'additionalProperties': False,
10940 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10941 'type': 'array'},
10942 'data': {'items': {'type': 'integer'},
10943 'type': 'array'},
10944 'id': {'$ref': '#/definitions/packet'},
10945 'location': {'$ref': '#/definitions/packet'},
10946 'sig': {'items': {'type': 'integer'},
10947 'type': 'array'}},
10948 'required': ['data',
10949 'location',
10950 'id',
10951 'caveats',
10952 'sig'],
10953 'type': 'object'},
10954 'MachineContainers': {'additionalProperties': False,
10955 'properties': {'ContainerTypes': {'items': {'type': 'string'},
10956 'type': 'array'},
10957 'MachineTag': {'type': 'string'}},
10958 'required': ['MachineTag',
10959 'ContainerTypes'],
10960 'type': 'object'},
10961 'MachineContainersParams': {'additionalProperties': False,
10962 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
10963 'type': 'array'}},
10964 'required': ['Params'],
10965 'type': 'object'},
10966 'MachineNetworkConfigResult': {'additionalProperties': False,
10967 'properties': {'Error': {'$ref': '#/definitions/Error'},
10968 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
10969 'type': 'array'}},
10970 'required': ['Error', 'Info'],
10971 'type': 'object'},
10972 'MachineNetworkConfigResults': {'additionalProperties': False,
10973 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
10974 'type': 'array'}},
10975 'required': ['Results'],
10976 'type': 'object'},
10977 'ModelConfigResult': {'additionalProperties': False,
10978 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10979 'type': 'object'}},
10980 'type': 'object'}},
10981 'required': ['Config'],
10982 'type': 'object'},
10983 'NetworkConfig': {'additionalProperties': False,
10984 'properties': {'Address': {'type': 'string'},
10985 'CIDR': {'type': 'string'},
10986 'ConfigType': {'type': 'string'},
10987 'DNSSearchDomains': {'items': {'type': 'string'},
10988 'type': 'array'},
10989 'DNSServers': {'items': {'type': 'string'},
10990 'type': 'array'},
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',
11007 'MACAddress',
11008 'CIDR',
11009 'MTU',
11010 'ProviderId',
11011 'ProviderSubnetId',
11012 'ProviderSpaceId',
11013 'ProviderAddressId',
11014 'ProviderVLANId',
11015 'VLANTag',
11016 'InterfaceName',
11017 'ParentInterfaceName',
11018 'InterfaceType',
11019 'Disabled'],
11020 'type': 'object'},
11021 'NotifyWatchResult': {'additionalProperties': False,
11022 'properties': {'Error': {'$ref': '#/definitions/Error'},
11023 'NotifyWatcherId': {'type': 'string'}},
11024 'required': ['NotifyWatcherId', 'Error'],
11025 'type': 'object'},
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',
11033 'Minor',
11034 'Tag',
11035 'Patch',
11036 'Build'],
11037 'type': 'object'},
11038 'ProvisioningInfo': {'additionalProperties': False,
11039 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
11040 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
11041 'type': 'object'},
11042 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
11043 'type': 'array'},
11044 'Jobs': {'items': {'type': 'string'},
11045 'type': 'array'},
11046 'Placement': {'type': 'string'},
11047 'Series': {'type': 'string'},
11048 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
11049 'type': 'array'}},
11050 'type': 'object'},
11051 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
11052 'type': 'object'},
11053 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
11054 'type': 'array'}},
11055 'required': ['Constraints',
11056 'Series',
11057 'Placement',
11058 'Jobs',
11059 'Volumes',
11060 'Tags',
11061 'SubnetsToZones',
11062 'ImageMetadata',
11063 'EndpointBindings'],
11064 'type': 'object'},
11065 'ProvisioningInfoResult': {'additionalProperties': False,
11066 'properties': {'Error': {'$ref': '#/definitions/Error'},
11067 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
11068 'required': ['Error', 'Result'],
11069 'type': 'object'},
11070 'ProvisioningInfoResults': {'additionalProperties': False,
11071 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
11072 'type': 'array'}},
11073 'required': ['Results'],
11074 'type': 'object'},
11075 'SetStatus': {'additionalProperties': False,
11076 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11077 'type': 'array'}},
11078 'required': ['Entities'],
11079 'type': 'object'},
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'],
11086 'type': 'object'},
11087 'StatusResult': {'additionalProperties': False,
11088 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11089 'type': 'object'}},
11090 'type': 'object'},
11091 'Error': {'$ref': '#/definitions/Error'},
11092 'Id': {'type': 'string'},
11093 'Info': {'type': 'string'},
11094 'Life': {'type': 'string'},
11095 'Since': {'format': 'date-time',
11096 'type': 'string'},
11097 'Status': {'type': 'string'}},
11098 'required': ['Error',
11099 'Id',
11100 'Life',
11101 'Status',
11102 'Info',
11103 'Data',
11104 'Since'],
11105 'type': 'object'},
11106 'StatusResults': {'additionalProperties': False,
11107 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
11108 'type': 'array'}},
11109 'required': ['Results'],
11110 'type': 'object'},
11111 'StringResult': {'additionalProperties': False,
11112 'properties': {'Error': {'$ref': '#/definitions/Error'},
11113 'Result': {'type': 'string'}},
11114 'required': ['Error', 'Result'],
11115 'type': 'object'},
11116 'StringResults': {'additionalProperties': False,
11117 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11118 'type': 'array'}},
11119 'required': ['Results'],
11120 'type': 'object'},
11121 'StringsResult': {'additionalProperties': False,
11122 'properties': {'Error': {'$ref': '#/definitions/Error'},
11123 'Result': {'items': {'type': 'string'},
11124 'type': 'array'}},
11125 'required': ['Error', 'Result'],
11126 'type': 'object'},
11127 'StringsWatchResult': {'additionalProperties': False,
11128 'properties': {'Changes': {'items': {'type': 'string'},
11129 'type': 'array'},
11130 'Error': {'$ref': '#/definitions/Error'},
11131 'StringsWatcherId': {'type': 'string'}},
11132 'required': ['StringsWatcherId',
11133 'Changes',
11134 'Error'],
11135 'type': 'object'},
11136 'StringsWatchResults': {'additionalProperties': False,
11137 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11138 'type': 'array'}},
11139 'required': ['Results'],
11140 'type': 'object'},
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'],
11147 'type': 'object'},
11148 'ToolsResult': {'additionalProperties': False,
11149 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
11150 'Error': {'$ref': '#/definitions/Error'},
11151 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
11152 'type': 'array'}},
11153 'required': ['ToolsList',
11154 'DisableSSLHostnameVerification',
11155 'Error'],
11156 'type': 'object'},
11157 'ToolsResults': {'additionalProperties': False,
11158 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
11159 'type': 'array'}},
11160 'required': ['Results'],
11161 'type': 'object'},
11162 'UpdateBehavior': {'additionalProperties': False,
11163 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
11164 'EnableOSUpgrade': {'type': 'boolean'}},
11165 'required': ['EnableOSRefreshUpdate',
11166 'EnableOSUpgrade'],
11167 'type': 'object'},
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'},
11177 'type': 'array'},
11178 'tags': {'items': {'type': 'string'},
11179 'type': 'array'},
11180 'virt-type': {'type': 'string'}},
11181 'type': 'object'},
11182 'Volume': {'additionalProperties': False,
11183 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
11184 'volumetag': {'type': 'string'}},
11185 'required': ['volumetag', 'info'],
11186 'type': 'object'},
11187 'VolumeAttachmentInfo': {'additionalProperties': False,
11188 'properties': {'busaddress': {'type': 'string'},
11189 'devicelink': {'type': 'string'},
11190 'devicename': {'type': 'string'},
11191 'read-only': {'type': 'boolean'}},
11192 'type': 'object'},
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',
11201 'machinetag',
11202 'provider'],
11203 'type': 'object'},
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'],
11210 'type': 'object'},
11211 'VolumeParams': {'additionalProperties': False,
11212 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
11213 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
11214 'type': 'object'}},
11215 'type': 'object'},
11216 'provider': {'type': 'string'},
11217 'size': {'type': 'integer'},
11218 'tags': {'patternProperties': {'.*': {'type': 'string'}},
11219 'type': 'object'},
11220 'volumetag': {'type': 'string'}},
11221 'required': ['volumetag', 'size', 'provider'],
11222 'type': 'object'},
11223 'WatchContainer': {'additionalProperties': False,
11224 'properties': {'ContainerType': {'type': 'string'},
11225 'MachineTag': {'type': 'string'}},
11226 'required': ['MachineTag', 'ContainerType'],
11227 'type': 'object'},
11228 'WatchContainers': {'additionalProperties': False,
11229 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
11230 'type': 'array'}},
11231 'required': ['Params'],
11232 'type': 'object'},
11233 'caveat': {'additionalProperties': False,
11234 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11235 'location': {'$ref': '#/definitions/packet'},
11236 'verificationId': {'$ref': '#/definitions/packet'}},
11237 'required': ['location',
11238 'caveatId',
11239 'verificationId'],
11240 'type': 'object'},
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'}},
11248 'type': 'object'},
11249 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
11250 'type': 'object'},
11251 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
11252 'type': 'object'},
11253 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11254 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
11255 'type': 'object'},
11256 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
11257 'type': 'object'},
11258 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
11259 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
11260 'type': 'object'},
11261 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11262 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
11263 'type': 'object'},
11264 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11265 'Result': {'$ref': '#/definitions/ErrorResults'}},
11266 'type': 'object'},
11267 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
11268 'Result': {'$ref': '#/definitions/FindToolsResult'}},
11269 'type': 'object'},
11270 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11271 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
11272 'type': 'object'},
11273 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11274 'Result': {'$ref': '#/definitions/StringResults'}},
11275 'type': 'object'},
11276 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11277 'Result': {'$ref': '#/definitions/StatusResults'}},
11278 'type': 'object'},
11279 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11280 'Result': {'$ref': '#/definitions/LifeResults'}},
11281 'type': 'object'},
11282 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
11283 'type': 'object'},
11284 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
11285 'type': 'object'},
11286 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
11287 'type': 'object'},
11288 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11289 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
11290 'type': 'object'},
11291 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11292 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
11293 'type': 'object'},
11294 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11295 'Result': {'$ref': '#/definitions/ErrorResults'}},
11296 'type': 'object'},
11297 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11298 'Result': {'$ref': '#/definitions/ErrorResults'}},
11299 'type': 'object'},
11300 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11301 'Result': {'$ref': '#/definitions/StringResults'}},
11302 'type': 'object'},
11303 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
11304 'Result': {'$ref': '#/definitions/ErrorResults'}},
11305 'type': 'object'},
11306 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11307 'Result': {'$ref': '#/definitions/ErrorResults'}},
11308 'type': 'object'},
11309 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
11310 'Result': {'$ref': '#/definitions/ErrorResults'}},
11311 'type': 'object'},
11312 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11313 'Result': {'$ref': '#/definitions/ErrorResults'}},
11314 'type': 'object'},
11315 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
11316 'Result': {'$ref': '#/definitions/ErrorResults'}},
11317 'type': 'object'},
11318 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11319 'type': 'object'},
11320 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11321 'Result': {'$ref': '#/definitions/StatusResults'}},
11322 'type': 'object'},
11323 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11324 'Result': {'$ref': '#/definitions/ToolsResults'}},
11325 'type': 'object'},
11326 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11327 'Result': {'$ref': '#/definitions/ErrorResults'}},
11328 'type': 'object'},
11329 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11330 'type': 'object'},
11331 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
11332 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11333 'type': 'object'},
11334 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
11335 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11336 'type': 'object'},
11337 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11338 'type': 'object'},
11339 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11340 'type': 'object'},
11341 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
11342 'type': 'object'}},
11343 'type': 'object'}
11344
11345
11346 #@ReturnMapping(StringsResult)
11347 async def APIAddresses(self):
11348 '''
11349
11350 Returns -> typing.Union[~Error, typing.Sequence[str]]
11351 '''
11352 # map input types to rpc msg
11353 params = dict()
11354 msg = dict(Type='Provisioner', Request='APIAddresses', Version=2, Params=params)
11355
11356 reply = await self.rpc(msg)
11357 return self._map(reply, APIAddresses)
11358
11359
11360
11361 #@ReturnMapping(APIHostPortsResult)
11362 async def APIHostPorts(self):
11363 '''
11364
11365 Returns -> typing.Sequence[~HostPort]
11366 '''
11367 # map input types to rpc msg
11368 params = dict()
11369 msg = dict(Type='Provisioner', Request='APIHostPorts', Version=2, Params=params)
11370
11371 reply = await self.rpc(msg)
11372 return self._map(reply, APIHostPorts)
11373
11374
11375
11376 #@ReturnMapping(BytesResult)
11377 async def CACert(self):
11378 '''
11379
11380 Returns -> typing.Sequence[int]
11381 '''
11382 # map input types to rpc msg
11383 params = dict()
11384 msg = dict(Type='Provisioner', Request='CACert', Version=2, Params=params)
11385
11386 reply = await self.rpc(msg)
11387 return self._map(reply, CACert)
11388
11389
11390
11391 #@ReturnMapping(ConstraintsResults)
11392 async def Constraints(self, entities):
11393 '''
11394 entities : typing.Sequence[~Entity]
11395 Returns -> typing.Sequence[~ConstraintsResult]
11396 '''
11397 # map input types to rpc msg
11398 params = dict()
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)
11403
11404
11405
11406 #@ReturnMapping(ContainerConfig)
11407 async def ContainerConfig(self):
11408 '''
11409
11410 Returns -> typing.Union[str, bool, ~Settings, ~UpdateBehavior]
11411 '''
11412 # map input types to rpc msg
11413 params = dict()
11414 msg = dict(Type='Provisioner', Request='ContainerConfig', Version=2, Params=params)
11415
11416 reply = await self.rpc(msg)
11417 return self._map(reply, ContainerConfig)
11418
11419
11420
11421 #@ReturnMapping(ContainerManagerConfig)
11422 async def ContainerManagerConfig(self, type_):
11423 '''
11424 type_ : str
11425 Returns -> typing.Mapping[str, str]
11426 '''
11427 # map input types to rpc msg
11428 params = dict()
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)
11433
11434
11435
11436 #@ReturnMapping(DistributionGroupResults)
11437 async def DistributionGroup(self, entities):
11438 '''
11439 entities : typing.Sequence[~Entity]
11440 Returns -> typing.Sequence[~DistributionGroupResult]
11441 '''
11442 # map input types to rpc msg
11443 params = dict()
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)
11448
11449
11450
11451 #@ReturnMapping(ErrorResults)
11452 async def EnsureDead(self, entities):
11453 '''
11454 entities : typing.Sequence[~Entity]
11455 Returns -> typing.Sequence[~ErrorResult]
11456 '''
11457 # map input types to rpc msg
11458 params = dict()
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)
11463
11464
11465
11466 #@ReturnMapping(FindToolsResult)
11467 async def FindTools(self, majorversion, series, minorversion, arch, number):
11468 '''
11469 majorversion : int
11470 series : str
11471 minorversion : int
11472 arch : str
11473 number : ~Number
11474 Returns -> typing.Union[~Error, typing.Sequence[~Tools]]
11475 '''
11476 # map input types to rpc msg
11477 params = dict()
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)
11486
11487
11488
11489 #@ReturnMapping(MachineNetworkConfigResults)
11490 async def GetContainerInterfaceInfo(self, entities):
11491 '''
11492 entities : typing.Sequence[~Entity]
11493 Returns -> typing.Sequence[~MachineNetworkConfigResult]
11494 '''
11495 # map input types to rpc msg
11496 params = dict()
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)
11501
11502
11503
11504 #@ReturnMapping(StringResults)
11505 async def InstanceId(self, entities):
11506 '''
11507 entities : typing.Sequence[~Entity]
11508 Returns -> typing.Sequence[~StringResult]
11509 '''
11510 # map input types to rpc msg
11511 params = dict()
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)
11516
11517
11518
11519 #@ReturnMapping(StatusResults)
11520 async def InstanceStatus(self, entities):
11521 '''
11522 entities : typing.Sequence[~Entity]
11523 Returns -> typing.Sequence[~StatusResult]
11524 '''
11525 # map input types to rpc msg
11526 params = dict()
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)
11531
11532
11533
11534 #@ReturnMapping(LifeResults)
11535 async def Life(self, entities):
11536 '''
11537 entities : typing.Sequence[~Entity]
11538 Returns -> typing.Sequence[~LifeResult]
11539 '''
11540 # map input types to rpc msg
11541 params = dict()
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)
11546
11547
11548
11549 #@ReturnMapping(StatusResults)
11550 async def MachinesWithTransientErrors(self):
11551 '''
11552
11553 Returns -> typing.Sequence[~StatusResult]
11554 '''
11555 # map input types to rpc msg
11556 params = dict()
11557 msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=2, Params=params)
11558
11559 reply = await self.rpc(msg)
11560 return self._map(reply, MachinesWithTransientErrors)
11561
11562
11563
11564 #@ReturnMapping(ModelConfigResult)
11565 async def ModelConfig(self):
11566 '''
11567
11568 Returns -> typing.Mapping[str, typing.Any]
11569 '''
11570 # map input types to rpc msg
11571 params = dict()
11572 msg = dict(Type='Provisioner', Request='ModelConfig', Version=2, Params=params)
11573
11574 reply = await self.rpc(msg)
11575 return self._map(reply, ModelConfig)
11576
11577
11578
11579 #@ReturnMapping(StringResult)
11580 async def ModelUUID(self):
11581 '''
11582
11583 Returns -> typing.Union[~Error, str]
11584 '''
11585 # map input types to rpc msg
11586 params = dict()
11587 msg = dict(Type='Provisioner', Request='ModelUUID', Version=2, Params=params)
11588
11589 reply = await self.rpc(msg)
11590 return self._map(reply, ModelUUID)
11591
11592
11593
11594 #@ReturnMapping(MachineNetworkConfigResults)
11595 async def PrepareContainerInterfaceInfo(self, entities):
11596 '''
11597 entities : typing.Sequence[~Entity]
11598 Returns -> typing.Sequence[~MachineNetworkConfigResult]
11599 '''
11600 # map input types to rpc msg
11601 params = dict()
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)
11606
11607
11608
11609 #@ReturnMapping(ProvisioningInfoResults)
11610 async def ProvisioningInfo(self, entities):
11611 '''
11612 entities : typing.Sequence[~Entity]
11613 Returns -> typing.Sequence[~ProvisioningInfoResult]
11614 '''
11615 # map input types to rpc msg
11616 params = dict()
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)
11621
11622
11623
11624 #@ReturnMapping(ErrorResults)
11625 async def ReleaseContainerAddresses(self, entities):
11626 '''
11627 entities : typing.Sequence[~Entity]
11628 Returns -> typing.Sequence[~ErrorResult]
11629 '''
11630 # map input types to rpc msg
11631 params = dict()
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)
11636
11637
11638
11639 #@ReturnMapping(ErrorResults)
11640 async def Remove(self, entities):
11641 '''
11642 entities : typing.Sequence[~Entity]
11643 Returns -> typing.Sequence[~ErrorResult]
11644 '''
11645 # map input types to rpc msg
11646 params = dict()
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)
11651
11652
11653
11654 #@ReturnMapping(StringResults)
11655 async def Series(self, entities):
11656 '''
11657 entities : typing.Sequence[~Entity]
11658 Returns -> typing.Sequence[~StringResult]
11659 '''
11660 # map input types to rpc msg
11661 params = dict()
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)
11666
11667
11668
11669 #@ReturnMapping(ErrorResults)
11670 async def SetInstanceInfo(self, machines):
11671 '''
11672 machines : typing.Sequence[~InstanceInfo]
11673 Returns -> typing.Sequence[~ErrorResult]
11674 '''
11675 # map input types to rpc msg
11676 params = dict()
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)
11681
11682
11683
11684 #@ReturnMapping(ErrorResults)
11685 async def SetInstanceStatus(self, entities):
11686 '''
11687 entities : typing.Sequence[~EntityStatusArgs]
11688 Returns -> typing.Sequence[~ErrorResult]
11689 '''
11690 # map input types to rpc msg
11691 params = dict()
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)
11696
11697
11698
11699 #@ReturnMapping(ErrorResults)
11700 async def SetPasswords(self, changes):
11701 '''
11702 changes : typing.Sequence[~EntityPassword]
11703 Returns -> typing.Sequence[~ErrorResult]
11704 '''
11705 # map input types to rpc msg
11706 params = dict()
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)
11711
11712
11713
11714 #@ReturnMapping(ErrorResults)
11715 async def SetStatus(self, entities):
11716 '''
11717 entities : typing.Sequence[~EntityStatusArgs]
11718 Returns -> typing.Sequence[~ErrorResult]
11719 '''
11720 # map input types to rpc msg
11721 params = dict()
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)
11726
11727
11728
11729 #@ReturnMapping(ErrorResults)
11730 async def SetSupportedContainers(self, params):
11731 '''
11732 params : typing.Sequence[~MachineContainers]
11733 Returns -> typing.Sequence[~ErrorResult]
11734 '''
11735 # map input types to rpc msg
11736 params = dict()
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)
11741
11742
11743
11744 #@ReturnMapping(StringsResult)
11745 async def StateAddresses(self):
11746 '''
11747
11748 Returns -> typing.Union[~Error, typing.Sequence[str]]
11749 '''
11750 # map input types to rpc msg
11751 params = dict()
11752 msg = dict(Type='Provisioner', Request='StateAddresses', Version=2, Params=params)
11753
11754 reply = await self.rpc(msg)
11755 return self._map(reply, StateAddresses)
11756
11757
11758
11759 #@ReturnMapping(StatusResults)
11760 async def Status(self, entities):
11761 '''
11762 entities : typing.Sequence[~Entity]
11763 Returns -> typing.Sequence[~StatusResult]
11764 '''
11765 # map input types to rpc msg
11766 params = dict()
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)
11771
11772
11773
11774 #@ReturnMapping(ToolsResults)
11775 async def Tools(self, entities):
11776 '''
11777 entities : typing.Sequence[~Entity]
11778 Returns -> typing.Sequence[~ToolsResult]
11779 '''
11780 # map input types to rpc msg
11781 params = dict()
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)
11786
11787
11788
11789 #@ReturnMapping(ErrorResults)
11790 async def UpdateStatus(self, entities):
11791 '''
11792 entities : typing.Sequence[~EntityStatusArgs]
11793 Returns -> typing.Sequence[~ErrorResult]
11794 '''
11795 # map input types to rpc msg
11796 params = dict()
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)
11801
11802
11803
11804 #@ReturnMapping(NotifyWatchResult)
11805 async def WatchAPIHostPorts(self):
11806 '''
11807
11808 Returns -> typing.Union[~Error, str]
11809 '''
11810 # map input types to rpc msg
11811 params = dict()
11812 msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=2, Params=params)
11813
11814 reply = await self.rpc(msg)
11815 return self._map(reply, WatchAPIHostPorts)
11816
11817
11818
11819 #@ReturnMapping(StringsWatchResults)
11820 async def WatchAllContainers(self, params):
11821 '''
11822 params : typing.Sequence[~WatchContainer]
11823 Returns -> typing.Sequence[~StringsWatchResult]
11824 '''
11825 # map input types to rpc msg
11826 params = dict()
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)
11831
11832
11833
11834 #@ReturnMapping(StringsWatchResults)
11835 async def WatchContainers(self, params):
11836 '''
11837 params : typing.Sequence[~WatchContainer]
11838 Returns -> typing.Sequence[~StringsWatchResult]
11839 '''
11840 # map input types to rpc msg
11841 params = dict()
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)
11846
11847
11848
11849 #@ReturnMapping(NotifyWatchResult)
11850 async def WatchForModelConfigChanges(self):
11851 '''
11852
11853 Returns -> typing.Union[~Error, str]
11854 '''
11855 # map input types to rpc msg
11856 params = dict()
11857 msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
11858
11859 reply = await self.rpc(msg)
11860 return self._map(reply, WatchForModelConfigChanges)
11861
11862
11863
11864 #@ReturnMapping(NotifyWatchResult)
11865 async def WatchMachineErrorRetry(self):
11866 '''
11867
11868 Returns -> typing.Union[~Error, str]
11869 '''
11870 # map input types to rpc msg
11871 params = dict()
11872 msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=2, Params=params)
11873
11874 reply = await self.rpc(msg)
11875 return self._map(reply, WatchMachineErrorRetry)
11876
11877
11878
11879 #@ReturnMapping(StringsWatchResult)
11880 async def WatchModelMachines(self):
11881 '''
11882
11883 Returns -> typing.Union[~Error, typing.Sequence[str]]
11884 '''
11885 # map input types to rpc msg
11886 params = dict()
11887 msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=2, Params=params)
11888
11889 reply = await self.rpc(msg)
11890 return self._map(reply, WatchModelMachines)
11891
11892
11893 class ProxyUpdater(Type):
11894 name = 'ProxyUpdater'
11895 version = 1
11896 schema = {'definitions': {'Entities': {'additionalProperties': False,
11897 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11898 'type': 'array'}},
11899 'required': ['Entities'],
11900 'type': 'object'},
11901 'Entity': {'additionalProperties': False,
11902 'properties': {'Tag': {'type': 'string'}},
11903 'required': ['Tag'],
11904 'type': 'object'},
11905 'Error': {'additionalProperties': False,
11906 'properties': {'Code': {'type': 'string'},
11907 'Info': {'$ref': '#/definitions/ErrorInfo'},
11908 'Message': {'type': 'string'}},
11909 'required': ['Message', 'Code'],
11910 'type': 'object'},
11911 'ErrorInfo': {'additionalProperties': False,
11912 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11913 'MacaroonPath': {'type': 'string'}},
11914 'type': 'object'},
11915 'Macaroon': {'additionalProperties': False,
11916 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11917 'type': 'array'},
11918 'data': {'items': {'type': 'integer'},
11919 'type': 'array'},
11920 'id': {'$ref': '#/definitions/packet'},
11921 'location': {'$ref': '#/definitions/packet'},
11922 'sig': {'items': {'type': 'integer'},
11923 'type': 'array'}},
11924 'required': ['data',
11925 'location',
11926 'id',
11927 'caveats',
11928 'sig'],
11929 'type': 'object'},
11930 'NotifyWatchResult': {'additionalProperties': False,
11931 'properties': {'Error': {'$ref': '#/definitions/Error'},
11932 'NotifyWatcherId': {'type': 'string'}},
11933 'required': ['NotifyWatcherId', 'Error'],
11934 'type': 'object'},
11935 'NotifyWatchResults': {'additionalProperties': False,
11936 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11937 'type': 'array'}},
11938 'required': ['Results'],
11939 'type': 'object'},
11940 'ProxyConfig': {'additionalProperties': False,
11941 'properties': {'FTP': {'type': 'string'},
11942 'HTTP': {'type': 'string'},
11943 'HTTPS': {'type': 'string'},
11944 'NoProxy': {'type': 'string'}},
11945 'required': ['HTTP',
11946 'HTTPS',
11947 'FTP',
11948 'NoProxy'],
11949 'type': 'object'},
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'],
11956 'type': 'object'},
11957 'ProxyConfigResults': {'additionalProperties': False,
11958 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
11959 'type': 'array'}},
11960 'required': ['Results'],
11961 'type': 'object'},
11962 'caveat': {'additionalProperties': False,
11963 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11964 'location': {'$ref': '#/definitions/packet'},
11965 'verificationId': {'$ref': '#/definitions/packet'}},
11966 'required': ['location',
11967 'caveatId',
11968 'verificationId'],
11969 'type': 'object'},
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'}},
11978 'type': 'object'},
11979 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11980 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11981 'type': 'object'}},
11982 'type': 'object'}
11983
11984
11985 #@ReturnMapping(ProxyConfigResults)
11986 async def ProxyConfig(self, entities):
11987 '''
11988 entities : typing.Sequence[~Entity]
11989 Returns -> typing.Sequence[~ProxyConfigResult]
11990 '''
11991 # map input types to rpc msg
11992 params = dict()
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)
11997
11998
11999
12000 #@ReturnMapping(NotifyWatchResults)
12001 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
12002 '''
12003 entities : typing.Sequence[~Entity]
12004 Returns -> typing.Sequence[~NotifyWatchResult]
12005 '''
12006 # map input types to rpc msg
12007 params = dict()
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)
12012
12013
12014 class Reboot(Type):
12015 name = 'Reboot'
12016 version = 2
12017 schema = {'definitions': {'Entities': {'additionalProperties': False,
12018 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12019 'type': 'array'}},
12020 'required': ['Entities'],
12021 'type': 'object'},
12022 'Entity': {'additionalProperties': False,
12023 'properties': {'Tag': {'type': 'string'}},
12024 'required': ['Tag'],
12025 'type': 'object'},
12026 'Error': {'additionalProperties': False,
12027 'properties': {'Code': {'type': 'string'},
12028 'Info': {'$ref': '#/definitions/ErrorInfo'},
12029 'Message': {'type': 'string'}},
12030 'required': ['Message', 'Code'],
12031 'type': 'object'},
12032 'ErrorInfo': {'additionalProperties': False,
12033 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12034 'MacaroonPath': {'type': 'string'}},
12035 'type': 'object'},
12036 'ErrorResult': {'additionalProperties': False,
12037 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12038 'required': ['Error'],
12039 'type': 'object'},
12040 'ErrorResults': {'additionalProperties': False,
12041 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12042 'type': 'array'}},
12043 'required': ['Results'],
12044 'type': 'object'},
12045 'Macaroon': {'additionalProperties': False,
12046 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12047 'type': 'array'},
12048 'data': {'items': {'type': 'integer'},
12049 'type': 'array'},
12050 'id': {'$ref': '#/definitions/packet'},
12051 'location': {'$ref': '#/definitions/packet'},
12052 'sig': {'items': {'type': 'integer'},
12053 'type': 'array'}},
12054 'required': ['data',
12055 'location',
12056 'id',
12057 'caveats',
12058 'sig'],
12059 'type': 'object'},
12060 'NotifyWatchResult': {'additionalProperties': False,
12061 'properties': {'Error': {'$ref': '#/definitions/Error'},
12062 'NotifyWatcherId': {'type': 'string'}},
12063 'required': ['NotifyWatcherId', 'Error'],
12064 'type': 'object'},
12065 'RebootActionResult': {'additionalProperties': False,
12066 'properties': {'error': {'$ref': '#/definitions/Error'},
12067 'result': {'type': 'string'}},
12068 'type': 'object'},
12069 'RebootActionResults': {'additionalProperties': False,
12070 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
12071 'type': 'array'}},
12072 'type': 'object'},
12073 'caveat': {'additionalProperties': False,
12074 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12075 'location': {'$ref': '#/definitions/packet'},
12076 'verificationId': {'$ref': '#/definitions/packet'}},
12077 'required': ['location',
12078 'caveatId',
12079 'verificationId'],
12080 'type': 'object'},
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'}},
12089 'type': 'object'},
12090 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12091 'Result': {'$ref': '#/definitions/RebootActionResults'}},
12092 'type': 'object'},
12093 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12094 'Result': {'$ref': '#/definitions/ErrorResults'}},
12095 'type': 'object'},
12096 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12097 'type': 'object'}},
12098 'type': 'object'}
12099
12100
12101 #@ReturnMapping(ErrorResults)
12102 async def ClearReboot(self, entities):
12103 '''
12104 entities : typing.Sequence[~Entity]
12105 Returns -> typing.Sequence[~ErrorResult]
12106 '''
12107 # map input types to rpc msg
12108 params = dict()
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)
12113
12114
12115
12116 #@ReturnMapping(RebootActionResults)
12117 async def GetRebootAction(self, entities):
12118 '''
12119 entities : typing.Sequence[~Entity]
12120 Returns -> typing.Sequence[~RebootActionResult]
12121 '''
12122 # map input types to rpc msg
12123 params = dict()
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)
12128
12129
12130
12131 #@ReturnMapping(ErrorResults)
12132 async def RequestReboot(self, entities):
12133 '''
12134 entities : typing.Sequence[~Entity]
12135 Returns -> typing.Sequence[~ErrorResult]
12136 '''
12137 # map input types to rpc msg
12138 params = dict()
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)
12143
12144
12145
12146 #@ReturnMapping(NotifyWatchResult)
12147 async def WatchForRebootEvent(self):
12148 '''
12149
12150 Returns -> typing.Union[~Error, str]
12151 '''
12152 # map input types to rpc msg
12153 params = dict()
12154 msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params)
12155
12156 reply = await self.rpc(msg)
12157 return self._map(reply, WatchForRebootEvent)
12158
12159
12160 class RelationUnitsWatcher(Type):
12161 name = 'RelationUnitsWatcher'
12162 version = 1
12163 schema = {'definitions': {'Error': {'additionalProperties': False,
12164 'properties': {'Code': {'type': 'string'},
12165 'Info': {'$ref': '#/definitions/ErrorInfo'},
12166 'Message': {'type': 'string'}},
12167 'required': ['Message', 'Code'],
12168 'type': 'object'},
12169 'ErrorInfo': {'additionalProperties': False,
12170 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12171 'MacaroonPath': {'type': 'string'}},
12172 'type': 'object'},
12173 'Macaroon': {'additionalProperties': False,
12174 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12175 'type': 'array'},
12176 'data': {'items': {'type': 'integer'},
12177 'type': 'array'},
12178 'id': {'$ref': '#/definitions/packet'},
12179 'location': {'$ref': '#/definitions/packet'},
12180 'sig': {'items': {'type': 'integer'},
12181 'type': 'array'}},
12182 'required': ['data',
12183 'location',
12184 'id',
12185 'caveats',
12186 'sig'],
12187 'type': 'object'},
12188 'RelationUnitsChange': {'additionalProperties': False,
12189 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
12190 'type': 'object'},
12191 'Departed': {'items': {'type': 'string'},
12192 'type': 'array'}},
12193 'required': ['Changed', 'Departed'],
12194 'type': 'object'},
12195 'RelationUnitsWatchResult': {'additionalProperties': False,
12196 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
12197 'Error': {'$ref': '#/definitions/Error'},
12198 'RelationUnitsWatcherId': {'type': 'string'}},
12199 'required': ['RelationUnitsWatcherId',
12200 'Changes',
12201 'Error'],
12202 'type': 'object'},
12203 'UnitSettings': {'additionalProperties': False,
12204 'properties': {'Version': {'type': 'integer'}},
12205 'required': ['Version'],
12206 'type': 'object'},
12207 'caveat': {'additionalProperties': False,
12208 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12209 'location': {'$ref': '#/definitions/packet'},
12210 'verificationId': {'$ref': '#/definitions/packet'}},
12211 'required': ['location',
12212 'caveatId',
12213 'verificationId'],
12214 'type': 'object'},
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'}},
12222 'type': 'object'},
12223 'Stop': {'type': 'object'}},
12224 'type': 'object'}
12225
12226
12227 #@ReturnMapping(RelationUnitsWatchResult)
12228 async def Next(self):
12229 '''
12230
12231 Returns -> typing.Union[~Error, str, ~RelationUnitsChange]
12232 '''
12233 # map input types to rpc msg
12234 params = dict()
12235 msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params)
12236
12237 reply = await self.rpc(msg)
12238 return self._map(reply, Next)
12239
12240
12241
12242 #@ReturnMapping(None)
12243 async def Stop(self):
12244 '''
12245
12246 Returns -> None
12247 '''
12248 # map input types to rpc msg
12249 params = dict()
12250 msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params)
12251
12252 reply = await self.rpc(msg)
12253 return self._map(reply, Stop)
12254
12255
12256 class Resumer(Type):
12257 name = 'Resumer'
12258 version = 2
12259 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
12260
12261
12262 #@ReturnMapping(None)
12263 async def ResumeTransactions(self):
12264 '''
12265
12266 Returns -> None
12267 '''
12268 # map input types to rpc msg
12269 params = dict()
12270 msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params)
12271
12272 reply = await self.rpc(msg)
12273 return self._map(reply, ResumeTransactions)
12274
12275
12276 class RetryStrategy(Type):
12277 name = 'RetryStrategy'
12278 version = 1
12279 schema = {'definitions': {'Entities': {'additionalProperties': False,
12280 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12281 'type': 'array'}},
12282 'required': ['Entities'],
12283 'type': 'object'},
12284 'Entity': {'additionalProperties': False,
12285 'properties': {'Tag': {'type': 'string'}},
12286 'required': ['Tag'],
12287 'type': 'object'},
12288 'Error': {'additionalProperties': False,
12289 'properties': {'Code': {'type': 'string'},
12290 'Info': {'$ref': '#/definitions/ErrorInfo'},
12291 'Message': {'type': 'string'}},
12292 'required': ['Message', 'Code'],
12293 'type': 'object'},
12294 'ErrorInfo': {'additionalProperties': False,
12295 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12296 'MacaroonPath': {'type': 'string'}},
12297 'type': 'object'},
12298 'Macaroon': {'additionalProperties': False,
12299 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12300 'type': 'array'},
12301 'data': {'items': {'type': 'integer'},
12302 'type': 'array'},
12303 'id': {'$ref': '#/definitions/packet'},
12304 'location': {'$ref': '#/definitions/packet'},
12305 'sig': {'items': {'type': 'integer'},
12306 'type': 'array'}},
12307 'required': ['data',
12308 'location',
12309 'id',
12310 'caveats',
12311 'sig'],
12312 'type': 'object'},
12313 'NotifyWatchResult': {'additionalProperties': False,
12314 'properties': {'Error': {'$ref': '#/definitions/Error'},
12315 'NotifyWatcherId': {'type': 'string'}},
12316 'required': ['NotifyWatcherId', 'Error'],
12317 'type': 'object'},
12318 'NotifyWatchResults': {'additionalProperties': False,
12319 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12320 'type': 'array'}},
12321 'required': ['Results'],
12322 'type': 'object'},
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',
12330 'MinRetryTime',
12331 'MaxRetryTime',
12332 'JitterRetryTime',
12333 'RetryTimeFactor'],
12334 'type': 'object'},
12335 'RetryStrategyResult': {'additionalProperties': False,
12336 'properties': {'Error': {'$ref': '#/definitions/Error'},
12337 'Result': {'$ref': '#/definitions/RetryStrategy'}},
12338 'required': ['Error', 'Result'],
12339 'type': 'object'},
12340 'RetryStrategyResults': {'additionalProperties': False,
12341 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
12342 'type': 'array'}},
12343 'required': ['Results'],
12344 'type': 'object'},
12345 'caveat': {'additionalProperties': False,
12346 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12347 'location': {'$ref': '#/definitions/packet'},
12348 'verificationId': {'$ref': '#/definitions/packet'}},
12349 'required': ['location',
12350 'caveatId',
12351 'verificationId'],
12352 'type': 'object'},
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'}},
12361 'type': 'object'},
12362 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12363 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12364 'type': 'object'}},
12365 'type': 'object'}
12366
12367
12368 #@ReturnMapping(RetryStrategyResults)
12369 async def RetryStrategy(self, entities):
12370 '''
12371 entities : typing.Sequence[~Entity]
12372 Returns -> typing.Sequence[~RetryStrategyResult]
12373 '''
12374 # map input types to rpc msg
12375 params = dict()
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)
12380
12381
12382
12383 #@ReturnMapping(NotifyWatchResults)
12384 async def WatchRetryStrategy(self, entities):
12385 '''
12386 entities : typing.Sequence[~Entity]
12387 Returns -> typing.Sequence[~NotifyWatchResult]
12388 '''
12389 # map input types to rpc msg
12390 params = dict()
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)
12395
12396
12397 class SSHClient(Type):
12398 name = 'SSHClient'
12399 version = 1
12400 schema = {'definitions': {'Entities': {'additionalProperties': False,
12401 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12402 'type': 'array'}},
12403 'required': ['Entities'],
12404 'type': 'object'},
12405 'Entity': {'additionalProperties': False,
12406 'properties': {'Tag': {'type': 'string'}},
12407 'required': ['Tag'],
12408 'type': 'object'},
12409 'Error': {'additionalProperties': False,
12410 'properties': {'Code': {'type': 'string'},
12411 'Info': {'$ref': '#/definitions/ErrorInfo'},
12412 'Message': {'type': 'string'}},
12413 'required': ['Message', 'Code'],
12414 'type': 'object'},
12415 'ErrorInfo': {'additionalProperties': False,
12416 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12417 'MacaroonPath': {'type': 'string'}},
12418 'type': 'object'},
12419 'Macaroon': {'additionalProperties': False,
12420 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12421 'type': 'array'},
12422 'data': {'items': {'type': 'integer'},
12423 'type': 'array'},
12424 'id': {'$ref': '#/definitions/packet'},
12425 'location': {'$ref': '#/definitions/packet'},
12426 'sig': {'items': {'type': 'integer'},
12427 'type': 'array'}},
12428 'required': ['data',
12429 'location',
12430 'id',
12431 'caveats',
12432 'sig'],
12433 'type': 'object'},
12434 'SSHAddressResult': {'additionalProperties': False,
12435 'properties': {'address': {'type': 'string'},
12436 'error': {'$ref': '#/definitions/Error'}},
12437 'type': 'object'},
12438 'SSHAddressResults': {'additionalProperties': False,
12439 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
12440 'type': 'array'}},
12441 'required': ['results'],
12442 'type': 'object'},
12443 'SSHProxyResult': {'additionalProperties': False,
12444 'properties': {'use-proxy': {'type': 'boolean'}},
12445 'required': ['use-proxy'],
12446 'type': 'object'},
12447 'SSHPublicKeysResult': {'additionalProperties': False,
12448 'properties': {'error': {'$ref': '#/definitions/Error'},
12449 'public-keys': {'items': {'type': 'string'},
12450 'type': 'array'}},
12451 'type': 'object'},
12452 'SSHPublicKeysResults': {'additionalProperties': False,
12453 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
12454 'type': 'array'}},
12455 'required': ['results'],
12456 'type': 'object'},
12457 'caveat': {'additionalProperties': False,
12458 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12459 'location': {'$ref': '#/definitions/packet'},
12460 'verificationId': {'$ref': '#/definitions/packet'}},
12461 'required': ['location',
12462 'caveatId',
12463 'verificationId'],
12464 'type': 'object'},
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'}},
12473 'type': 'object'},
12474 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
12475 'type': 'object'},
12476 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12477 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
12478 'type': 'object'},
12479 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12480 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
12481 'type': 'object'}},
12482 'type': 'object'}
12483
12484
12485 #@ReturnMapping(SSHAddressResults)
12486 async def PrivateAddress(self, entities):
12487 '''
12488 entities : typing.Sequence[~Entity]
12489 Returns -> typing.Sequence[~SSHAddressResult]
12490 '''
12491 # map input types to rpc msg
12492 params = dict()
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)
12497
12498
12499
12500 #@ReturnMapping(SSHProxyResult)
12501 async def Proxy(self):
12502 '''
12503
12504 Returns -> bool
12505 '''
12506 # map input types to rpc msg
12507 params = dict()
12508 msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params)
12509
12510 reply = await self.rpc(msg)
12511 return self._map(reply, Proxy)
12512
12513
12514
12515 #@ReturnMapping(SSHAddressResults)
12516 async def PublicAddress(self, entities):
12517 '''
12518 entities : typing.Sequence[~Entity]
12519 Returns -> typing.Sequence[~SSHAddressResult]
12520 '''
12521 # map input types to rpc msg
12522 params = dict()
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)
12527
12528
12529
12530 #@ReturnMapping(SSHPublicKeysResults)
12531 async def PublicKeys(self, entities):
12532 '''
12533 entities : typing.Sequence[~Entity]
12534 Returns -> typing.Sequence[~SSHPublicKeysResult]
12535 '''
12536 # map input types to rpc msg
12537 params = dict()
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)
12542
12543
12544 class Service(Type):
12545 name = 'Service'
12546 version = 3
12547 schema = {'definitions': {'AddRelation': {'additionalProperties': False,
12548 'properties': {'Endpoints': {'items': {'type': 'string'},
12549 'type': 'array'}},
12550 'required': ['Endpoints'],
12551 'type': 'object'},
12552 'AddRelationResults': {'additionalProperties': False,
12553 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
12554 'type': 'object'}},
12555 'required': ['Endpoints'],
12556 'type': 'object'},
12557 'AddServiceUnits': {'additionalProperties': False,
12558 'properties': {'NumUnits': {'type': 'integer'},
12559 'Placement': {'items': {'$ref': '#/definitions/Placement'},
12560 'type': 'array'},
12561 'ServiceName': {'type': 'string'}},
12562 'required': ['ServiceName',
12563 'NumUnits',
12564 'Placement'],
12565 'type': 'object'},
12566 'AddServiceUnitsResults': {'additionalProperties': False,
12567 'properties': {'Units': {'items': {'type': 'string'},
12568 'type': 'array'}},
12569 'required': ['Units'],
12570 'type': 'object'},
12571 'Constraints': {'additionalProperties': False,
12572 'properties': {'Count': {'type': 'integer'},
12573 'Pool': {'type': 'string'},
12574 'Size': {'type': 'integer'}},
12575 'required': ['Pool', 'Size', 'Count'],
12576 'type': 'object'},
12577 'DestroyRelation': {'additionalProperties': False,
12578 'properties': {'Endpoints': {'items': {'type': 'string'},
12579 'type': 'array'}},
12580 'required': ['Endpoints'],
12581 'type': 'object'},
12582 'DestroyServiceUnits': {'additionalProperties': False,
12583 'properties': {'UnitNames': {'items': {'type': 'string'},
12584 'type': 'array'}},
12585 'required': ['UnitNames'],
12586 'type': 'object'},
12587 'Error': {'additionalProperties': False,
12588 'properties': {'Code': {'type': 'string'},
12589 'Info': {'$ref': '#/definitions/ErrorInfo'},
12590 'Message': {'type': 'string'}},
12591 'required': ['Message', 'Code'],
12592 'type': 'object'},
12593 'ErrorInfo': {'additionalProperties': False,
12594 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12595 'MacaroonPath': {'type': 'string'}},
12596 'type': 'object'},
12597 'ErrorResult': {'additionalProperties': False,
12598 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12599 'required': ['Error'],
12600 'type': 'object'},
12601 'ErrorResults': {'additionalProperties': False,
12602 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12603 'type': 'array'}},
12604 'required': ['Results'],
12605 'type': 'object'},
12606 'GetConstraintsResults': {'additionalProperties': False,
12607 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
12608 'required': ['Constraints'],
12609 'type': 'object'},
12610 'GetServiceConstraints': {'additionalProperties': False,
12611 'properties': {'ServiceName': {'type': 'string'}},
12612 'required': ['ServiceName'],
12613 'type': 'object'},
12614 'Macaroon': {'additionalProperties': False,
12615 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12616 'type': 'array'},
12617 'data': {'items': {'type': 'integer'},
12618 'type': 'array'},
12619 'id': {'$ref': '#/definitions/packet'},
12620 'location': {'$ref': '#/definitions/packet'},
12621 'sig': {'items': {'type': 'integer'},
12622 'type': 'array'}},
12623 'required': ['data',
12624 'location',
12625 'id',
12626 'caveats',
12627 'sig'],
12628 'type': 'object'},
12629 'Placement': {'additionalProperties': False,
12630 'properties': {'Directive': {'type': 'string'},
12631 'Scope': {'type': 'string'}},
12632 'required': ['Scope', 'Directive'],
12633 'type': 'object'},
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',
12642 'Role',
12643 'Interface',
12644 'Optional',
12645 'Limit',
12646 'Scope'],
12647 'type': 'object'},
12648 'ServiceCharmRelations': {'additionalProperties': False,
12649 'properties': {'ServiceName': {'type': 'string'}},
12650 'required': ['ServiceName'],
12651 'type': 'object'},
12652 'ServiceCharmRelationsResults': {'additionalProperties': False,
12653 'properties': {'CharmRelations': {'items': {'type': 'string'},
12654 'type': 'array'}},
12655 'required': ['CharmRelations'],
12656 'type': 'object'},
12657 'ServiceDeploy': {'additionalProperties': False,
12658 'properties': {'Channel': {'type': 'string'},
12659 'CharmUrl': {'type': 'string'},
12660 'Config': {'patternProperties': {'.*': {'type': 'string'}},
12661 'type': 'object'},
12662 'ConfigYAML': {'type': 'string'},
12663 'Constraints': {'$ref': '#/definitions/Value'},
12664 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
12665 'type': 'object'},
12666 'NumUnits': {'type': 'integer'},
12667 'Placement': {'items': {'$ref': '#/definitions/Placement'},
12668 'type': 'array'},
12669 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
12670 'type': 'object'},
12671 'Series': {'type': 'string'},
12672 'ServiceName': {'type': 'string'},
12673 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
12674 'type': 'object'}},
12675 'required': ['ServiceName',
12676 'Series',
12677 'CharmUrl',
12678 'Channel',
12679 'NumUnits',
12680 'Config',
12681 'ConfigYAML',
12682 'Constraints',
12683 'Placement',
12684 'Storage',
12685 'EndpointBindings',
12686 'Resources'],
12687 'type': 'object'},
12688 'ServiceDestroy': {'additionalProperties': False,
12689 'properties': {'ServiceName': {'type': 'string'}},
12690 'required': ['ServiceName'],
12691 'type': 'object'},
12692 'ServiceExpose': {'additionalProperties': False,
12693 'properties': {'ServiceName': {'type': 'string'}},
12694 'required': ['ServiceName'],
12695 'type': 'object'},
12696 'ServiceGet': {'additionalProperties': False,
12697 'properties': {'ServiceName': {'type': 'string'}},
12698 'required': ['ServiceName'],
12699 'type': 'object'},
12700 'ServiceGetResults': {'additionalProperties': False,
12701 'properties': {'Charm': {'type': 'string'},
12702 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12703 'type': 'object'}},
12704 'type': 'object'},
12705 'Constraints': {'$ref': '#/definitions/Value'},
12706 'Service': {'type': 'string'}},
12707 'required': ['Service',
12708 'Charm',
12709 'Config',
12710 'Constraints'],
12711 'type': 'object'},
12712 'ServiceMetricCredential': {'additionalProperties': False,
12713 'properties': {'MetricCredentials': {'items': {'type': 'integer'},
12714 'type': 'array'},
12715 'ServiceName': {'type': 'string'}},
12716 'required': ['ServiceName',
12717 'MetricCredentials'],
12718 'type': 'object'},
12719 'ServiceMetricCredentials': {'additionalProperties': False,
12720 'properties': {'Creds': {'items': {'$ref': '#/definitions/ServiceMetricCredential'},
12721 'type': 'array'}},
12722 'required': ['Creds'],
12723 'type': 'object'},
12724 'ServiceSet': {'additionalProperties': False,
12725 'properties': {'Options': {'patternProperties': {'.*': {'type': 'string'}},
12726 'type': 'object'},
12727 'ServiceName': {'type': 'string'}},
12728 'required': ['ServiceName', 'Options'],
12729 'type': 'object'},
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'}},
12736 'type': 'object'},
12737 'servicename': {'type': 'string'}},
12738 'required': ['servicename',
12739 'charmurl',
12740 'cs-channel',
12741 'forceunits',
12742 'forceseries',
12743 'resourceids'],
12744 'type': 'object'},
12745 'ServiceUnexpose': {'additionalProperties': False,
12746 'properties': {'ServiceName': {'type': 'string'}},
12747 'required': ['ServiceName'],
12748 'type': 'object'},
12749 'ServiceUnset': {'additionalProperties': False,
12750 'properties': {'Options': {'items': {'type': 'string'},
12751 'type': 'array'},
12752 'ServiceName': {'type': 'string'}},
12753 'required': ['ServiceName', 'Options'],
12754 'type': 'object'},
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'}},
12763 'type': 'object'},
12764 'SettingsYAML': {'type': 'string'}},
12765 'required': ['ServiceName',
12766 'CharmUrl',
12767 'ForceCharmUrl',
12768 'ForceSeries',
12769 'MinUnits',
12770 'SettingsStrings',
12771 'SettingsYAML',
12772 'Constraints'],
12773 'type': 'object'},
12774 'ServicesDeploy': {'additionalProperties': False,
12775 'properties': {'Services': {'items': {'$ref': '#/definitions/ServiceDeploy'},
12776 'type': 'array'}},
12777 'required': ['Services'],
12778 'type': 'object'},
12779 'SetConstraints': {'additionalProperties': False,
12780 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
12781 'ServiceName': {'type': 'string'}},
12782 'required': ['ServiceName', 'Constraints'],
12783 'type': 'object'},
12784 'StringResult': {'additionalProperties': False,
12785 'properties': {'Error': {'$ref': '#/definitions/Error'},
12786 'Result': {'type': 'string'}},
12787 'required': ['Error', 'Result'],
12788 'type': 'object'},
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'},
12798 'type': 'array'},
12799 'tags': {'items': {'type': 'string'},
12800 'type': 'array'},
12801 'virt-type': {'type': 'string'}},
12802 'type': 'object'},
12803 'caveat': {'additionalProperties': False,
12804 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12805 'location': {'$ref': '#/definitions/packet'},
12806 'verificationId': {'$ref': '#/definitions/packet'}},
12807 'required': ['location',
12808 'caveatId',
12809 'verificationId'],
12810 'type': 'object'},
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'}},
12819 'type': 'object'},
12820 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddServiceUnits'},
12821 'Result': {'$ref': '#/definitions/AddServiceUnitsResults'}},
12822 'type': 'object'},
12823 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ServiceCharmRelations'},
12824 'Result': {'$ref': '#/definitions/ServiceCharmRelationsResults'}},
12825 'type': 'object'},
12826 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ServicesDeploy'},
12827 'Result': {'$ref': '#/definitions/ErrorResults'}},
12828 'type': 'object'},
12829 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ServiceDestroy'}},
12830 'type': 'object'},
12831 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
12832 'type': 'object'},
12833 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyServiceUnits'}},
12834 'type': 'object'},
12835 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ServiceExpose'}},
12836 'type': 'object'},
12837 'Get': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
12838 'Result': {'$ref': '#/definitions/ServiceGetResults'}},
12839 'type': 'object'},
12840 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
12841 'Result': {'$ref': '#/definitions/StringResult'}},
12842 'type': 'object'},
12843 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetServiceConstraints'},
12844 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
12845 'type': 'object'},
12846 'Set': {'properties': {'Params': {'$ref': '#/definitions/ServiceSet'}},
12847 'type': 'object'},
12848 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ServiceSetCharm'}},
12849 'type': 'object'},
12850 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
12851 'type': 'object'},
12852 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ServiceMetricCredentials'},
12853 'Result': {'$ref': '#/definitions/ErrorResults'}},
12854 'type': 'object'},
12855 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnexpose'}},
12856 'type': 'object'},
12857 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnset'}},
12858 'type': 'object'},
12859 'Update': {'properties': {'Params': {'$ref': '#/definitions/ServiceUpdate'}},
12860 'type': 'object'}},
12861 'type': 'object'}
12862
12863
12864 #@ReturnMapping(AddRelationResults)
12865 async def AddRelation(self, endpoints):
12866 '''
12867 endpoints : typing.Sequence[str]
12868 Returns -> typing.Mapping[str, ~Relation]
12869 '''
12870 # map input types to rpc msg
12871 params = dict()
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)
12876
12877
12878
12879 #@ReturnMapping(AddServiceUnitsResults)
12880 async def AddUnits(self, numunits, placement, servicename):
12881 '''
12882 numunits : int
12883 placement : typing.Sequence[~Placement]
12884 servicename : str
12885 Returns -> typing.Sequence[str]
12886 '''
12887 # map input types to rpc msg
12888 params = dict()
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)
12895
12896
12897
12898 #@ReturnMapping(ServiceCharmRelationsResults)
12899 async def CharmRelations(self, servicename):
12900 '''
12901 servicename : str
12902 Returns -> typing.Sequence[str]
12903 '''
12904 # map input types to rpc msg
12905 params = dict()
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)
12910
12911
12912
12913 #@ReturnMapping(ErrorResults)
12914 async def Deploy(self, services):
12915 '''
12916 services : typing.Sequence[~ServiceDeploy]
12917 Returns -> typing.Sequence[~ErrorResult]
12918 '''
12919 # map input types to rpc msg
12920 params = dict()
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)
12925
12926
12927
12928 #@ReturnMapping(None)
12929 async def Destroy(self, servicename):
12930 '''
12931 servicename : str
12932 Returns -> None
12933 '''
12934 # map input types to rpc msg
12935 params = dict()
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)
12940
12941
12942
12943 #@ReturnMapping(None)
12944 async def DestroyRelation(self, endpoints):
12945 '''
12946 endpoints : typing.Sequence[str]
12947 Returns -> None
12948 '''
12949 # map input types to rpc msg
12950 params = dict()
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)
12955
12956
12957
12958 #@ReturnMapping(None)
12959 async def DestroyUnits(self, unitnames):
12960 '''
12961 unitnames : typing.Sequence[str]
12962 Returns -> None
12963 '''
12964 # map input types to rpc msg
12965 params = dict()
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)
12970
12971
12972
12973 #@ReturnMapping(None)
12974 async def Expose(self, servicename):
12975 '''
12976 servicename : str
12977 Returns -> None
12978 '''
12979 # map input types to rpc msg
12980 params = dict()
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)
12985
12986
12987
12988 #@ReturnMapping(ServiceGetResults)
12989 async def Get(self, servicename):
12990 '''
12991 servicename : str
12992 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], ~Value]
12993 '''
12994 # map input types to rpc msg
12995 params = dict()
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)
13000
13001
13002
13003 #@ReturnMapping(StringResult)
13004 async def GetCharmURL(self, servicename):
13005 '''
13006 servicename : str
13007 Returns -> typing.Union[~Error, str]
13008 '''
13009 # map input types to rpc msg
13010 params = dict()
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)
13015
13016
13017
13018 #@ReturnMapping(GetConstraintsResults)
13019 async def GetConstraints(self, servicename):
13020 '''
13021 servicename : str
13022 Returns -> ~Value
13023 '''
13024 # map input types to rpc msg
13025 params = dict()
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)
13030
13031
13032
13033 #@ReturnMapping(None)
13034 async def Set(self, options, servicename):
13035 '''
13036 options : typing.Mapping[str, str]
13037 servicename : str
13038 Returns -> None
13039 '''
13040 # map input types to rpc msg
13041 params = dict()
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)
13047
13048
13049
13050 #@ReturnMapping(None)
13051 async def SetCharm(self, resourceids, charmurl, forceunits, cs_channel, servicename, forceseries):
13052 '''
13053 resourceids : typing.Mapping[str, str]
13054 charmurl : str
13055 forceunits : bool
13056 cs_channel : str
13057 servicename : str
13058 forceseries : bool
13059 Returns -> None
13060 '''
13061 # map input types to rpc msg
13062 params = dict()
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)
13072
13073
13074
13075 #@ReturnMapping(None)
13076 async def SetConstraints(self, constraints, servicename):
13077 '''
13078 constraints : ~Value
13079 servicename : str
13080 Returns -> None
13081 '''
13082 # map input types to rpc msg
13083 params = dict()
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)
13089
13090
13091
13092 #@ReturnMapping(ErrorResults)
13093 async def SetMetricCredentials(self, creds):
13094 '''
13095 creds : typing.Sequence[~ServiceMetricCredential]
13096 Returns -> typing.Sequence[~ErrorResult]
13097 '''
13098 # map input types to rpc msg
13099 params = dict()
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)
13104
13105
13106
13107 #@ReturnMapping(None)
13108 async def Unexpose(self, servicename):
13109 '''
13110 servicename : str
13111 Returns -> None
13112 '''
13113 # map input types to rpc msg
13114 params = dict()
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)
13119
13120
13121
13122 #@ReturnMapping(None)
13123 async def Unset(self, options, servicename):
13124 '''
13125 options : typing.Sequence[str]
13126 servicename : str
13127 Returns -> None
13128 '''
13129 # map input types to rpc msg
13130 params = dict()
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)
13136
13137
13138
13139 #@ReturnMapping(None)
13140 async def Update(self, forceseries, charmurl, settingsstrings, settingsyaml, constraints, servicename, minunits, forcecharmurl):
13141 '''
13142 forceseries : bool
13143 charmurl : str
13144 settingsstrings : typing.Mapping[str, str]
13145 settingsyaml : str
13146 constraints : ~Value
13147 servicename : str
13148 minunits : int
13149 forcecharmurl : bool
13150 Returns -> None
13151 '''
13152 # map input types to rpc msg
13153 params = dict()
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)
13165
13166
13167 class ServiceScaler(Type):
13168 name = 'ServiceScaler'
13169 version = 1
13170 schema = {'definitions': {'Entities': {'additionalProperties': False,
13171 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13172 'type': 'array'}},
13173 'required': ['Entities'],
13174 'type': 'object'},
13175 'Entity': {'additionalProperties': False,
13176 'properties': {'Tag': {'type': 'string'}},
13177 'required': ['Tag'],
13178 'type': 'object'},
13179 'Error': {'additionalProperties': False,
13180 'properties': {'Code': {'type': 'string'},
13181 'Info': {'$ref': '#/definitions/ErrorInfo'},
13182 'Message': {'type': 'string'}},
13183 'required': ['Message', 'Code'],
13184 'type': 'object'},
13185 'ErrorInfo': {'additionalProperties': False,
13186 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13187 'MacaroonPath': {'type': 'string'}},
13188 'type': 'object'},
13189 'ErrorResult': {'additionalProperties': False,
13190 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13191 'required': ['Error'],
13192 'type': 'object'},
13193 'ErrorResults': {'additionalProperties': False,
13194 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13195 'type': 'array'}},
13196 'required': ['Results'],
13197 'type': 'object'},
13198 'Macaroon': {'additionalProperties': False,
13199 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13200 'type': 'array'},
13201 'data': {'items': {'type': 'integer'},
13202 'type': 'array'},
13203 'id': {'$ref': '#/definitions/packet'},
13204 'location': {'$ref': '#/definitions/packet'},
13205 'sig': {'items': {'type': 'integer'},
13206 'type': 'array'}},
13207 'required': ['data',
13208 'location',
13209 'id',
13210 'caveats',
13211 'sig'],
13212 'type': 'object'},
13213 'StringsWatchResult': {'additionalProperties': False,
13214 'properties': {'Changes': {'items': {'type': 'string'},
13215 'type': 'array'},
13216 'Error': {'$ref': '#/definitions/Error'},
13217 'StringsWatcherId': {'type': 'string'}},
13218 'required': ['StringsWatcherId',
13219 'Changes',
13220 'Error'],
13221 'type': 'object'},
13222 'caveat': {'additionalProperties': False,
13223 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13224 'location': {'$ref': '#/definitions/packet'},
13225 'verificationId': {'$ref': '#/definitions/packet'}},
13226 'required': ['location',
13227 'caveatId',
13228 'verificationId'],
13229 'type': 'object'},
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'}},
13238 'type': 'object'},
13239 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
13240 'type': 'object'}},
13241 'type': 'object'}
13242
13243
13244 #@ReturnMapping(ErrorResults)
13245 async def Rescale(self, entities):
13246 '''
13247 entities : typing.Sequence[~Entity]
13248 Returns -> typing.Sequence[~ErrorResult]
13249 '''
13250 # map input types to rpc msg
13251 params = dict()
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)
13256
13257
13258
13259 #@ReturnMapping(StringsWatchResult)
13260 async def Watch(self):
13261 '''
13262
13263 Returns -> typing.Union[~Error, typing.Sequence[str]]
13264 '''
13265 # map input types to rpc msg
13266 params = dict()
13267 msg = dict(Type='ServiceScaler', Request='Watch', Version=1, Params=params)
13268
13269 reply = await self.rpc(msg)
13270 return self._map(reply, Watch)
13271
13272
13273 class Singular(Type):
13274 name = 'Singular'
13275 version = 1
13276 schema = {'definitions': {'Entities': {'additionalProperties': False,
13277 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13278 'type': 'array'}},
13279 'required': ['Entities'],
13280 'type': 'object'},
13281 'Entity': {'additionalProperties': False,
13282 'properties': {'Tag': {'type': 'string'}},
13283 'required': ['Tag'],
13284 'type': 'object'},
13285 'Error': {'additionalProperties': False,
13286 'properties': {'Code': {'type': 'string'},
13287 'Info': {'$ref': '#/definitions/ErrorInfo'},
13288 'Message': {'type': 'string'}},
13289 'required': ['Message', 'Code'],
13290 'type': 'object'},
13291 'ErrorInfo': {'additionalProperties': False,
13292 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13293 'MacaroonPath': {'type': 'string'}},
13294 'type': 'object'},
13295 'ErrorResult': {'additionalProperties': False,
13296 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13297 'required': ['Error'],
13298 'type': 'object'},
13299 'ErrorResults': {'additionalProperties': False,
13300 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13301 'type': 'array'}},
13302 'required': ['Results'],
13303 'type': 'object'},
13304 'Macaroon': {'additionalProperties': False,
13305 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13306 'type': 'array'},
13307 'data': {'items': {'type': 'integer'},
13308 'type': 'array'},
13309 'id': {'$ref': '#/definitions/packet'},
13310 'location': {'$ref': '#/definitions/packet'},
13311 'sig': {'items': {'type': 'integer'},
13312 'type': 'array'}},
13313 'required': ['data',
13314 'location',
13315 'id',
13316 'caveats',
13317 'sig'],
13318 'type': 'object'},
13319 'SingularClaim': {'additionalProperties': False,
13320 'properties': {'ControllerTag': {'type': 'string'},
13321 'Duration': {'type': 'integer'},
13322 'ModelTag': {'type': 'string'}},
13323 'required': ['ModelTag',
13324 'ControllerTag',
13325 'Duration'],
13326 'type': 'object'},
13327 'SingularClaims': {'additionalProperties': False,
13328 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
13329 'type': 'array'}},
13330 'required': ['Claims'],
13331 'type': 'object'},
13332 'caveat': {'additionalProperties': False,
13333 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13334 'location': {'$ref': '#/definitions/packet'},
13335 'verificationId': {'$ref': '#/definitions/packet'}},
13336 'required': ['location',
13337 'caveatId',
13338 'verificationId'],
13339 'type': 'object'},
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'}},
13348 'type': 'object'},
13349 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13350 'Result': {'$ref': '#/definitions/ErrorResults'}},
13351 'type': 'object'}},
13352 'type': 'object'}
13353
13354
13355 #@ReturnMapping(ErrorResults)
13356 async def Claim(self, claims):
13357 '''
13358 claims : typing.Sequence[~SingularClaim]
13359 Returns -> typing.Sequence[~ErrorResult]
13360 '''
13361 # map input types to rpc msg
13362 params = dict()
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)
13367
13368
13369
13370 #@ReturnMapping(ErrorResults)
13371 async def Wait(self, entities):
13372 '''
13373 entities : typing.Sequence[~Entity]
13374 Returns -> typing.Sequence[~ErrorResult]
13375 '''
13376 # map input types to rpc msg
13377 params = dict()
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)
13382
13383
13384 class Spaces(Type):
13385 name = 'Spaces'
13386 version = 2
13387 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
13388 'properties': {'ProviderId': {'type': 'string'},
13389 'Public': {'type': 'boolean'},
13390 'SpaceTag': {'type': 'string'},
13391 'SubnetTags': {'items': {'type': 'string'},
13392 'type': 'array'}},
13393 'required': ['SubnetTags',
13394 'SpaceTag',
13395 'Public'],
13396 'type': 'object'},
13397 'CreateSpacesParams': {'additionalProperties': False,
13398 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
13399 'type': 'array'}},
13400 'required': ['Spaces'],
13401 'type': 'object'},
13402 'Error': {'additionalProperties': False,
13403 'properties': {'Code': {'type': 'string'},
13404 'Info': {'$ref': '#/definitions/ErrorInfo'},
13405 'Message': {'type': 'string'}},
13406 'required': ['Message', 'Code'],
13407 'type': 'object'},
13408 'ErrorInfo': {'additionalProperties': False,
13409 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13410 'MacaroonPath': {'type': 'string'}},
13411 'type': 'object'},
13412 'ErrorResult': {'additionalProperties': False,
13413 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13414 'required': ['Error'],
13415 'type': 'object'},
13416 'ErrorResults': {'additionalProperties': False,
13417 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13418 'type': 'array'}},
13419 'required': ['Results'],
13420 'type': 'object'},
13421 'ListSpacesResults': {'additionalProperties': False,
13422 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
13423 'type': 'array'}},
13424 'required': ['Results'],
13425 'type': 'object'},
13426 'Macaroon': {'additionalProperties': False,
13427 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13428 'type': 'array'},
13429 'data': {'items': {'type': 'integer'},
13430 'type': 'array'},
13431 'id': {'$ref': '#/definitions/packet'},
13432 'location': {'$ref': '#/definitions/packet'},
13433 'sig': {'items': {'type': 'integer'},
13434 'type': 'array'}},
13435 'required': ['data',
13436 'location',
13437 'id',
13438 'caveats',
13439 'sig'],
13440 'type': 'object'},
13441 'Space': {'additionalProperties': False,
13442 'properties': {'Error': {'$ref': '#/definitions/Error'},
13443 'Name': {'type': 'string'},
13444 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
13445 'type': 'array'}},
13446 'required': ['Name', 'Subnets'],
13447 'type': 'object'},
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'},
13454 'type': 'array'},
13455 'StaticRangeLowIP': {'items': {'type': 'integer'},
13456 'type': 'array'},
13457 'Status': {'type': 'string'},
13458 'VLANTag': {'type': 'integer'},
13459 'Zones': {'items': {'type': 'string'},
13460 'type': 'array'}},
13461 'required': ['CIDR',
13462 'VLANTag',
13463 'Life',
13464 'SpaceTag',
13465 'Zones'],
13466 'type': 'object'},
13467 'caveat': {'additionalProperties': False,
13468 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13469 'location': {'$ref': '#/definitions/packet'},
13470 'verificationId': {'$ref': '#/definitions/packet'}},
13471 'required': ['location',
13472 'caveatId',
13473 'verificationId'],
13474 'type': 'object'},
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'}},
13483 'type': 'object'},
13484 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
13485 'type': 'object'}},
13486 'type': 'object'}
13487
13488
13489 #@ReturnMapping(ErrorResults)
13490 async def CreateSpaces(self, spaces):
13491 '''
13492 spaces : typing.Sequence[~CreateSpaceParams]
13493 Returns -> typing.Sequence[~ErrorResult]
13494 '''
13495 # map input types to rpc msg
13496 params = dict()
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)
13501
13502
13503
13504 #@ReturnMapping(ListSpacesResults)
13505 async def ListSpaces(self):
13506 '''
13507
13508 Returns -> typing.Sequence[~Space]
13509 '''
13510 # map input types to rpc msg
13511 params = dict()
13512 msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params)
13513
13514 reply = await self.rpc(msg)
13515 return self._map(reply, ListSpaces)
13516
13517
13518 class StatusHistory(Type):
13519 name = 'StatusHistory'
13520 version = 2
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'}},
13527 'type': 'object'}
13528
13529
13530 #@ReturnMapping(None)
13531 async def Prune(self, maxlogsperentity):
13532 '''
13533 maxlogsperentity : int
13534 Returns -> None
13535 '''
13536 # map input types to rpc msg
13537 params = dict()
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)
13542
13543
13544 class Storage(Type):
13545 name = 'Storage'
13546 version = 2
13547 schema = {'definitions': {'Entities': {'additionalProperties': False,
13548 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13549 'type': 'array'}},
13550 'required': ['Entities'],
13551 'type': 'object'},
13552 'Entity': {'additionalProperties': False,
13553 'properties': {'Tag': {'type': 'string'}},
13554 'required': ['Tag'],
13555 'type': 'object'},
13556 'EntityStatus': {'additionalProperties': False,
13557 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13558 'type': 'object'}},
13559 'type': 'object'},
13560 'Info': {'type': 'string'},
13561 'Since': {'format': 'date-time',
13562 'type': 'string'},
13563 'Status': {'type': 'string'}},
13564 'required': ['Status',
13565 'Info',
13566 'Data',
13567 'Since'],
13568 'type': 'object'},
13569 'Error': {'additionalProperties': False,
13570 'properties': {'Code': {'type': 'string'},
13571 'Info': {'$ref': '#/definitions/ErrorInfo'},
13572 'Message': {'type': 'string'}},
13573 'required': ['Message', 'Code'],
13574 'type': 'object'},
13575 'ErrorInfo': {'additionalProperties': False,
13576 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13577 'MacaroonPath': {'type': 'string'}},
13578 'type': 'object'},
13579 'ErrorResult': {'additionalProperties': False,
13580 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13581 'required': ['Error'],
13582 'type': 'object'},
13583 'ErrorResults': {'additionalProperties': False,
13584 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13585 'type': 'array'}},
13586 'required': ['Results'],
13587 'type': 'object'},
13588 'FilesystemAttachmentInfo': {'additionalProperties': False,
13589 'properties': {'mountpoint': {'type': 'string'},
13590 'read-only': {'type': 'boolean'}},
13591 'type': 'object'},
13592 'FilesystemDetails': {'additionalProperties': False,
13593 'properties': {'filesystemtag': {'type': 'string'},
13594 'info': {'$ref': '#/definitions/FilesystemInfo'},
13595 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
13596 'type': 'object'},
13597 'status': {'$ref': '#/definitions/EntityStatus'},
13598 'storage': {'$ref': '#/definitions/StorageDetails'},
13599 'volumetag': {'type': 'string'}},
13600 'required': ['filesystemtag',
13601 'info',
13602 'status'],
13603 'type': 'object'},
13604 'FilesystemDetailsListResult': {'additionalProperties': False,
13605 'properties': {'error': {'$ref': '#/definitions/Error'},
13606 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
13607 'type': 'array'}},
13608 'type': 'object'},
13609 'FilesystemDetailsListResults': {'additionalProperties': False,
13610 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
13611 'type': 'array'}},
13612 'type': 'object'},
13613 'FilesystemFilter': {'additionalProperties': False,
13614 'properties': {'machines': {'items': {'type': 'string'},
13615 'type': 'array'}},
13616 'type': 'object'},
13617 'FilesystemFilters': {'additionalProperties': False,
13618 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
13619 'type': 'array'}},
13620 'type': 'object'},
13621 'FilesystemInfo': {'additionalProperties': False,
13622 'properties': {'filesystemid': {'type': 'string'},
13623 'size': {'type': 'integer'}},
13624 'required': ['filesystemid', 'size'],
13625 'type': 'object'},
13626 'Macaroon': {'additionalProperties': False,
13627 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13628 'type': 'array'},
13629 'data': {'items': {'type': 'integer'},
13630 'type': 'array'},
13631 'id': {'$ref': '#/definitions/packet'},
13632 'location': {'$ref': '#/definitions/packet'},
13633 'sig': {'items': {'type': 'integer'},
13634 'type': 'array'}},
13635 'required': ['data',
13636 'location',
13637 'id',
13638 'caveats',
13639 'sig'],
13640 'type': 'object'},
13641 'StorageAddParams': {'additionalProperties': False,
13642 'properties': {'StorageName': {'type': 'string'},
13643 'storage': {'$ref': '#/definitions/StorageConstraints'},
13644 'unit': {'type': 'string'}},
13645 'required': ['unit',
13646 'StorageName',
13647 'storage'],
13648 'type': 'object'},
13649 'StorageAttachmentDetails': {'additionalProperties': False,
13650 'properties': {'location': {'type': 'string'},
13651 'machinetag': {'type': 'string'},
13652 'storagetag': {'type': 'string'},
13653 'unittag': {'type': 'string'}},
13654 'required': ['storagetag',
13655 'unittag',
13656 'machinetag'],
13657 'type': 'object'},
13658 'StorageConstraints': {'additionalProperties': False,
13659 'properties': {'Count': {'type': 'integer'},
13660 'Pool': {'type': 'string'},
13661 'Size': {'type': 'integer'}},
13662 'required': ['Pool', 'Size', 'Count'],
13663 'type': 'object'},
13664 'StorageDetails': {'additionalProperties': False,
13665 'properties': {'Persistent': {'type': 'boolean'},
13666 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
13667 'type': 'object'},
13668 'kind': {'type': 'integer'},
13669 'ownertag': {'type': 'string'},
13670 'status': {'$ref': '#/definitions/EntityStatus'},
13671 'storagetag': {'type': 'string'}},
13672 'required': ['storagetag',
13673 'ownertag',
13674 'kind',
13675 'status',
13676 'Persistent'],
13677 'type': 'object'},
13678 'StorageDetailsListResult': {'additionalProperties': False,
13679 'properties': {'error': {'$ref': '#/definitions/Error'},
13680 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
13681 'type': 'array'}},
13682 'type': 'object'},
13683 'StorageDetailsListResults': {'additionalProperties': False,
13684 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
13685 'type': 'array'}},
13686 'type': 'object'},
13687 'StorageDetailsResult': {'additionalProperties': False,
13688 'properties': {'error': {'$ref': '#/definitions/Error'},
13689 'result': {'$ref': '#/definitions/StorageDetails'}},
13690 'type': 'object'},
13691 'StorageDetailsResults': {'additionalProperties': False,
13692 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
13693 'type': 'array'}},
13694 'type': 'object'},
13695 'StorageFilter': {'additionalProperties': False,
13696 'type': 'object'},
13697 'StorageFilters': {'additionalProperties': False,
13698 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
13699 'type': 'array'}},
13700 'type': 'object'},
13701 'StoragePool': {'additionalProperties': False,
13702 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
13703 'type': 'object'}},
13704 'type': 'object'},
13705 'name': {'type': 'string'},
13706 'provider': {'type': 'string'}},
13707 'required': ['name', 'provider', 'attrs'],
13708 'type': 'object'},
13709 'StoragePoolFilter': {'additionalProperties': False,
13710 'properties': {'names': {'items': {'type': 'string'},
13711 'type': 'array'},
13712 'providers': {'items': {'type': 'string'},
13713 'type': 'array'}},
13714 'type': 'object'},
13715 'StoragePoolFilters': {'additionalProperties': False,
13716 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
13717 'type': 'array'}},
13718 'type': 'object'},
13719 'StoragePoolsResult': {'additionalProperties': False,
13720 'properties': {'error': {'$ref': '#/definitions/Error'},
13721 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
13722 'type': 'array'}},
13723 'type': 'object'},
13724 'StoragePoolsResults': {'additionalProperties': False,
13725 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
13726 'type': 'array'}},
13727 'type': 'object'},
13728 'StoragesAddParams': {'additionalProperties': False,
13729 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
13730 'type': 'array'}},
13731 'required': ['storages'],
13732 'type': 'object'},
13733 'VolumeAttachmentInfo': {'additionalProperties': False,
13734 'properties': {'busaddress': {'type': 'string'},
13735 'devicelink': {'type': 'string'},
13736 'devicename': {'type': 'string'},
13737 'read-only': {'type': 'boolean'}},
13738 'type': 'object'},
13739 'VolumeDetails': {'additionalProperties': False,
13740 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13741 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13742 'type': 'object'},
13743 'status': {'$ref': '#/definitions/EntityStatus'},
13744 'storage': {'$ref': '#/definitions/StorageDetails'},
13745 'volumetag': {'type': 'string'}},
13746 'required': ['volumetag', 'info', 'status'],
13747 'type': 'object'},
13748 'VolumeDetailsListResult': {'additionalProperties': False,
13749 'properties': {'error': {'$ref': '#/definitions/Error'},
13750 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
13751 'type': 'array'}},
13752 'type': 'object'},
13753 'VolumeDetailsListResults': {'additionalProperties': False,
13754 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
13755 'type': 'array'}},
13756 'type': 'object'},
13757 'VolumeFilter': {'additionalProperties': False,
13758 'properties': {'machines': {'items': {'type': 'string'},
13759 'type': 'array'}},
13760 'type': 'object'},
13761 'VolumeFilters': {'additionalProperties': False,
13762 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
13763 'type': 'array'}},
13764 'type': 'object'},
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'],
13771 'type': 'object'},
13772 'caveat': {'additionalProperties': False,
13773 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13774 'location': {'$ref': '#/definitions/packet'},
13775 'verificationId': {'$ref': '#/definitions/packet'}},
13776 'required': ['location',
13777 'caveatId',
13778 'verificationId'],
13779 'type': 'object'},
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'}},
13788 'type': 'object'},
13789 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
13790 'type': 'object'},
13791 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
13792 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
13793 'type': 'object'},
13794 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
13795 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
13796 'type': 'object'},
13797 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
13798 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
13799 'type': 'object'},
13800 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
13801 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
13802 'type': 'object'},
13803 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13804 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
13805 'type': 'object'}},
13806 'type': 'object'}
13807
13808
13809 #@ReturnMapping(ErrorResults)
13810 async def AddToUnit(self, storages):
13811 '''
13812 storages : typing.Sequence[~StorageAddParams]
13813 Returns -> typing.Sequence[~ErrorResult]
13814 '''
13815 # map input types to rpc msg
13816 params = dict()
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)
13821
13822
13823
13824 #@ReturnMapping(None)
13825 async def CreatePool(self, name, provider, attrs):
13826 '''
13827 name : str
13828 provider : str
13829 attrs : typing.Mapping[str, typing.Any]
13830 Returns -> None
13831 '''
13832 # map input types to rpc msg
13833 params = dict()
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)
13840
13841
13842
13843 #@ReturnMapping(FilesystemDetailsListResults)
13844 async def ListFilesystems(self, filters):
13845 '''
13846 filters : typing.Sequence[~FilesystemFilter]
13847 Returns -> typing.Sequence[~FilesystemDetailsListResult]
13848 '''
13849 # map input types to rpc msg
13850 params = dict()
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)
13855
13856
13857
13858 #@ReturnMapping(StoragePoolsResults)
13859 async def ListPools(self, filters):
13860 '''
13861 filters : typing.Sequence[~StoragePoolFilter]
13862 Returns -> typing.Sequence[~StoragePoolsResult]
13863 '''
13864 # map input types to rpc msg
13865 params = dict()
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)
13870
13871
13872
13873 #@ReturnMapping(StorageDetailsListResults)
13874 async def ListStorageDetails(self, filters):
13875 '''
13876 filters : typing.Sequence[~StorageFilter]
13877 Returns -> typing.Sequence[~StorageDetailsListResult]
13878 '''
13879 # map input types to rpc msg
13880 params = dict()
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)
13885
13886
13887
13888 #@ReturnMapping(VolumeDetailsListResults)
13889 async def ListVolumes(self, filters):
13890 '''
13891 filters : typing.Sequence[~VolumeFilter]
13892 Returns -> typing.Sequence[~VolumeDetailsListResult]
13893 '''
13894 # map input types to rpc msg
13895 params = dict()
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)
13900
13901
13902
13903 #@ReturnMapping(StorageDetailsResults)
13904 async def StorageDetails(self, entities):
13905 '''
13906 entities : typing.Sequence[~Entity]
13907 Returns -> typing.Sequence[~StorageDetailsResult]
13908 '''
13909 # map input types to rpc msg
13910 params = dict()
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)
13915
13916
13917 class StorageProvisioner(Type):
13918 name = 'StorageProvisioner'
13919 version = 2
13920 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
13921 'properties': {'BusAddress': {'type': 'string'},
13922 'DeviceLinks': {'items': {'type': 'string'},
13923 'type': 'array'},
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',
13933 'DeviceLinks',
13934 'Label',
13935 'UUID',
13936 'HardwareId',
13937 'BusAddress',
13938 'Size',
13939 'FilesystemType',
13940 'InUse',
13941 'MountPoint'],
13942 'type': 'object'},
13943 'BlockDeviceResult': {'additionalProperties': False,
13944 'properties': {'error': {'$ref': '#/definitions/Error'},
13945 'result': {'$ref': '#/definitions/BlockDevice'}},
13946 'required': ['result'],
13947 'type': 'object'},
13948 'BlockDeviceResults': {'additionalProperties': False,
13949 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
13950 'type': 'array'}},
13951 'type': 'object'},
13952 'Entities': {'additionalProperties': False,
13953 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13954 'type': 'array'}},
13955 'required': ['Entities'],
13956 'type': 'object'},
13957 'Entity': {'additionalProperties': False,
13958 'properties': {'Tag': {'type': 'string'}},
13959 'required': ['Tag'],
13960 'type': 'object'},
13961 'EntityStatusArgs': {'additionalProperties': False,
13962 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13963 'type': 'object'}},
13964 'type': 'object'},
13965 'Info': {'type': 'string'},
13966 'Status': {'type': 'string'},
13967 'Tag': {'type': 'string'}},
13968 'required': ['Tag',
13969 'Status',
13970 'Info',
13971 'Data'],
13972 'type': 'object'},
13973 'Error': {'additionalProperties': False,
13974 'properties': {'Code': {'type': 'string'},
13975 'Info': {'$ref': '#/definitions/ErrorInfo'},
13976 'Message': {'type': 'string'}},
13977 'required': ['Message', 'Code'],
13978 'type': 'object'},
13979 'ErrorInfo': {'additionalProperties': False,
13980 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13981 'MacaroonPath': {'type': 'string'}},
13982 'type': 'object'},
13983 'ErrorResult': {'additionalProperties': False,
13984 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13985 'required': ['Error'],
13986 'type': 'object'},
13987 'ErrorResults': {'additionalProperties': False,
13988 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13989 'type': 'array'}},
13990 'required': ['Results'],
13991 'type': 'object'},
13992 'Filesystem': {'additionalProperties': False,
13993 'properties': {'filesystemtag': {'type': 'string'},
13994 'info': {'$ref': '#/definitions/FilesystemInfo'},
13995 'volumetag': {'type': 'string'}},
13996 'required': ['filesystemtag', 'info'],
13997 'type': 'object'},
13998 'FilesystemAttachment': {'additionalProperties': False,
13999 'properties': {'filesystemtag': {'type': 'string'},
14000 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
14001 'machinetag': {'type': 'string'}},
14002 'required': ['filesystemtag',
14003 'machinetag',
14004 'info'],
14005 'type': 'object'},
14006 'FilesystemAttachmentInfo': {'additionalProperties': False,
14007 'properties': {'mountpoint': {'type': 'string'},
14008 'read-only': {'type': 'boolean'}},
14009 'type': 'object'},
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',
14019 'machinetag',
14020 'provider'],
14021 'type': 'object'},
14022 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
14023 'properties': {'error': {'$ref': '#/definitions/Error'},
14024 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
14025 'required': ['result'],
14026 'type': 'object'},
14027 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
14028 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
14029 'type': 'array'}},
14030 'type': 'object'},
14031 'FilesystemAttachmentResult': {'additionalProperties': False,
14032 'properties': {'error': {'$ref': '#/definitions/Error'},
14033 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
14034 'required': ['result'],
14035 'type': 'object'},
14036 'FilesystemAttachmentResults': {'additionalProperties': False,
14037 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
14038 'type': 'array'}},
14039 'type': 'object'},
14040 'FilesystemAttachments': {'additionalProperties': False,
14041 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
14042 'type': 'array'}},
14043 'required': ['filesystemattachments'],
14044 'type': 'object'},
14045 'FilesystemInfo': {'additionalProperties': False,
14046 'properties': {'filesystemid': {'type': 'string'},
14047 'size': {'type': 'integer'}},
14048 'required': ['filesystemid', 'size'],
14049 'type': 'object'},
14050 'FilesystemParams': {'additionalProperties': False,
14051 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
14052 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14053 'type': 'object'}},
14054 'type': 'object'},
14055 'filesystemtag': {'type': 'string'},
14056 'provider': {'type': 'string'},
14057 'size': {'type': 'integer'},
14058 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14059 'type': 'object'},
14060 'volumetag': {'type': 'string'}},
14061 'required': ['filesystemtag',
14062 'size',
14063 'provider'],
14064 'type': 'object'},
14065 'FilesystemParamsResult': {'additionalProperties': False,
14066 'properties': {'error': {'$ref': '#/definitions/Error'},
14067 'result': {'$ref': '#/definitions/FilesystemParams'}},
14068 'required': ['result'],
14069 'type': 'object'},
14070 'FilesystemParamsResults': {'additionalProperties': False,
14071 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
14072 'type': 'array'}},
14073 'type': 'object'},
14074 'FilesystemResult': {'additionalProperties': False,
14075 'properties': {'error': {'$ref': '#/definitions/Error'},
14076 'result': {'$ref': '#/definitions/Filesystem'}},
14077 'required': ['result'],
14078 'type': 'object'},
14079 'FilesystemResults': {'additionalProperties': False,
14080 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
14081 'type': 'array'}},
14082 'type': 'object'},
14083 'Filesystems': {'additionalProperties': False,
14084 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
14085 'type': 'array'}},
14086 'required': ['filesystems'],
14087 'type': 'object'},
14088 'LifeResult': {'additionalProperties': False,
14089 'properties': {'Error': {'$ref': '#/definitions/Error'},
14090 'Life': {'type': 'string'}},
14091 'required': ['Life', 'Error'],
14092 'type': 'object'},
14093 'LifeResults': {'additionalProperties': False,
14094 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
14095 'type': 'array'}},
14096 'required': ['Results'],
14097 'type': 'object'},
14098 'Macaroon': {'additionalProperties': False,
14099 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14100 'type': 'array'},
14101 'data': {'items': {'type': 'integer'},
14102 'type': 'array'},
14103 'id': {'$ref': '#/definitions/packet'},
14104 'location': {'$ref': '#/definitions/packet'},
14105 'sig': {'items': {'type': 'integer'},
14106 'type': 'array'}},
14107 'required': ['data',
14108 'location',
14109 'id',
14110 'caveats',
14111 'sig'],
14112 'type': 'object'},
14113 'MachineStorageId': {'additionalProperties': False,
14114 'properties': {'attachmenttag': {'type': 'string'},
14115 'machinetag': {'type': 'string'}},
14116 'required': ['machinetag',
14117 'attachmenttag'],
14118 'type': 'object'},
14119 'MachineStorageIds': {'additionalProperties': False,
14120 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
14121 'type': 'array'}},
14122 'required': ['ids'],
14123 'type': 'object'},
14124 'MachineStorageIdsWatchResult': {'additionalProperties': False,
14125 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
14126 'type': 'array'},
14127 'Error': {'$ref': '#/definitions/Error'},
14128 'MachineStorageIdsWatcherId': {'type': 'string'}},
14129 'required': ['MachineStorageIdsWatcherId',
14130 'Changes',
14131 'Error'],
14132 'type': 'object'},
14133 'MachineStorageIdsWatchResults': {'additionalProperties': False,
14134 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
14135 'type': 'array'}},
14136 'required': ['Results'],
14137 'type': 'object'},
14138 'ModelConfigResult': {'additionalProperties': False,
14139 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
14140 'type': 'object'}},
14141 'type': 'object'}},
14142 'required': ['Config'],
14143 'type': 'object'},
14144 'NotifyWatchResult': {'additionalProperties': False,
14145 'properties': {'Error': {'$ref': '#/definitions/Error'},
14146 'NotifyWatcherId': {'type': 'string'}},
14147 'required': ['NotifyWatcherId', 'Error'],
14148 'type': 'object'},
14149 'NotifyWatchResults': {'additionalProperties': False,
14150 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14151 'type': 'array'}},
14152 'required': ['Results'],
14153 'type': 'object'},
14154 'SetStatus': {'additionalProperties': False,
14155 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
14156 'type': 'array'}},
14157 'required': ['Entities'],
14158 'type': 'object'},
14159 'StringResult': {'additionalProperties': False,
14160 'properties': {'Error': {'$ref': '#/definitions/Error'},
14161 'Result': {'type': 'string'}},
14162 'required': ['Error', 'Result'],
14163 'type': 'object'},
14164 'StringResults': {'additionalProperties': False,
14165 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
14166 'type': 'array'}},
14167 'required': ['Results'],
14168 'type': 'object'},
14169 'StringsWatchResult': {'additionalProperties': False,
14170 'properties': {'Changes': {'items': {'type': 'string'},
14171 'type': 'array'},
14172 'Error': {'$ref': '#/definitions/Error'},
14173 'StringsWatcherId': {'type': 'string'}},
14174 'required': ['StringsWatcherId',
14175 'Changes',
14176 'Error'],
14177 'type': 'object'},
14178 'StringsWatchResults': {'additionalProperties': False,
14179 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
14180 'type': 'array'}},
14181 'required': ['Results'],
14182 'type': 'object'},
14183 'Volume': {'additionalProperties': False,
14184 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
14185 'volumetag': {'type': 'string'}},
14186 'required': ['volumetag', 'info'],
14187 'type': 'object'},
14188 'VolumeAttachment': {'additionalProperties': False,
14189 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
14190 'machinetag': {'type': 'string'},
14191 'volumetag': {'type': 'string'}},
14192 'required': ['volumetag',
14193 'machinetag',
14194 'info'],
14195 'type': 'object'},
14196 'VolumeAttachmentInfo': {'additionalProperties': False,
14197 'properties': {'busaddress': {'type': 'string'},
14198 'devicelink': {'type': 'string'},
14199 'devicename': {'type': 'string'},
14200 'read-only': {'type': 'boolean'}},
14201 'type': 'object'},
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',
14210 'machinetag',
14211 'provider'],
14212 'type': 'object'},
14213 'VolumeAttachmentParamsResult': {'additionalProperties': False,
14214 'properties': {'error': {'$ref': '#/definitions/Error'},
14215 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
14216 'required': ['result'],
14217 'type': 'object'},
14218 'VolumeAttachmentParamsResults': {'additionalProperties': False,
14219 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
14220 'type': 'array'}},
14221 'type': 'object'},
14222 'VolumeAttachmentResult': {'additionalProperties': False,
14223 'properties': {'error': {'$ref': '#/definitions/Error'},
14224 'result': {'$ref': '#/definitions/VolumeAttachment'}},
14225 'required': ['result'],
14226 'type': 'object'},
14227 'VolumeAttachmentResults': {'additionalProperties': False,
14228 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
14229 'type': 'array'}},
14230 'type': 'object'},
14231 'VolumeAttachments': {'additionalProperties': False,
14232 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
14233 'type': 'array'}},
14234 'required': ['volumeattachments'],
14235 'type': 'object'},
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'],
14242 'type': 'object'},
14243 'VolumeParams': {'additionalProperties': False,
14244 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
14245 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
14246 'type': 'object'}},
14247 'type': 'object'},
14248 'provider': {'type': 'string'},
14249 'size': {'type': 'integer'},
14250 'tags': {'patternProperties': {'.*': {'type': 'string'}},
14251 'type': 'object'},
14252 'volumetag': {'type': 'string'}},
14253 'required': ['volumetag', 'size', 'provider'],
14254 'type': 'object'},
14255 'VolumeParamsResult': {'additionalProperties': False,
14256 'properties': {'error': {'$ref': '#/definitions/Error'},
14257 'result': {'$ref': '#/definitions/VolumeParams'}},
14258 'required': ['result'],
14259 'type': 'object'},
14260 'VolumeParamsResults': {'additionalProperties': False,
14261 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
14262 'type': 'array'}},
14263 'type': 'object'},
14264 'VolumeResult': {'additionalProperties': False,
14265 'properties': {'error': {'$ref': '#/definitions/Error'},
14266 'result': {'$ref': '#/definitions/Volume'}},
14267 'required': ['result'],
14268 'type': 'object'},
14269 'VolumeResults': {'additionalProperties': False,
14270 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
14271 'type': 'array'}},
14272 'type': 'object'},
14273 'Volumes': {'additionalProperties': False,
14274 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
14275 'type': 'array'}},
14276 'required': ['volumes'],
14277 'type': 'object'},
14278 'caveat': {'additionalProperties': False,
14279 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14280 'location': {'$ref': '#/definitions/packet'},
14281 'verificationId': {'$ref': '#/definitions/packet'}},
14282 'required': ['location',
14283 'caveatId',
14284 'verificationId'],
14285 'type': 'object'},
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'}},
14294 'type': 'object'},
14295 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14296 'Result': {'$ref': '#/definitions/ErrorResults'}},
14297 'type': 'object'},
14298 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14299 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
14300 'type': 'object'},
14301 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14302 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
14303 'type': 'object'},
14304 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14305 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
14306 'type': 'object'},
14307 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14308 'Result': {'$ref': '#/definitions/FilesystemResults'}},
14309 'type': 'object'},
14310 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14311 'Result': {'$ref': '#/definitions/StringResults'}},
14312 'type': 'object'},
14313 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14314 'Result': {'$ref': '#/definitions/LifeResults'}},
14315 'type': 'object'},
14316 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
14317 'type': 'object'},
14318 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14319 'Result': {'$ref': '#/definitions/ErrorResults'}},
14320 'type': 'object'},
14321 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14322 'Result': {'$ref': '#/definitions/ErrorResults'}},
14323 'type': 'object'},
14324 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
14325 'Result': {'$ref': '#/definitions/ErrorResults'}},
14326 'type': 'object'},
14327 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
14328 'Result': {'$ref': '#/definitions/ErrorResults'}},
14329 'type': 'object'},
14330 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14331 'Result': {'$ref': '#/definitions/ErrorResults'}},
14332 'type': 'object'},
14333 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
14334 'Result': {'$ref': '#/definitions/ErrorResults'}},
14335 'type': 'object'},
14336 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
14337 'Result': {'$ref': '#/definitions/ErrorResults'}},
14338 'type': 'object'},
14339 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
14340 'Result': {'$ref': '#/definitions/ErrorResults'}},
14341 'type': 'object'},
14342 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14343 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
14344 'type': 'object'},
14345 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14346 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
14347 'type': 'object'},
14348 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
14349 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
14350 'type': 'object'},
14351 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14352 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
14353 'type': 'object'},
14354 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14355 'Result': {'$ref': '#/definitions/VolumeResults'}},
14356 'type': 'object'},
14357 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14358 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14359 'type': 'object'},
14360 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14361 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
14362 'type': 'object'},
14363 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14364 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14365 'type': 'object'},
14366 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14367 'type': 'object'},
14368 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14369 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14370 'type': 'object'},
14371 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14372 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
14373 'type': 'object'},
14374 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14375 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
14376 'type': 'object'}},
14377 'type': 'object'}
14378
14379
14380 #@ReturnMapping(LifeResults)
14381 async def AttachmentLife(self, ids):
14382 '''
14383 ids : typing.Sequence[~MachineStorageId]
14384 Returns -> typing.Sequence[~LifeResult]
14385 '''
14386 # map input types to rpc msg
14387 params = dict()
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)
14392
14393
14394
14395 #@ReturnMapping(ErrorResults)
14396 async def EnsureDead(self, entities):
14397 '''
14398 entities : typing.Sequence[~Entity]
14399 Returns -> typing.Sequence[~ErrorResult]
14400 '''
14401 # map input types to rpc msg
14402 params = dict()
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)
14407
14408
14409
14410 #@ReturnMapping(FilesystemAttachmentParamsResults)
14411 async def FilesystemAttachmentParams(self, ids):
14412 '''
14413 ids : typing.Sequence[~MachineStorageId]
14414 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
14415 '''
14416 # map input types to rpc msg
14417 params = dict()
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)
14422
14423
14424
14425 #@ReturnMapping(FilesystemAttachmentResults)
14426 async def FilesystemAttachments(self, ids):
14427 '''
14428 ids : typing.Sequence[~MachineStorageId]
14429 Returns -> typing.Sequence[~FilesystemAttachmentResult]
14430 '''
14431 # map input types to rpc msg
14432 params = dict()
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)
14437
14438
14439
14440 #@ReturnMapping(FilesystemParamsResults)
14441 async def FilesystemParams(self, entities):
14442 '''
14443 entities : typing.Sequence[~Entity]
14444 Returns -> typing.Sequence[~FilesystemParamsResult]
14445 '''
14446 # map input types to rpc msg
14447 params = dict()
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)
14452
14453
14454
14455 #@ReturnMapping(FilesystemResults)
14456 async def Filesystems(self, entities):
14457 '''
14458 entities : typing.Sequence[~Entity]
14459 Returns -> typing.Sequence[~FilesystemResult]
14460 '''
14461 # map input types to rpc msg
14462 params = dict()
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)
14467
14468
14469
14470 #@ReturnMapping(StringResults)
14471 async def InstanceId(self, entities):
14472 '''
14473 entities : typing.Sequence[~Entity]
14474 Returns -> typing.Sequence[~StringResult]
14475 '''
14476 # map input types to rpc msg
14477 params = dict()
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)
14482
14483
14484
14485 #@ReturnMapping(LifeResults)
14486 async def Life(self, entities):
14487 '''
14488 entities : typing.Sequence[~Entity]
14489 Returns -> typing.Sequence[~LifeResult]
14490 '''
14491 # map input types to rpc msg
14492 params = dict()
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)
14497
14498
14499
14500 #@ReturnMapping(ModelConfigResult)
14501 async def ModelConfig(self):
14502 '''
14503
14504 Returns -> typing.Mapping[str, typing.Any]
14505 '''
14506 # map input types to rpc msg
14507 params = dict()
14508 msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params)
14509
14510 reply = await self.rpc(msg)
14511 return self._map(reply, ModelConfig)
14512
14513
14514
14515 #@ReturnMapping(ErrorResults)
14516 async def Remove(self, entities):
14517 '''
14518 entities : typing.Sequence[~Entity]
14519 Returns -> typing.Sequence[~ErrorResult]
14520 '''
14521 # map input types to rpc msg
14522 params = dict()
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)
14527
14528
14529
14530 #@ReturnMapping(ErrorResults)
14531 async def RemoveAttachment(self, ids):
14532 '''
14533 ids : typing.Sequence[~MachineStorageId]
14534 Returns -> typing.Sequence[~ErrorResult]
14535 '''
14536 # map input types to rpc msg
14537 params = dict()
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)
14542
14543
14544
14545 #@ReturnMapping(ErrorResults)
14546 async def SetFilesystemAttachmentInfo(self, filesystemattachments):
14547 '''
14548 filesystemattachments : typing.Sequence[~FilesystemAttachment]
14549 Returns -> typing.Sequence[~ErrorResult]
14550 '''
14551 # map input types to rpc msg
14552 params = dict()
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)
14557
14558
14559
14560 #@ReturnMapping(ErrorResults)
14561 async def SetFilesystemInfo(self, filesystems):
14562 '''
14563 filesystems : typing.Sequence[~Filesystem]
14564 Returns -> typing.Sequence[~ErrorResult]
14565 '''
14566 # map input types to rpc msg
14567 params = dict()
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)
14572
14573
14574
14575 #@ReturnMapping(ErrorResults)
14576 async def SetStatus(self, entities):
14577 '''
14578 entities : typing.Sequence[~EntityStatusArgs]
14579 Returns -> typing.Sequence[~ErrorResult]
14580 '''
14581 # map input types to rpc msg
14582 params = dict()
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)
14587
14588
14589
14590 #@ReturnMapping(ErrorResults)
14591 async def SetVolumeAttachmentInfo(self, volumeattachments):
14592 '''
14593 volumeattachments : typing.Sequence[~VolumeAttachment]
14594 Returns -> typing.Sequence[~ErrorResult]
14595 '''
14596 # map input types to rpc msg
14597 params = dict()
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)
14602
14603
14604
14605 #@ReturnMapping(ErrorResults)
14606 async def SetVolumeInfo(self, volumes):
14607 '''
14608 volumes : typing.Sequence[~Volume]
14609 Returns -> typing.Sequence[~ErrorResult]
14610 '''
14611 # map input types to rpc msg
14612 params = dict()
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)
14617
14618
14619
14620 #@ReturnMapping(ErrorResults)
14621 async def UpdateStatus(self, entities):
14622 '''
14623 entities : typing.Sequence[~EntityStatusArgs]
14624 Returns -> typing.Sequence[~ErrorResult]
14625 '''
14626 # map input types to rpc msg
14627 params = dict()
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)
14632
14633
14634
14635 #@ReturnMapping(VolumeAttachmentParamsResults)
14636 async def VolumeAttachmentParams(self, ids):
14637 '''
14638 ids : typing.Sequence[~MachineStorageId]
14639 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
14640 '''
14641 # map input types to rpc msg
14642 params = dict()
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)
14647
14648
14649
14650 #@ReturnMapping(VolumeAttachmentResults)
14651 async def VolumeAttachments(self, ids):
14652 '''
14653 ids : typing.Sequence[~MachineStorageId]
14654 Returns -> typing.Sequence[~VolumeAttachmentResult]
14655 '''
14656 # map input types to rpc msg
14657 params = dict()
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)
14662
14663
14664
14665 #@ReturnMapping(BlockDeviceResults)
14666 async def VolumeBlockDevices(self, ids):
14667 '''
14668 ids : typing.Sequence[~MachineStorageId]
14669 Returns -> typing.Sequence[~BlockDeviceResult]
14670 '''
14671 # map input types to rpc msg
14672 params = dict()
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)
14677
14678
14679
14680 #@ReturnMapping(VolumeParamsResults)
14681 async def VolumeParams(self, entities):
14682 '''
14683 entities : typing.Sequence[~Entity]
14684 Returns -> typing.Sequence[~VolumeParamsResult]
14685 '''
14686 # map input types to rpc msg
14687 params = dict()
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)
14692
14693
14694
14695 #@ReturnMapping(VolumeResults)
14696 async def Volumes(self, entities):
14697 '''
14698 entities : typing.Sequence[~Entity]
14699 Returns -> typing.Sequence[~VolumeResult]
14700 '''
14701 # map input types to rpc msg
14702 params = dict()
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)
14707
14708
14709
14710 #@ReturnMapping(NotifyWatchResults)
14711 async def WatchBlockDevices(self, entities):
14712 '''
14713 entities : typing.Sequence[~Entity]
14714 Returns -> typing.Sequence[~NotifyWatchResult]
14715 '''
14716 # map input types to rpc msg
14717 params = dict()
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)
14722
14723
14724
14725 #@ReturnMapping(MachineStorageIdsWatchResults)
14726 async def WatchFilesystemAttachments(self, entities):
14727 '''
14728 entities : typing.Sequence[~Entity]
14729 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
14730 '''
14731 # map input types to rpc msg
14732 params = dict()
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)
14737
14738
14739
14740 #@ReturnMapping(StringsWatchResults)
14741 async def WatchFilesystems(self, entities):
14742 '''
14743 entities : typing.Sequence[~Entity]
14744 Returns -> typing.Sequence[~StringsWatchResult]
14745 '''
14746 # map input types to rpc msg
14747 params = dict()
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)
14752
14753
14754
14755 #@ReturnMapping(NotifyWatchResult)
14756 async def WatchForModelConfigChanges(self):
14757 '''
14758
14759 Returns -> typing.Union[~Error, str]
14760 '''
14761 # map input types to rpc msg
14762 params = dict()
14763 msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
14764
14765 reply = await self.rpc(msg)
14766 return self._map(reply, WatchForModelConfigChanges)
14767
14768
14769
14770 #@ReturnMapping(NotifyWatchResults)
14771 async def WatchMachines(self, entities):
14772 '''
14773 entities : typing.Sequence[~Entity]
14774 Returns -> typing.Sequence[~NotifyWatchResult]
14775 '''
14776 # map input types to rpc msg
14777 params = dict()
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)
14782
14783
14784
14785 #@ReturnMapping(MachineStorageIdsWatchResults)
14786 async def WatchVolumeAttachments(self, entities):
14787 '''
14788 entities : typing.Sequence[~Entity]
14789 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
14790 '''
14791 # map input types to rpc msg
14792 params = dict()
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)
14797
14798
14799
14800 #@ReturnMapping(StringsWatchResults)
14801 async def WatchVolumes(self, entities):
14802 '''
14803 entities : typing.Sequence[~Entity]
14804 Returns -> typing.Sequence[~StringsWatchResult]
14805 '''
14806 # map input types to rpc msg
14807 params = dict()
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)
14812
14813
14814 class StringsWatcher(Type):
14815 name = 'StringsWatcher'
14816 version = 1
14817 schema = {'definitions': {'Error': {'additionalProperties': False,
14818 'properties': {'Code': {'type': 'string'},
14819 'Info': {'$ref': '#/definitions/ErrorInfo'},
14820 'Message': {'type': 'string'}},
14821 'required': ['Message', 'Code'],
14822 'type': 'object'},
14823 'ErrorInfo': {'additionalProperties': False,
14824 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14825 'MacaroonPath': {'type': 'string'}},
14826 'type': 'object'},
14827 'Macaroon': {'additionalProperties': False,
14828 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14829 'type': 'array'},
14830 'data': {'items': {'type': 'integer'},
14831 'type': 'array'},
14832 'id': {'$ref': '#/definitions/packet'},
14833 'location': {'$ref': '#/definitions/packet'},
14834 'sig': {'items': {'type': 'integer'},
14835 'type': 'array'}},
14836 'required': ['data',
14837 'location',
14838 'id',
14839 'caveats',
14840 'sig'],
14841 'type': 'object'},
14842 'StringsWatchResult': {'additionalProperties': False,
14843 'properties': {'Changes': {'items': {'type': 'string'},
14844 'type': 'array'},
14845 'Error': {'$ref': '#/definitions/Error'},
14846 'StringsWatcherId': {'type': 'string'}},
14847 'required': ['StringsWatcherId',
14848 'Changes',
14849 'Error'],
14850 'type': 'object'},
14851 'caveat': {'additionalProperties': False,
14852 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14853 'location': {'$ref': '#/definitions/packet'},
14854 'verificationId': {'$ref': '#/definitions/packet'}},
14855 'required': ['location',
14856 'caveatId',
14857 'verificationId'],
14858 'type': 'object'},
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'}},
14866 'type': 'object'},
14867 'Stop': {'type': 'object'}},
14868 'type': 'object'}
14869
14870
14871 #@ReturnMapping(StringsWatchResult)
14872 async def Next(self):
14873 '''
14874
14875 Returns -> typing.Union[~Error, typing.Sequence[str]]
14876 '''
14877 # map input types to rpc msg
14878 params = dict()
14879 msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params)
14880
14881 reply = await self.rpc(msg)
14882 return self._map(reply, Next)
14883
14884
14885
14886 #@ReturnMapping(None)
14887 async def Stop(self):
14888 '''
14889
14890 Returns -> None
14891 '''
14892 # map input types to rpc msg
14893 params = dict()
14894 msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params)
14895
14896 reply = await self.rpc(msg)
14897 return self._map(reply, Stop)
14898
14899
14900 class Subnets(Type):
14901 name = 'Subnets'
14902 version = 2
14903 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
14904 'properties': {'SpaceTag': {'type': 'string'},
14905 'SubnetProviderId': {'type': 'string'},
14906 'SubnetTag': {'type': 'string'},
14907 'Zones': {'items': {'type': 'string'},
14908 'type': 'array'}},
14909 'required': ['SpaceTag'],
14910 'type': 'object'},
14911 'AddSubnetsParams': {'additionalProperties': False,
14912 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
14913 'type': 'array'}},
14914 'required': ['Subnets'],
14915 'type': 'object'},
14916 'Error': {'additionalProperties': False,
14917 'properties': {'Code': {'type': 'string'},
14918 'Info': {'$ref': '#/definitions/ErrorInfo'},
14919 'Message': {'type': 'string'}},
14920 'required': ['Message', 'Code'],
14921 'type': 'object'},
14922 'ErrorInfo': {'additionalProperties': False,
14923 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14924 'MacaroonPath': {'type': 'string'}},
14925 'type': 'object'},
14926 'ErrorResult': {'additionalProperties': False,
14927 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14928 'required': ['Error'],
14929 'type': 'object'},
14930 'ErrorResults': {'additionalProperties': False,
14931 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14932 'type': 'array'}},
14933 'required': ['Results'],
14934 'type': 'object'},
14935 'ListSubnetsResults': {'additionalProperties': False,
14936 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
14937 'type': 'array'}},
14938 'required': ['Results'],
14939 'type': 'object'},
14940 'Macaroon': {'additionalProperties': False,
14941 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14942 'type': 'array'},
14943 'data': {'items': {'type': 'integer'},
14944 'type': 'array'},
14945 'id': {'$ref': '#/definitions/packet'},
14946 'location': {'$ref': '#/definitions/packet'},
14947 'sig': {'items': {'type': 'integer'},
14948 'type': 'array'}},
14949 'required': ['data',
14950 'location',
14951 'id',
14952 'caveats',
14953 'sig'],
14954 'type': 'object'},
14955 'SpaceResult': {'additionalProperties': False,
14956 'properties': {'Error': {'$ref': '#/definitions/Error'},
14957 'Tag': {'type': 'string'}},
14958 'required': ['Error', 'Tag'],
14959 'type': 'object'},
14960 'SpaceResults': {'additionalProperties': False,
14961 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
14962 'type': 'array'}},
14963 'required': ['Results'],
14964 'type': 'object'},
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'},
14971 'type': 'array'},
14972 'StaticRangeLowIP': {'items': {'type': 'integer'},
14973 'type': 'array'},
14974 'Status': {'type': 'string'},
14975 'VLANTag': {'type': 'integer'},
14976 'Zones': {'items': {'type': 'string'},
14977 'type': 'array'}},
14978 'required': ['CIDR',
14979 'VLANTag',
14980 'Life',
14981 'SpaceTag',
14982 'Zones'],
14983 'type': 'object'},
14984 'SubnetsFilters': {'additionalProperties': False,
14985 'properties': {'SpaceTag': {'type': 'string'},
14986 'Zone': {'type': 'string'}},
14987 'type': 'object'},
14988 'ZoneResult': {'additionalProperties': False,
14989 'properties': {'Available': {'type': 'boolean'},
14990 'Error': {'$ref': '#/definitions/Error'},
14991 'Name': {'type': 'string'}},
14992 'required': ['Error', 'Name', 'Available'],
14993 'type': 'object'},
14994 'ZoneResults': {'additionalProperties': False,
14995 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
14996 'type': 'array'}},
14997 'required': ['Results'],
14998 'type': 'object'},
14999 'caveat': {'additionalProperties': False,
15000 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15001 'location': {'$ref': '#/definitions/packet'},
15002 'verificationId': {'$ref': '#/definitions/packet'}},
15003 'required': ['location',
15004 'caveatId',
15005 'verificationId'],
15006 'type': 'object'},
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'}},
15015 'type': 'object'},
15016 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
15017 'type': 'object'},
15018 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
15019 'type': 'object'},
15020 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
15021 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
15022 'type': 'object'}},
15023 'type': 'object'}
15024
15025
15026 #@ReturnMapping(ErrorResults)
15027 async def AddSubnets(self, subnets):
15028 '''
15029 subnets : typing.Sequence[~AddSubnetParams]
15030 Returns -> typing.Sequence[~ErrorResult]
15031 '''
15032 # map input types to rpc msg
15033 params = dict()
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)
15038
15039
15040
15041 #@ReturnMapping(SpaceResults)
15042 async def AllSpaces(self):
15043 '''
15044
15045 Returns -> typing.Sequence[~SpaceResult]
15046 '''
15047 # map input types to rpc msg
15048 params = dict()
15049 msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params)
15050
15051 reply = await self.rpc(msg)
15052 return self._map(reply, AllSpaces)
15053
15054
15055
15056 #@ReturnMapping(ZoneResults)
15057 async def AllZones(self):
15058 '''
15059
15060 Returns -> typing.Sequence[~ZoneResult]
15061 '''
15062 # map input types to rpc msg
15063 params = dict()
15064 msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params)
15065
15066 reply = await self.rpc(msg)
15067 return self._map(reply, AllZones)
15068
15069
15070
15071 #@ReturnMapping(ListSubnetsResults)
15072 async def ListSubnets(self, spacetag, zone):
15073 '''
15074 spacetag : str
15075 zone : str
15076 Returns -> typing.Sequence[~Subnet]
15077 '''
15078 # map input types to rpc msg
15079 params = dict()
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)
15085
15086
15087 class Undertaker(Type):
15088 name = 'Undertaker'
15089 version = 1
15090 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
15091 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15092 'type': 'object'}},
15093 'type': 'object'},
15094 'Info': {'type': 'string'},
15095 'Status': {'type': 'string'},
15096 'Tag': {'type': 'string'}},
15097 'required': ['Tag',
15098 'Status',
15099 'Info',
15100 'Data'],
15101 'type': 'object'},
15102 'Error': {'additionalProperties': False,
15103 'properties': {'Code': {'type': 'string'},
15104 'Info': {'$ref': '#/definitions/ErrorInfo'},
15105 'Message': {'type': 'string'}},
15106 'required': ['Message', 'Code'],
15107 'type': 'object'},
15108 'ErrorInfo': {'additionalProperties': False,
15109 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15110 'MacaroonPath': {'type': 'string'}},
15111 'type': 'object'},
15112 'ErrorResult': {'additionalProperties': False,
15113 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15114 'required': ['Error'],
15115 'type': 'object'},
15116 'ErrorResults': {'additionalProperties': False,
15117 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15118 'type': 'array'}},
15119 'required': ['Results'],
15120 'type': 'object'},
15121 'Macaroon': {'additionalProperties': False,
15122 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15123 'type': 'array'},
15124 'data': {'items': {'type': 'integer'},
15125 'type': 'array'},
15126 'id': {'$ref': '#/definitions/packet'},
15127 'location': {'$ref': '#/definitions/packet'},
15128 'sig': {'items': {'type': 'integer'},
15129 'type': 'array'}},
15130 'required': ['data',
15131 'location',
15132 'id',
15133 'caveats',
15134 'sig'],
15135 'type': 'object'},
15136 'ModelConfigResult': {'additionalProperties': False,
15137 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15138 'type': 'object'}},
15139 'type': 'object'}},
15140 'required': ['Config'],
15141 'type': 'object'},
15142 'NotifyWatchResult': {'additionalProperties': False,
15143 'properties': {'Error': {'$ref': '#/definitions/Error'},
15144 'NotifyWatcherId': {'type': 'string'}},
15145 'required': ['NotifyWatcherId', 'Error'],
15146 'type': 'object'},
15147 'NotifyWatchResults': {'additionalProperties': False,
15148 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15149 'type': 'array'}},
15150 'required': ['Results'],
15151 'type': 'object'},
15152 'SetStatus': {'additionalProperties': False,
15153 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15154 'type': 'array'}},
15155 'required': ['Entities'],
15156 'type': 'object'},
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',
15164 'Name',
15165 'GlobalName',
15166 'IsSystem',
15167 'Life'],
15168 'type': 'object'},
15169 'UndertakerModelInfoResult': {'additionalProperties': False,
15170 'properties': {'Error': {'$ref': '#/definitions/Error'},
15171 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
15172 'required': ['Error', 'Result'],
15173 'type': 'object'},
15174 'caveat': {'additionalProperties': False,
15175 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15176 'location': {'$ref': '#/definitions/packet'},
15177 'verificationId': {'$ref': '#/definitions/packet'}},
15178 'required': ['location',
15179 'caveatId',
15180 'verificationId'],
15181 'type': 'object'},
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'}},
15189 'type': 'object'},
15190 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
15191 'type': 'object'},
15192 'ProcessDyingModel': {'type': 'object'},
15193 'RemoveModel': {'type': 'object'},
15194 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15195 'Result': {'$ref': '#/definitions/ErrorResults'}},
15196 'type': 'object'},
15197 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15198 'Result': {'$ref': '#/definitions/ErrorResults'}},
15199 'type': 'object'},
15200 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
15201 'type': 'object'}},
15202 'type': 'object'}
15203
15204
15205 #@ReturnMapping(ModelConfigResult)
15206 async def ModelConfig(self):
15207 '''
15208
15209 Returns -> typing.Mapping[str, typing.Any]
15210 '''
15211 # map input types to rpc msg
15212 params = dict()
15213 msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params)
15214
15215 reply = await self.rpc(msg)
15216 return self._map(reply, ModelConfig)
15217
15218
15219
15220 #@ReturnMapping(UndertakerModelInfoResult)
15221 async def ModelInfo(self):
15222 '''
15223
15224 Returns -> typing.Union[~Error, ~UndertakerModelInfo]
15225 '''
15226 # map input types to rpc msg
15227 params = dict()
15228 msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params)
15229
15230 reply = await self.rpc(msg)
15231 return self._map(reply, ModelInfo)
15232
15233
15234
15235 #@ReturnMapping(None)
15236 async def ProcessDyingModel(self):
15237 '''
15238
15239 Returns -> None
15240 '''
15241 # map input types to rpc msg
15242 params = dict()
15243 msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params)
15244
15245 reply = await self.rpc(msg)
15246 return self._map(reply, ProcessDyingModel)
15247
15248
15249
15250 #@ReturnMapping(None)
15251 async def RemoveModel(self):
15252 '''
15253
15254 Returns -> None
15255 '''
15256 # map input types to rpc msg
15257 params = dict()
15258 msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params)
15259
15260 reply = await self.rpc(msg)
15261 return self._map(reply, RemoveModel)
15262
15263
15264
15265 #@ReturnMapping(ErrorResults)
15266 async def SetStatus(self, entities):
15267 '''
15268 entities : typing.Sequence[~EntityStatusArgs]
15269 Returns -> typing.Sequence[~ErrorResult]
15270 '''
15271 # map input types to rpc msg
15272 params = dict()
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)
15277
15278
15279
15280 #@ReturnMapping(ErrorResults)
15281 async def UpdateStatus(self, entities):
15282 '''
15283 entities : typing.Sequence[~EntityStatusArgs]
15284 Returns -> typing.Sequence[~ErrorResult]
15285 '''
15286 # map input types to rpc msg
15287 params = dict()
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)
15292
15293
15294
15295 #@ReturnMapping(NotifyWatchResults)
15296 async def WatchModelResources(self):
15297 '''
15298
15299 Returns -> typing.Sequence[~NotifyWatchResult]
15300 '''
15301 # map input types to rpc msg
15302 params = dict()
15303 msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params)
15304
15305 reply = await self.rpc(msg)
15306 return self._map(reply, WatchModelResources)
15307
15308
15309 class UnitAssigner(Type):
15310 name = 'UnitAssigner'
15311 version = 1
15312 schema = {'definitions': {'Entities': {'additionalProperties': False,
15313 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15314 'type': 'array'}},
15315 'required': ['Entities'],
15316 'type': 'object'},
15317 'Entity': {'additionalProperties': False,
15318 'properties': {'Tag': {'type': 'string'}},
15319 'required': ['Tag'],
15320 'type': 'object'},
15321 'EntityStatusArgs': {'additionalProperties': False,
15322 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15323 'type': 'object'}},
15324 'type': 'object'},
15325 'Info': {'type': 'string'},
15326 'Status': {'type': 'string'},
15327 'Tag': {'type': 'string'}},
15328 'required': ['Tag',
15329 'Status',
15330 'Info',
15331 'Data'],
15332 'type': 'object'},
15333 'Error': {'additionalProperties': False,
15334 'properties': {'Code': {'type': 'string'},
15335 'Info': {'$ref': '#/definitions/ErrorInfo'},
15336 'Message': {'type': 'string'}},
15337 'required': ['Message', 'Code'],
15338 'type': 'object'},
15339 'ErrorInfo': {'additionalProperties': False,
15340 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15341 'MacaroonPath': {'type': 'string'}},
15342 'type': 'object'},
15343 'ErrorResult': {'additionalProperties': False,
15344 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15345 'required': ['Error'],
15346 'type': 'object'},
15347 'ErrorResults': {'additionalProperties': False,
15348 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15349 'type': 'array'}},
15350 'required': ['Results'],
15351 'type': 'object'},
15352 'Macaroon': {'additionalProperties': False,
15353 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15354 'type': 'array'},
15355 'data': {'items': {'type': 'integer'},
15356 'type': 'array'},
15357 'id': {'$ref': '#/definitions/packet'},
15358 'location': {'$ref': '#/definitions/packet'},
15359 'sig': {'items': {'type': 'integer'},
15360 'type': 'array'}},
15361 'required': ['data',
15362 'location',
15363 'id',
15364 'caveats',
15365 'sig'],
15366 'type': 'object'},
15367 'SetStatus': {'additionalProperties': False,
15368 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15369 'type': 'array'}},
15370 'required': ['Entities'],
15371 'type': 'object'},
15372 'StringsWatchResult': {'additionalProperties': False,
15373 'properties': {'Changes': {'items': {'type': 'string'},
15374 'type': 'array'},
15375 'Error': {'$ref': '#/definitions/Error'},
15376 'StringsWatcherId': {'type': 'string'}},
15377 'required': ['StringsWatcherId',
15378 'Changes',
15379 'Error'],
15380 'type': 'object'},
15381 'caveat': {'additionalProperties': False,
15382 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15383 'location': {'$ref': '#/definitions/packet'},
15384 'verificationId': {'$ref': '#/definitions/packet'}},
15385 'required': ['location',
15386 'caveatId',
15387 'verificationId'],
15388 'type': 'object'},
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'}},
15397 'type': 'object'},
15398 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
15399 'Result': {'$ref': '#/definitions/ErrorResults'}},
15400 'type': 'object'},
15401 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15402 'type': 'object'}},
15403 'type': 'object'}
15404
15405
15406 #@ReturnMapping(ErrorResults)
15407 async def AssignUnits(self, entities):
15408 '''
15409 entities : typing.Sequence[~Entity]
15410 Returns -> typing.Sequence[~ErrorResult]
15411 '''
15412 # map input types to rpc msg
15413 params = dict()
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)
15418
15419
15420
15421 #@ReturnMapping(ErrorResults)
15422 async def SetAgentStatus(self, entities):
15423 '''
15424 entities : typing.Sequence[~EntityStatusArgs]
15425 Returns -> typing.Sequence[~ErrorResult]
15426 '''
15427 # map input types to rpc msg
15428 params = dict()
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)
15433
15434
15435
15436 #@ReturnMapping(StringsWatchResult)
15437 async def WatchUnitAssignments(self):
15438 '''
15439
15440 Returns -> typing.Union[~Error, typing.Sequence[str]]
15441 '''
15442 # map input types to rpc msg
15443 params = dict()
15444 msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params)
15445
15446 reply = await self.rpc(msg)
15447 return self._map(reply, WatchUnitAssignments)
15448
15449
15450 class Uniter(Type):
15451 name = 'Uniter'
15452 version = 3
15453 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
15454 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
15455 'type': 'array'},
15456 'type': 'array'}},
15457 'required': ['Servers'],
15458 'type': 'object'},
15459 'Action': {'additionalProperties': False,
15460 'properties': {'name': {'type': 'string'},
15461 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
15462 'type': 'object'}},
15463 'type': 'object'},
15464 'receiver': {'type': 'string'},
15465 'tag': {'type': 'string'}},
15466 'required': ['tag', 'receiver', 'name'],
15467 'type': 'object'},
15468 'ActionExecutionResult': {'additionalProperties': False,
15469 'properties': {'actiontag': {'type': 'string'},
15470 'message': {'type': 'string'},
15471 'results': {'patternProperties': {'.*': {'additionalProperties': True,
15472 'type': 'object'}},
15473 'type': 'object'},
15474 'status': {'type': 'string'}},
15475 'required': ['actiontag', 'status'],
15476 'type': 'object'},
15477 'ActionExecutionResults': {'additionalProperties': False,
15478 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
15479 'type': 'array'}},
15480 'type': 'object'},
15481 'ActionResult': {'additionalProperties': False,
15482 'properties': {'action': {'$ref': '#/definitions/Action'},
15483 'completed': {'format': 'date-time',
15484 'type': 'string'},
15485 'enqueued': {'format': 'date-time',
15486 'type': 'string'},
15487 'error': {'$ref': '#/definitions/Error'},
15488 'message': {'type': 'string'},
15489 'output': {'patternProperties': {'.*': {'additionalProperties': True,
15490 'type': 'object'}},
15491 'type': 'object'},
15492 'started': {'format': 'date-time',
15493 'type': 'string'},
15494 'status': {'type': 'string'}},
15495 'type': 'object'},
15496 'ActionResults': {'additionalProperties': False,
15497 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
15498 'type': 'array'}},
15499 'type': 'object'},
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'],
15506 'type': 'object'},
15507 'BoolResult': {'additionalProperties': False,
15508 'properties': {'Error': {'$ref': '#/definitions/Error'},
15509 'Result': {'type': 'boolean'}},
15510 'required': ['Error', 'Result'],
15511 'type': 'object'},
15512 'BoolResults': {'additionalProperties': False,
15513 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
15514 'type': 'array'}},
15515 'required': ['Results'],
15516 'type': 'object'},
15517 'BytesResult': {'additionalProperties': False,
15518 'properties': {'Result': {'items': {'type': 'integer'},
15519 'type': 'array'}},
15520 'required': ['Result'],
15521 'type': 'object'},
15522 'CharmURL': {'additionalProperties': False,
15523 'properties': {'URL': {'type': 'string'}},
15524 'required': ['URL'],
15525 'type': 'object'},
15526 'CharmURLs': {'additionalProperties': False,
15527 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
15528 'type': 'array'}},
15529 'required': ['URLs'],
15530 'type': 'object'},
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'],
15537 'type': 'object'},
15538 'ConfigSettingsResults': {'additionalProperties': False,
15539 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
15540 'type': 'array'}},
15541 'required': ['Results'],
15542 'type': 'object'},
15543 'Endpoint': {'additionalProperties': False,
15544 'properties': {'Relation': {'$ref': '#/definitions/Relation'},
15545 'ServiceName': {'type': 'string'}},
15546 'required': ['ServiceName', 'Relation'],
15547 'type': 'object'},
15548 'Entities': {'additionalProperties': False,
15549 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15550 'type': 'array'}},
15551 'required': ['Entities'],
15552 'type': 'object'},
15553 'EntitiesCharmURL': {'additionalProperties': False,
15554 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
15555 'type': 'array'}},
15556 'required': ['Entities'],
15557 'type': 'object'},
15558 'EntitiesPortRanges': {'additionalProperties': False,
15559 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
15560 'type': 'array'}},
15561 'required': ['Entities'],
15562 'type': 'object'},
15563 'Entity': {'additionalProperties': False,
15564 'properties': {'Tag': {'type': 'string'}},
15565 'required': ['Tag'],
15566 'type': 'object'},
15567 'EntityCharmURL': {'additionalProperties': False,
15568 'properties': {'CharmURL': {'type': 'string'},
15569 'Tag': {'type': 'string'}},
15570 'required': ['Tag', 'CharmURL'],
15571 'type': 'object'},
15572 'EntityPortRange': {'additionalProperties': False,
15573 'properties': {'FromPort': {'type': 'integer'},
15574 'Protocol': {'type': 'string'},
15575 'Tag': {'type': 'string'},
15576 'ToPort': {'type': 'integer'}},
15577 'required': ['Tag',
15578 'Protocol',
15579 'FromPort',
15580 'ToPort'],
15581 'type': 'object'},
15582 'EntityStatusArgs': {'additionalProperties': False,
15583 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15584 'type': 'object'}},
15585 'type': 'object'},
15586 'Info': {'type': 'string'},
15587 'Status': {'type': 'string'},
15588 'Tag': {'type': 'string'}},
15589 'required': ['Tag',
15590 'Status',
15591 'Info',
15592 'Data'],
15593 'type': 'object'},
15594 'Error': {'additionalProperties': False,
15595 'properties': {'Code': {'type': 'string'},
15596 'Info': {'$ref': '#/definitions/ErrorInfo'},
15597 'Message': {'type': 'string'}},
15598 'required': ['Message', 'Code'],
15599 'type': 'object'},
15600 'ErrorInfo': {'additionalProperties': False,
15601 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15602 'MacaroonPath': {'type': 'string'}},
15603 'type': 'object'},
15604 'ErrorResult': {'additionalProperties': False,
15605 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15606 'required': ['Error'],
15607 'type': 'object'},
15608 'ErrorResults': {'additionalProperties': False,
15609 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15610 'type': 'array'}},
15611 'required': ['Results'],
15612 'type': 'object'},
15613 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
15614 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
15615 'type': 'array'}},
15616 'required': ['Results'],
15617 'type': 'object'},
15618 'GetLeadershipSettingsResult': {'additionalProperties': False,
15619 'properties': {'Error': {'$ref': '#/definitions/Error'},
15620 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15621 'type': 'object'}},
15622 'required': ['Settings',
15623 'Error'],
15624 'type': 'object'},
15625 'HostPort': {'additionalProperties': False,
15626 'properties': {'Address': {'$ref': '#/definitions/Address'},
15627 'Port': {'type': 'integer'}},
15628 'required': ['Address', 'Port'],
15629 'type': 'object'},
15630 'IntResult': {'additionalProperties': False,
15631 'properties': {'Error': {'$ref': '#/definitions/Error'},
15632 'Result': {'type': 'integer'}},
15633 'required': ['Error', 'Result'],
15634 'type': 'object'},
15635 'IntResults': {'additionalProperties': False,
15636 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
15637 'type': 'array'}},
15638 'required': ['Results'],
15639 'type': 'object'},
15640 'LifeResult': {'additionalProperties': False,
15641 'properties': {'Error': {'$ref': '#/definitions/Error'},
15642 'Life': {'type': 'string'}},
15643 'required': ['Life', 'Error'],
15644 'type': 'object'},
15645 'LifeResults': {'additionalProperties': False,
15646 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
15647 'type': 'array'}},
15648 'required': ['Results'],
15649 'type': 'object'},
15650 'Macaroon': {'additionalProperties': False,
15651 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15652 'type': 'array'},
15653 'data': {'items': {'type': 'integer'},
15654 'type': 'array'},
15655 'id': {'$ref': '#/definitions/packet'},
15656 'location': {'$ref': '#/definitions/packet'},
15657 'sig': {'items': {'type': 'integer'},
15658 'type': 'array'}},
15659 'required': ['data',
15660 'location',
15661 'id',
15662 'caveats',
15663 'sig'],
15664 'type': 'object'},
15665 'MachinePortRange': {'additionalProperties': False,
15666 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
15667 'RelationTag': {'type': 'string'},
15668 'UnitTag': {'type': 'string'}},
15669 'required': ['UnitTag',
15670 'RelationTag',
15671 'PortRange'],
15672 'type': 'object'},
15673 'MachinePortsResult': {'additionalProperties': False,
15674 'properties': {'Error': {'$ref': '#/definitions/Error'},
15675 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
15676 'type': 'array'}},
15677 'required': ['Error', 'Ports'],
15678 'type': 'object'},
15679 'MachinePortsResults': {'additionalProperties': False,
15680 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
15681 'type': 'array'}},
15682 'required': ['Results'],
15683 'type': 'object'},
15684 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
15685 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
15686 'type': 'array'}},
15687 'required': ['Params'],
15688 'type': 'object'},
15689 'MergeLeadershipSettingsParam': {'additionalProperties': False,
15690 'properties': {'ServiceTag': {'type': 'string'},
15691 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15692 'type': 'object'}},
15693 'required': ['ServiceTag',
15694 'Settings'],
15695 'type': 'object'},
15696 'MeterStatusResult': {'additionalProperties': False,
15697 'properties': {'Code': {'type': 'string'},
15698 'Error': {'$ref': '#/definitions/Error'},
15699 'Info': {'type': 'string'}},
15700 'required': ['Code', 'Info', 'Error'],
15701 'type': 'object'},
15702 'MeterStatusResults': {'additionalProperties': False,
15703 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
15704 'type': 'array'}},
15705 'required': ['Results'],
15706 'type': 'object'},
15707 'Metric': {'additionalProperties': False,
15708 'properties': {'Key': {'type': 'string'},
15709 'Time': {'format': 'date-time',
15710 'type': 'string'},
15711 'Value': {'type': 'string'}},
15712 'required': ['Key', 'Value', 'Time'],
15713 'type': 'object'},
15714 'MetricBatch': {'additionalProperties': False,
15715 'properties': {'CharmURL': {'type': 'string'},
15716 'Created': {'format': 'date-time',
15717 'type': 'string'},
15718 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
15719 'type': 'array'},
15720 'UUID': {'type': 'string'}},
15721 'required': ['UUID',
15722 'CharmURL',
15723 'Created',
15724 'Metrics'],
15725 'type': 'object'},
15726 'MetricBatchParam': {'additionalProperties': False,
15727 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
15728 'Tag': {'type': 'string'}},
15729 'required': ['Tag', 'Batch'],
15730 'type': 'object'},
15731 'MetricBatchParams': {'additionalProperties': False,
15732 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
15733 'type': 'array'}},
15734 'required': ['Batches'],
15735 'type': 'object'},
15736 'ModelConfigResult': {'additionalProperties': False,
15737 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15738 'type': 'object'}},
15739 'type': 'object'}},
15740 'required': ['Config'],
15741 'type': 'object'},
15742 'ModelResult': {'additionalProperties': False,
15743 'properties': {'Error': {'$ref': '#/definitions/Error'},
15744 'Name': {'type': 'string'},
15745 'UUID': {'type': 'string'}},
15746 'required': ['Error', 'Name', 'UUID'],
15747 'type': 'object'},
15748 'NetworkConfig': {'additionalProperties': False,
15749 'properties': {'Address': {'type': 'string'},
15750 'CIDR': {'type': 'string'},
15751 'ConfigType': {'type': 'string'},
15752 'DNSSearchDomains': {'items': {'type': 'string'},
15753 'type': 'array'},
15754 'DNSServers': {'items': {'type': 'string'},
15755 'type': 'array'},
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',
15772 'MACAddress',
15773 'CIDR',
15774 'MTU',
15775 'ProviderId',
15776 'ProviderSubnetId',
15777 'ProviderSpaceId',
15778 'ProviderAddressId',
15779 'ProviderVLANId',
15780 'VLANTag',
15781 'InterfaceName',
15782 'ParentInterfaceName',
15783 'InterfaceType',
15784 'Disabled'],
15785 'type': 'object'},
15786 'NotifyWatchResult': {'additionalProperties': False,
15787 'properties': {'Error': {'$ref': '#/definitions/Error'},
15788 'NotifyWatcherId': {'type': 'string'}},
15789 'required': ['NotifyWatcherId', 'Error'],
15790 'type': 'object'},
15791 'NotifyWatchResults': {'additionalProperties': False,
15792 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
15793 'type': 'array'}},
15794 'required': ['Results'],
15795 'type': 'object'},
15796 'PortRange': {'additionalProperties': False,
15797 'properties': {'FromPort': {'type': 'integer'},
15798 'Protocol': {'type': 'string'},
15799 'ToPort': {'type': 'integer'}},
15800 'required': ['FromPort', 'ToPort', 'Protocol'],
15801 'type': 'object'},
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',
15810 'Role',
15811 'Interface',
15812 'Optional',
15813 'Limit',
15814 'Scope'],
15815 'type': 'object'},
15816 'RelationIds': {'additionalProperties': False,
15817 'properties': {'RelationIds': {'items': {'type': 'integer'},
15818 'type': 'array'}},
15819 'required': ['RelationIds'],
15820 'type': 'object'},
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',
15828 'Life',
15829 'Id',
15830 'Key',
15831 'Endpoint'],
15832 'type': 'object'},
15833 'RelationResults': {'additionalProperties': False,
15834 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
15835 'type': 'array'}},
15836 'required': ['Results'],
15837 'type': 'object'},
15838 'RelationUnit': {'additionalProperties': False,
15839 'properties': {'Relation': {'type': 'string'},
15840 'Unit': {'type': 'string'}},
15841 'required': ['Relation', 'Unit'],
15842 'type': 'object'},
15843 'RelationUnitPair': {'additionalProperties': False,
15844 'properties': {'LocalUnit': {'type': 'string'},
15845 'Relation': {'type': 'string'},
15846 'RemoteUnit': {'type': 'string'}},
15847 'required': ['Relation',
15848 'LocalUnit',
15849 'RemoteUnit'],
15850 'type': 'object'},
15851 'RelationUnitPairs': {'additionalProperties': False,
15852 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
15853 'type': 'array'}},
15854 'required': ['RelationUnitPairs'],
15855 'type': 'object'},
15856 'RelationUnitSettings': {'additionalProperties': False,
15857 'properties': {'Relation': {'type': 'string'},
15858 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15859 'type': 'object'},
15860 'Unit': {'type': 'string'}},
15861 'required': ['Relation',
15862 'Unit',
15863 'Settings'],
15864 'type': 'object'},
15865 'RelationUnits': {'additionalProperties': False,
15866 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
15867 'type': 'array'}},
15868 'required': ['RelationUnits'],
15869 'type': 'object'},
15870 'RelationUnitsChange': {'additionalProperties': False,
15871 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
15872 'type': 'object'},
15873 'Departed': {'items': {'type': 'string'},
15874 'type': 'array'}},
15875 'required': ['Changed', 'Departed'],
15876 'type': 'object'},
15877 'RelationUnitsSettings': {'additionalProperties': False,
15878 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
15879 'type': 'array'}},
15880 'required': ['RelationUnits'],
15881 'type': 'object'},
15882 'RelationUnitsWatchResult': {'additionalProperties': False,
15883 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
15884 'Error': {'$ref': '#/definitions/Error'},
15885 'RelationUnitsWatcherId': {'type': 'string'}},
15886 'required': ['RelationUnitsWatcherId',
15887 'Changes',
15888 'Error'],
15889 'type': 'object'},
15890 'RelationUnitsWatchResults': {'additionalProperties': False,
15891 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
15892 'type': 'array'}},
15893 'required': ['Results'],
15894 'type': 'object'},
15895 'ResolvedModeResult': {'additionalProperties': False,
15896 'properties': {'Error': {'$ref': '#/definitions/Error'},
15897 'Mode': {'type': 'string'}},
15898 'required': ['Error', 'Mode'],
15899 'type': 'object'},
15900 'ResolvedModeResults': {'additionalProperties': False,
15901 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
15902 'type': 'array'}},
15903 'required': ['Results'],
15904 'type': 'object'},
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',
15911 'Units',
15912 'Error'],
15913 'type': 'object'},
15914 'ServiceStatusResults': {'additionalProperties': False,
15915 'properties': {'Results': {'items': {'$ref': '#/definitions/ServiceStatusResult'},
15916 'type': 'array'}},
15917 'required': ['Results'],
15918 'type': 'object'},
15919 'SetStatus': {'additionalProperties': False,
15920 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
15921 'type': 'array'}},
15922 'required': ['Entities'],
15923 'type': 'object'},
15924 'SettingsResult': {'additionalProperties': False,
15925 'properties': {'Error': {'$ref': '#/definitions/Error'},
15926 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
15927 'type': 'object'}},
15928 'required': ['Error', 'Settings'],
15929 'type': 'object'},
15930 'SettingsResults': {'additionalProperties': False,
15931 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
15932 'type': 'array'}},
15933 'required': ['Results'],
15934 'type': 'object'},
15935 'StatusResult': {'additionalProperties': False,
15936 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15937 'type': 'object'}},
15938 'type': 'object'},
15939 'Error': {'$ref': '#/definitions/Error'},
15940 'Id': {'type': 'string'},
15941 'Info': {'type': 'string'},
15942 'Life': {'type': 'string'},
15943 'Since': {'format': 'date-time',
15944 'type': 'string'},
15945 'Status': {'type': 'string'}},
15946 'required': ['Error',
15947 'Id',
15948 'Life',
15949 'Status',
15950 'Info',
15951 'Data',
15952 'Since'],
15953 'type': 'object'},
15954 'StatusResults': {'additionalProperties': False,
15955 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
15956 'type': 'array'}},
15957 'required': ['Results'],
15958 'type': 'object'},
15959 'StorageAddParams': {'additionalProperties': False,
15960 'properties': {'StorageName': {'type': 'string'},
15961 'storage': {'$ref': '#/definitions/StorageConstraints'},
15962 'unit': {'type': 'string'}},
15963 'required': ['unit',
15964 'StorageName',
15965 'storage'],
15966 'type': 'object'},
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',
15975 'OwnerTag',
15976 'UnitTag',
15977 'Kind',
15978 'Location',
15979 'Life'],
15980 'type': 'object'},
15981 'StorageAttachmentId': {'additionalProperties': False,
15982 'properties': {'storagetag': {'type': 'string'},
15983 'unittag': {'type': 'string'}},
15984 'required': ['storagetag', 'unittag'],
15985 'type': 'object'},
15986 'StorageAttachmentIds': {'additionalProperties': False,
15987 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
15988 'type': 'array'}},
15989 'required': ['ids'],
15990 'type': 'object'},
15991 'StorageAttachmentIdsResult': {'additionalProperties': False,
15992 'properties': {'error': {'$ref': '#/definitions/Error'},
15993 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
15994 'required': ['result'],
15995 'type': 'object'},
15996 'StorageAttachmentIdsResults': {'additionalProperties': False,
15997 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
15998 'type': 'array'}},
15999 'type': 'object'},
16000 'StorageAttachmentResult': {'additionalProperties': False,
16001 'properties': {'error': {'$ref': '#/definitions/Error'},
16002 'result': {'$ref': '#/definitions/StorageAttachment'}},
16003 'required': ['result'],
16004 'type': 'object'},
16005 'StorageAttachmentResults': {'additionalProperties': False,
16006 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
16007 'type': 'array'}},
16008 'type': 'object'},
16009 'StorageConstraints': {'additionalProperties': False,
16010 'properties': {'Count': {'type': 'integer'},
16011 'Pool': {'type': 'string'},
16012 'Size': {'type': 'integer'}},
16013 'required': ['Pool', 'Size', 'Count'],
16014 'type': 'object'},
16015 'StoragesAddParams': {'additionalProperties': False,
16016 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16017 'type': 'array'}},
16018 'required': ['storages'],
16019 'type': 'object'},
16020 'StringBoolResult': {'additionalProperties': False,
16021 'properties': {'Error': {'$ref': '#/definitions/Error'},
16022 'Ok': {'type': 'boolean'},
16023 'Result': {'type': 'string'}},
16024 'required': ['Error', 'Result', 'Ok'],
16025 'type': 'object'},
16026 'StringBoolResults': {'additionalProperties': False,
16027 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
16028 'type': 'array'}},
16029 'required': ['Results'],
16030 'type': 'object'},
16031 'StringResult': {'additionalProperties': False,
16032 'properties': {'Error': {'$ref': '#/definitions/Error'},
16033 'Result': {'type': 'string'}},
16034 'required': ['Error', 'Result'],
16035 'type': 'object'},
16036 'StringResults': {'additionalProperties': False,
16037 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16038 'type': 'array'}},
16039 'required': ['Results'],
16040 'type': 'object'},
16041 'StringsResult': {'additionalProperties': False,
16042 'properties': {'Error': {'$ref': '#/definitions/Error'},
16043 'Result': {'items': {'type': 'string'},
16044 'type': 'array'}},
16045 'required': ['Error', 'Result'],
16046 'type': 'object'},
16047 'StringsResults': {'additionalProperties': False,
16048 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
16049 'type': 'array'}},
16050 'required': ['Results'],
16051 'type': 'object'},
16052 'StringsWatchResult': {'additionalProperties': False,
16053 'properties': {'Changes': {'items': {'type': 'string'},
16054 'type': 'array'},
16055 'Error': {'$ref': '#/definitions/Error'},
16056 'StringsWatcherId': {'type': 'string'}},
16057 'required': ['StringsWatcherId',
16058 'Changes',
16059 'Error'],
16060 'type': 'object'},
16061 'StringsWatchResults': {'additionalProperties': False,
16062 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16063 'type': 'array'}},
16064 'required': ['Results'],
16065 'type': 'object'},
16066 'UnitNetworkConfig': {'additionalProperties': False,
16067 'properties': {'BindingName': {'type': 'string'},
16068 'UnitTag': {'type': 'string'}},
16069 'required': ['UnitTag', 'BindingName'],
16070 'type': 'object'},
16071 'UnitNetworkConfigResult': {'additionalProperties': False,
16072 'properties': {'Error': {'$ref': '#/definitions/Error'},
16073 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
16074 'type': 'array'}},
16075 'required': ['Error', 'Info'],
16076 'type': 'object'},
16077 'UnitNetworkConfigResults': {'additionalProperties': False,
16078 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
16079 'type': 'array'}},
16080 'required': ['Results'],
16081 'type': 'object'},
16082 'UnitSettings': {'additionalProperties': False,
16083 'properties': {'Version': {'type': 'integer'}},
16084 'required': ['Version'],
16085 'type': 'object'},
16086 'UnitsNetworkConfig': {'additionalProperties': False,
16087 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
16088 'type': 'array'}},
16089 'required': ['Args'],
16090 'type': 'object'},
16091 'caveat': {'additionalProperties': False,
16092 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16093 'location': {'$ref': '#/definitions/packet'},
16094 'verificationId': {'$ref': '#/definitions/packet'}},
16095 'required': ['location',
16096 'caveatId',
16097 'verificationId'],
16098 'type': 'object'},
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'}},
16106 'type': 'object'},
16107 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
16108 'type': 'object'},
16109 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16110 'Result': {'$ref': '#/definitions/ActionResults'}},
16111 'type': 'object'},
16112 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
16113 'Result': {'$ref': '#/definitions/ErrorResults'}},
16114 'type': 'object'},
16115 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
16116 'Result': {'$ref': '#/definitions/ErrorResults'}},
16117 'type': 'object'},
16118 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16119 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
16120 'type': 'object'},
16121 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16122 'Result': {'$ref': '#/definitions/StringResults'}},
16123 'type': 'object'},
16124 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16125 'Result': {'$ref': '#/definitions/StringResults'}},
16126 'type': 'object'},
16127 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16128 'Result': {'$ref': '#/definitions/ErrorResults'}},
16129 'type': 'object'},
16130 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
16131 'type': 'object'},
16132 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
16133 'Result': {'$ref': '#/definitions/StringResults'}},
16134 'type': 'object'},
16135 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16136 'Result': {'$ref': '#/definitions/IntResults'}},
16137 'type': 'object'},
16138 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16139 'Result': {'$ref': '#/definitions/StringBoolResults'}},
16140 'type': 'object'},
16141 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16142 'Result': {'$ref': '#/definitions/ErrorResults'}},
16143 'type': 'object'},
16144 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
16145 'Result': {'$ref': '#/definitions/ErrorResults'}},
16146 'type': 'object'},
16147 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16148 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
16149 'type': 'object'},
16150 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
16151 'type': 'object'},
16152 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16153 'Result': {'$ref': '#/definitions/ErrorResults'}},
16154 'type': 'object'},
16155 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16156 'Result': {'$ref': '#/definitions/ErrorResults'}},
16157 'type': 'object'},
16158 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16159 'Result': {'$ref': '#/definitions/ErrorResults'}},
16160 'type': 'object'},
16161 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16162 'Result': {'$ref': '#/definitions/ErrorResults'}},
16163 'type': 'object'},
16164 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16165 'Result': {'$ref': '#/definitions/ErrorResults'}},
16166 'type': 'object'},
16167 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
16168 'Result': {'$ref': '#/definitions/ErrorResults'}},
16169 'type': 'object'},
16170 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16171 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
16172 'type': 'object'},
16173 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16174 'Result': {'$ref': '#/definitions/StringBoolResults'}},
16175 'type': 'object'},
16176 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16177 'Result': {'$ref': '#/definitions/BoolResults'}},
16178 'type': 'object'},
16179 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16180 'Result': {'$ref': '#/definitions/StringsResults'}},
16181 'type': 'object'},
16182 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16183 'Result': {'$ref': '#/definitions/ErrorResults'}},
16184 'type': 'object'},
16185 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16186 'Result': {'$ref': '#/definitions/LifeResults'}},
16187 'type': 'object'},
16188 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
16189 'Result': {'$ref': '#/definitions/ErrorResults'}},
16190 'type': 'object'},
16191 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16192 'type': 'object'},
16193 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
16194 'type': 'object'},
16195 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
16196 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
16197 'type': 'object'},
16198 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
16199 'Result': {'$ref': '#/definitions/ErrorResults'}},
16200 'type': 'object'},
16201 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16202 'Result': {'$ref': '#/definitions/StringResults'}},
16203 'type': 'object'},
16204 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
16205 'type': 'object'},
16206 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16207 'Result': {'$ref': '#/definitions/StringResults'}},
16208 'type': 'object'},
16209 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16210 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
16211 'type': 'object'},
16212 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
16213 'Result': {'$ref': '#/definitions/SettingsResults'}},
16214 'type': 'object'},
16215 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16216 'Result': {'$ref': '#/definitions/SettingsResults'}},
16217 'type': 'object'},
16218 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16219 'Result': {'$ref': '#/definitions/RelationResults'}},
16220 'type': 'object'},
16221 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
16222 'Result': {'$ref': '#/definitions/RelationResults'}},
16223 'type': 'object'},
16224 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16225 'Result': {'$ref': '#/definitions/ErrorResults'}},
16226 'type': 'object'},
16227 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16228 'Result': {'$ref': '#/definitions/ErrorResults'}},
16229 'type': 'object'},
16230 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16231 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
16232 'type': 'object'},
16233 'ServiceOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16234 'Result': {'$ref': '#/definitions/StringResults'}},
16235 'type': 'object'},
16236 'ServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16237 'Result': {'$ref': '#/definitions/ServiceStatusResults'}},
16238 'type': 'object'},
16239 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16240 'Result': {'$ref': '#/definitions/ErrorResults'}},
16241 'type': 'object'},
16242 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
16243 'Result': {'$ref': '#/definitions/ErrorResults'}},
16244 'type': 'object'},
16245 'SetServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16246 'Result': {'$ref': '#/definitions/ErrorResults'}},
16247 'type': 'object'},
16248 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16249 'Result': {'$ref': '#/definitions/ErrorResults'}},
16250 'type': 'object'},
16251 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16252 'Result': {'$ref': '#/definitions/ErrorResults'}},
16253 'type': 'object'},
16254 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16255 'Result': {'$ref': '#/definitions/LifeResults'}},
16256 'type': 'object'},
16257 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16258 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
16259 'type': 'object'},
16260 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16261 'Result': {'$ref': '#/definitions/StatusResults'}},
16262 'type': 'object'},
16263 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16264 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
16265 'type': 'object'},
16266 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
16267 'Result': {'$ref': '#/definitions/ErrorResults'}},
16268 'type': 'object'},
16269 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16270 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16271 'type': 'object'},
16272 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16273 'type': 'object'},
16274 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16275 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16276 'type': 'object'},
16277 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16278 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16279 'type': 'object'},
16280 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16281 'type': 'object'},
16282 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16283 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16284 'type': 'object'},
16285 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16286 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16287 'type': 'object'},
16288 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
16289 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
16290 'type': 'object'},
16291 'WatchServiceRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16292 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16293 'type': 'object'},
16294 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
16295 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16296 'type': 'object'},
16297 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16298 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16299 'type': 'object'},
16300 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16301 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16302 'type': 'object'}},
16303 'type': 'object'}
16304
16305
16306 #@ReturnMapping(StringsResult)
16307 async def APIAddresses(self):
16308 '''
16309
16310 Returns -> typing.Union[~Error, typing.Sequence[str]]
16311 '''
16312 # map input types to rpc msg
16313 params = dict()
16314 msg = dict(Type='Uniter', Request='APIAddresses', Version=3, Params=params)
16315
16316 reply = await self.rpc(msg)
16317 return self._map(reply, APIAddresses)
16318
16319
16320
16321 #@ReturnMapping(APIHostPortsResult)
16322 async def APIHostPorts(self):
16323 '''
16324
16325 Returns -> typing.Sequence[~HostPort]
16326 '''
16327 # map input types to rpc msg
16328 params = dict()
16329 msg = dict(Type='Uniter', Request='APIHostPorts', Version=3, Params=params)
16330
16331 reply = await self.rpc(msg)
16332 return self._map(reply, APIHostPorts)
16333
16334
16335
16336 #@ReturnMapping(ActionResults)
16337 async def Actions(self, entities):
16338 '''
16339 entities : typing.Sequence[~Entity]
16340 Returns -> typing.Sequence[~ActionResult]
16341 '''
16342 # map input types to rpc msg
16343 params = dict()
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)
16348
16349
16350
16351 #@ReturnMapping(ErrorResults)
16352 async def AddMetricBatches(self, batches):
16353 '''
16354 batches : typing.Sequence[~MetricBatchParam]
16355 Returns -> typing.Sequence[~ErrorResult]
16356 '''
16357 # map input types to rpc msg
16358 params = dict()
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)
16363
16364
16365
16366 #@ReturnMapping(ErrorResults)
16367 async def AddUnitStorage(self, storages):
16368 '''
16369 storages : typing.Sequence[~StorageAddParams]
16370 Returns -> typing.Sequence[~ErrorResult]
16371 '''
16372 # map input types to rpc msg
16373 params = dict()
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)
16378
16379
16380
16381 #@ReturnMapping(MachinePortsResults)
16382 async def AllMachinePorts(self, entities):
16383 '''
16384 entities : typing.Sequence[~Entity]
16385 Returns -> typing.Sequence[~MachinePortsResult]
16386 '''
16387 # map input types to rpc msg
16388 params = dict()
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)
16393
16394
16395
16396 #@ReturnMapping(StringResults)
16397 async def AssignedMachine(self, entities):
16398 '''
16399 entities : typing.Sequence[~Entity]
16400 Returns -> typing.Sequence[~StringResult]
16401 '''
16402 # map input types to rpc msg
16403 params = dict()
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)
16408
16409
16410
16411 #@ReturnMapping(StringResults)
16412 async def AvailabilityZone(self, entities):
16413 '''
16414 entities : typing.Sequence[~Entity]
16415 Returns -> typing.Sequence[~StringResult]
16416 '''
16417 # map input types to rpc msg
16418 params = dict()
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)
16423
16424
16425
16426 #@ReturnMapping(ErrorResults)
16427 async def BeginActions(self, entities):
16428 '''
16429 entities : typing.Sequence[~Entity]
16430 Returns -> typing.Sequence[~ErrorResult]
16431 '''
16432 # map input types to rpc msg
16433 params = dict()
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)
16438
16439
16440
16441 #@ReturnMapping(BytesResult)
16442 async def CACert(self):
16443 '''
16444
16445 Returns -> typing.Sequence[int]
16446 '''
16447 # map input types to rpc msg
16448 params = dict()
16449 msg = dict(Type='Uniter', Request='CACert', Version=3, Params=params)
16450
16451 reply = await self.rpc(msg)
16452 return self._map(reply, CACert)
16453
16454
16455
16456 #@ReturnMapping(StringResults)
16457 async def CharmArchiveSha256(self, urls):
16458 '''
16459 urls : typing.Sequence[~CharmURL]
16460 Returns -> typing.Sequence[~StringResult]
16461 '''
16462 # map input types to rpc msg
16463 params = dict()
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)
16468
16469
16470
16471 #@ReturnMapping(IntResults)
16472 async def CharmModifiedVersion(self, entities):
16473 '''
16474 entities : typing.Sequence[~Entity]
16475 Returns -> typing.Sequence[~IntResult]
16476 '''
16477 # map input types to rpc msg
16478 params = dict()
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)
16483
16484
16485
16486 #@ReturnMapping(StringBoolResults)
16487 async def CharmURL(self, entities):
16488 '''
16489 entities : typing.Sequence[~Entity]
16490 Returns -> typing.Sequence[~StringBoolResult]
16491 '''
16492 # map input types to rpc msg
16493 params = dict()
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)
16498
16499
16500
16501 #@ReturnMapping(ErrorResults)
16502 async def ClearResolved(self, entities):
16503 '''
16504 entities : typing.Sequence[~Entity]
16505 Returns -> typing.Sequence[~ErrorResult]
16506 '''
16507 # map input types to rpc msg
16508 params = dict()
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)
16513
16514
16515
16516 #@ReturnMapping(ErrorResults)
16517 async def ClosePorts(self, entities):
16518 '''
16519 entities : typing.Sequence[~EntityPortRange]
16520 Returns -> typing.Sequence[~ErrorResult]
16521 '''
16522 # map input types to rpc msg
16523 params = dict()
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)
16528
16529
16530
16531 #@ReturnMapping(ConfigSettingsResults)
16532 async def ConfigSettings(self, entities):
16533 '''
16534 entities : typing.Sequence[~Entity]
16535 Returns -> typing.Sequence[~ConfigSettingsResult]
16536 '''
16537 # map input types to rpc msg
16538 params = dict()
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)
16543
16544
16545
16546 #@ReturnMapping(ModelResult)
16547 async def CurrentModel(self):
16548 '''
16549
16550 Returns -> typing.Union[str, ~Error]
16551 '''
16552 # map input types to rpc msg
16553 params = dict()
16554 msg = dict(Type='Uniter', Request='CurrentModel', Version=3, Params=params)
16555
16556 reply = await self.rpc(msg)
16557 return self._map(reply, CurrentModel)
16558
16559
16560
16561 #@ReturnMapping(ErrorResults)
16562 async def Destroy(self, entities):
16563 '''
16564 entities : typing.Sequence[~Entity]
16565 Returns -> typing.Sequence[~ErrorResult]
16566 '''
16567 # map input types to rpc msg
16568 params = dict()
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)
16573
16574
16575
16576 #@ReturnMapping(ErrorResults)
16577 async def DestroyAllSubordinates(self, entities):
16578 '''
16579 entities : typing.Sequence[~Entity]
16580 Returns -> typing.Sequence[~ErrorResult]
16581 '''
16582 # map input types to rpc msg
16583 params = dict()
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)
16588
16589
16590
16591 #@ReturnMapping(ErrorResults)
16592 async def DestroyUnitStorageAttachments(self, entities):
16593 '''
16594 entities : typing.Sequence[~Entity]
16595 Returns -> typing.Sequence[~ErrorResult]
16596 '''
16597 # map input types to rpc msg
16598 params = dict()
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)
16603
16604
16605
16606 #@ReturnMapping(ErrorResults)
16607 async def EnsureDead(self, entities):
16608 '''
16609 entities : typing.Sequence[~Entity]
16610 Returns -> typing.Sequence[~ErrorResult]
16611 '''
16612 # map input types to rpc msg
16613 params = dict()
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)
16618
16619
16620
16621 #@ReturnMapping(ErrorResults)
16622 async def EnterScope(self, relationunits):
16623 '''
16624 relationunits : typing.Sequence[~RelationUnit]
16625 Returns -> typing.Sequence[~ErrorResult]
16626 '''
16627 # map input types to rpc msg
16628 params = dict()
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)
16633
16634
16635
16636 #@ReturnMapping(ErrorResults)
16637 async def FinishActions(self, results):
16638 '''
16639 results : typing.Sequence[~ActionExecutionResult]
16640 Returns -> typing.Sequence[~ErrorResult]
16641 '''
16642 # map input types to rpc msg
16643 params = dict()
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)
16648
16649
16650
16651 #@ReturnMapping(MeterStatusResults)
16652 async def GetMeterStatus(self, entities):
16653 '''
16654 entities : typing.Sequence[~Entity]
16655 Returns -> typing.Sequence[~MeterStatusResult]
16656 '''
16657 # map input types to rpc msg
16658 params = dict()
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)
16663
16664
16665
16666 #@ReturnMapping(StringBoolResults)
16667 async def GetPrincipal(self, entities):
16668 '''
16669 entities : typing.Sequence[~Entity]
16670 Returns -> typing.Sequence[~StringBoolResult]
16671 '''
16672 # map input types to rpc msg
16673 params = dict()
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)
16678
16679
16680
16681 #@ReturnMapping(BoolResults)
16682 async def HasSubordinates(self, entities):
16683 '''
16684 entities : typing.Sequence[~Entity]
16685 Returns -> typing.Sequence[~BoolResult]
16686 '''
16687 # map input types to rpc msg
16688 params = dict()
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)
16693
16694
16695
16696 #@ReturnMapping(StringsResults)
16697 async def JoinedRelations(self, entities):
16698 '''
16699 entities : typing.Sequence[~Entity]
16700 Returns -> typing.Sequence[~StringsResult]
16701 '''
16702 # map input types to rpc msg
16703 params = dict()
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)
16708
16709
16710
16711 #@ReturnMapping(ErrorResults)
16712 async def LeaveScope(self, relationunits):
16713 '''
16714 relationunits : typing.Sequence[~RelationUnit]
16715 Returns -> typing.Sequence[~ErrorResult]
16716 '''
16717 # map input types to rpc msg
16718 params = dict()
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)
16723
16724
16725
16726 #@ReturnMapping(LifeResults)
16727 async def Life(self, entities):
16728 '''
16729 entities : typing.Sequence[~Entity]
16730 Returns -> typing.Sequence[~LifeResult]
16731 '''
16732 # map input types to rpc msg
16733 params = dict()
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)
16738
16739
16740
16741 #@ReturnMapping(ErrorResults)
16742 async def Merge(self, params):
16743 '''
16744 params : typing.Sequence[~MergeLeadershipSettingsParam]
16745 Returns -> typing.Sequence[~ErrorResult]
16746 '''
16747 # map input types to rpc msg
16748 params = dict()
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)
16753
16754
16755
16756 #@ReturnMapping(ModelConfigResult)
16757 async def ModelConfig(self):
16758 '''
16759
16760 Returns -> typing.Mapping[str, typing.Any]
16761 '''
16762 # map input types to rpc msg
16763 params = dict()
16764 msg = dict(Type='Uniter', Request='ModelConfig', Version=3, Params=params)
16765
16766 reply = await self.rpc(msg)
16767 return self._map(reply, ModelConfig)
16768
16769
16770
16771 #@ReturnMapping(StringResult)
16772 async def ModelUUID(self):
16773 '''
16774
16775 Returns -> typing.Union[~Error, str]
16776 '''
16777 # map input types to rpc msg
16778 params = dict()
16779 msg = dict(Type='Uniter', Request='ModelUUID', Version=3, Params=params)
16780
16781 reply = await self.rpc(msg)
16782 return self._map(reply, ModelUUID)
16783
16784
16785
16786 #@ReturnMapping(UnitNetworkConfigResults)
16787 async def NetworkConfig(self, args):
16788 '''
16789 args : typing.Sequence[~UnitNetworkConfig]
16790 Returns -> typing.Sequence[~UnitNetworkConfigResult]
16791 '''
16792 # map input types to rpc msg
16793 params = dict()
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)
16798
16799
16800
16801 #@ReturnMapping(ErrorResults)
16802 async def OpenPorts(self, entities):
16803 '''
16804 entities : typing.Sequence[~EntityPortRange]
16805 Returns -> typing.Sequence[~ErrorResult]
16806 '''
16807 # map input types to rpc msg
16808 params = dict()
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)
16813
16814
16815
16816 #@ReturnMapping(StringResults)
16817 async def PrivateAddress(self, entities):
16818 '''
16819 entities : typing.Sequence[~Entity]
16820 Returns -> typing.Sequence[~StringResult]
16821 '''
16822 # map input types to rpc msg
16823 params = dict()
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)
16828
16829
16830
16831 #@ReturnMapping(StringResult)
16832 async def ProviderType(self):
16833 '''
16834
16835 Returns -> typing.Union[~Error, str]
16836 '''
16837 # map input types to rpc msg
16838 params = dict()
16839 msg = dict(Type='Uniter', Request='ProviderType', Version=3, Params=params)
16840
16841 reply = await self.rpc(msg)
16842 return self._map(reply, ProviderType)
16843
16844
16845
16846 #@ReturnMapping(StringResults)
16847 async def PublicAddress(self, entities):
16848 '''
16849 entities : typing.Sequence[~Entity]
16850 Returns -> typing.Sequence[~StringResult]
16851 '''
16852 # map input types to rpc msg
16853 params = dict()
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)
16858
16859
16860
16861 #@ReturnMapping(GetLeadershipSettingsBulkResults)
16862 async def Read(self, entities):
16863 '''
16864 entities : typing.Sequence[~Entity]
16865 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
16866 '''
16867 # map input types to rpc msg
16868 params = dict()
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)
16873
16874
16875
16876 #@ReturnMapping(SettingsResults)
16877 async def ReadRemoteSettings(self, relationunitpairs):
16878 '''
16879 relationunitpairs : typing.Sequence[~RelationUnitPair]
16880 Returns -> typing.Sequence[~SettingsResult]
16881 '''
16882 # map input types to rpc msg
16883 params = dict()
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)
16888
16889
16890
16891 #@ReturnMapping(SettingsResults)
16892 async def ReadSettings(self, relationunits):
16893 '''
16894 relationunits : typing.Sequence[~RelationUnit]
16895 Returns -> typing.Sequence[~SettingsResult]
16896 '''
16897 # map input types to rpc msg
16898 params = dict()
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)
16903
16904
16905
16906 #@ReturnMapping(RelationResults)
16907 async def Relation(self, relationunits):
16908 '''
16909 relationunits : typing.Sequence[~RelationUnit]
16910 Returns -> typing.Sequence[~RelationResult]
16911 '''
16912 # map input types to rpc msg
16913 params = dict()
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)
16918
16919
16920
16921 #@ReturnMapping(RelationResults)
16922 async def RelationById(self, relationids):
16923 '''
16924 relationids : typing.Sequence[int]
16925 Returns -> typing.Sequence[~RelationResult]
16926 '''
16927 # map input types to rpc msg
16928 params = dict()
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)
16933
16934
16935
16936 #@ReturnMapping(ErrorResults)
16937 async def RemoveStorageAttachments(self, ids):
16938 '''
16939 ids : typing.Sequence[~StorageAttachmentId]
16940 Returns -> typing.Sequence[~ErrorResult]
16941 '''
16942 # map input types to rpc msg
16943 params = dict()
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)
16948
16949
16950
16951 #@ReturnMapping(ErrorResults)
16952 async def RequestReboot(self, entities):
16953 '''
16954 entities : typing.Sequence[~Entity]
16955 Returns -> typing.Sequence[~ErrorResult]
16956 '''
16957 # map input types to rpc msg
16958 params = dict()
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)
16963
16964
16965
16966 #@ReturnMapping(ResolvedModeResults)
16967 async def Resolved(self, entities):
16968 '''
16969 entities : typing.Sequence[~Entity]
16970 Returns -> typing.Sequence[~ResolvedModeResult]
16971 '''
16972 # map input types to rpc msg
16973 params = dict()
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)
16978
16979
16980
16981 #@ReturnMapping(StringResults)
16982 async def ServiceOwner(self, entities):
16983 '''
16984 entities : typing.Sequence[~Entity]
16985 Returns -> typing.Sequence[~StringResult]
16986 '''
16987 # map input types to rpc msg
16988 params = dict()
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)
16993
16994
16995
16996 #@ReturnMapping(ServiceStatusResults)
16997 async def ServiceStatus(self, entities):
16998 '''
16999 entities : typing.Sequence[~Entity]
17000 Returns -> typing.Sequence[~ServiceStatusResult]
17001 '''
17002 # map input types to rpc msg
17003 params = dict()
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)
17008
17009
17010
17011 #@ReturnMapping(ErrorResults)
17012 async def SetAgentStatus(self, entities):
17013 '''
17014 entities : typing.Sequence[~EntityStatusArgs]
17015 Returns -> typing.Sequence[~ErrorResult]
17016 '''
17017 # map input types to rpc msg
17018 params = dict()
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)
17023
17024
17025
17026 #@ReturnMapping(ErrorResults)
17027 async def SetCharmURL(self, entities):
17028 '''
17029 entities : typing.Sequence[~EntityCharmURL]
17030 Returns -> typing.Sequence[~ErrorResult]
17031 '''
17032 # map input types to rpc msg
17033 params = dict()
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)
17038
17039
17040
17041 #@ReturnMapping(ErrorResults)
17042 async def SetServiceStatus(self, entities):
17043 '''
17044 entities : typing.Sequence[~EntityStatusArgs]
17045 Returns -> typing.Sequence[~ErrorResult]
17046 '''
17047 # map input types to rpc msg
17048 params = dict()
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)
17053
17054
17055
17056 #@ReturnMapping(ErrorResults)
17057 async def SetStatus(self, entities):
17058 '''
17059 entities : typing.Sequence[~EntityStatusArgs]
17060 Returns -> typing.Sequence[~ErrorResult]
17061 '''
17062 # map input types to rpc msg
17063 params = dict()
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)
17068
17069
17070
17071 #@ReturnMapping(ErrorResults)
17072 async def SetUnitStatus(self, entities):
17073 '''
17074 entities : typing.Sequence[~EntityStatusArgs]
17075 Returns -> typing.Sequence[~ErrorResult]
17076 '''
17077 # map input types to rpc msg
17078 params = dict()
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)
17083
17084
17085
17086 #@ReturnMapping(LifeResults)
17087 async def StorageAttachmentLife(self, ids):
17088 '''
17089 ids : typing.Sequence[~StorageAttachmentId]
17090 Returns -> typing.Sequence[~LifeResult]
17091 '''
17092 # map input types to rpc msg
17093 params = dict()
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)
17098
17099
17100
17101 #@ReturnMapping(StorageAttachmentResults)
17102 async def StorageAttachments(self, ids):
17103 '''
17104 ids : typing.Sequence[~StorageAttachmentId]
17105 Returns -> typing.Sequence[~StorageAttachmentResult]
17106 '''
17107 # map input types to rpc msg
17108 params = dict()
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)
17113
17114
17115
17116 #@ReturnMapping(StatusResults)
17117 async def UnitStatus(self, entities):
17118 '''
17119 entities : typing.Sequence[~Entity]
17120 Returns -> typing.Sequence[~StatusResult]
17121 '''
17122 # map input types to rpc msg
17123 params = dict()
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)
17128
17129
17130
17131 #@ReturnMapping(StorageAttachmentIdsResults)
17132 async def UnitStorageAttachments(self, entities):
17133 '''
17134 entities : typing.Sequence[~Entity]
17135 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
17136 '''
17137 # map input types to rpc msg
17138 params = dict()
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)
17143
17144
17145
17146 #@ReturnMapping(ErrorResults)
17147 async def UpdateSettings(self, relationunits):
17148 '''
17149 relationunits : typing.Sequence[~RelationUnitSettings]
17150 Returns -> typing.Sequence[~ErrorResult]
17151 '''
17152 # map input types to rpc msg
17153 params = dict()
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)
17158
17159
17160
17161 #@ReturnMapping(NotifyWatchResults)
17162 async def Watch(self, entities):
17163 '''
17164 entities : typing.Sequence[~Entity]
17165 Returns -> typing.Sequence[~NotifyWatchResult]
17166 '''
17167 # map input types to rpc msg
17168 params = dict()
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)
17173
17174
17175
17176 #@ReturnMapping(NotifyWatchResult)
17177 async def WatchAPIHostPorts(self):
17178 '''
17179
17180 Returns -> typing.Union[~Error, str]
17181 '''
17182 # map input types to rpc msg
17183 params = dict()
17184 msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=3, Params=params)
17185
17186 reply = await self.rpc(msg)
17187 return self._map(reply, WatchAPIHostPorts)
17188
17189
17190
17191 #@ReturnMapping(StringsWatchResults)
17192 async def WatchActionNotifications(self, entities):
17193 '''
17194 entities : typing.Sequence[~Entity]
17195 Returns -> typing.Sequence[~StringsWatchResult]
17196 '''
17197 # map input types to rpc msg
17198 params = dict()
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)
17203
17204
17205
17206 #@ReturnMapping(NotifyWatchResults)
17207 async def WatchConfigSettings(self, entities):
17208 '''
17209 entities : typing.Sequence[~Entity]
17210 Returns -> typing.Sequence[~NotifyWatchResult]
17211 '''
17212 # map input types to rpc msg
17213 params = dict()
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)
17218
17219
17220
17221 #@ReturnMapping(NotifyWatchResult)
17222 async def WatchForModelConfigChanges(self):
17223 '''
17224
17225 Returns -> typing.Union[~Error, str]
17226 '''
17227 # map input types to rpc msg
17228 params = dict()
17229 msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=3, Params=params)
17230
17231 reply = await self.rpc(msg)
17232 return self._map(reply, WatchForModelConfigChanges)
17233
17234
17235
17236 #@ReturnMapping(NotifyWatchResults)
17237 async def WatchLeadershipSettings(self, entities):
17238 '''
17239 entities : typing.Sequence[~Entity]
17240 Returns -> typing.Sequence[~NotifyWatchResult]
17241 '''
17242 # map input types to rpc msg
17243 params = dict()
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)
17248
17249
17250
17251 #@ReturnMapping(NotifyWatchResults)
17252 async def WatchMeterStatus(self, entities):
17253 '''
17254 entities : typing.Sequence[~Entity]
17255 Returns -> typing.Sequence[~NotifyWatchResult]
17256 '''
17257 # map input types to rpc msg
17258 params = dict()
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)
17263
17264
17265
17266 #@ReturnMapping(RelationUnitsWatchResults)
17267 async def WatchRelationUnits(self, relationunits):
17268 '''
17269 relationunits : typing.Sequence[~RelationUnit]
17270 Returns -> typing.Sequence[~RelationUnitsWatchResult]
17271 '''
17272 # map input types to rpc msg
17273 params = dict()
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)
17278
17279
17280
17281 #@ReturnMapping(StringsWatchResults)
17282 async def WatchServiceRelations(self, entities):
17283 '''
17284 entities : typing.Sequence[~Entity]
17285 Returns -> typing.Sequence[~StringsWatchResult]
17286 '''
17287 # map input types to rpc msg
17288 params = dict()
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)
17293
17294
17295
17296 #@ReturnMapping(NotifyWatchResults)
17297 async def WatchStorageAttachments(self, ids):
17298 '''
17299 ids : typing.Sequence[~StorageAttachmentId]
17300 Returns -> typing.Sequence[~NotifyWatchResult]
17301 '''
17302 # map input types to rpc msg
17303 params = dict()
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)
17308
17309
17310
17311 #@ReturnMapping(NotifyWatchResults)
17312 async def WatchUnitAddresses(self, entities):
17313 '''
17314 entities : typing.Sequence[~Entity]
17315 Returns -> typing.Sequence[~NotifyWatchResult]
17316 '''
17317 # map input types to rpc msg
17318 params = dict()
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)
17323
17324
17325
17326 #@ReturnMapping(StringsWatchResults)
17327 async def WatchUnitStorageAttachments(self, entities):
17328 '''
17329 entities : typing.Sequence[~Entity]
17330 Returns -> typing.Sequence[~StringsWatchResult]
17331 '''
17332 # map input types to rpc msg
17333 params = dict()
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)
17338
17339
17340 class Upgrader(Type):
17341 name = 'Upgrader'
17342 version = 1
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'],
17348 'type': 'object'},
17349 'Entities': {'additionalProperties': False,
17350 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17351 'type': 'array'}},
17352 'required': ['Entities'],
17353 'type': 'object'},
17354 'EntitiesVersion': {'additionalProperties': False,
17355 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
17356 'type': 'array'}},
17357 'required': ['AgentTools'],
17358 'type': 'object'},
17359 'Entity': {'additionalProperties': False,
17360 'properties': {'Tag': {'type': 'string'}},
17361 'required': ['Tag'],
17362 'type': 'object'},
17363 'EntityVersion': {'additionalProperties': False,
17364 'properties': {'Tag': {'type': 'string'},
17365 'Tools': {'$ref': '#/definitions/Version'}},
17366 'required': ['Tag', 'Tools'],
17367 'type': 'object'},
17368 'Error': {'additionalProperties': False,
17369 'properties': {'Code': {'type': 'string'},
17370 'Info': {'$ref': '#/definitions/ErrorInfo'},
17371 'Message': {'type': 'string'}},
17372 'required': ['Message', 'Code'],
17373 'type': 'object'},
17374 'ErrorInfo': {'additionalProperties': False,
17375 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17376 'MacaroonPath': {'type': 'string'}},
17377 'type': 'object'},
17378 'ErrorResult': {'additionalProperties': False,
17379 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17380 'required': ['Error'],
17381 'type': 'object'},
17382 'ErrorResults': {'additionalProperties': False,
17383 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17384 'type': 'array'}},
17385 'required': ['Results'],
17386 'type': 'object'},
17387 'Macaroon': {'additionalProperties': False,
17388 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17389 'type': 'array'},
17390 'data': {'items': {'type': 'integer'},
17391 'type': 'array'},
17392 'id': {'$ref': '#/definitions/packet'},
17393 'location': {'$ref': '#/definitions/packet'},
17394 'sig': {'items': {'type': 'integer'},
17395 'type': 'array'}},
17396 'required': ['data',
17397 'location',
17398 'id',
17399 'caveats',
17400 'sig'],
17401 'type': 'object'},
17402 'NotifyWatchResult': {'additionalProperties': False,
17403 'properties': {'Error': {'$ref': '#/definitions/Error'},
17404 'NotifyWatcherId': {'type': 'string'}},
17405 'required': ['NotifyWatcherId', 'Error'],
17406 'type': 'object'},
17407 'NotifyWatchResults': {'additionalProperties': False,
17408 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17409 'type': 'array'}},
17410 'required': ['Results'],
17411 'type': 'object'},
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',
17419 'Minor',
17420 'Tag',
17421 'Patch',
17422 'Build'],
17423 'type': 'object'},
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'],
17430 'type': 'object'},
17431 'ToolsResult': {'additionalProperties': False,
17432 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
17433 'Error': {'$ref': '#/definitions/Error'},
17434 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
17435 'type': 'array'}},
17436 'required': ['ToolsList',
17437 'DisableSSLHostnameVerification',
17438 'Error'],
17439 'type': 'object'},
17440 'ToolsResults': {'additionalProperties': False,
17441 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
17442 'type': 'array'}},
17443 'required': ['Results'],
17444 'type': 'object'},
17445 'Version': {'additionalProperties': False,
17446 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
17447 'required': ['Version'],
17448 'type': 'object'},
17449 'VersionResult': {'additionalProperties': False,
17450 'properties': {'Error': {'$ref': '#/definitions/Error'},
17451 'Version': {'$ref': '#/definitions/Number'}},
17452 'required': ['Version', 'Error'],
17453 'type': 'object'},
17454 'VersionResults': {'additionalProperties': False,
17455 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
17456 'type': 'array'}},
17457 'required': ['Results'],
17458 'type': 'object'},
17459 'caveat': {'additionalProperties': False,
17460 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17461 'location': {'$ref': '#/definitions/packet'},
17462 'verificationId': {'$ref': '#/definitions/packet'}},
17463 'required': ['location',
17464 'caveatId',
17465 'verificationId'],
17466 'type': 'object'},
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'}},
17475 'type': 'object'},
17476 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
17477 'Result': {'$ref': '#/definitions/ErrorResults'}},
17478 'type': 'object'},
17479 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17480 'Result': {'$ref': '#/definitions/ToolsResults'}},
17481 'type': 'object'},
17482 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17483 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17484 'type': 'object'}},
17485 'type': 'object'}
17486
17487
17488 #@ReturnMapping(VersionResults)
17489 async def DesiredVersion(self, entities):
17490 '''
17491 entities : typing.Sequence[~Entity]
17492 Returns -> typing.Sequence[~VersionResult]
17493 '''
17494 # map input types to rpc msg
17495 params = dict()
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)
17500
17501
17502
17503 #@ReturnMapping(ErrorResults)
17504 async def SetTools(self, agenttools):
17505 '''
17506 agenttools : typing.Sequence[~EntityVersion]
17507 Returns -> typing.Sequence[~ErrorResult]
17508 '''
17509 # map input types to rpc msg
17510 params = dict()
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)
17515
17516
17517
17518 #@ReturnMapping(ToolsResults)
17519 async def Tools(self, entities):
17520 '''
17521 entities : typing.Sequence[~Entity]
17522 Returns -> typing.Sequence[~ToolsResult]
17523 '''
17524 # map input types to rpc msg
17525 params = dict()
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)
17530
17531
17532
17533 #@ReturnMapping(NotifyWatchResults)
17534 async def WatchAPIVersion(self, entities):
17535 '''
17536 entities : typing.Sequence[~Entity]
17537 Returns -> typing.Sequence[~NotifyWatchResult]
17538 '''
17539 # map input types to rpc msg
17540 params = dict()
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)
17545
17546
17547 class UserManager(Type):
17548 name = 'UserManager'
17549 version = 1
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'},
17555 'type': 'array'},
17556 'username': {'type': 'string'}},
17557 'required': ['username',
17558 'display-name',
17559 'shared-model-tags'],
17560 'type': 'object'},
17561 'AddUserResult': {'additionalProperties': False,
17562 'properties': {'error': {'$ref': '#/definitions/Error'},
17563 'secret-key': {'items': {'type': 'integer'},
17564 'type': 'array'},
17565 'tag': {'type': 'string'}},
17566 'type': 'object'},
17567 'AddUserResults': {'additionalProperties': False,
17568 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
17569 'type': 'array'}},
17570 'required': ['results'],
17571 'type': 'object'},
17572 'AddUsers': {'additionalProperties': False,
17573 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
17574 'type': 'array'}},
17575 'required': ['users'],
17576 'type': 'object'},
17577 'Entities': {'additionalProperties': False,
17578 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17579 'type': 'array'}},
17580 'required': ['Entities'],
17581 'type': 'object'},
17582 'Entity': {'additionalProperties': False,
17583 'properties': {'Tag': {'type': 'string'}},
17584 'required': ['Tag'],
17585 'type': 'object'},
17586 'EntityPassword': {'additionalProperties': False,
17587 'properties': {'Password': {'type': 'string'},
17588 'Tag': {'type': 'string'}},
17589 'required': ['Tag', 'Password'],
17590 'type': 'object'},
17591 'EntityPasswords': {'additionalProperties': False,
17592 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
17593 'type': 'array'}},
17594 'required': ['Changes'],
17595 'type': 'object'},
17596 'Error': {'additionalProperties': False,
17597 'properties': {'Code': {'type': 'string'},
17598 'Info': {'$ref': '#/definitions/ErrorInfo'},
17599 'Message': {'type': 'string'}},
17600 'required': ['Message', 'Code'],
17601 'type': 'object'},
17602 'ErrorInfo': {'additionalProperties': False,
17603 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17604 'MacaroonPath': {'type': 'string'}},
17605 'type': 'object'},
17606 'ErrorResult': {'additionalProperties': False,
17607 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17608 'required': ['Error'],
17609 'type': 'object'},
17610 'ErrorResults': {'additionalProperties': False,
17611 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17612 'type': 'array'}},
17613 'required': ['Results'],
17614 'type': 'object'},
17615 'Macaroon': {'additionalProperties': False,
17616 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17617 'type': 'array'},
17618 'data': {'items': {'type': 'integer'},
17619 'type': 'array'},
17620 'id': {'$ref': '#/definitions/packet'},
17621 'location': {'$ref': '#/definitions/packet'},
17622 'sig': {'items': {'type': 'integer'},
17623 'type': 'array'}},
17624 'required': ['data',
17625 'location',
17626 'id',
17627 'caveats',
17628 'sig'],
17629 'type': 'object'},
17630 'MacaroonResult': {'additionalProperties': False,
17631 'properties': {'error': {'$ref': '#/definitions/Error'},
17632 'result': {'$ref': '#/definitions/Macaroon'}},
17633 'type': 'object'},
17634 'MacaroonResults': {'additionalProperties': False,
17635 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
17636 'type': 'array'}},
17637 'required': ['results'],
17638 'type': 'object'},
17639 'UserInfo': {'additionalProperties': False,
17640 'properties': {'created-by': {'type': 'string'},
17641 'date-created': {'format': 'date-time',
17642 'type': 'string'},
17643 'disabled': {'type': 'boolean'},
17644 'display-name': {'type': 'string'},
17645 'last-connection': {'format': 'date-time',
17646 'type': 'string'},
17647 'username': {'type': 'string'}},
17648 'required': ['username',
17649 'display-name',
17650 'created-by',
17651 'date-created',
17652 'disabled'],
17653 'type': 'object'},
17654 'UserInfoRequest': {'additionalProperties': False,
17655 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
17656 'type': 'array'},
17657 'include-disabled': {'type': 'boolean'}},
17658 'required': ['entities',
17659 'include-disabled'],
17660 'type': 'object'},
17661 'UserInfoResult': {'additionalProperties': False,
17662 'properties': {'error': {'$ref': '#/definitions/Error'},
17663 'result': {'$ref': '#/definitions/UserInfo'}},
17664 'type': 'object'},
17665 'UserInfoResults': {'additionalProperties': False,
17666 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
17667 'type': 'array'}},
17668 'required': ['results'],
17669 'type': 'object'},
17670 'caveat': {'additionalProperties': False,
17671 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17672 'location': {'$ref': '#/definitions/packet'},
17673 'verificationId': {'$ref': '#/definitions/packet'}},
17674 'required': ['location',
17675 'caveatId',
17676 'verificationId'],
17677 'type': 'object'},
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'}},
17686 'type': 'object'},
17687 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17688 'Result': {'$ref': '#/definitions/MacaroonResults'}},
17689 'type': 'object'},
17690 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17691 'Result': {'$ref': '#/definitions/ErrorResults'}},
17692 'type': 'object'},
17693 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17694 'Result': {'$ref': '#/definitions/ErrorResults'}},
17695 'type': 'object'},
17696 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
17697 'Result': {'$ref': '#/definitions/ErrorResults'}},
17698 'type': 'object'},
17699 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
17700 'Result': {'$ref': '#/definitions/UserInfoResults'}},
17701 'type': 'object'}},
17702 'type': 'object'}
17703
17704
17705 #@ReturnMapping(AddUserResults)
17706 async def AddUser(self, users):
17707 '''
17708 users : typing.Sequence[~AddUser]
17709 Returns -> typing.Sequence[~AddUserResult]
17710 '''
17711 # map input types to rpc msg
17712 params = dict()
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)
17717
17718
17719
17720 #@ReturnMapping(MacaroonResults)
17721 async def CreateLocalLoginMacaroon(self, entities):
17722 '''
17723 entities : typing.Sequence[~Entity]
17724 Returns -> typing.Sequence[~MacaroonResult]
17725 '''
17726 # map input types to rpc msg
17727 params = dict()
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)
17732
17733
17734
17735 #@ReturnMapping(ErrorResults)
17736 async def DisableUser(self, entities):
17737 '''
17738 entities : typing.Sequence[~Entity]
17739 Returns -> typing.Sequence[~ErrorResult]
17740 '''
17741 # map input types to rpc msg
17742 params = dict()
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)
17747
17748
17749
17750 #@ReturnMapping(ErrorResults)
17751 async def EnableUser(self, entities):
17752 '''
17753 entities : typing.Sequence[~Entity]
17754 Returns -> typing.Sequence[~ErrorResult]
17755 '''
17756 # map input types to rpc msg
17757 params = dict()
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)
17762
17763
17764
17765 #@ReturnMapping(ErrorResults)
17766 async def SetPassword(self, changes):
17767 '''
17768 changes : typing.Sequence[~EntityPassword]
17769 Returns -> typing.Sequence[~ErrorResult]
17770 '''
17771 # map input types to rpc msg
17772 params = dict()
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)
17777
17778
17779
17780 #@ReturnMapping(UserInfoResults)
17781 async def UserInfo(self, entities, include_disabled):
17782 '''
17783 entities : typing.Sequence[~Entity]
17784 include_disabled : bool
17785 Returns -> typing.Sequence[~UserInfoResult]
17786 '''
17787 # map input types to rpc msg
17788 params = dict()
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)
17794
17795
17796 class VolumeAttachmentsWatcher(Type):
17797 name = 'VolumeAttachmentsWatcher'
17798 version = 2
17799 schema = {'definitions': {'Error': {'additionalProperties': False,
17800 'properties': {'Code': {'type': 'string'},
17801 'Info': {'$ref': '#/definitions/ErrorInfo'},
17802 'Message': {'type': 'string'}},
17803 'required': ['Message', 'Code'],
17804 'type': 'object'},
17805 'ErrorInfo': {'additionalProperties': False,
17806 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17807 'MacaroonPath': {'type': 'string'}},
17808 'type': 'object'},
17809 'Macaroon': {'additionalProperties': False,
17810 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17811 'type': 'array'},
17812 'data': {'items': {'type': 'integer'},
17813 'type': 'array'},
17814 'id': {'$ref': '#/definitions/packet'},
17815 'location': {'$ref': '#/definitions/packet'},
17816 'sig': {'items': {'type': 'integer'},
17817 'type': 'array'}},
17818 'required': ['data',
17819 'location',
17820 'id',
17821 'caveats',
17822 'sig'],
17823 'type': 'object'},
17824 'MachineStorageId': {'additionalProperties': False,
17825 'properties': {'attachmenttag': {'type': 'string'},
17826 'machinetag': {'type': 'string'}},
17827 'required': ['machinetag',
17828 'attachmenttag'],
17829 'type': 'object'},
17830 'MachineStorageIdsWatchResult': {'additionalProperties': False,
17831 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
17832 'type': 'array'},
17833 'Error': {'$ref': '#/definitions/Error'},
17834 'MachineStorageIdsWatcherId': {'type': 'string'}},
17835 'required': ['MachineStorageIdsWatcherId',
17836 'Changes',
17837 'Error'],
17838 'type': 'object'},
17839 'caveat': {'additionalProperties': False,
17840 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17841 'location': {'$ref': '#/definitions/packet'},
17842 'verificationId': {'$ref': '#/definitions/packet'}},
17843 'required': ['location',
17844 'caveatId',
17845 'verificationId'],
17846 'type': 'object'},
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'}},
17854 'type': 'object'},
17855 'Stop': {'type': 'object'}},
17856 'type': 'object'}
17857
17858
17859 #@ReturnMapping(MachineStorageIdsWatchResult)
17860 async def Next(self):
17861 '''
17862
17863 Returns -> typing.Union[~Error, typing.Sequence[~MachineStorageId]]
17864 '''
17865 # map input types to rpc msg
17866 params = dict()
17867 msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params)
17868
17869 reply = await self.rpc(msg)
17870 return self._map(reply, Next)
17871
17872
17873
17874 #@ReturnMapping(None)
17875 async def Stop(self):
17876 '''
17877
17878 Returns -> None
17879 '''
17880 # map input types to rpc msg
17881 params = dict()
17882 msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params)
17883
17884 reply = await self.rpc(msg)
17885 return self._map(reply, Stop)
17886
17887