FullStatus example
[osm/N2VC.git] / juju / client / _client.py
1 # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py.
2 # Changes will be overwritten/lost when the file is regenerated.
3
4 from juju.client.facade import Type, ReturnMapping
5
6
7 class Action(Type):
8 _toSchema = {'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters', 'name': 'name'}
9 _toPy = {'receiver': 'receiver', 'tag': 'tag', 'parameters': 'parameters', 'name': 'name'}
10 def __init__(self, name=None, parameters=None, receiver=None, tag=None):
11 '''
12 name : str
13 parameters : typing.Mapping[str, typing.Any]
14 receiver : str
15 tag : str
16 '''
17 self.name = name
18 self.parameters = parameters
19 self.receiver = receiver
20 self.tag = tag
21
22
23 class ActionResult(Type):
24 _toSchema = {'action': 'action', 'completed': 'completed', 'output': 'output', 'status': 'status', 'started': 'started', 'message': 'message', 'enqueued': 'enqueued', 'error': 'error'}
25 _toPy = {'action': 'action', 'completed': 'completed', 'output': 'output', 'status': 'status', 'started': 'started', 'message': 'message', 'enqueued': 'enqueued', 'error': 'error'}
26 def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None):
27 '''
28 action : Action
29 completed : str
30 enqueued : str
31 error : Error
32 message : str
33 output : typing.Mapping[str, typing.Any]
34 started : str
35 status : str
36 '''
37 self.action = Action.from_json(action) if action else None
38 self.completed = completed
39 self.enqueued = enqueued
40 self.error = Error.from_json(error) if error else None
41 self.message = message
42 self.output = output
43 self.started = started
44 self.status = status
45
46
47 class ActionResults(Type):
48 _toSchema = {'results': 'results'}
49 _toPy = {'results': 'results'}
50 def __init__(self, results=None):
51 '''
52 results : typing.Sequence[~ActionResult]
53 '''
54 self.results = [ActionResult.from_json(o) for o in results or []]
55
56
57 class Actions(Type):
58 _toSchema = {'actions': 'actions'}
59 _toPy = {'actions': 'actions'}
60 def __init__(self, actions=None):
61 '''
62 actions : typing.Sequence[~Action]
63 '''
64 self.actions = [Action.from_json(o) for o in actions or []]
65
66
67 class ActionsByName(Type):
68 _toSchema = {'actions': 'actions', 'error': 'error', 'name': 'name'}
69 _toPy = {'actions': 'actions', 'error': 'error', 'name': 'name'}
70 def __init__(self, actions=None, error=None, name=None):
71 '''
72 actions : typing.Sequence[~ActionResult]
73 error : Error
74 name : str
75 '''
76 self.actions = [ActionResult.from_json(o) for o in actions or []]
77 self.error = Error.from_json(error) if error else None
78 self.name = name
79
80
81 class ActionsByNames(Type):
82 _toSchema = {'actions': 'actions'}
83 _toPy = {'actions': 'actions'}
84 def __init__(self, actions=None):
85 '''
86 actions : typing.Sequence[~ActionsByName]
87 '''
88 self.actions = [ActionsByName.from_json(o) for o in actions or []]
89
90
91 class ActionsByReceiver(Type):
92 _toSchema = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'}
93 _toPy = {'actions': 'actions', 'receiver': 'receiver', 'error': 'error'}
94 def __init__(self, actions=None, error=None, receiver=None):
95 '''
96 actions : typing.Sequence[~ActionResult]
97 error : Error
98 receiver : str
99 '''
100 self.actions = [ActionResult.from_json(o) for o in actions or []]
101 self.error = Error.from_json(error) if error else None
102 self.receiver = receiver
103
104
105 class ActionsByReceivers(Type):
106 _toSchema = {'actions': 'actions'}
107 _toPy = {'actions': 'actions'}
108 def __init__(self, actions=None):
109 '''
110 actions : typing.Sequence[~ActionsByReceiver]
111 '''
112 self.actions = [ActionsByReceiver.from_json(o) for o in actions or []]
113
114
115 class Entities(Type):
116 _toSchema = {'entities': 'Entities'}
117 _toPy = {'Entities': 'entities'}
118 def __init__(self, entities=None):
119 '''
120 entities : typing.Sequence[~Entity]
121 '''
122 self.entities = [Entity.from_json(o) for o in entities or []]
123
124
125 class Entity(Type):
126 _toSchema = {'tag': 'Tag'}
127 _toPy = {'Tag': 'tag'}
128 def __init__(self, tag=None):
129 '''
130 tag : str
131 '''
132 self.tag = tag
133
134
135 class Error(Type):
136 _toSchema = {'info': 'Info', 'message': 'Message', 'code': 'Code'}
137 _toPy = {'Info': 'info', 'Code': 'code', 'Message': 'message'}
138 def __init__(self, code=None, info=None, message=None):
139 '''
140 code : str
141 info : ErrorInfo
142 message : str
143 '''
144 self.code = code
145 self.info = ErrorInfo.from_json(info) if info else None
146 self.message = message
147
148
149 class ErrorInfo(Type):
150 _toSchema = {'macaroonpath': 'MacaroonPath', 'macaroon': 'Macaroon'}
151 _toPy = {'MacaroonPath': 'macaroonpath', 'Macaroon': 'macaroon'}
152 def __init__(self, macaroon=None, macaroonpath=None):
153 '''
154 macaroon : Macaroon
155 macaroonpath : str
156 '''
157 self.macaroon = Macaroon.from_json(macaroon) if macaroon else None
158 self.macaroonpath = macaroonpath
159
160
161 class FindActionsByNames(Type):
162 _toSchema = {'names': 'names'}
163 _toPy = {'names': 'names'}
164 def __init__(self, names=None):
165 '''
166 names : typing.Sequence[str]
167 '''
168 self.names = names
169
170
171 class FindTags(Type):
172 _toSchema = {'prefixes': 'prefixes'}
173 _toPy = {'prefixes': 'prefixes'}
174 def __init__(self, prefixes=None):
175 '''
176 prefixes : typing.Sequence[str]
177 '''
178 self.prefixes = prefixes
179
180
181 class FindTagsResults(Type):
182 _toSchema = {'matches': 'matches'}
183 _toPy = {'matches': 'matches'}
184 def __init__(self, matches=None):
185 '''
186 matches : typing.Sequence[~Entity]
187 '''
188 self.matches = [Entity.from_json(o) for o in matches or []]
189
190
191 class Macaroon(Type):
192 _toSchema = {'location': 'location', 'caveats': 'caveats', 'sig': 'sig', 'id_': 'id', 'data': 'data'}
193 _toPy = {'location': 'location', 'caveats': 'caveats', 'sig': 'sig', 'id': 'id_', 'data': 'data'}
194 def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None):
195 '''
196 caveats : typing.Sequence[~caveat]
197 data : typing.Sequence[int]
198 id_ : packet
199 location : packet
200 sig : typing.Sequence[int]
201 '''
202 self.caveats = [caveat.from_json(o) for o in caveats or []]
203 self.data = data
204 self.id_ = packet.from_json(id_) if id_ else None
205 self.location = packet.from_json(location) if location else None
206 self.sig = sig
207
208
209 class RunParams(Type):
210 _toSchema = {'timeout': 'Timeout', 'machines': 'Machines', 'units': 'Units', 'services': 'Services', 'commands': 'Commands'}
211 _toPy = {'Services': 'services', 'Units': 'units', 'Machines': 'machines', 'Commands': 'commands', 'Timeout': 'timeout'}
212 def __init__(self, commands=None, machines=None, services=None, timeout=None, units=None):
213 '''
214 commands : str
215 machines : typing.Sequence[str]
216 services : typing.Sequence[str]
217 timeout : int
218 units : typing.Sequence[str]
219 '''
220 self.commands = commands
221 self.machines = machines
222 self.services = services
223 self.timeout = timeout
224 self.units = units
225
226
227 class ServiceCharmActionsResult(Type):
228 _toSchema = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'}
229 _toPy = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'}
230 def __init__(self, actions=None, error=None, servicetag=None):
231 '''
232 actions : Actions
233 error : Error
234 servicetag : str
235 '''
236 self.actions = Actions.from_json(actions) if actions else None
237 self.error = Error.from_json(error) if error else None
238 self.servicetag = servicetag
239
240
241 class ServicesCharmActionsResults(Type):
242 _toSchema = {'results': 'results'}
243 _toPy = {'results': 'results'}
244 def __init__(self, results=None):
245 '''
246 results : typing.Sequence[~ServiceCharmActionsResult]
247 '''
248 self.results = [ServiceCharmActionsResult.from_json(o) for o in results or []]
249
250
251 class caveat(Type):
252 _toSchema = {'location': 'location', 'caveatid': 'caveatId', 'verificationid': 'verificationId'}
253 _toPy = {'location': 'location', 'caveatId': 'caveatid', 'verificationId': 'verificationid'}
254 def __init__(self, caveatid=None, location=None, verificationid=None):
255 '''
256 caveatid : packet
257 location : packet
258 verificationid : packet
259 '''
260 self.caveatid = packet.from_json(caveatid) if caveatid else None
261 self.location = packet.from_json(location) if location else None
262 self.verificationid = packet.from_json(verificationid) if verificationid else None
263
264
265 class packet(Type):
266 _toSchema = {'headerlen': 'headerLen', 'start': 'start', 'totallen': 'totalLen'}
267 _toPy = {'totalLen': 'totallen', 'headerLen': 'headerlen', 'start': 'start'}
268 def __init__(self, headerlen=None, start=None, totallen=None):
269 '''
270 headerlen : int
271 start : int
272 totallen : int
273 '''
274 self.headerlen = headerlen
275 self.start = start
276 self.totallen = totallen
277
278
279 class BoolResult(Type):
280 _toSchema = {'error': 'Error', 'result': 'Result'}
281 _toPy = {'Error': 'error', 'Result': 'result'}
282 def __init__(self, error=None, result=None):
283 '''
284 error : Error
285 result : bool
286 '''
287 self.error = Error.from_json(error) if error else None
288 self.result = result
289
290
291 class EntitiesWatchResult(Type):
292 _toSchema = {'changes': 'Changes', 'error': 'Error', 'entitywatcherid': 'EntityWatcherId'}
293 _toPy = {'Changes': 'changes', 'Error': 'error', 'EntityWatcherId': 'entitywatcherid'}
294 def __init__(self, changes=None, entitywatcherid=None, error=None):
295 '''
296 changes : typing.Sequence[str]
297 entitywatcherid : str
298 error : Error
299 '''
300 self.changes = changes
301 self.entitywatcherid = entitywatcherid
302 self.error = Error.from_json(error) if error else None
303
304
305 class ErrorResult(Type):
306 _toSchema = {'info': 'Info', 'message': 'Message', 'code': 'Code'}
307 _toPy = {'Info': 'info', 'Code': 'code', 'Message': 'message'}
308 def __init__(self, code=None, info=None, message=None):
309 '''
310 code : str
311 info : ErrorInfo
312 message : str
313 '''
314 self.code = code
315 self.info = ErrorInfo.from_json(info) if info else None
316 self.message = message
317
318
319 class AgentGetEntitiesResult(Type):
320 _toSchema = {'containertype': 'ContainerType', 'error': 'Error', 'life': 'Life', 'jobs': 'Jobs'}
321 _toPy = {'Error': 'error', 'Jobs': 'jobs', 'ContainerType': 'containertype', 'Life': 'life'}
322 def __init__(self, containertype=None, error=None, jobs=None, life=None):
323 '''
324 containertype : str
325 error : Error
326 jobs : typing.Sequence[str]
327 life : str
328 '''
329 self.containertype = containertype
330 self.error = Error.from_json(error) if error else None
331 self.jobs = jobs
332 self.life = life
333
334
335 class AgentGetEntitiesResults(Type):
336 _toSchema = {'entities': 'Entities'}
337 _toPy = {'Entities': 'entities'}
338 def __init__(self, entities=None):
339 '''
340 entities : typing.Sequence[~AgentGetEntitiesResult]
341 '''
342 self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []]
343
344
345 class EntityPassword(Type):
346 _toSchema = {'password': 'Password', 'tag': 'Tag'}
347 _toPy = {'Password': 'password', 'Tag': 'tag'}
348 def __init__(self, password=None, tag=None):
349 '''
350 password : str
351 tag : str
352 '''
353 self.password = password
354 self.tag = tag
355
356
357 class EntityPasswords(Type):
358 _toSchema = {'changes': 'Changes'}
359 _toPy = {'Changes': 'changes'}
360 def __init__(self, changes=None):
361 '''
362 changes : typing.Sequence[~EntityPassword]
363 '''
364 self.changes = [EntityPassword.from_json(o) for o in changes or []]
365
366
367 class ErrorResults(Type):
368 _toSchema = {'results': 'Results'}
369 _toPy = {'Results': 'results'}
370 def __init__(self, results=None):
371 '''
372 results : typing.Sequence[~ErrorResult]
373 '''
374 self.results = [ErrorResult.from_json(o) for o in results or []]
375
376
377 class IsMasterResult(Type):
378 _toSchema = {'master': 'Master'}
379 _toPy = {'Master': 'master'}
380 def __init__(self, master=None):
381 '''
382 master : bool
383 '''
384 self.master = master
385
386
387 class ModelConfigResult(Type):
388 _toSchema = {'config': 'Config'}
389 _toPy = {'Config': 'config'}
390 def __init__(self, config=None):
391 '''
392 config : typing.Mapping[str, typing.Any]
393 '''
394 self.config = config
395
396
397 class NotifyWatchResult(Type):
398 _toSchema = {'error': 'Error', 'notifywatcherid': 'NotifyWatcherId'}
399 _toPy = {'Error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
400 def __init__(self, error=None, notifywatcherid=None):
401 '''
402 error : Error
403 notifywatcherid : str
404 '''
405 self.error = Error.from_json(error) if error else None
406 self.notifywatcherid = notifywatcherid
407
408
409 class StateServingInfo(Type):
410 _toSchema = {'sharedsecret': 'SharedSecret', 'caprivatekey': 'CAPrivateKey', 'stateport': 'StatePort', 'cert': 'Cert', 'apiport': 'APIPort', 'privatekey': 'PrivateKey', 'systemidentity': 'SystemIdentity'}
411 _toPy = {'StatePort': 'stateport', 'APIPort': 'apiport', 'CAPrivateKey': 'caprivatekey', 'PrivateKey': 'privatekey', 'SystemIdentity': 'systemidentity', 'Cert': 'cert', 'SharedSecret': 'sharedsecret'}
412 def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None):
413 '''
414 apiport : int
415 caprivatekey : str
416 cert : str
417 privatekey : str
418 sharedsecret : str
419 stateport : int
420 systemidentity : str
421 '''
422 self.apiport = apiport
423 self.caprivatekey = caprivatekey
424 self.cert = cert
425 self.privatekey = privatekey
426 self.sharedsecret = sharedsecret
427 self.stateport = stateport
428 self.systemidentity = systemidentity
429
430
431 class AllWatcherNextResults(Type):
432 _toSchema = {'deltas': 'Deltas'}
433 _toPy = {'Deltas': 'deltas'}
434 def __init__(self, deltas=None):
435 '''
436 deltas : typing.Sequence[~Delta]
437 '''
438 self.deltas = [Delta.from_json(o) for o in deltas or []]
439
440
441 class Delta(Type):
442 _toSchema = {'removed': 'Removed', 'entity': 'Entity'}
443 _toPy = {'Removed': 'removed', 'Entity': 'entity'}
444 def __init__(self, entity=None, removed=None):
445 '''
446 entity : typing.Mapping[str, typing.Any]
447 removed : bool
448 '''
449 self.entity = entity
450 self.removed = removed
451
452
453 class AnnotationsGetResult(Type):
454 _toSchema = {'error': 'Error', 'entitytag': 'EntityTag', 'annotations': 'Annotations'}
455 _toPy = {'EntityTag': 'entitytag', 'Annotations': 'annotations', 'Error': 'error'}
456 def __init__(self, annotations=None, entitytag=None, error=None):
457 '''
458 annotations : typing.Mapping[str, str]
459 entitytag : str
460 error : ErrorResult
461 '''
462 self.annotations = annotations
463 self.entitytag = entitytag
464 self.error = ErrorResult.from_json(error) if error else None
465
466
467 class AnnotationsGetResults(Type):
468 _toSchema = {'results': 'Results'}
469 _toPy = {'Results': 'results'}
470 def __init__(self, results=None):
471 '''
472 results : typing.Sequence[~AnnotationsGetResult]
473 '''
474 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
475
476
477 class AnnotationsSet(Type):
478 _toSchema = {'annotations': 'Annotations'}
479 _toPy = {'Annotations': 'annotations'}
480 def __init__(self, annotations=None):
481 '''
482 annotations : typing.Sequence[~EntityAnnotations]
483 '''
484 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
485
486
487 class EntityAnnotations(Type):
488 _toSchema = {'entitytag': 'EntityTag', 'annotations': 'Annotations'}
489 _toPy = {'EntityTag': 'entitytag', 'Annotations': 'annotations'}
490 def __init__(self, annotations=None, entitytag=None):
491 '''
492 annotations : typing.Mapping[str, str]
493 entitytag : str
494 '''
495 self.annotations = annotations
496 self.entitytag = entitytag
497
498
499 class BackupsCreateArgs(Type):
500 _toSchema = {'notes': 'Notes'}
501 _toPy = {'Notes': 'notes'}
502 def __init__(self, notes=None):
503 '''
504 notes : str
505 '''
506 self.notes = notes
507
508
509 class BackupsInfoArgs(Type):
510 _toSchema = {'id_': 'ID'}
511 _toPy = {'ID': 'id_'}
512 def __init__(self, id_=None):
513 '''
514 id_ : str
515 '''
516 self.id_ = id_
517
518
519 class BackupsListArgs(Type):
520 _toSchema = {}
521 _toPy = {}
522 def __init__(self):
523 '''
524
525 '''
526 pass
527
528
529 class BackupsListResult(Type):
530 _toSchema = {'list_': 'List'}
531 _toPy = {'List': 'list_'}
532 def __init__(self, list_=None):
533 '''
534 list_ : typing.Sequence[~BackupsMetadataResult]
535 '''
536 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
537
538
539 class BackupsMetadataResult(Type):
540 _toSchema = {'caprivatekey': 'CAPrivateKey', 'started': 'Started', 'finished': 'Finished', 'size': 'Size', 'stored': 'Stored', 'checksum': 'Checksum', 'model': 'Model', 'version': 'Version', 'cacert': 'CACert', 'machine': 'Machine', 'hostname': 'Hostname', 'notes': 'Notes', 'checksumformat': 'ChecksumFormat', 'id_': 'ID'}
541 _toPy = {'Hostname': 'hostname', 'Stored': 'stored', 'CACert': 'cacert', 'Checksum': 'checksum', 'Started': 'started', 'Model': 'model', 'ChecksumFormat': 'checksumformat', 'Machine': 'machine', 'Version': 'version', 'CAPrivateKey': 'caprivatekey', 'Size': 'size', 'ID': 'id_', 'Finished': 'finished', 'Notes': 'notes'}
542 def __init__(self, cacert=None, caprivatekey=None, checksum=None, checksumformat=None, finished=None, hostname=None, id_=None, machine=None, model=None, notes=None, size=None, started=None, stored=None, version=None):
543 '''
544 cacert : str
545 caprivatekey : str
546 checksum : str
547 checksumformat : str
548 finished : str
549 hostname : str
550 id_ : str
551 machine : str
552 model : str
553 notes : str
554 size : int
555 started : str
556 stored : str
557 version : Number
558 '''
559 self.cacert = cacert
560 self.caprivatekey = caprivatekey
561 self.checksum = checksum
562 self.checksumformat = checksumformat
563 self.finished = finished
564 self.hostname = hostname
565 self.id_ = id_
566 self.machine = machine
567 self.model = model
568 self.notes = notes
569 self.size = size
570 self.started = started
571 self.stored = stored
572 self.version = Number.from_json(version) if version else None
573
574
575 class BackupsRemoveArgs(Type):
576 _toSchema = {'id_': 'ID'}
577 _toPy = {'ID': 'id_'}
578 def __init__(self, id_=None):
579 '''
580 id_ : str
581 '''
582 self.id_ = id_
583
584
585 class Number(Type):
586 _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'}
587 _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'}
588 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
589 '''
590 build : int
591 major : int
592 minor : int
593 patch : int
594 tag : str
595 '''
596 self.build = build
597 self.major = major
598 self.minor = minor
599 self.patch = patch
600 self.tag = tag
601
602
603 class RestoreArgs(Type):
604 _toSchema = {'backupid': 'BackupId'}
605 _toPy = {'BackupId': 'backupid'}
606 def __init__(self, backupid=None):
607 '''
608 backupid : str
609 '''
610 self.backupid = backupid
611
612
613 class Block(Type):
614 _toSchema = {'message': 'message', 'type_': 'type', 'id_': 'id', 'tag': 'tag'}
615 _toPy = {'message': 'message', 'id': 'id_', 'tag': 'tag', 'type': 'type_'}
616 def __init__(self, id_=None, message=None, tag=None, type_=None):
617 '''
618 id_ : str
619 message : str
620 tag : str
621 type_ : str
622 '''
623 self.id_ = id_
624 self.message = message
625 self.tag = tag
626 self.type_ = type_
627
628
629 class BlockResult(Type):
630 _toSchema = {'error': 'error', 'result': 'result'}
631 _toPy = {'error': 'error', 'result': 'result'}
632 def __init__(self, error=None, result=None):
633 '''
634 error : Error
635 result : Block
636 '''
637 self.error = Error.from_json(error) if error else None
638 self.result = Block.from_json(result) if result else None
639
640
641 class BlockResults(Type):
642 _toSchema = {'results': 'results'}
643 _toPy = {'results': 'results'}
644 def __init__(self, results=None):
645 '''
646 results : typing.Sequence[~BlockResult]
647 '''
648 self.results = [BlockResult.from_json(o) for o in results or []]
649
650
651 class BlockSwitchParams(Type):
652 _toSchema = {'message': 'message', 'type_': 'type'}
653 _toPy = {'message': 'message', 'type': 'type_'}
654 def __init__(self, message=None, type_=None):
655 '''
656 message : str
657 type_ : str
658 '''
659 self.message = message
660 self.type_ = type_
661
662
663 class CharmInfo(Type):
664 _toSchema = {'charmurl': 'CharmURL'}
665 _toPy = {'CharmURL': 'charmurl'}
666 def __init__(self, charmurl=None):
667 '''
668 charmurl : str
669 '''
670 self.charmurl = charmurl
671
672
673 class CharmsList(Type):
674 _toSchema = {'names': 'Names'}
675 _toPy = {'Names': 'names'}
676 def __init__(self, names=None):
677 '''
678 names : typing.Sequence[str]
679 '''
680 self.names = names
681
682
683 class CharmsListResult(Type):
684 _toSchema = {'charmurls': 'CharmURLs'}
685 _toPy = {'CharmURLs': 'charmurls'}
686 def __init__(self, charmurls=None):
687 '''
688 charmurls : typing.Sequence[str]
689 '''
690 self.charmurls = charmurls
691
692
693 class IsMeteredResult(Type):
694 _toSchema = {'metered': 'Metered'}
695 _toPy = {'Metered': 'metered'}
696 def __init__(self, metered=None):
697 '''
698 metered : bool
699 '''
700 self.metered = metered
701
702
703 class APIHostPortsResult(Type):
704 _toSchema = {'servers': 'Servers'}
705 _toPy = {'Servers': 'servers'}
706 def __init__(self, servers=None):
707 '''
708 servers : typing.Sequence[~HostPort]
709 '''
710 self.servers = [HostPort.from_json(o) for o in servers or []]
711
712
713 class AddCharm(Type):
714 _toSchema = {'channel': 'Channel', 'url': 'URL'}
715 _toPy = {'Channel': 'channel', 'URL': 'url'}
716 def __init__(self, channel=None, url=None):
717 '''
718 channel : str
719 url : str
720 '''
721 self.channel = channel
722 self.url = url
723
724
725 class AddCharmWithAuthorization(Type):
726 _toSchema = {'channel': 'Channel', 'charmstoremacaroon': 'CharmStoreMacaroon', 'url': 'URL'}
727 _toPy = {'Channel': 'channel', 'CharmStoreMacaroon': 'charmstoremacaroon', 'URL': 'url'}
728 def __init__(self, channel=None, charmstoremacaroon=None, url=None):
729 '''
730 channel : str
731 charmstoremacaroon : Macaroon
732 url : str
733 '''
734 self.channel = channel
735 self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon) if charmstoremacaroon else None
736 self.url = url
737
738
739 class AddMachineParams(Type):
740 _toSchema = {'parentid': 'ParentId', 'containertype': 'ContainerType', 'instanceid': 'InstanceId', 'disks': 'Disks', 'jobs': 'Jobs', 'placement': 'Placement', 'addrs': 'Addrs', 'nonce': 'Nonce', 'constraints': 'Constraints', 'series': 'Series', 'hardwarecharacteristics': 'HardwareCharacteristics'}
741 _toPy = {'HardwareCharacteristics': 'hardwarecharacteristics', 'Constraints': 'constraints', 'InstanceId': 'instanceid', 'ContainerType': 'containertype', 'ParentId': 'parentid', 'Addrs': 'addrs', 'Placement': 'placement', 'Disks': 'disks', 'Nonce': 'nonce', 'Jobs': 'jobs', 'Series': 'series'}
742 def __init__(self, addrs=None, constraints=None, containertype=None, disks=None, hardwarecharacteristics=None, instanceid=None, jobs=None, nonce=None, parentid=None, placement=None, series=None):
743 '''
744 addrs : typing.Sequence[~Address]
745 constraints : Value
746 containertype : str
747 disks : typing.Sequence[~Constraints]
748 hardwarecharacteristics : HardwareCharacteristics
749 instanceid : str
750 jobs : typing.Sequence[str]
751 nonce : str
752 parentid : str
753 placement : Placement
754 series : str
755 '''
756 self.addrs = [Address.from_json(o) for o in addrs or []]
757 self.constraints = Value.from_json(constraints) if constraints else None
758 self.containertype = containertype
759 self.disks = [Constraints.from_json(o) for o in disks or []]
760 self.hardwarecharacteristics = HardwareCharacteristics.from_json(hardwarecharacteristics) if hardwarecharacteristics else None
761 self.instanceid = instanceid
762 self.jobs = jobs
763 self.nonce = nonce
764 self.parentid = parentid
765 self.placement = Placement.from_json(placement) if placement else None
766 self.series = series
767
768
769 class AddMachines(Type):
770 _toSchema = {'machineparams': 'MachineParams'}
771 _toPy = {'MachineParams': 'machineparams'}
772 def __init__(self, machineparams=None):
773 '''
774 machineparams : typing.Sequence[~AddMachineParams]
775 '''
776 self.machineparams = [AddMachineParams.from_json(o) for o in machineparams or []]
777
778
779 class AddMachinesResult(Type):
780 _toSchema = {'error': 'Error', 'machine': 'Machine'}
781 _toPy = {'Error': 'error', 'Machine': 'machine'}
782 def __init__(self, error=None, machine=None):
783 '''
784 error : Error
785 machine : str
786 '''
787 self.error = Error.from_json(error) if error else None
788 self.machine = machine
789
790
791 class AddMachinesResults(Type):
792 _toSchema = {'machines': 'Machines'}
793 _toPy = {'Machines': 'machines'}
794 def __init__(self, machines=None):
795 '''
796 machines : typing.Sequence[~AddMachinesResult]
797 '''
798 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
799
800
801 class Address(Type):
802 _toSchema = {'spacename': 'SpaceName', 'value': 'Value', 'scope': 'Scope', 'type_': 'Type'}
803 _toPy = {'SpaceName': 'spacename', 'Type': 'type_', 'Scope': 'scope', 'Value': 'value'}
804 def __init__(self, scope=None, spacename=None, type_=None, value=None):
805 '''
806 scope : str
807 spacename : str
808 type_ : str
809 value : str
810 '''
811 self.scope = scope
812 self.spacename = spacename
813 self.type_ = type_
814 self.value = value
815
816
817 class AgentVersionResult(Type):
818 _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'}
819 _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'}
820 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
821 '''
822 build : int
823 major : int
824 minor : int
825 patch : int
826 tag : str
827 '''
828 self.build = build
829 self.major = major
830 self.minor = minor
831 self.patch = patch
832 self.tag = tag
833
834
835 class AllWatcherId(Type):
836 _toSchema = {'allwatcherid': 'AllWatcherId'}
837 _toPy = {'AllWatcherId': 'allwatcherid'}
838 def __init__(self, allwatcherid=None):
839 '''
840 allwatcherid : str
841 '''
842 self.allwatcherid = allwatcherid
843
844
845 class Binary(Type):
846 _toSchema = {'series': 'Series', 'arch': 'Arch', 'number': 'Number'}
847 _toPy = {'Arch': 'arch', 'Number': 'number', 'Series': 'series'}
848 def __init__(self, arch=None, number=None, series=None):
849 '''
850 arch : str
851 number : Number
852 series : str
853 '''
854 self.arch = arch
855 self.number = Number.from_json(number) if number else None
856 self.series = series
857
858
859 class BundleChangesChange(Type):
860 _toSchema = {'requires': 'requires', 'args': 'args', 'id_': 'id', 'method': 'method'}
861 _toPy = {'args': 'args', 'id': 'id_', 'method': 'method', 'requires': 'requires'}
862 def __init__(self, args=None, id_=None, method=None, requires=None):
863 '''
864 args : typing.Sequence[typing.Any]
865 id_ : str
866 method : str
867 requires : typing.Sequence[str]
868 '''
869 self.args = args
870 self.id_ = id_
871 self.method = method
872 self.requires = requires
873
874
875 class Constraints(Type):
876 _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'}
877 _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'}
878 def __init__(self, count=None, pool=None, size=None):
879 '''
880 count : int
881 pool : str
882 size : int
883 '''
884 self.count = count
885 self.pool = pool
886 self.size = size
887
888
889 class DestroyMachines(Type):
890 _toSchema = {'force': 'Force', 'machinenames': 'MachineNames'}
891 _toPy = {'MachineNames': 'machinenames', 'Force': 'force'}
892 def __init__(self, force=None, machinenames=None):
893 '''
894 force : bool
895 machinenames : typing.Sequence[str]
896 '''
897 self.force = force
898 self.machinenames = machinenames
899
900
901 class DetailedStatus(Type):
902 _toSchema = {'info': 'Info', 'status': 'Status', 'version': 'Version', 'data': 'Data', 'kind': 'Kind', 'since': 'Since', 'err': 'Err', 'life': 'Life'}
903 _toPy = {'Status': 'status', 'Since': 'since', 'Version': 'version', 'Err': 'err', 'Info': 'info', 'Data': 'data', 'Life': 'life', 'Kind': 'kind'}
904 def __init__(self, data=None, err=None, info=None, kind=None, life=None, since=None, status=None, version=None):
905 '''
906 data : typing.Mapping[str, typing.Any]
907 err : typing.Mapping[str, typing.Any]
908 info : str
909 kind : str
910 life : str
911 since : str
912 status : str
913 version : str
914 '''
915 self.data = data
916 self.err = err
917 self.info = info
918 self.kind = kind
919 self.life = life
920 self.since = since
921 self.status = status
922 self.version = version
923
924
925 class EndpointStatus(Type):
926 _toSchema = {'role': 'Role', 'subordinate': 'Subordinate', 'servicename': 'ServiceName', 'name': 'Name'}
927 _toPy = {'ServiceName': 'servicename', 'Subordinate': 'subordinate', 'Role': 'role', 'Name': 'name'}
928 def __init__(self, name=None, role=None, servicename=None, subordinate=None):
929 '''
930 name : str
931 role : str
932 servicename : str
933 subordinate : bool
934 '''
935 self.name = name
936 self.role = role
937 self.servicename = servicename
938 self.subordinate = subordinate
939
940
941 class EntityStatus(Type):
942 _toSchema = {'info': 'Info', 'status': 'Status', 'since': 'Since', 'data': 'Data'}
943 _toPy = {'Info': 'info', 'Since': 'since', 'Status': 'status', 'Data': 'data'}
944 def __init__(self, data=None, info=None, since=None, status=None):
945 '''
946 data : typing.Mapping[str, typing.Any]
947 info : str
948 since : str
949 status : str
950 '''
951 self.data = data
952 self.info = info
953 self.since = since
954 self.status = status
955
956
957 class FindToolsParams(Type):
958 _toSchema = {'minorversion': 'MinorVersion', 'arch': 'Arch', 'number': 'Number', 'majorversion': 'MajorVersion', 'series': 'Series'}
959 _toPy = {'Arch': 'arch', 'MinorVersion': 'minorversion', 'MajorVersion': 'majorversion', 'Number': 'number', 'Series': 'series'}
960 def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None):
961 '''
962 arch : str
963 majorversion : int
964 minorversion : int
965 number : Number
966 series : str
967 '''
968 self.arch = arch
969 self.majorversion = majorversion
970 self.minorversion = minorversion
971 self.number = Number.from_json(number) if number else None
972 self.series = series
973
974
975 class FindToolsResult(Type):
976 _toSchema = {'error': 'Error', 'list_': 'List'}
977 _toPy = {'Error': 'error', 'List': 'list_'}
978 def __init__(self, error=None, list_=None):
979 '''
980 error : Error
981 list_ : typing.Sequence[~Tools]
982 '''
983 self.error = Error.from_json(error) if error else None
984 self.list_ = [Tools.from_json(o) for o in list_ or []]
985
986
987 class FullStatus(Type):
988 _toSchema = {'machines': 'Machines', 'modelname': 'ModelName', 'availableversion': 'AvailableVersion', 'relations': 'Relations', 'services': 'Services'}
989 _toPy = {'Services': 'services', 'Relations': 'relations', 'AvailableVersion': 'availableversion', 'ModelName': 'modelname', 'Machines': 'machines'}
990 def __init__(self, availableversion=None, machines=None, modelname=None, relations=None, services=None):
991 '''
992 availableversion : str
993 machines : typing.Mapping[str, ~MachineStatus]
994 modelname : str
995 relations : typing.Sequence[~RelationStatus]
996 services : typing.Mapping[str, ~ServiceStatus]
997 '''
998 self.availableversion = availableversion
999 self.machines = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()}
1000 self.modelname = modelname
1001 self.relations = [RelationStatus.from_json(o) for o in relations or []]
1002 self.services = {k: ServiceStatus.from_json(v) for k, v in (services or dict()).items()}
1003
1004
1005 class GetBundleChangesParams(Type):
1006 _toSchema = {'yaml': 'yaml'}
1007 _toPy = {'yaml': 'yaml'}
1008 def __init__(self, yaml=None):
1009 '''
1010 yaml : str
1011 '''
1012 self.yaml = yaml
1013
1014
1015 class GetBundleChangesResults(Type):
1016 _toSchema = {'errors': 'errors', 'changes': 'changes'}
1017 _toPy = {'errors': 'errors', 'changes': 'changes'}
1018 def __init__(self, changes=None, errors=None):
1019 '''
1020 changes : typing.Sequence[~BundleChangesChange]
1021 errors : typing.Sequence[str]
1022 '''
1023 self.changes = [BundleChangesChange.from_json(o) for o in changes or []]
1024 self.errors = errors
1025
1026
1027 class GetConstraintsResults(Type):
1028 _toSchema = {'virt_type': 'virt-type', 'mem': 'mem', 'container': 'container', 'instance_type': 'instance-type', 'root_disk': 'root-disk', 'tags': 'tags', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'}
1029 _toPy = {'instance-type': 'instance_type', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power', 'mem': 'mem', 'tags': 'tags', 'arch': 'arch', 'spaces': 'spaces', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores'}
1030 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
1031 '''
1032 arch : str
1033 container : str
1034 cpu_cores : int
1035 cpu_power : int
1036 instance_type : str
1037 mem : int
1038 root_disk : int
1039 spaces : typing.Sequence[str]
1040 tags : typing.Sequence[str]
1041 virt_type : str
1042 '''
1043 self.arch = arch
1044 self.container = container
1045 self.cpu_cores = cpu_cores
1046 self.cpu_power = cpu_power
1047 self.instance_type = instance_type
1048 self.mem = mem
1049 self.root_disk = root_disk
1050 self.spaces = spaces
1051 self.tags = tags
1052 self.virt_type = virt_type
1053
1054
1055 class HardwareCharacteristics(Type):
1056 _toSchema = {'tags': 'Tags', 'rootdisk': 'RootDisk', 'arch': 'Arch', 'cpupower': 'CpuPower', 'availabilityzone': 'AvailabilityZone', 'cpucores': 'CpuCores', 'mem': 'Mem'}
1057 _toPy = {'RootDisk': 'rootdisk', 'Arch': 'arch', 'CpuCores': 'cpucores', 'Tags': 'tags', 'AvailabilityZone': 'availabilityzone', 'CpuPower': 'cpupower', 'Mem': 'mem'}
1058 def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None):
1059 '''
1060 arch : str
1061 availabilityzone : str
1062 cpucores : int
1063 cpupower : int
1064 mem : int
1065 rootdisk : int
1066 tags : typing.Sequence[str]
1067 '''
1068 self.arch = arch
1069 self.availabilityzone = availabilityzone
1070 self.cpucores = cpucores
1071 self.cpupower = cpupower
1072 self.mem = mem
1073 self.rootdisk = rootdisk
1074 self.tags = tags
1075
1076
1077 class HostPort(Type):
1078 _toSchema = {'address': 'Address', 'port': 'Port'}
1079 _toPy = {'Port': 'port', 'Address': 'address'}
1080 def __init__(self, address=None, port=None):
1081 '''
1082 address : Address
1083 port : int
1084 '''
1085 self.address = Address.from_json(address) if address else None
1086 self.port = port
1087
1088
1089 class MachineStatus(Type):
1090 _toSchema = {'series': 'Series', 'jobs': 'Jobs', 'instanceid': 'InstanceId', 'instancestatus': 'InstanceStatus', 'hasvote': 'HasVote', 'wantsvote': 'WantsVote', 'containers': 'Containers', 'agentstatus': 'AgentStatus', 'dnsname': 'DNSName', 'hardware': 'Hardware', 'id_': 'Id'}
1091 _toPy = {'AgentStatus': 'agentstatus', 'InstanceId': 'instanceid', 'HasVote': 'hasvote', 'Series': 'series', 'Hardware': 'hardware', 'DNSName': 'dnsname', 'WantsVote': 'wantsvote', 'Id': 'id_', 'Jobs': 'jobs', 'InstanceStatus': 'instancestatus', 'Containers': 'containers'}
1092 def __init__(self, agentstatus=None, containers=None, dnsname=None, hardware=None, hasvote=None, id_=None, instanceid=None, instancestatus=None, jobs=None, series=None, wantsvote=None):
1093 '''
1094 agentstatus : DetailedStatus
1095 containers : typing.Mapping[str, ~MachineStatus]
1096 dnsname : str
1097 hardware : str
1098 hasvote : bool
1099 id_ : str
1100 instanceid : str
1101 instancestatus : DetailedStatus
1102 jobs : typing.Sequence[str]
1103 series : str
1104 wantsvote : bool
1105 '''
1106 self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None
1107 self.containers = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()}
1108 self.dnsname = dnsname
1109 self.hardware = hardware
1110 self.hasvote = hasvote
1111 self.id_ = id_
1112 self.instanceid = instanceid
1113 self.instancestatus = DetailedStatus.from_json(instancestatus) if instancestatus else None
1114 self.jobs = jobs
1115 self.series = series
1116 self.wantsvote = wantsvote
1117
1118
1119 class MeterStatus(Type):
1120 _toSchema = {'message': 'Message', 'color': 'Color'}
1121 _toPy = {'Message': 'message', 'Color': 'color'}
1122 def __init__(self, color=None, message=None):
1123 '''
1124 color : str
1125 message : str
1126 '''
1127 self.color = color
1128 self.message = message
1129
1130
1131 class ModelConfigResults(Type):
1132 _toSchema = {'config': 'Config'}
1133 _toPy = {'Config': 'config'}
1134 def __init__(self, config=None):
1135 '''
1136 config : typing.Mapping[str, typing.Any]
1137 '''
1138 self.config = config
1139
1140
1141 class ModelInfo(Type):
1142 _toSchema = {'users': 'Users', 'status': 'Status', 'serveruuid': 'ServerUUID', 'uuid': 'UUID', 'name': 'Name', 'providertype': 'ProviderType', 'defaultseries': 'DefaultSeries', 'ownertag': 'OwnerTag', 'life': 'Life'}
1143 _toPy = {'Status': 'status', 'UUID': 'uuid', 'OwnerTag': 'ownertag', 'Name': 'name', 'ServerUUID': 'serveruuid', 'DefaultSeries': 'defaultseries', 'Life': 'life', 'Users': 'users', 'ProviderType': 'providertype'}
1144 def __init__(self, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None):
1145 '''
1146 defaultseries : str
1147 life : str
1148 name : str
1149 ownertag : str
1150 providertype : str
1151 serveruuid : str
1152 status : EntityStatus
1153 uuid : str
1154 users : typing.Sequence[~ModelUserInfo]
1155 '''
1156 self.defaultseries = defaultseries
1157 self.life = life
1158 self.name = name
1159 self.ownertag = ownertag
1160 self.providertype = providertype
1161 self.serveruuid = serveruuid
1162 self.status = EntityStatus.from_json(status) if status else None
1163 self.uuid = uuid
1164 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1165
1166
1167 class ModelSet(Type):
1168 _toSchema = {'config': 'Config'}
1169 _toPy = {'Config': 'config'}
1170 def __init__(self, config=None):
1171 '''
1172 config : typing.Mapping[str, typing.Any]
1173 '''
1174 self.config = config
1175
1176
1177 class ModelUnset(Type):
1178 _toSchema = {'keys': 'Keys'}
1179 _toPy = {'Keys': 'keys'}
1180 def __init__(self, keys=None):
1181 '''
1182 keys : typing.Sequence[str]
1183 '''
1184 self.keys = keys
1185
1186
1187 class ModelUserInfo(Type):
1188 _toSchema = {'displayname': 'displayname', 'access': 'access', 'user': 'user', 'lastconnection': 'lastconnection'}
1189 _toPy = {'displayname': 'displayname', 'access': 'access', 'user': 'user', 'lastconnection': 'lastconnection'}
1190 def __init__(self, access=None, displayname=None, lastconnection=None, user=None):
1191 '''
1192 access : str
1193 displayname : str
1194 lastconnection : str
1195 user : str
1196 '''
1197 self.access = access
1198 self.displayname = displayname
1199 self.lastconnection = lastconnection
1200 self.user = user
1201
1202
1203 class ModelUserInfoResult(Type):
1204 _toSchema = {'error': 'error', 'result': 'result'}
1205 _toPy = {'error': 'error', 'result': 'result'}
1206 def __init__(self, error=None, result=None):
1207 '''
1208 error : Error
1209 result : ModelUserInfo
1210 '''
1211 self.error = Error.from_json(error) if error else None
1212 self.result = ModelUserInfo.from_json(result) if result else None
1213
1214
1215 class ModelUserInfoResults(Type):
1216 _toSchema = {'results': 'results'}
1217 _toPy = {'results': 'results'}
1218 def __init__(self, results=None):
1219 '''
1220 results : typing.Sequence[~ModelUserInfoResult]
1221 '''
1222 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1223
1224
1225 class Placement(Type):
1226 _toSchema = {'scope': 'Scope', 'directive': 'Directive'}
1227 _toPy = {'Directive': 'directive', 'Scope': 'scope'}
1228 def __init__(self, directive=None, scope=None):
1229 '''
1230 directive : str
1231 scope : str
1232 '''
1233 self.directive = directive
1234 self.scope = scope
1235
1236
1237 class PrivateAddress(Type):
1238 _toSchema = {'target': 'Target'}
1239 _toPy = {'Target': 'target'}
1240 def __init__(self, target=None):
1241 '''
1242 target : str
1243 '''
1244 self.target = target
1245
1246
1247 class PrivateAddressResults(Type):
1248 _toSchema = {'privateaddress': 'PrivateAddress'}
1249 _toPy = {'PrivateAddress': 'privateaddress'}
1250 def __init__(self, privateaddress=None):
1251 '''
1252 privateaddress : str
1253 '''
1254 self.privateaddress = privateaddress
1255
1256
1257 class ProvisioningScriptParams(Type):
1258 _toSchema = {'machineid': 'MachineId', 'disablepackagecommands': 'DisablePackageCommands', 'nonce': 'Nonce', 'datadir': 'DataDir'}
1259 _toPy = {'Nonce': 'nonce', 'DisablePackageCommands': 'disablepackagecommands', 'MachineId': 'machineid', 'DataDir': 'datadir'}
1260 def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None):
1261 '''
1262 datadir : str
1263 disablepackagecommands : bool
1264 machineid : str
1265 nonce : str
1266 '''
1267 self.datadir = datadir
1268 self.disablepackagecommands = disablepackagecommands
1269 self.machineid = machineid
1270 self.nonce = nonce
1271
1272
1273 class ProvisioningScriptResult(Type):
1274 _toSchema = {'script': 'Script'}
1275 _toPy = {'Script': 'script'}
1276 def __init__(self, script=None):
1277 '''
1278 script : str
1279 '''
1280 self.script = script
1281
1282
1283 class PublicAddress(Type):
1284 _toSchema = {'target': 'Target'}
1285 _toPy = {'Target': 'target'}
1286 def __init__(self, target=None):
1287 '''
1288 target : str
1289 '''
1290 self.target = target
1291
1292
1293 class PublicAddressResults(Type):
1294 _toSchema = {'publicaddress': 'PublicAddress'}
1295 _toPy = {'PublicAddress': 'publicaddress'}
1296 def __init__(self, publicaddress=None):
1297 '''
1298 publicaddress : str
1299 '''
1300 self.publicaddress = publicaddress
1301
1302
1303 class RelationStatus(Type):
1304 _toSchema = {'key': 'Key', 'interface': 'Interface', 'scope': 'Scope', 'endpoints': 'Endpoints', 'id_': 'Id'}
1305 _toPy = {'Key': 'key', 'Id': 'id_', 'Scope': 'scope', 'Interface': 'interface', 'Endpoints': 'endpoints'}
1306 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
1307 '''
1308 endpoints : typing.Sequence[~EndpointStatus]
1309 id_ : int
1310 interface : str
1311 key : str
1312 scope : str
1313 '''
1314 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
1315 self.id_ = id_
1316 self.interface = interface
1317 self.key = key
1318 self.scope = scope
1319
1320
1321 class ResolveCharmResult(Type):
1322 _toSchema = {'error': 'Error', 'url': 'URL'}
1323 _toPy = {'Error': 'error', 'URL': 'url'}
1324 def __init__(self, error=None, url=None):
1325 '''
1326 error : str
1327 url : URL
1328 '''
1329 self.error = error
1330 self.url = URL.from_json(url) if url else None
1331
1332
1333 class ResolveCharmResults(Type):
1334 _toSchema = {'urls': 'URLs'}
1335 _toPy = {'URLs': 'urls'}
1336 def __init__(self, urls=None):
1337 '''
1338 urls : typing.Sequence[~ResolveCharmResult]
1339 '''
1340 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
1341
1342
1343 class ResolveCharms(Type):
1344 _toSchema = {'references': 'References'}
1345 _toPy = {'References': 'references'}
1346 def __init__(self, references=None):
1347 '''
1348 references : typing.Sequence[~URL]
1349 '''
1350 self.references = [URL.from_json(o) for o in references or []]
1351
1352
1353 class Resolved(Type):
1354 _toSchema = {'retry': 'Retry', 'unitname': 'UnitName'}
1355 _toPy = {'UnitName': 'unitname', 'Retry': 'retry'}
1356 def __init__(self, retry=None, unitname=None):
1357 '''
1358 retry : bool
1359 unitname : str
1360 '''
1361 self.retry = retry
1362 self.unitname = unitname
1363
1364
1365 class ServiceStatus(Type):
1366 _toSchema = {'units': 'Units', 'charm': 'Charm', 'relations': 'Relations', 'status': 'Status', 'exposed': 'Exposed', 'canupgradeto': 'CanUpgradeTo', 'meterstatuses': 'MeterStatuses', 'subordinateto': 'SubordinateTo', 'life': 'Life', 'err': 'Err'}
1367 _toPy = {'Status': 'status', 'Relations': 'relations', 'Exposed': 'exposed', 'Err': 'err', 'SubordinateTo': 'subordinateto', 'Charm': 'charm', 'CanUpgradeTo': 'canupgradeto', 'Units': 'units', 'Life': 'life', 'MeterStatuses': 'meterstatuses'}
1368 def __init__(self, canupgradeto=None, charm=None, err=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None):
1369 '''
1370 canupgradeto : str
1371 charm : str
1372 err : typing.Mapping[str, typing.Any]
1373 exposed : bool
1374 life : str
1375 meterstatuses : typing.Mapping[str, ~MeterStatus]
1376 relations : typing.Sequence[str]
1377 status : DetailedStatus
1378 subordinateto : typing.Sequence[str]
1379 units : typing.Mapping[str, ~UnitStatus]
1380 '''
1381 self.canupgradeto = canupgradeto
1382 self.charm = charm
1383 self.err = err
1384 self.exposed = exposed
1385 self.life = life
1386 self.meterstatuses = {k: MeterStatus.from_json(v) for k, v in (meterstatuses or dict()).items()}
1387 self.relations = relations
1388 self.status = DetailedStatus.from_json(status) if status else None
1389 self.subordinateto = subordinateto
1390 self.units = {k: UnitStatus.from_json(v) for k, v in (units or dict()).items()}
1391
1392
1393 class SetConstraints(Type):
1394 _toSchema = {'constraints': 'Constraints', 'servicename': 'ServiceName'}
1395 _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints'}
1396 def __init__(self, constraints=None, servicename=None):
1397 '''
1398 constraints : Value
1399 servicename : str
1400 '''
1401 self.constraints = Value.from_json(constraints) if constraints else None
1402 self.servicename = servicename
1403
1404
1405 class SetModelAgentVersion(Type):
1406 _toSchema = {'minor': 'Minor', 'major': 'Major', 'tag': 'Tag', 'patch': 'Patch', 'build': 'Build'}
1407 _toPy = {'Tag': 'tag', 'Build': 'build', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'}
1408 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1409 '''
1410 build : int
1411 major : int
1412 minor : int
1413 patch : int
1414 tag : str
1415 '''
1416 self.build = build
1417 self.major = major
1418 self.minor = minor
1419 self.patch = patch
1420 self.tag = tag
1421
1422
1423 class StatusHistoryArgs(Type):
1424 _toSchema = {'kind': 'Kind', 'size': 'Size', 'name': 'Name'}
1425 _toPy = {'Size': 'size', 'Kind': 'kind', 'Name': 'name'}
1426 def __init__(self, kind=None, name=None, size=None):
1427 '''
1428 kind : str
1429 name : str
1430 size : int
1431 '''
1432 self.kind = kind
1433 self.name = name
1434 self.size = size
1435
1436
1437 class StatusHistoryResults(Type):
1438 _toSchema = {'statuses': 'Statuses'}
1439 _toPy = {'Statuses': 'statuses'}
1440 def __init__(self, statuses=None):
1441 '''
1442 statuses : typing.Sequence[~DetailedStatus]
1443 '''
1444 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1445
1446
1447 class StatusParams(Type):
1448 _toSchema = {'patterns': 'Patterns'}
1449 _toPy = {'Patterns': 'patterns'}
1450 def __init__(self, patterns=None):
1451 '''
1452 patterns : typing.Sequence[str]
1453 '''
1454 self.patterns = patterns
1455
1456
1457 class Tools(Type):
1458 _toSchema = {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'}
1459 _toPy = {'url': 'url', 'version': 'version', 'size': 'size', 'sha256': 'sha256'}
1460 def __init__(self, sha256=None, size=None, url=None, version=None):
1461 '''
1462 sha256 : str
1463 size : int
1464 url : str
1465 version : Binary
1466 '''
1467 self.sha256 = sha256
1468 self.size = size
1469 self.url = url
1470 self.version = Binary.from_json(version) if version else None
1471
1472
1473 class URL(Type):
1474 _toSchema = {'series': 'Series', 'channel': 'Channel', 'schema': 'Schema', 'revision': 'Revision', 'name': 'Name', 'user': 'User'}
1475 _toPy = {'Schema': 'schema', 'Name': 'name', 'Channel': 'channel', 'User': 'user', 'Revision': 'revision', 'Series': 'series'}
1476 def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None):
1477 '''
1478 channel : str
1479 name : str
1480 revision : int
1481 schema : str
1482 series : str
1483 user : str
1484 '''
1485 self.channel = channel
1486 self.name = name
1487 self.revision = revision
1488 self.schema = schema
1489 self.series = series
1490 self.user = user
1491
1492
1493 class UnitStatus(Type):
1494 _toSchema = {'charm': 'Charm', 'subordinates': 'Subordinates', 'workloadstatus': 'WorkloadStatus', 'machine': 'Machine', 'openedports': 'OpenedPorts', 'agentstatus': 'AgentStatus', 'publicaddress': 'PublicAddress'}
1495 _toPy = {'AgentStatus': 'agentstatus', 'Machine': 'machine', 'Charm': 'charm', 'Subordinates': 'subordinates', 'PublicAddress': 'publicaddress', 'WorkloadStatus': 'workloadstatus', 'OpenedPorts': 'openedports'}
1496 def __init__(self, agentstatus=None, charm=None, machine=None, openedports=None, publicaddress=None, subordinates=None, workloadstatus=None):
1497 '''
1498 agentstatus : DetailedStatus
1499 charm : str
1500 machine : str
1501 openedports : typing.Sequence[str]
1502 publicaddress : str
1503 subordinates : typing.Mapping[str, ~UnitStatus]
1504 workloadstatus : DetailedStatus
1505 '''
1506 self.agentstatus = DetailedStatus.from_json(agentstatus) if agentstatus else None
1507 self.charm = charm
1508 self.machine = machine
1509 self.openedports = openedports
1510 self.publicaddress = publicaddress
1511 self.subordinates = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()}
1512 self.workloadstatus = DetailedStatus.from_json(workloadstatus) if workloadstatus else None
1513
1514
1515 class Value(Type):
1516 _toSchema = {'virt_type': 'virt-type', 'mem': 'mem', 'container': 'container', 'instance_type': 'instance-type', 'root_disk': 'root-disk', 'tags': 'tags', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'spaces': 'spaces'}
1517 _toPy = {'instance-type': 'instance_type', 'root-disk': 'root_disk', 'cpu-power': 'cpu_power', 'mem': 'mem', 'tags': 'tags', 'arch': 'arch', 'spaces': 'spaces', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores'}
1518 def __init__(self, arch=None, container=None, cpu_cores=None, cpu_power=None, instance_type=None, mem=None, root_disk=None, spaces=None, tags=None, virt_type=None):
1519 '''
1520 arch : str
1521 container : str
1522 cpu_cores : int
1523 cpu_power : int
1524 instance_type : str
1525 mem : int
1526 root_disk : int
1527 spaces : typing.Sequence[str]
1528 tags : typing.Sequence[str]
1529 virt_type : str
1530 '''
1531 self.arch = arch
1532 self.container = container
1533 self.cpu_cores = cpu_cores
1534 self.cpu_power = cpu_power
1535 self.instance_type = instance_type
1536 self.mem = mem
1537 self.root_disk = root_disk
1538 self.spaces = spaces
1539 self.tags = tags
1540 self.virt_type = virt_type
1541
1542
1543 class DestroyControllerArgs(Type):
1544 _toSchema = {'destroy_models': 'destroy-models'}
1545 _toPy = {'destroy-models': 'destroy_models'}
1546 def __init__(self, destroy_models=None):
1547 '''
1548 destroy_models : bool
1549 '''
1550 self.destroy_models = destroy_models
1551
1552
1553 class InitiateModelMigrationArgs(Type):
1554 _toSchema = {'specs': 'specs'}
1555 _toPy = {'specs': 'specs'}
1556 def __init__(self, specs=None):
1557 '''
1558 specs : typing.Sequence[~ModelMigrationSpec]
1559 '''
1560 self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []]
1561
1562
1563 class InitiateModelMigrationResult(Type):
1564 _toSchema = {'error': 'error', 'id_': 'id', 'model_tag': 'model-tag'}
1565 _toPy = {'model-tag': 'model_tag', 'error': 'error', 'id': 'id_'}
1566 def __init__(self, error=None, id_=None, model_tag=None):
1567 '''
1568 error : Error
1569 id_ : str
1570 model_tag : str
1571 '''
1572 self.error = Error.from_json(error) if error else None
1573 self.id_ = id_
1574 self.model_tag = model_tag
1575
1576
1577 class InitiateModelMigrationResults(Type):
1578 _toSchema = {'results': 'results'}
1579 _toPy = {'results': 'results'}
1580 def __init__(self, results=None):
1581 '''
1582 results : typing.Sequence[~InitiateModelMigrationResult]
1583 '''
1584 self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []]
1585
1586
1587 class Model(Type):
1588 _toSchema = {'ownertag': 'OwnerTag', 'uuid': 'UUID', 'name': 'Name'}
1589 _toPy = {'UUID': 'uuid', 'OwnerTag': 'ownertag', 'Name': 'name'}
1590 def __init__(self, name=None, ownertag=None, uuid=None):
1591 '''
1592 name : str
1593 ownertag : str
1594 uuid : str
1595 '''
1596 self.name = name
1597 self.ownertag = ownertag
1598 self.uuid = uuid
1599
1600
1601 class ModelBlockInfo(Type):
1602 _toSchema = {'model_uuid': 'model-uuid', 'owner_tag': 'owner-tag', 'blocks': 'blocks', 'name': 'name'}
1603 _toPy = {'model-uuid': 'model_uuid', 'blocks': 'blocks', 'owner-tag': 'owner_tag', 'name': 'name'}
1604 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
1605 '''
1606 blocks : typing.Sequence[str]
1607 model_uuid : str
1608 name : str
1609 owner_tag : str
1610 '''
1611 self.blocks = blocks
1612 self.model_uuid = model_uuid
1613 self.name = name
1614 self.owner_tag = owner_tag
1615
1616
1617 class ModelBlockInfoList(Type):
1618 _toSchema = {'models': 'models'}
1619 _toPy = {'models': 'models'}
1620 def __init__(self, models=None):
1621 '''
1622 models : typing.Sequence[~ModelBlockInfo]
1623 '''
1624 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
1625
1626
1627 class ModelMigrationSpec(Type):
1628 _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'}
1629 _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'}
1630 def __init__(self, model_tag=None, target_info=None):
1631 '''
1632 model_tag : str
1633 target_info : ModelMigrationTargetInfo
1634 '''
1635 self.model_tag = model_tag
1636 self.target_info = ModelMigrationTargetInfo.from_json(target_info) if target_info else None
1637
1638
1639 class ModelMigrationTargetInfo(Type):
1640 _toSchema = {'auth_tag': 'auth-tag', 'password': 'password', 'controller_tag': 'controller-tag', 'ca_cert': 'ca-cert', 'addrs': 'addrs'}
1641 _toPy = {'password': 'password', 'auth-tag': 'auth_tag', 'ca-cert': 'ca_cert', 'controller-tag': 'controller_tag', 'addrs': 'addrs'}
1642 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None):
1643 '''
1644 addrs : typing.Sequence[str]
1645 auth_tag : str
1646 ca_cert : str
1647 controller_tag : str
1648 password : str
1649 '''
1650 self.addrs = addrs
1651 self.auth_tag = auth_tag
1652 self.ca_cert = ca_cert
1653 self.controller_tag = controller_tag
1654 self.password = password
1655
1656
1657 class ModelStatus(Type):
1658 _toSchema = {'hosted_machine_count': 'hosted-machine-count', 'service_count': 'service-count', 'life': 'life', 'model_tag': 'model-tag', 'owner_tag': 'owner-tag'}
1659 _toPy = {'model-tag': 'model_tag', 'service-count': 'service_count', 'life': 'life', 'hosted-machine-count': 'hosted_machine_count', 'owner-tag': 'owner_tag'}
1660 def __init__(self, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None, service_count=None):
1661 '''
1662 hosted_machine_count : int
1663 life : str
1664 model_tag : str
1665 owner_tag : str
1666 service_count : int
1667 '''
1668 self.hosted_machine_count = hosted_machine_count
1669 self.life = life
1670 self.model_tag = model_tag
1671 self.owner_tag = owner_tag
1672 self.service_count = service_count
1673
1674
1675 class ModelStatusResults(Type):
1676 _toSchema = {'models': 'models'}
1677 _toPy = {'models': 'models'}
1678 def __init__(self, models=None):
1679 '''
1680 models : typing.Sequence[~ModelStatus]
1681 '''
1682 self.models = [ModelStatus.from_json(o) for o in models or []]
1683
1684
1685 class RemoveBlocksArgs(Type):
1686 _toSchema = {'all_': 'all'}
1687 _toPy = {'all': 'all_'}
1688 def __init__(self, all_=None):
1689 '''
1690 all_ : bool
1691 '''
1692 self.all_ = all_
1693
1694
1695 class UserModel(Type):
1696 _toSchema = {'model': 'Model', 'lastconnection': 'LastConnection'}
1697 _toPy = {'LastConnection': 'lastconnection', 'Model': 'model'}
1698 def __init__(self, lastconnection=None, model=None):
1699 '''
1700 lastconnection : str
1701 model : Model
1702 '''
1703 self.lastconnection = lastconnection
1704 self.model = Model.from_json(model) if model else None
1705
1706
1707 class UserModelList(Type):
1708 _toSchema = {'usermodels': 'UserModels'}
1709 _toPy = {'UserModels': 'usermodels'}
1710 def __init__(self, usermodels=None):
1711 '''
1712 usermodels : typing.Sequence[~UserModel]
1713 '''
1714 self.usermodels = [UserModel.from_json(o) for o in usermodels or []]
1715
1716
1717 class BytesResult(Type):
1718 _toSchema = {'result': 'Result'}
1719 _toPy = {'Result': 'result'}
1720 def __init__(self, result=None):
1721 '''
1722 result : typing.Sequence[int]
1723 '''
1724 self.result = result
1725
1726
1727 class DeployerConnectionValues(Type):
1728 _toSchema = {'apiaddresses': 'APIAddresses', 'stateaddresses': 'StateAddresses'}
1729 _toPy = {'StateAddresses': 'stateaddresses', 'APIAddresses': 'apiaddresses'}
1730 def __init__(self, apiaddresses=None, stateaddresses=None):
1731 '''
1732 apiaddresses : typing.Sequence[str]
1733 stateaddresses : typing.Sequence[str]
1734 '''
1735 self.apiaddresses = apiaddresses
1736 self.stateaddresses = stateaddresses
1737
1738
1739 class LifeResult(Type):
1740 _toSchema = {'error': 'Error', 'life': 'Life'}
1741 _toPy = {'Error': 'error', 'Life': 'life'}
1742 def __init__(self, error=None, life=None):
1743 '''
1744 error : Error
1745 life : str
1746 '''
1747 self.error = Error.from_json(error) if error else None
1748 self.life = life
1749
1750
1751 class LifeResults(Type):
1752 _toSchema = {'results': 'Results'}
1753 _toPy = {'Results': 'results'}
1754 def __init__(self, results=None):
1755 '''
1756 results : typing.Sequence[~LifeResult]
1757 '''
1758 self.results = [LifeResult.from_json(o) for o in results or []]
1759
1760
1761 class StringResult(Type):
1762 _toSchema = {'error': 'Error', 'result': 'Result'}
1763 _toPy = {'Error': 'error', 'Result': 'result'}
1764 def __init__(self, error=None, result=None):
1765 '''
1766 error : Error
1767 result : str
1768 '''
1769 self.error = Error.from_json(error) if error else None
1770 self.result = result
1771
1772
1773 class StringsResult(Type):
1774 _toSchema = {'error': 'Error', 'result': 'Result'}
1775 _toPy = {'Error': 'error', 'Result': 'result'}
1776 def __init__(self, error=None, result=None):
1777 '''
1778 error : Error
1779 result : typing.Sequence[str]
1780 '''
1781 self.error = Error.from_json(error) if error else None
1782 self.result = result
1783
1784
1785 class StringsWatchResult(Type):
1786 _toSchema = {'changes': 'Changes', 'stringswatcherid': 'StringsWatcherId', 'error': 'Error'}
1787 _toPy = {'Changes': 'changes', 'Error': 'error', 'StringsWatcherId': 'stringswatcherid'}
1788 def __init__(self, changes=None, error=None, stringswatcherid=None):
1789 '''
1790 changes : typing.Sequence[str]
1791 error : Error
1792 stringswatcherid : str
1793 '''
1794 self.changes = changes
1795 self.error = Error.from_json(error) if error else None
1796 self.stringswatcherid = stringswatcherid
1797
1798
1799 class StringsWatchResults(Type):
1800 _toSchema = {'results': 'Results'}
1801 _toPy = {'Results': 'results'}
1802 def __init__(self, results=None):
1803 '''
1804 results : typing.Sequence[~StringsWatchResult]
1805 '''
1806 self.results = [StringsWatchResult.from_json(o) for o in results or []]
1807
1808
1809 class AddSubnetParams(Type):
1810 _toSchema = {'subnettag': 'SubnetTag', 'zones': 'Zones', 'subnetproviderid': 'SubnetProviderId', 'spacetag': 'SpaceTag'}
1811 _toPy = {'SpaceTag': 'spacetag', 'SubnetProviderId': 'subnetproviderid', 'SubnetTag': 'subnettag', 'Zones': 'zones'}
1812 def __init__(self, spacetag=None, subnetproviderid=None, subnettag=None, zones=None):
1813 '''
1814 spacetag : str
1815 subnetproviderid : str
1816 subnettag : str
1817 zones : typing.Sequence[str]
1818 '''
1819 self.spacetag = spacetag
1820 self.subnetproviderid = subnetproviderid
1821 self.subnettag = subnettag
1822 self.zones = zones
1823
1824
1825 class AddSubnetsParams(Type):
1826 _toSchema = {'subnets': 'Subnets'}
1827 _toPy = {'Subnets': 'subnets'}
1828 def __init__(self, subnets=None):
1829 '''
1830 subnets : typing.Sequence[~AddSubnetParams]
1831 '''
1832 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
1833
1834
1835 class CreateSpaceParams(Type):
1836 _toSchema = {'public': 'Public', 'subnettags': 'SubnetTags', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag'}
1837 _toPy = {'ProviderId': 'providerid', 'Public': 'public', 'SpaceTag': 'spacetag', 'SubnetTags': 'subnettags'}
1838 def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None):
1839 '''
1840 providerid : str
1841 public : bool
1842 spacetag : str
1843 subnettags : typing.Sequence[str]
1844 '''
1845 self.providerid = providerid
1846 self.public = public
1847 self.spacetag = spacetag
1848 self.subnettags = subnettags
1849
1850
1851 class CreateSpacesParams(Type):
1852 _toSchema = {'spaces': 'Spaces'}
1853 _toPy = {'Spaces': 'spaces'}
1854 def __init__(self, spaces=None):
1855 '''
1856 spaces : typing.Sequence[~CreateSpaceParams]
1857 '''
1858 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
1859
1860
1861 class DiscoverSpacesResults(Type):
1862 _toSchema = {'results': 'Results'}
1863 _toPy = {'Results': 'results'}
1864 def __init__(self, results=None):
1865 '''
1866 results : typing.Sequence[~ProviderSpace]
1867 '''
1868 self.results = [ProviderSpace.from_json(o) for o in results or []]
1869
1870
1871 class ListSubnetsResults(Type):
1872 _toSchema = {'results': 'Results'}
1873 _toPy = {'Results': 'results'}
1874 def __init__(self, results=None):
1875 '''
1876 results : typing.Sequence[~Subnet]
1877 '''
1878 self.results = [Subnet.from_json(o) for o in results or []]
1879
1880
1881 class ProviderSpace(Type):
1882 _toSchema = {'subnets': 'Subnets', 'error': 'Error', 'providerid': 'ProviderId', 'name': 'Name'}
1883 _toPy = {'ProviderId': 'providerid', 'Error': 'error', 'Subnets': 'subnets', 'Name': 'name'}
1884 def __init__(self, error=None, name=None, providerid=None, subnets=None):
1885 '''
1886 error : Error
1887 name : str
1888 providerid : str
1889 subnets : typing.Sequence[~Subnet]
1890 '''
1891 self.error = Error.from_json(error) if error else None
1892 self.name = name
1893 self.providerid = providerid
1894 self.subnets = [Subnet.from_json(o) for o in subnets or []]
1895
1896
1897 class Subnet(Type):
1898 _toSchema = {'zones': 'Zones', 'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag', 'status': 'Status', 'staticrangehighip': 'StaticRangeHighIP', 'life': 'Life', 'cidr': 'CIDR'}
1899 _toPy = {'ProviderId': 'providerid', 'SpaceTag': 'spacetag', 'StaticRangeLowIP': 'staticrangelowip', 'StaticRangeHighIP': 'staticrangehighip', 'Status': 'status', 'CIDR': 'cidr', 'Life': 'life', 'VLANTag': 'vlantag', 'Zones': 'zones'}
1900 def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None):
1901 '''
1902 cidr : str
1903 life : str
1904 providerid : str
1905 spacetag : str
1906 staticrangehighip : typing.Sequence[int]
1907 staticrangelowip : typing.Sequence[int]
1908 status : str
1909 vlantag : int
1910 zones : typing.Sequence[str]
1911 '''
1912 self.cidr = cidr
1913 self.life = life
1914 self.providerid = providerid
1915 self.spacetag = spacetag
1916 self.staticrangehighip = staticrangehighip
1917 self.staticrangelowip = staticrangelowip
1918 self.status = status
1919 self.vlantag = vlantag
1920 self.zones = zones
1921
1922
1923 class SubnetsFilters(Type):
1924 _toSchema = {'zone': 'Zone', 'spacetag': 'SpaceTag'}
1925 _toPy = {'SpaceTag': 'spacetag', 'Zone': 'zone'}
1926 def __init__(self, spacetag=None, zone=None):
1927 '''
1928 spacetag : str
1929 zone : str
1930 '''
1931 self.spacetag = spacetag
1932 self.zone = zone
1933
1934
1935 class BlockDevice(Type):
1936 _toSchema = {'devicename': 'DeviceName', 'hardwareid': 'HardwareId', 'inuse': 'InUse', 'uuid': 'UUID', 'mountpoint': 'MountPoint', 'filesystemtype': 'FilesystemType', 'label': 'Label', 'devicelinks': 'DeviceLinks', 'size': 'Size', 'busaddress': 'BusAddress'}
1937 _toPy = {'DeviceLinks': 'devicelinks', 'BusAddress': 'busaddress', 'Size': 'size', 'Label': 'label', 'InUse': 'inuse', 'HardwareId': 'hardwareid', 'UUID': 'uuid', 'DeviceName': 'devicename', 'FilesystemType': 'filesystemtype', 'MountPoint': 'mountpoint'}
1938 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
1939 '''
1940 busaddress : str
1941 devicelinks : typing.Sequence[str]
1942 devicename : str
1943 filesystemtype : str
1944 hardwareid : str
1945 inuse : bool
1946 label : str
1947 mountpoint : str
1948 size : int
1949 uuid : str
1950 '''
1951 self.busaddress = busaddress
1952 self.devicelinks = devicelinks
1953 self.devicename = devicename
1954 self.filesystemtype = filesystemtype
1955 self.hardwareid = hardwareid
1956 self.inuse = inuse
1957 self.label = label
1958 self.mountpoint = mountpoint
1959 self.size = size
1960 self.uuid = uuid
1961
1962
1963 class MachineBlockDevices(Type):
1964 _toSchema = {'machine': 'machine', 'blockdevices': 'blockdevices'}
1965 _toPy = {'machine': 'machine', 'blockdevices': 'blockdevices'}
1966 def __init__(self, blockdevices=None, machine=None):
1967 '''
1968 blockdevices : typing.Sequence[~BlockDevice]
1969 machine : str
1970 '''
1971 self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []]
1972 self.machine = machine
1973
1974
1975 class SetMachineBlockDevices(Type):
1976 _toSchema = {'machineblockdevices': 'machineblockdevices'}
1977 _toPy = {'machineblockdevices': 'machineblockdevices'}
1978 def __init__(self, machineblockdevices=None):
1979 '''
1980 machineblockdevices : typing.Sequence[~MachineBlockDevices]
1981 '''
1982 self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []]
1983
1984
1985 class MachineStorageId(Type):
1986 _toSchema = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
1987 _toPy = {'machinetag': 'machinetag', 'attachmenttag': 'attachmenttag'}
1988 def __init__(self, attachmenttag=None, machinetag=None):
1989 '''
1990 attachmenttag : str
1991 machinetag : str
1992 '''
1993 self.attachmenttag = attachmenttag
1994 self.machinetag = machinetag
1995
1996
1997 class MachineStorageIdsWatchResult(Type):
1998 _toSchema = {'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'changes': 'Changes', 'error': 'Error'}
1999 _toPy = {'Changes': 'changes', 'Error': 'error', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid'}
2000 def __init__(self, changes=None, error=None, machinestorageidswatcherid=None):
2001 '''
2002 changes : typing.Sequence[~MachineStorageId]
2003 error : Error
2004 machinestorageidswatcherid : str
2005 '''
2006 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
2007 self.error = Error.from_json(error) if error else None
2008 self.machinestorageidswatcherid = machinestorageidswatcherid
2009
2010
2011 class BoolResults(Type):
2012 _toSchema = {'results': 'Results'}
2013 _toPy = {'Results': 'results'}
2014 def __init__(self, results=None):
2015 '''
2016 results : typing.Sequence[~BoolResult]
2017 '''
2018 self.results = [BoolResult.from_json(o) for o in results or []]
2019
2020
2021 class MachinePortRange(Type):
2022 _toSchema = {'unittag': 'UnitTag', 'relationtag': 'RelationTag', 'portrange': 'PortRange'}
2023 _toPy = {'RelationTag': 'relationtag', 'UnitTag': 'unittag', 'PortRange': 'portrange'}
2024 def __init__(self, portrange=None, relationtag=None, unittag=None):
2025 '''
2026 portrange : PortRange
2027 relationtag : str
2028 unittag : str
2029 '''
2030 self.portrange = PortRange.from_json(portrange) if portrange else None
2031 self.relationtag = relationtag
2032 self.unittag = unittag
2033
2034
2035 class MachinePorts(Type):
2036 _toSchema = {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'}
2037 _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'}
2038 def __init__(self, machinetag=None, subnettag=None):
2039 '''
2040 machinetag : str
2041 subnettag : str
2042 '''
2043 self.machinetag = machinetag
2044 self.subnettag = subnettag
2045
2046
2047 class MachinePortsParams(Type):
2048 _toSchema = {'params': 'Params'}
2049 _toPy = {'Params': 'params'}
2050 def __init__(self, params=None):
2051 '''
2052 params : typing.Sequence[~MachinePorts]
2053 '''
2054 self.params = [MachinePorts.from_json(o) for o in params or []]
2055
2056
2057 class MachinePortsResult(Type):
2058 _toSchema = {'error': 'Error', 'ports': 'Ports'}
2059 _toPy = {'Error': 'error', 'Ports': 'ports'}
2060 def __init__(self, error=None, ports=None):
2061 '''
2062 error : Error
2063 ports : typing.Sequence[~MachinePortRange]
2064 '''
2065 self.error = Error.from_json(error) if error else None
2066 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
2067
2068
2069 class MachinePortsResults(Type):
2070 _toSchema = {'results': 'Results'}
2071 _toPy = {'Results': 'results'}
2072 def __init__(self, results=None):
2073 '''
2074 results : typing.Sequence[~MachinePortsResult]
2075 '''
2076 self.results = [MachinePortsResult.from_json(o) for o in results or []]
2077
2078
2079 class NotifyWatchResults(Type):
2080 _toSchema = {'results': 'Results'}
2081 _toPy = {'Results': 'results'}
2082 def __init__(self, results=None):
2083 '''
2084 results : typing.Sequence[~NotifyWatchResult]
2085 '''
2086 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
2087
2088
2089 class PortRange(Type):
2090 _toSchema = {'protocol': 'Protocol', 'fromport': 'FromPort', 'toport': 'ToPort'}
2091 _toPy = {'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'}
2092 def __init__(self, fromport=None, protocol=None, toport=None):
2093 '''
2094 fromport : int
2095 protocol : str
2096 toport : int
2097 '''
2098 self.fromport = fromport
2099 self.protocol = protocol
2100 self.toport = toport
2101
2102
2103 class StringResults(Type):
2104 _toSchema = {'results': 'Results'}
2105 _toPy = {'Results': 'results'}
2106 def __init__(self, results=None):
2107 '''
2108 results : typing.Sequence[~StringResult]
2109 '''
2110 self.results = [StringResult.from_json(o) for o in results or []]
2111
2112
2113 class StringsResults(Type):
2114 _toSchema = {'results': 'Results'}
2115 _toPy = {'Results': 'results'}
2116 def __init__(self, results=None):
2117 '''
2118 results : typing.Sequence[~StringsResult]
2119 '''
2120 self.results = [StringsResult.from_json(o) for o in results or []]
2121
2122
2123 class ControllersChangeResult(Type):
2124 _toSchema = {'error': 'Error', 'result': 'Result'}
2125 _toPy = {'Error': 'error', 'Result': 'result'}
2126 def __init__(self, error=None, result=None):
2127 '''
2128 error : Error
2129 result : ControllersChanges
2130 '''
2131 self.error = Error.from_json(error) if error else None
2132 self.result = ControllersChanges.from_json(result) if result else None
2133
2134
2135 class ControllersChangeResults(Type):
2136 _toSchema = {'results': 'Results'}
2137 _toPy = {'Results': 'results'}
2138 def __init__(self, results=None):
2139 '''
2140 results : typing.Sequence[~ControllersChangeResult]
2141 '''
2142 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
2143
2144
2145 class ControllersChanges(Type):
2146 _toSchema = {'added': 'added', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'converted': 'converted'}
2147 _toPy = {'added': 'added', 'maintained': 'maintained', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'converted': 'converted'}
2148 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
2149 '''
2150 added : typing.Sequence[str]
2151 converted : typing.Sequence[str]
2152 demoted : typing.Sequence[str]
2153 maintained : typing.Sequence[str]
2154 promoted : typing.Sequence[str]
2155 removed : typing.Sequence[str]
2156 '''
2157 self.added = added
2158 self.converted = converted
2159 self.demoted = demoted
2160 self.maintained = maintained
2161 self.promoted = promoted
2162 self.removed = removed
2163
2164
2165 class ControllersSpec(Type):
2166 _toSchema = {'modeltag': 'ModelTag', 'num_controllers': 'num-controllers', 'constraints': 'constraints', 'placement': 'placement', 'series': 'series'}
2167 _toPy = {'num-controllers': 'num_controllers', 'ModelTag': 'modeltag', 'constraints': 'constraints', 'placement': 'placement', 'series': 'series'}
2168 def __init__(self, modeltag=None, constraints=None, num_controllers=None, placement=None, series=None):
2169 '''
2170 modeltag : str
2171 constraints : Value
2172 num_controllers : int
2173 placement : typing.Sequence[str]
2174 series : str
2175 '''
2176 self.modeltag = modeltag
2177 self.constraints = Value.from_json(constraints) if constraints else None
2178 self.num_controllers = num_controllers
2179 self.placement = placement
2180 self.series = series
2181
2182
2183 class ControllersSpecs(Type):
2184 _toSchema = {'specs': 'Specs'}
2185 _toPy = {'Specs': 'specs'}
2186 def __init__(self, specs=None):
2187 '''
2188 specs : typing.Sequence[~ControllersSpec]
2189 '''
2190 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
2191
2192
2193 class HAMember(Type):
2194 _toSchema = {'series': 'Series', 'publicaddress': 'PublicAddress', 'tag': 'Tag'}
2195 _toPy = {'Tag': 'tag', 'PublicAddress': 'publicaddress', 'Series': 'series'}
2196 def __init__(self, publicaddress=None, series=None, tag=None):
2197 '''
2198 publicaddress : Address
2199 series : str
2200 tag : str
2201 '''
2202 self.publicaddress = Address.from_json(publicaddress) if publicaddress else None
2203 self.series = series
2204 self.tag = tag
2205
2206
2207 class Member(Type):
2208 _toSchema = {'hidden': 'Hidden', 'tags': 'Tags', 'buildindexes': 'BuildIndexes', 'address': 'Address', 'slavedelay': 'SlaveDelay', 'votes': 'Votes', 'id_': 'Id', 'arbiter': 'Arbiter', 'priority': 'Priority'}
2209 _toPy = {'Tags': 'tags', 'SlaveDelay': 'slavedelay', 'Votes': 'votes', 'Arbiter': 'arbiter', 'Address': 'address', 'Hidden': 'hidden', 'Priority': 'priority', 'BuildIndexes': 'buildindexes', 'Id': 'id_'}
2210 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
2211 '''
2212 address : str
2213 arbiter : bool
2214 buildindexes : bool
2215 hidden : bool
2216 id_ : int
2217 priority : float
2218 slavedelay : int
2219 tags : typing.Mapping[str, str]
2220 votes : int
2221 '''
2222 self.address = address
2223 self.arbiter = arbiter
2224 self.buildindexes = buildindexes
2225 self.hidden = hidden
2226 self.id_ = id_
2227 self.priority = priority
2228 self.slavedelay = slavedelay
2229 self.tags = tags
2230 self.votes = votes
2231
2232
2233 class MongoUpgradeResults(Type):
2234 _toSchema = {'members': 'Members', 'master': 'Master', 'rsmembers': 'RsMembers'}
2235 _toPy = {'Master': 'master', 'Members': 'members', 'RsMembers': 'rsmembers'}
2236 def __init__(self, master=None, members=None, rsmembers=None):
2237 '''
2238 master : HAMember
2239 members : typing.Sequence[~HAMember]
2240 rsmembers : typing.Sequence[~Member]
2241 '''
2242 self.master = HAMember.from_json(master) if master else None
2243 self.members = [HAMember.from_json(o) for o in members or []]
2244 self.rsmembers = [Member.from_json(o) for o in rsmembers or []]
2245
2246
2247 class ResumeReplicationParams(Type):
2248 _toSchema = {'members': 'Members'}
2249 _toPy = {'Members': 'members'}
2250 def __init__(self, members=None):
2251 '''
2252 members : typing.Sequence[~Member]
2253 '''
2254 self.members = [Member.from_json(o) for o in members or []]
2255
2256
2257 class UpgradeMongoParams(Type):
2258 _toSchema = {'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch'}
2259 _toPy = {'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'}
2260 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2261 '''
2262 major : int
2263 minor : int
2264 patch : str
2265 storageengine : str
2266 '''
2267 self.major = major
2268 self.minor = minor
2269 self.patch = patch
2270 self.storageengine = storageengine
2271
2272
2273 class Version(Type):
2274 _toSchema = {'minor': 'Minor', 'major': 'Major', 'storageengine': 'StorageEngine', 'patch': 'Patch'}
2275 _toPy = {'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor', 'Patch': 'patch'}
2276 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2277 '''
2278 major : int
2279 minor : int
2280 patch : str
2281 storageengine : str
2282 '''
2283 self.major = major
2284 self.minor = minor
2285 self.patch = patch
2286 self.storageengine = storageengine
2287
2288
2289 class SSHHostKeySet(Type):
2290 _toSchema = {'entity_keys': 'entity-keys'}
2291 _toPy = {'entity-keys': 'entity_keys'}
2292 def __init__(self, entity_keys=None):
2293 '''
2294 entity_keys : typing.Sequence[~SSHHostKeys]
2295 '''
2296 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
2297
2298
2299 class SSHHostKeys(Type):
2300 _toSchema = {'tag': 'tag', 'public_keys': 'public-keys'}
2301 _toPy = {'public-keys': 'public_keys', 'tag': 'tag'}
2302 def __init__(self, public_keys=None, tag=None):
2303 '''
2304 public_keys : typing.Sequence[str]
2305 tag : str
2306 '''
2307 self.public_keys = public_keys
2308 self.tag = tag
2309
2310
2311 class ImageFilterParams(Type):
2312 _toSchema = {'images': 'images'}
2313 _toPy = {'images': 'images'}
2314 def __init__(self, images=None):
2315 '''
2316 images : typing.Sequence[~ImageSpec]
2317 '''
2318 self.images = [ImageSpec.from_json(o) for o in images or []]
2319
2320
2321 class ImageMetadata(Type):
2322 _toSchema = {'series': 'series', 'arch': 'arch', 'kind': 'kind', 'created': 'created', 'url': 'url'}
2323 _toPy = {'series': 'series', 'arch': 'arch', 'kind': 'kind', 'created': 'created', 'url': 'url'}
2324 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
2325 '''
2326 arch : str
2327 created : str
2328 kind : str
2329 series : str
2330 url : str
2331 '''
2332 self.arch = arch
2333 self.created = created
2334 self.kind = kind
2335 self.series = series
2336 self.url = url
2337
2338
2339 class ImageSpec(Type):
2340 _toSchema = {'series': 'series', 'arch': 'arch', 'kind': 'kind'}
2341 _toPy = {'series': 'series', 'arch': 'arch', 'kind': 'kind'}
2342 def __init__(self, arch=None, kind=None, series=None):
2343 '''
2344 arch : str
2345 kind : str
2346 series : str
2347 '''
2348 self.arch = arch
2349 self.kind = kind
2350 self.series = series
2351
2352
2353 class ListImageResult(Type):
2354 _toSchema = {'result': 'result'}
2355 _toPy = {'result': 'result'}
2356 def __init__(self, result=None):
2357 '''
2358 result : typing.Sequence[~ImageMetadata]
2359 '''
2360 self.result = [ImageMetadata.from_json(o) for o in result or []]
2361
2362
2363 class CloudImageMetadata(Type):
2364 _toSchema = {'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'image_id': 'image_id', 'series': 'series', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'stream': 'stream', 'region': 'region', 'priority': 'priority'}
2365 _toPy = {'root_storage_type': 'root_storage_type', 'virt_type': 'virt_type', 'version': 'version', 'image_id': 'image_id', 'series': 'series', 'source': 'source', 'root_storage_size': 'root_storage_size', 'arch': 'arch', 'stream': 'stream', 'region': 'region', 'priority': 'priority'}
2366 def __init__(self, arch=None, image_id=None, priority=None, region=None, root_storage_size=None, root_storage_type=None, series=None, source=None, stream=None, version=None, virt_type=None):
2367 '''
2368 arch : str
2369 image_id : str
2370 priority : int
2371 region : str
2372 root_storage_size : int
2373 root_storage_type : str
2374 series : str
2375 source : str
2376 stream : str
2377 version : str
2378 virt_type : str
2379 '''
2380 self.arch = arch
2381 self.image_id = image_id
2382 self.priority = priority
2383 self.region = region
2384 self.root_storage_size = root_storage_size
2385 self.root_storage_type = root_storage_type
2386 self.series = series
2387 self.source = source
2388 self.stream = stream
2389 self.version = version
2390 self.virt_type = virt_type
2391
2392
2393 class CloudImageMetadataList(Type):
2394 _toSchema = {'metadata': 'metadata'}
2395 _toPy = {'metadata': 'metadata'}
2396 def __init__(self, metadata=None):
2397 '''
2398 metadata : typing.Sequence[~CloudImageMetadata]
2399 '''
2400 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
2401
2402
2403 class ImageMetadataFilter(Type):
2404 _toSchema = {'series': 'series', 'virt_type': 'virt_type', 'stream': 'stream', 'arches': 'arches', 'root_storage_type': 'root-storage-type', 'region': 'region'}
2405 _toPy = {'arches': 'arches', 'virt_type': 'virt_type', 'stream': 'stream', 'series': 'series', 'root-storage-type': 'root_storage_type', 'region': 'region'}
2406 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
2407 '''
2408 arches : typing.Sequence[str]
2409 region : str
2410 root_storage_type : str
2411 series : typing.Sequence[str]
2412 stream : str
2413 virt_type : str
2414 '''
2415 self.arches = arches
2416 self.region = region
2417 self.root_storage_type = root_storage_type
2418 self.series = series
2419 self.stream = stream
2420 self.virt_type = virt_type
2421
2422
2423 class ListCloudImageMetadataResult(Type):
2424 _toSchema = {'result': 'result'}
2425 _toPy = {'result': 'result'}
2426 def __init__(self, result=None):
2427 '''
2428 result : typing.Sequence[~CloudImageMetadata]
2429 '''
2430 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
2431
2432
2433 class MetadataImageIds(Type):
2434 _toSchema = {'image_ids': 'image_ids'}
2435 _toPy = {'image_ids': 'image_ids'}
2436 def __init__(self, image_ids=None):
2437 '''
2438 image_ids : typing.Sequence[str]
2439 '''
2440 self.image_ids = image_ids
2441
2442
2443 class MetadataSaveParams(Type):
2444 _toSchema = {'metadata': 'metadata'}
2445 _toPy = {'metadata': 'metadata'}
2446 def __init__(self, metadata=None):
2447 '''
2448 metadata : typing.Sequence[~CloudImageMetadataList]
2449 '''
2450 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
2451
2452
2453 class EntityStatusArgs(Type):
2454 _toSchema = {'info': 'Info', 'status': 'Status', 'tag': 'Tag', 'data': 'Data'}
2455 _toPy = {'Info': 'info', 'Status': 'status', 'Tag': 'tag', 'Data': 'data'}
2456 def __init__(self, data=None, info=None, status=None, tag=None):
2457 '''
2458 data : typing.Mapping[str, typing.Any]
2459 info : str
2460 status : str
2461 tag : str
2462 '''
2463 self.data = data
2464 self.info = info
2465 self.status = status
2466 self.tag = tag
2467
2468
2469 class MachineAddresses(Type):
2470 _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'}
2471 _toPy = {'Tag': 'tag', 'Addresses': 'addresses'}
2472 def __init__(self, addresses=None, tag=None):
2473 '''
2474 addresses : typing.Sequence[~Address]
2475 tag : str
2476 '''
2477 self.addresses = [Address.from_json(o) for o in addresses or []]
2478 self.tag = tag
2479
2480
2481 class MachineAddressesResult(Type):
2482 _toSchema = {'addresses': 'Addresses', 'error': 'Error'}
2483 _toPy = {'Error': 'error', 'Addresses': 'addresses'}
2484 def __init__(self, addresses=None, error=None):
2485 '''
2486 addresses : typing.Sequence[~Address]
2487 error : Error
2488 '''
2489 self.addresses = [Address.from_json(o) for o in addresses or []]
2490 self.error = Error.from_json(error) if error else None
2491
2492
2493 class MachineAddressesResults(Type):
2494 _toSchema = {'results': 'Results'}
2495 _toPy = {'Results': 'results'}
2496 def __init__(self, results=None):
2497 '''
2498 results : typing.Sequence[~MachineAddressesResult]
2499 '''
2500 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
2501
2502
2503 class SetMachinesAddresses(Type):
2504 _toSchema = {'machineaddresses': 'MachineAddresses'}
2505 _toPy = {'MachineAddresses': 'machineaddresses'}
2506 def __init__(self, machineaddresses=None):
2507 '''
2508 machineaddresses : typing.Sequence[~MachineAddresses]
2509 '''
2510 self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []]
2511
2512
2513 class SetStatus(Type):
2514 _toSchema = {'entities': 'Entities'}
2515 _toPy = {'Entities': 'entities'}
2516 def __init__(self, entities=None):
2517 '''
2518 entities : typing.Sequence[~EntityStatusArgs]
2519 '''
2520 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
2521
2522
2523 class StatusResult(Type):
2524 _toSchema = {'info': 'Info', 'status': 'Status', 'data': 'Data', 'error': 'Error', 'since': 'Since', 'id_': 'Id', 'life': 'Life'}
2525 _toPy = {'Status': 'status', 'Since': 'since', 'Life': 'life', 'Info': 'info', 'Error': 'error', 'Data': 'data', 'Id': 'id_'}
2526 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
2527 '''
2528 data : typing.Mapping[str, typing.Any]
2529 error : Error
2530 id_ : str
2531 info : str
2532 life : str
2533 since : str
2534 status : str
2535 '''
2536 self.data = data
2537 self.error = Error.from_json(error) if error else None
2538 self.id_ = id_
2539 self.info = info
2540 self.life = life
2541 self.since = since
2542 self.status = status
2543
2544
2545 class StatusResults(Type):
2546 _toSchema = {'results': 'Results'}
2547 _toPy = {'Results': 'results'}
2548 def __init__(self, results=None):
2549 '''
2550 results : typing.Sequence[~StatusResult]
2551 '''
2552 self.results = [StatusResult.from_json(o) for o in results or []]
2553
2554
2555 class ListSSHKeys(Type):
2556 _toSchema = {'mode': 'Mode', 'entities': 'Entities'}
2557 _toPy = {'Mode': 'mode', 'Entities': 'entities'}
2558 def __init__(self, entities=None, mode=None):
2559 '''
2560 entities : Entities
2561 mode : bool
2562 '''
2563 self.entities = Entities.from_json(entities) if entities else None
2564 self.mode = mode
2565
2566
2567 class ModifyUserSSHKeys(Type):
2568 _toSchema = {'keys': 'Keys', 'user': 'User'}
2569 _toPy = {'Keys': 'keys', 'User': 'user'}
2570 def __init__(self, keys=None, user=None):
2571 '''
2572 keys : typing.Sequence[str]
2573 user : str
2574 '''
2575 self.keys = keys
2576 self.user = user
2577
2578
2579 class ClaimLeadershipBulkParams(Type):
2580 _toSchema = {'params': 'Params'}
2581 _toPy = {'Params': 'params'}
2582 def __init__(self, params=None):
2583 '''
2584 params : typing.Sequence[~ClaimLeadershipParams]
2585 '''
2586 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
2587
2588
2589 class ClaimLeadershipBulkResults(Type):
2590 _toSchema = {'results': 'Results'}
2591 _toPy = {'Results': 'results'}
2592 def __init__(self, results=None):
2593 '''
2594 results : typing.Sequence[~ErrorResult]
2595 '''
2596 self.results = [ErrorResult.from_json(o) for o in results or []]
2597
2598
2599 class ClaimLeadershipParams(Type):
2600 _toSchema = {'unittag': 'UnitTag', 'durationseconds': 'DurationSeconds', 'servicetag': 'ServiceTag'}
2601 _toPy = {'UnitTag': 'unittag', 'DurationSeconds': 'durationseconds', 'ServiceTag': 'servicetag'}
2602 def __init__(self, durationseconds=None, servicetag=None, unittag=None):
2603 '''
2604 durationseconds : float
2605 servicetag : str
2606 unittag : str
2607 '''
2608 self.durationseconds = durationseconds
2609 self.servicetag = servicetag
2610 self.unittag = unittag
2611
2612
2613 class ServiceTag(Type):
2614 _toSchema = {'name': 'Name'}
2615 _toPy = {'Name': 'name'}
2616 def __init__(self, name=None):
2617 '''
2618 name : str
2619 '''
2620 self.name = name
2621
2622
2623 class ActionExecutionResult(Type):
2624 _toSchema = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'}
2625 _toPy = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'}
2626 def __init__(self, actiontag=None, message=None, results=None, status=None):
2627 '''
2628 actiontag : str
2629 message : str
2630 results : typing.Mapping[str, typing.Any]
2631 status : str
2632 '''
2633 self.actiontag = actiontag
2634 self.message = message
2635 self.results = results
2636 self.status = status
2637
2638
2639 class ActionExecutionResults(Type):
2640 _toSchema = {'results': 'results'}
2641 _toPy = {'results': 'results'}
2642 def __init__(self, results=None):
2643 '''
2644 results : typing.Sequence[~ActionExecutionResult]
2645 '''
2646 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
2647
2648
2649 class JobsResult(Type):
2650 _toSchema = {'jobs': 'Jobs', 'error': 'Error'}
2651 _toPy = {'Error': 'error', 'Jobs': 'jobs'}
2652 def __init__(self, error=None, jobs=None):
2653 '''
2654 error : Error
2655 jobs : typing.Sequence[str]
2656 '''
2657 self.error = Error.from_json(error) if error else None
2658 self.jobs = jobs
2659
2660
2661 class JobsResults(Type):
2662 _toSchema = {'results': 'Results'}
2663 _toPy = {'Results': 'results'}
2664 def __init__(self, results=None):
2665 '''
2666 results : typing.Sequence[~JobsResult]
2667 '''
2668 self.results = [JobsResult.from_json(o) for o in results or []]
2669
2670
2671 class NetworkConfig(Type):
2672 _toSchema = {'dnssearchdomains': 'DNSSearchDomains', 'gatewayaddress': 'GatewayAddress', 'providerspaceid': 'ProviderSpaceId', 'providersubnetid': 'ProviderSubnetId', 'noautostart': 'NoAutoStart', 'mtu': 'MTU', 'providervlanid': 'ProviderVLANId', 'provideraddressid': 'ProviderAddressId', 'dnsservers': 'DNSServers', 'interfacename': 'InterfaceName', 'providerid': 'ProviderId', 'vlantag': 'VLANTag', 'cidr': 'CIDR', 'address': 'Address', 'parentinterfacename': 'ParentInterfaceName', 'interfacetype': 'InterfaceType', 'disabled': 'Disabled', 'deviceindex': 'DeviceIndex', 'configtype': 'ConfigType', 'macaddress': 'MACAddress'}
2673 _toPy = {'DeviceIndex': 'deviceindex', 'MTU': 'mtu', 'Disabled': 'disabled', 'ProviderId': 'providerid', 'CIDR': 'cidr', 'MACAddress': 'macaddress', 'InterfaceType': 'interfacetype', 'GatewayAddress': 'gatewayaddress', 'InterfaceName': 'interfacename', 'NoAutoStart': 'noautostart', 'DNSServers': 'dnsservers', 'ParentInterfaceName': 'parentinterfacename', 'VLANTag': 'vlantag', 'ProviderVLANId': 'providervlanid', 'ProviderSubnetId': 'providersubnetid', 'ProviderSpaceId': 'providerspaceid', 'Address': 'address', 'ConfigType': 'configtype', 'ProviderAddressId': 'provideraddressid', 'DNSSearchDomains': 'dnssearchdomains'}
2674 def __init__(self, address=None, cidr=None, configtype=None, dnssearchdomains=None, dnsservers=None, deviceindex=None, disabled=None, gatewayaddress=None, interfacename=None, interfacetype=None, macaddress=None, mtu=None, noautostart=None, parentinterfacename=None, provideraddressid=None, providerid=None, providerspaceid=None, providersubnetid=None, providervlanid=None, vlantag=None):
2675 '''
2676 address : str
2677 cidr : str
2678 configtype : str
2679 dnssearchdomains : typing.Sequence[str]
2680 dnsservers : typing.Sequence[str]
2681 deviceindex : int
2682 disabled : bool
2683 gatewayaddress : str
2684 interfacename : str
2685 interfacetype : str
2686 macaddress : str
2687 mtu : int
2688 noautostart : bool
2689 parentinterfacename : str
2690 provideraddressid : str
2691 providerid : str
2692 providerspaceid : str
2693 providersubnetid : str
2694 providervlanid : str
2695 vlantag : int
2696 '''
2697 self.address = address
2698 self.cidr = cidr
2699 self.configtype = configtype
2700 self.dnssearchdomains = dnssearchdomains
2701 self.dnsservers = dnsservers
2702 self.deviceindex = deviceindex
2703 self.disabled = disabled
2704 self.gatewayaddress = gatewayaddress
2705 self.interfacename = interfacename
2706 self.interfacetype = interfacetype
2707 self.macaddress = macaddress
2708 self.mtu = mtu
2709 self.noautostart = noautostart
2710 self.parentinterfacename = parentinterfacename
2711 self.provideraddressid = provideraddressid
2712 self.providerid = providerid
2713 self.providerspaceid = providerspaceid
2714 self.providersubnetid = providersubnetid
2715 self.providervlanid = providervlanid
2716 self.vlantag = vlantag
2717
2718
2719 class SetMachineNetworkConfig(Type):
2720 _toSchema = {'config': 'Config', 'tag': 'Tag'}
2721 _toPy = {'Tag': 'tag', 'Config': 'config'}
2722 def __init__(self, config=None, tag=None):
2723 '''
2724 config : typing.Sequence[~NetworkConfig]
2725 tag : str
2726 '''
2727 self.config = [NetworkConfig.from_json(o) for o in config or []]
2728 self.tag = tag
2729
2730
2731 class MeterStatusResult(Type):
2732 _toSchema = {'info': 'Info', 'error': 'Error', 'code': 'Code'}
2733 _toPy = {'Info': 'info', 'Error': 'error', 'Code': 'code'}
2734 def __init__(self, code=None, error=None, info=None):
2735 '''
2736 code : str
2737 error : Error
2738 info : str
2739 '''
2740 self.code = code
2741 self.error = Error.from_json(error) if error else None
2742 self.info = info
2743
2744
2745 class MeterStatusResults(Type):
2746 _toSchema = {'results': 'Results'}
2747 _toPy = {'Results': 'results'}
2748 def __init__(self, results=None):
2749 '''
2750 results : typing.Sequence[~MeterStatusResult]
2751 '''
2752 self.results = [MeterStatusResult.from_json(o) for o in results or []]
2753
2754
2755 class Metric(Type):
2756 _toSchema = {'key': 'Key', 'time': 'Time', 'value': 'Value'}
2757 _toPy = {'Time': 'time', 'Value': 'value', 'Key': 'key'}
2758 def __init__(self, key=None, time=None, value=None):
2759 '''
2760 key : str
2761 time : str
2762 value : str
2763 '''
2764 self.key = key
2765 self.time = time
2766 self.value = value
2767
2768
2769 class MetricBatch(Type):
2770 _toSchema = {'charmurl': 'CharmURL', 'metrics': 'Metrics', 'created': 'Created', 'uuid': 'UUID'}
2771 _toPy = {'Metrics': 'metrics', 'CharmURL': 'charmurl', 'Created': 'created', 'UUID': 'uuid'}
2772 def __init__(self, charmurl=None, created=None, metrics=None, uuid=None):
2773 '''
2774 charmurl : str
2775 created : str
2776 metrics : typing.Sequence[~Metric]
2777 uuid : str
2778 '''
2779 self.charmurl = charmurl
2780 self.created = created
2781 self.metrics = [Metric.from_json(o) for o in metrics or []]
2782 self.uuid = uuid
2783
2784
2785 class MetricBatchParam(Type):
2786 _toSchema = {'batch': 'Batch', 'tag': 'Tag'}
2787 _toPy = {'Tag': 'tag', 'Batch': 'batch'}
2788 def __init__(self, batch=None, tag=None):
2789 '''
2790 batch : MetricBatch
2791 tag : str
2792 '''
2793 self.batch = MetricBatch.from_json(batch) if batch else None
2794 self.tag = tag
2795
2796
2797 class MetricBatchParams(Type):
2798 _toSchema = {'batches': 'Batches'}
2799 _toPy = {'Batches': 'batches'}
2800 def __init__(self, batches=None):
2801 '''
2802 batches : typing.Sequence[~MetricBatchParam]
2803 '''
2804 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
2805
2806
2807 class EntityMetrics(Type):
2808 _toSchema = {'error': 'error', 'metrics': 'metrics'}
2809 _toPy = {'error': 'error', 'metrics': 'metrics'}
2810 def __init__(self, error=None, metrics=None):
2811 '''
2812 error : Error
2813 metrics : typing.Sequence[~MetricResult]
2814 '''
2815 self.error = Error.from_json(error) if error else None
2816 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
2817
2818
2819 class MeterStatusParam(Type):
2820 _toSchema = {'info': 'info', 'tag': 'tag', 'code': 'code'}
2821 _toPy = {'info': 'info', 'tag': 'tag', 'code': 'code'}
2822 def __init__(self, code=None, info=None, tag=None):
2823 '''
2824 code : str
2825 info : str
2826 tag : str
2827 '''
2828 self.code = code
2829 self.info = info
2830 self.tag = tag
2831
2832
2833 class MeterStatusParams(Type):
2834 _toSchema = {'statues': 'statues'}
2835 _toPy = {'statues': 'statues'}
2836 def __init__(self, statues=None):
2837 '''
2838 statues : typing.Sequence[~MeterStatusParam]
2839 '''
2840 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
2841
2842
2843 class MetricResult(Type):
2844 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
2845 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
2846 def __init__(self, key=None, time=None, value=None):
2847 '''
2848 key : str
2849 time : str
2850 value : str
2851 '''
2852 self.key = key
2853 self.time = time
2854 self.value = value
2855
2856
2857 class MetricResults(Type):
2858 _toSchema = {'results': 'results'}
2859 _toPy = {'results': 'results'}
2860 def __init__(self, results=None):
2861 '''
2862 results : typing.Sequence[~EntityMetrics]
2863 '''
2864 self.results = [EntityMetrics.from_json(o) for o in results or []]
2865
2866
2867 class PhaseResult(Type):
2868 _toSchema = {'error': 'Error', 'phase': 'phase'}
2869 _toPy = {'Error': 'error', 'phase': 'phase'}
2870 def __init__(self, error=None, phase=None):
2871 '''
2872 error : Error
2873 phase : str
2874 '''
2875 self.error = Error.from_json(error) if error else None
2876 self.phase = phase
2877
2878
2879 class PhaseResults(Type):
2880 _toSchema = {'results': 'Results'}
2881 _toPy = {'Results': 'results'}
2882 def __init__(self, results=None):
2883 '''
2884 results : typing.Sequence[~PhaseResult]
2885 '''
2886 self.results = [PhaseResult.from_json(o) for o in results or []]
2887
2888
2889 class FullMigrationStatus(Type):
2890 _toSchema = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'}
2891 _toPy = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'}
2892 def __init__(self, attempt=None, phase=None, spec=None):
2893 '''
2894 attempt : int
2895 phase : str
2896 spec : ModelMigrationSpec
2897 '''
2898 self.attempt = attempt
2899 self.phase = phase
2900 self.spec = ModelMigrationSpec.from_json(spec) if spec else None
2901
2902
2903 class SerializedModel(Type):
2904 _toSchema = {'bytes_': 'bytes'}
2905 _toPy = {'bytes': 'bytes_'}
2906 def __init__(self, bytes_=None):
2907 '''
2908 bytes_ : typing.Sequence[int]
2909 '''
2910 self.bytes_ = bytes_
2911
2912
2913 class SetMigrationPhaseArgs(Type):
2914 _toSchema = {'phase': 'phase'}
2915 _toPy = {'phase': 'phase'}
2916 def __init__(self, phase=None):
2917 '''
2918 phase : str
2919 '''
2920 self.phase = phase
2921
2922
2923 class MigrationStatus(Type):
2924 _toSchema = {'source_api_addrs': 'source-api-addrs', 'attempt': 'attempt', 'target_api_addrs': 'target-api-addrs', 'source_ca_cert': 'source-ca-cert', 'phase': 'phase', 'target_ca_cert': 'target-ca-cert'}
2925 _toPy = {'attempt': 'attempt', 'target-api-addrs': 'target_api_addrs', 'target-ca-cert': 'target_ca_cert', 'phase': 'phase', 'source-ca-cert': 'source_ca_cert', 'source-api-addrs': 'source_api_addrs'}
2926 def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
2927 '''
2928 attempt : int
2929 phase : str
2930 source_api_addrs : typing.Sequence[str]
2931 source_ca_cert : str
2932 target_api_addrs : typing.Sequence[str]
2933 target_ca_cert : str
2934 '''
2935 self.attempt = attempt
2936 self.phase = phase
2937 self.source_api_addrs = source_api_addrs
2938 self.source_ca_cert = source_ca_cert
2939 self.target_api_addrs = target_api_addrs
2940 self.target_ca_cert = target_ca_cert
2941
2942
2943 class ModelArgs(Type):
2944 _toSchema = {'model_tag': 'model-tag'}
2945 _toPy = {'model-tag': 'model_tag'}
2946 def __init__(self, model_tag=None):
2947 '''
2948 model_tag : str
2949 '''
2950 self.model_tag = model_tag
2951
2952
2953 class ModelCreateArgs(Type):
2954 _toSchema = {'config': 'Config', 'account': 'Account', 'ownertag': 'OwnerTag'}
2955 _toPy = {'Account': 'account', 'Config': 'config', 'OwnerTag': 'ownertag'}
2956 def __init__(self, account=None, config=None, ownertag=None):
2957 '''
2958 account : typing.Mapping[str, typing.Any]
2959 config : typing.Mapping[str, typing.Any]
2960 ownertag : str
2961 '''
2962 self.account = account
2963 self.config = config
2964 self.ownertag = ownertag
2965
2966
2967 class ModelInfoResult(Type):
2968 _toSchema = {'error': 'error', 'result': 'result'}
2969 _toPy = {'error': 'error', 'result': 'result'}
2970 def __init__(self, error=None, result=None):
2971 '''
2972 error : Error
2973 result : ModelInfo
2974 '''
2975 self.error = Error.from_json(error) if error else None
2976 self.result = ModelInfo.from_json(result) if result else None
2977
2978
2979 class ModelInfoResults(Type):
2980 _toSchema = {'results': 'results'}
2981 _toPy = {'results': 'results'}
2982 def __init__(self, results=None):
2983 '''
2984 results : typing.Sequence[~ModelInfoResult]
2985 '''
2986 self.results = [ModelInfoResult.from_json(o) for o in results or []]
2987
2988
2989 class ModelSkeletonConfigArgs(Type):
2990 _toSchema = {'provider': 'Provider', 'region': 'Region'}
2991 _toPy = {'Region': 'region', 'Provider': 'provider'}
2992 def __init__(self, provider=None, region=None):
2993 '''
2994 provider : str
2995 region : str
2996 '''
2997 self.provider = provider
2998 self.region = region
2999
3000
3001 class ModifyModelAccess(Type):
3002 _toSchema = {'user_tag': 'user-tag', 'access': 'access', 'action': 'action', 'model_tag': 'model-tag'}
3003 _toPy = {'model-tag': 'model_tag', 'access': 'access', 'action': 'action', 'user-tag': 'user_tag'}
3004 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
3005 '''
3006 access : str
3007 action : str
3008 model_tag : str
3009 user_tag : str
3010 '''
3011 self.access = access
3012 self.action = action
3013 self.model_tag = model_tag
3014 self.user_tag = user_tag
3015
3016
3017 class ModifyModelAccessRequest(Type):
3018 _toSchema = {'changes': 'changes'}
3019 _toPy = {'changes': 'changes'}
3020 def __init__(self, changes=None):
3021 '''
3022 changes : typing.Sequence[~ModifyModelAccess]
3023 '''
3024 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
3025
3026
3027 class ConstraintsResult(Type):
3028 _toSchema = {'error': 'Error', 'constraints': 'Constraints'}
3029 _toPy = {'Constraints': 'constraints', 'Error': 'error'}
3030 def __init__(self, constraints=None, error=None):
3031 '''
3032 constraints : Value
3033 error : Error
3034 '''
3035 self.constraints = Value.from_json(constraints) if constraints else None
3036 self.error = Error.from_json(error) if error else None
3037
3038
3039 class ConstraintsResults(Type):
3040 _toSchema = {'results': 'Results'}
3041 _toPy = {'Results': 'results'}
3042 def __init__(self, results=None):
3043 '''
3044 results : typing.Sequence[~ConstraintsResult]
3045 '''
3046 self.results = [ConstraintsResult.from_json(o) for o in results or []]
3047
3048
3049 class ContainerConfig(Type):
3050 _toSchema = {'sslhostnameverification': 'SSLHostnameVerification', 'authorizedkeys': 'AuthorizedKeys', 'aptproxy': 'AptProxy', 'updatebehavior': 'UpdateBehavior', 'providertype': 'ProviderType', 'allowlxcloopmounts': 'AllowLXCLoopMounts', 'proxy': 'Proxy', 'aptmirror': 'AptMirror', 'preferipv6': 'PreferIPv6'}
3051 _toPy = {'AuthorizedKeys': 'authorizedkeys', 'AptMirror': 'aptmirror', 'AptProxy': 'aptproxy', 'SSLHostnameVerification': 'sslhostnameverification', 'PreferIPv6': 'preferipv6', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'UpdateBehavior': 'updatebehavior', 'Proxy': 'proxy', 'ProviderType': 'providertype'}
3052 def __init__(self, allowlxcloopmounts=None, aptmirror=None, aptproxy=None, authorizedkeys=None, preferipv6=None, providertype=None, proxy=None, sslhostnameverification=None, updatebehavior=None):
3053 '''
3054 allowlxcloopmounts : bool
3055 aptmirror : str
3056 aptproxy : Settings
3057 authorizedkeys : str
3058 preferipv6 : bool
3059 providertype : str
3060 proxy : Settings
3061 sslhostnameverification : bool
3062 updatebehavior : UpdateBehavior
3063 '''
3064 self.allowlxcloopmounts = allowlxcloopmounts
3065 self.aptmirror = aptmirror
3066 self.aptproxy = Settings.from_json(aptproxy) if aptproxy else None
3067 self.authorizedkeys = authorizedkeys
3068 self.preferipv6 = preferipv6
3069 self.providertype = providertype
3070 self.proxy = Settings.from_json(proxy) if proxy else None
3071 self.sslhostnameverification = sslhostnameverification
3072 self.updatebehavior = UpdateBehavior.from_json(updatebehavior) if updatebehavior else None
3073
3074
3075 class ContainerManagerConfig(Type):
3076 _toSchema = {'managerconfig': 'ManagerConfig'}
3077 _toPy = {'ManagerConfig': 'managerconfig'}
3078 def __init__(self, managerconfig=None):
3079 '''
3080 managerconfig : typing.Mapping[str, str]
3081 '''
3082 self.managerconfig = managerconfig
3083
3084
3085 class ContainerManagerConfigParams(Type):
3086 _toSchema = {'type_': 'Type'}
3087 _toPy = {'Type': 'type_'}
3088 def __init__(self, type_=None):
3089 '''
3090 type_ : str
3091 '''
3092 self.type_ = type_
3093
3094
3095 class DistributionGroupResult(Type):
3096 _toSchema = {'error': 'Error', 'result': 'Result'}
3097 _toPy = {'Error': 'error', 'Result': 'result'}
3098 def __init__(self, error=None, result=None):
3099 '''
3100 error : Error
3101 result : typing.Sequence[str]
3102 '''
3103 self.error = Error.from_json(error) if error else None
3104 self.result = result
3105
3106
3107 class DistributionGroupResults(Type):
3108 _toSchema = {'results': 'Results'}
3109 _toPy = {'Results': 'results'}
3110 def __init__(self, results=None):
3111 '''
3112 results : typing.Sequence[~DistributionGroupResult]
3113 '''
3114 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
3115
3116
3117 class InstanceInfo(Type):
3118 _toSchema = {'nonce': 'Nonce', 'networkconfig': 'NetworkConfig', 'tag': 'Tag', 'characteristics': 'Characteristics', 'volumeattachments': 'VolumeAttachments', 'volumes': 'Volumes', 'instanceid': 'InstanceId'}
3119 _toPy = {'Tag': 'tag', 'InstanceId': 'instanceid', 'Volumes': 'volumes', 'Characteristics': 'characteristics', 'Nonce': 'nonce', 'NetworkConfig': 'networkconfig', 'VolumeAttachments': 'volumeattachments'}
3120 def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None):
3121 '''
3122 characteristics : HardwareCharacteristics
3123 instanceid : str
3124 networkconfig : typing.Sequence[~NetworkConfig]
3125 nonce : str
3126 tag : str
3127 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3128 volumes : typing.Sequence[~Volume]
3129 '''
3130 self.characteristics = HardwareCharacteristics.from_json(characteristics) if characteristics else None
3131 self.instanceid = instanceid
3132 self.networkconfig = [NetworkConfig.from_json(o) for o in networkconfig or []]
3133 self.nonce = nonce
3134 self.tag = tag
3135 self.volumeattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volumeattachments or dict()).items()}
3136 self.volumes = [Volume.from_json(o) for o in volumes or []]
3137
3138
3139 class InstancesInfo(Type):
3140 _toSchema = {'machines': 'Machines'}
3141 _toPy = {'Machines': 'machines'}
3142 def __init__(self, machines=None):
3143 '''
3144 machines : typing.Sequence[~InstanceInfo]
3145 '''
3146 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
3147
3148
3149 class MachineContainers(Type):
3150 _toSchema = {'machinetag': 'MachineTag', 'containertypes': 'ContainerTypes'}
3151 _toPy = {'ContainerTypes': 'containertypes', 'MachineTag': 'machinetag'}
3152 def __init__(self, containertypes=None, machinetag=None):
3153 '''
3154 containertypes : typing.Sequence[str]
3155 machinetag : str
3156 '''
3157 self.containertypes = containertypes
3158 self.machinetag = machinetag
3159
3160
3161 class MachineContainersParams(Type):
3162 _toSchema = {'params': 'Params'}
3163 _toPy = {'Params': 'params'}
3164 def __init__(self, params=None):
3165 '''
3166 params : typing.Sequence[~MachineContainers]
3167 '''
3168 self.params = [MachineContainers.from_json(o) for o in params or []]
3169
3170
3171 class MachineNetworkConfigResult(Type):
3172 _toSchema = {'info': 'Info', 'error': 'Error'}
3173 _toPy = {'Info': 'info', 'Error': 'error'}
3174 def __init__(self, error=None, info=None):
3175 '''
3176 error : Error
3177 info : typing.Sequence[~NetworkConfig]
3178 '''
3179 self.error = Error.from_json(error) if error else None
3180 self.info = [NetworkConfig.from_json(o) for o in info or []]
3181
3182
3183 class MachineNetworkConfigResults(Type):
3184 _toSchema = {'results': 'Results'}
3185 _toPy = {'Results': 'results'}
3186 def __init__(self, results=None):
3187 '''
3188 results : typing.Sequence[~MachineNetworkConfigResult]
3189 '''
3190 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
3191
3192
3193 class ProvisioningInfo(Type):
3194 _toSchema = {'jobs': 'Jobs', 'volumes': 'Volumes', 'tags': 'Tags', 'endpointbindings': 'EndpointBindings', 'placement': 'Placement', 'series': 'Series', 'constraints': 'Constraints', 'subnetstozones': 'SubnetsToZones', 'imagemetadata': 'ImageMetadata'}
3195 _toPy = {'Constraints': 'constraints', 'EndpointBindings': 'endpointbindings', 'Volumes': 'volumes', 'Placement': 'placement', 'SubnetsToZones': 'subnetstozones', 'Tags': 'tags', 'Jobs': 'jobs', 'ImageMetadata': 'imagemetadata', 'Series': 'series'}
3196 def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None):
3197 '''
3198 constraints : Value
3199 endpointbindings : typing.Mapping[str, str]
3200 imagemetadata : typing.Sequence[~CloudImageMetadata]
3201 jobs : typing.Sequence[str]
3202 placement : str
3203 series : str
3204 subnetstozones : typing.Sequence[str]
3205 tags : typing.Mapping[str, str]
3206 volumes : typing.Sequence[~VolumeParams]
3207 '''
3208 self.constraints = Value.from_json(constraints) if constraints else None
3209 self.endpointbindings = endpointbindings
3210 self.imagemetadata = [CloudImageMetadata.from_json(o) for o in imagemetadata or []]
3211 self.jobs = jobs
3212 self.placement = placement
3213 self.series = series
3214 self.subnetstozones = subnetstozones
3215 self.tags = tags
3216 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
3217
3218
3219 class ProvisioningInfoResult(Type):
3220 _toSchema = {'error': 'Error', 'result': 'Result'}
3221 _toPy = {'Error': 'error', 'Result': 'result'}
3222 def __init__(self, error=None, result=None):
3223 '''
3224 error : Error
3225 result : ProvisioningInfo
3226 '''
3227 self.error = Error.from_json(error) if error else None
3228 self.result = ProvisioningInfo.from_json(result) if result else None
3229
3230
3231 class ProvisioningInfoResults(Type):
3232 _toSchema = {'results': 'Results'}
3233 _toPy = {'Results': 'results'}
3234 def __init__(self, results=None):
3235 '''
3236 results : typing.Sequence[~ProvisioningInfoResult]
3237 '''
3238 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
3239
3240
3241 class Settings(Type):
3242 _toSchema = {'https': 'Https', 'noproxy': 'NoProxy', 'ftp': 'Ftp', 'http': 'Http'}
3243 _toPy = {'Http': 'http', 'Ftp': 'ftp', 'Https': 'https', 'NoProxy': 'noproxy'}
3244 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3245 '''
3246 ftp : str
3247 http : str
3248 https : str
3249 noproxy : str
3250 '''
3251 self.ftp = ftp
3252 self.http = http
3253 self.https = https
3254 self.noproxy = noproxy
3255
3256
3257 class ToolsResult(Type):
3258 _toSchema = {'error': 'Error', 'disablesslhostnameverification': 'DisableSSLHostnameVerification', 'toolslist': 'ToolsList'}
3259 _toPy = {'Error': 'error', 'ToolsList': 'toolslist', 'DisableSSLHostnameVerification': 'disablesslhostnameverification'}
3260 def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None):
3261 '''
3262 disablesslhostnameverification : bool
3263 error : Error
3264 toolslist : typing.Sequence[~Tools]
3265 '''
3266 self.disablesslhostnameverification = disablesslhostnameverification
3267 self.error = Error.from_json(error) if error else None
3268 self.toolslist = [Tools.from_json(o) for o in toolslist or []]
3269
3270
3271 class ToolsResults(Type):
3272 _toSchema = {'results': 'Results'}
3273 _toPy = {'Results': 'results'}
3274 def __init__(self, results=None):
3275 '''
3276 results : typing.Sequence[~ToolsResult]
3277 '''
3278 self.results = [ToolsResult.from_json(o) for o in results or []]
3279
3280
3281 class UpdateBehavior(Type):
3282 _toSchema = {'enableosupgrade': 'EnableOSUpgrade', 'enableosrefreshupdate': 'EnableOSRefreshUpdate'}
3283 _toPy = {'EnableOSUpgrade': 'enableosupgrade', 'EnableOSRefreshUpdate': 'enableosrefreshupdate'}
3284 def __init__(self, enableosrefreshupdate=None, enableosupgrade=None):
3285 '''
3286 enableosrefreshupdate : bool
3287 enableosupgrade : bool
3288 '''
3289 self.enableosrefreshupdate = enableosrefreshupdate
3290 self.enableosupgrade = enableosupgrade
3291
3292
3293 class Volume(Type):
3294 _toSchema = {'info': 'info', 'volumetag': 'volumetag'}
3295 _toPy = {'info': 'info', 'volumetag': 'volumetag'}
3296 def __init__(self, info=None, volumetag=None):
3297 '''
3298 info : VolumeInfo
3299 volumetag : str
3300 '''
3301 self.info = VolumeInfo.from_json(info) if info else None
3302 self.volumetag = volumetag
3303
3304
3305 class VolumeAttachmentInfo(Type):
3306 _toSchema = {'devicename': 'devicename', 'devicelink': 'devicelink', 'read_only': 'read-only', 'busaddress': 'busaddress'}
3307 _toPy = {'read-only': 'read_only', 'devicename': 'devicename', 'devicelink': 'devicelink', 'busaddress': 'busaddress'}
3308 def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None):
3309 '''
3310 busaddress : str
3311 devicelink : str
3312 devicename : str
3313 read_only : bool
3314 '''
3315 self.busaddress = busaddress
3316 self.devicelink = devicelink
3317 self.devicename = devicename
3318 self.read_only = read_only
3319
3320
3321 class VolumeAttachmentParams(Type):
3322 _toSchema = {'volumeid': 'volumeid', 'instanceid': 'instanceid', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'provider': 'provider', 'read_only': 'read-only'}
3323 _toPy = {'volumeid': 'volumeid', 'instanceid': 'instanceid', 'read-only': 'read_only', 'volumetag': 'volumetag', 'machinetag': 'machinetag', 'provider': 'provider'}
3324 def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None):
3325 '''
3326 instanceid : str
3327 machinetag : str
3328 provider : str
3329 read_only : bool
3330 volumeid : str
3331 volumetag : str
3332 '''
3333 self.instanceid = instanceid
3334 self.machinetag = machinetag
3335 self.provider = provider
3336 self.read_only = read_only
3337 self.volumeid = volumeid
3338 self.volumetag = volumetag
3339
3340
3341 class VolumeInfo(Type):
3342 _toSchema = {'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size'}
3343 _toPy = {'volumeid': 'volumeid', 'hardwareid': 'hardwareid', 'persistent': 'persistent', 'size': 'size'}
3344 def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None):
3345 '''
3346 hardwareid : str
3347 persistent : bool
3348 size : int
3349 volumeid : str
3350 '''
3351 self.hardwareid = hardwareid
3352 self.persistent = persistent
3353 self.size = size
3354 self.volumeid = volumeid
3355
3356
3357 class VolumeParams(Type):
3358 _toSchema = {'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'}
3359 _toPy = {'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'}
3360 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None):
3361 '''
3362 attachment : VolumeAttachmentParams
3363 attributes : typing.Mapping[str, typing.Any]
3364 provider : str
3365 size : int
3366 tags : typing.Mapping[str, str]
3367 volumetag : str
3368 '''
3369 self.attachment = VolumeAttachmentParams.from_json(attachment) if attachment else None
3370 self.attributes = attributes
3371 self.provider = provider
3372 self.size = size
3373 self.tags = tags
3374 self.volumetag = volumetag
3375
3376
3377 class WatchContainer(Type):
3378 _toSchema = {'containertype': 'ContainerType', 'machinetag': 'MachineTag'}
3379 _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'}
3380 def __init__(self, containertype=None, machinetag=None):
3381 '''
3382 containertype : str
3383 machinetag : str
3384 '''
3385 self.containertype = containertype
3386 self.machinetag = machinetag
3387
3388
3389 class WatchContainers(Type):
3390 _toSchema = {'params': 'Params'}
3391 _toPy = {'Params': 'params'}
3392 def __init__(self, params=None):
3393 '''
3394 params : typing.Sequence[~WatchContainer]
3395 '''
3396 self.params = [WatchContainer.from_json(o) for o in params or []]
3397
3398
3399 class ProxyConfig(Type):
3400 _toSchema = {'https': 'HTTPS', 'noproxy': 'NoProxy', 'ftp': 'FTP', 'http': 'HTTP'}
3401 _toPy = {'HTTP': 'http', 'HTTPS': 'https', 'NoProxy': 'noproxy', 'FTP': 'ftp'}
3402 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3403 '''
3404 ftp : str
3405 http : str
3406 https : str
3407 noproxy : str
3408 '''
3409 self.ftp = ftp
3410 self.http = http
3411 self.https = https
3412 self.noproxy = noproxy
3413
3414
3415 class ProxyConfigResult(Type):
3416 _toSchema = {'proxysettings': 'ProxySettings', 'error': 'Error', 'aptproxysettings': 'APTProxySettings'}
3417 _toPy = {'Error': 'error', 'APTProxySettings': 'aptproxysettings', 'ProxySettings': 'proxysettings'}
3418 def __init__(self, aptproxysettings=None, error=None, proxysettings=None):
3419 '''
3420 aptproxysettings : ProxyConfig
3421 error : Error
3422 proxysettings : ProxyConfig
3423 '''
3424 self.aptproxysettings = ProxyConfig.from_json(aptproxysettings) if aptproxysettings else None
3425 self.error = Error.from_json(error) if error else None
3426 self.proxysettings = ProxyConfig.from_json(proxysettings) if proxysettings else None
3427
3428
3429 class ProxyConfigResults(Type):
3430 _toSchema = {'results': 'Results'}
3431 _toPy = {'Results': 'results'}
3432 def __init__(self, results=None):
3433 '''
3434 results : typing.Sequence[~ProxyConfigResult]
3435 '''
3436 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
3437
3438
3439 class RebootActionResult(Type):
3440 _toSchema = {'error': 'error', 'result': 'result'}
3441 _toPy = {'error': 'error', 'result': 'result'}
3442 def __init__(self, error=None, result=None):
3443 '''
3444 error : Error
3445 result : str
3446 '''
3447 self.error = Error.from_json(error) if error else None
3448 self.result = result
3449
3450
3451 class RebootActionResults(Type):
3452 _toSchema = {'results': 'results'}
3453 _toPy = {'results': 'results'}
3454 def __init__(self, results=None):
3455 '''
3456 results : typing.Sequence[~RebootActionResult]
3457 '''
3458 self.results = [RebootActionResult.from_json(o) for o in results or []]
3459
3460
3461 class RelationUnitsChange(Type):
3462 _toSchema = {'departed': 'Departed', 'changed': 'Changed'}
3463 _toPy = {'Departed': 'departed', 'Changed': 'changed'}
3464 def __init__(self, changed=None, departed=None):
3465 '''
3466 changed : typing.Mapping[str, ~UnitSettings]
3467 departed : typing.Sequence[str]
3468 '''
3469 self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()}
3470 self.departed = departed
3471
3472
3473 class RelationUnitsWatchResult(Type):
3474 _toSchema = {'changes': 'Changes', 'error': 'Error', 'relationunitswatcherid': 'RelationUnitsWatcherId'}
3475 _toPy = {'Changes': 'changes', 'Error': 'error', 'RelationUnitsWatcherId': 'relationunitswatcherid'}
3476 def __init__(self, changes=None, error=None, relationunitswatcherid=None):
3477 '''
3478 changes : RelationUnitsChange
3479 error : Error
3480 relationunitswatcherid : str
3481 '''
3482 self.changes = RelationUnitsChange.from_json(changes) if changes else None
3483 self.error = Error.from_json(error) if error else None
3484 self.relationunitswatcherid = relationunitswatcherid
3485
3486
3487 class UnitSettings(Type):
3488 _toSchema = {'version': 'Version'}
3489 _toPy = {'Version': 'version'}
3490 def __init__(self, version=None):
3491 '''
3492 version : int
3493 '''
3494 self.version = version
3495
3496
3497 class RetryStrategy(Type):
3498 _toSchema = {'maxretrytime': 'MaxRetryTime', 'minretrytime': 'MinRetryTime', 'jitterretrytime': 'JitterRetryTime', 'shouldretry': 'ShouldRetry', 'retrytimefactor': 'RetryTimeFactor'}
3499 _toPy = {'MinRetryTime': 'minretrytime', 'ShouldRetry': 'shouldretry', 'MaxRetryTime': 'maxretrytime', 'RetryTimeFactor': 'retrytimefactor', 'JitterRetryTime': 'jitterretrytime'}
3500 def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None):
3501 '''
3502 jitterretrytime : bool
3503 maxretrytime : int
3504 minretrytime : int
3505 retrytimefactor : int
3506 shouldretry : bool
3507 '''
3508 self.jitterretrytime = jitterretrytime
3509 self.maxretrytime = maxretrytime
3510 self.minretrytime = minretrytime
3511 self.retrytimefactor = retrytimefactor
3512 self.shouldretry = shouldretry
3513
3514
3515 class RetryStrategyResult(Type):
3516 _toSchema = {'error': 'Error', 'result': 'Result'}
3517 _toPy = {'Error': 'error', 'Result': 'result'}
3518 def __init__(self, error=None, result=None):
3519 '''
3520 error : Error
3521 result : RetryStrategy
3522 '''
3523 self.error = Error.from_json(error) if error else None
3524 self.result = RetryStrategy.from_json(result) if result else None
3525
3526
3527 class RetryStrategyResults(Type):
3528 _toSchema = {'results': 'Results'}
3529 _toPy = {'Results': 'results'}
3530 def __init__(self, results=None):
3531 '''
3532 results : typing.Sequence[~RetryStrategyResult]
3533 '''
3534 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
3535
3536
3537 class SSHAddressResult(Type):
3538 _toSchema = {'error': 'error', 'address': 'address'}
3539 _toPy = {'error': 'error', 'address': 'address'}
3540 def __init__(self, address=None, error=None):
3541 '''
3542 address : str
3543 error : Error
3544 '''
3545 self.address = address
3546 self.error = Error.from_json(error) if error else None
3547
3548
3549 class SSHAddressResults(Type):
3550 _toSchema = {'results': 'results'}
3551 _toPy = {'results': 'results'}
3552 def __init__(self, results=None):
3553 '''
3554 results : typing.Sequence[~SSHAddressResult]
3555 '''
3556 self.results = [SSHAddressResult.from_json(o) for o in results or []]
3557
3558
3559 class SSHProxyResult(Type):
3560 _toSchema = {'use_proxy': 'use-proxy'}
3561 _toPy = {'use-proxy': 'use_proxy'}
3562 def __init__(self, use_proxy=None):
3563 '''
3564 use_proxy : bool
3565 '''
3566 self.use_proxy = use_proxy
3567
3568
3569 class SSHPublicKeysResult(Type):
3570 _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
3571 _toPy = {'error': 'error', 'public-keys': 'public_keys'}
3572 def __init__(self, error=None, public_keys=None):
3573 '''
3574 error : Error
3575 public_keys : typing.Sequence[str]
3576 '''
3577 self.error = Error.from_json(error) if error else None
3578 self.public_keys = public_keys
3579
3580
3581 class SSHPublicKeysResults(Type):
3582 _toSchema = {'results': 'results'}
3583 _toPy = {'results': 'results'}
3584 def __init__(self, results=None):
3585 '''
3586 results : typing.Sequence[~SSHPublicKeysResult]
3587 '''
3588 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
3589
3590
3591 class AddRelation(Type):
3592 _toSchema = {'endpoints': 'Endpoints'}
3593 _toPy = {'Endpoints': 'endpoints'}
3594 def __init__(self, endpoints=None):
3595 '''
3596 endpoints : typing.Sequence[str]
3597 '''
3598 self.endpoints = endpoints
3599
3600
3601 class AddRelationResults(Type):
3602 _toSchema = {'endpoints': 'Endpoints'}
3603 _toPy = {'Endpoints': 'endpoints'}
3604 def __init__(self, endpoints=None):
3605 '''
3606 endpoints : typing.Mapping[str, ~Relation]
3607 '''
3608 self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()}
3609
3610
3611 class AddServiceUnits(Type):
3612 _toSchema = {'servicename': 'ServiceName', 'placement': 'Placement', 'numunits': 'NumUnits'}
3613 _toPy = {'ServiceName': 'servicename', 'Placement': 'placement', 'NumUnits': 'numunits'}
3614 def __init__(self, numunits=None, placement=None, servicename=None):
3615 '''
3616 numunits : int
3617 placement : typing.Sequence[~Placement]
3618 servicename : str
3619 '''
3620 self.numunits = numunits
3621 self.placement = [Placement.from_json(o) for o in placement or []]
3622 self.servicename = servicename
3623
3624
3625 class AddServiceUnitsResults(Type):
3626 _toSchema = {'units': 'Units'}
3627 _toPy = {'Units': 'units'}
3628 def __init__(self, units=None):
3629 '''
3630 units : typing.Sequence[str]
3631 '''
3632 self.units = units
3633
3634
3635 class DestroyRelation(Type):
3636 _toSchema = {'endpoints': 'Endpoints'}
3637 _toPy = {'Endpoints': 'endpoints'}
3638 def __init__(self, endpoints=None):
3639 '''
3640 endpoints : typing.Sequence[str]
3641 '''
3642 self.endpoints = endpoints
3643
3644
3645 class DestroyServiceUnits(Type):
3646 _toSchema = {'unitnames': 'UnitNames'}
3647 _toPy = {'UnitNames': 'unitnames'}
3648 def __init__(self, unitnames=None):
3649 '''
3650 unitnames : typing.Sequence[str]
3651 '''
3652 self.unitnames = unitnames
3653
3654
3655 class GetServiceConstraints(Type):
3656 _toSchema = {'servicename': 'ServiceName'}
3657 _toPy = {'ServiceName': 'servicename'}
3658 def __init__(self, servicename=None):
3659 '''
3660 servicename : str
3661 '''
3662 self.servicename = servicename
3663
3664
3665 class Relation(Type):
3666 _toSchema = {'name': 'Name', 'limit': 'Limit', 'role': 'Role', 'optional': 'Optional', 'scope': 'Scope', 'interface': 'Interface'}
3667 _toPy = {'Optional': 'optional', 'Limit': 'limit', 'Scope': 'scope', 'Name': 'name', 'Role': 'role', 'Interface': 'interface'}
3668 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
3669 '''
3670 interface : str
3671 limit : int
3672 name : str
3673 optional : bool
3674 role : str
3675 scope : str
3676 '''
3677 self.interface = interface
3678 self.limit = limit
3679 self.name = name
3680 self.optional = optional
3681 self.role = role
3682 self.scope = scope
3683
3684
3685 class ServiceCharmRelations(Type):
3686 _toSchema = {'servicename': 'ServiceName'}
3687 _toPy = {'ServiceName': 'servicename'}
3688 def __init__(self, servicename=None):
3689 '''
3690 servicename : str
3691 '''
3692 self.servicename = servicename
3693
3694
3695 class ServiceCharmRelationsResults(Type):
3696 _toSchema = {'charmrelations': 'CharmRelations'}
3697 _toPy = {'CharmRelations': 'charmrelations'}
3698 def __init__(self, charmrelations=None):
3699 '''
3700 charmrelations : typing.Sequence[str]
3701 '''
3702 self.charmrelations = charmrelations
3703
3704
3705 class ServiceDeploy(Type):
3706 _toSchema = {'configyaml': 'ConfigYAML', 'storage': 'Storage', 'endpointbindings': 'EndpointBindings', 'resources': 'Resources', 'servicename': 'ServiceName', 'series': 'Series', 'charmurl': 'CharmUrl', 'config': 'Config', 'channel': 'Channel', 'placement': 'Placement', 'numunits': 'NumUnits', 'constraints': 'Constraints'}
3707 _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints', 'ConfigYAML': 'configyaml', 'Resources': 'resources', 'Channel': 'channel', 'Storage': 'storage', 'Config': 'config', 'Placement': 'placement', 'EndpointBindings': 'endpointbindings', 'NumUnits': 'numunits', 'CharmUrl': 'charmurl', 'Series': 'series'}
3708 def __init__(self, channel=None, charmurl=None, config=None, configyaml=None, constraints=None, endpointbindings=None, numunits=None, placement=None, resources=None, series=None, servicename=None, storage=None):
3709 '''
3710 channel : str
3711 charmurl : str
3712 config : typing.Mapping[str, str]
3713 configyaml : str
3714 constraints : Value
3715 endpointbindings : typing.Mapping[str, str]
3716 numunits : int
3717 placement : typing.Sequence[~Placement]
3718 resources : typing.Mapping[str, str]
3719 series : str
3720 servicename : str
3721 storage : typing.Mapping[str, ~Constraints]
3722 '''
3723 self.channel = channel
3724 self.charmurl = charmurl
3725 self.config = config
3726 self.configyaml = configyaml
3727 self.constraints = Value.from_json(constraints) if constraints else None
3728 self.endpointbindings = endpointbindings
3729 self.numunits = numunits
3730 self.placement = [Placement.from_json(o) for o in placement or []]
3731 self.resources = resources
3732 self.series = series
3733 self.servicename = servicename
3734 self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()}
3735
3736
3737 class ServiceDestroy(Type):
3738 _toSchema = {'servicename': 'ServiceName'}
3739 _toPy = {'ServiceName': 'servicename'}
3740 def __init__(self, servicename=None):
3741 '''
3742 servicename : str
3743 '''
3744 self.servicename = servicename
3745
3746
3747 class ServiceExpose(Type):
3748 _toSchema = {'servicename': 'ServiceName'}
3749 _toPy = {'ServiceName': 'servicename'}
3750 def __init__(self, servicename=None):
3751 '''
3752 servicename : str
3753 '''
3754 self.servicename = servicename
3755
3756
3757 class ServiceGet(Type):
3758 _toSchema = {'servicename': 'ServiceName'}
3759 _toPy = {'ServiceName': 'servicename'}
3760 def __init__(self, servicename=None):
3761 '''
3762 servicename : str
3763 '''
3764 self.servicename = servicename
3765
3766
3767 class ServiceGetResults(Type):
3768 _toSchema = {'config': 'Config', 'charm': 'Charm', 'constraints': 'Constraints', 'service': 'Service'}
3769 _toPy = {'Charm': 'charm', 'Constraints': 'constraints', 'Config': 'config', 'Service': 'service'}
3770 def __init__(self, charm=None, config=None, constraints=None, service=None):
3771 '''
3772 charm : str
3773 config : typing.Mapping[str, typing.Any]
3774 constraints : Value
3775 service : str
3776 '''
3777 self.charm = charm
3778 self.config = config
3779 self.constraints = Value.from_json(constraints) if constraints else None
3780 self.service = service
3781
3782
3783 class ServiceMetricCredential(Type):
3784 _toSchema = {'metriccredentials': 'MetricCredentials', 'servicename': 'ServiceName'}
3785 _toPy = {'MetricCredentials': 'metriccredentials', 'ServiceName': 'servicename'}
3786 def __init__(self, metriccredentials=None, servicename=None):
3787 '''
3788 metriccredentials : typing.Sequence[int]
3789 servicename : str
3790 '''
3791 self.metriccredentials = metriccredentials
3792 self.servicename = servicename
3793
3794
3795 class ServiceMetricCredentials(Type):
3796 _toSchema = {'creds': 'Creds'}
3797 _toPy = {'Creds': 'creds'}
3798 def __init__(self, creds=None):
3799 '''
3800 creds : typing.Sequence[~ServiceMetricCredential]
3801 '''
3802 self.creds = [ServiceMetricCredential.from_json(o) for o in creds or []]
3803
3804
3805 class ServiceSet(Type):
3806 _toSchema = {'options': 'Options', 'servicename': 'ServiceName'}
3807 _toPy = {'ServiceName': 'servicename', 'Options': 'options'}
3808 def __init__(self, options=None, servicename=None):
3809 '''
3810 options : typing.Mapping[str, str]
3811 servicename : str
3812 '''
3813 self.options = options
3814 self.servicename = servicename
3815
3816
3817 class ServiceSetCharm(Type):
3818 _toSchema = {'charmurl': 'charmurl', 'forceseries': 'forceseries', 'forceunits': 'forceunits', 'resourceids': 'resourceids', 'cs_channel': 'cs-channel', 'servicename': 'servicename'}
3819 _toPy = {'charmurl': 'charmurl', 'forceseries': 'forceseries', 'forceunits': 'forceunits', 'cs-channel': 'cs_channel', 'resourceids': 'resourceids', 'servicename': 'servicename'}
3820 def __init__(self, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None, servicename=None):
3821 '''
3822 charmurl : str
3823 cs_channel : str
3824 forceseries : bool
3825 forceunits : bool
3826 resourceids : typing.Mapping[str, str]
3827 servicename : str
3828 '''
3829 self.charmurl = charmurl
3830 self.cs_channel = cs_channel
3831 self.forceseries = forceseries
3832 self.forceunits = forceunits
3833 self.resourceids = resourceids
3834 self.servicename = servicename
3835
3836
3837 class ServiceUnexpose(Type):
3838 _toSchema = {'servicename': 'ServiceName'}
3839 _toPy = {'ServiceName': 'servicename'}
3840 def __init__(self, servicename=None):
3841 '''
3842 servicename : str
3843 '''
3844 self.servicename = servicename
3845
3846
3847 class ServiceUnset(Type):
3848 _toSchema = {'options': 'Options', 'servicename': 'ServiceName'}
3849 _toPy = {'ServiceName': 'servicename', 'Options': 'options'}
3850 def __init__(self, options=None, servicename=None):
3851 '''
3852 options : typing.Sequence[str]
3853 servicename : str
3854 '''
3855 self.options = options
3856 self.servicename = servicename
3857
3858
3859 class ServiceUpdate(Type):
3860 _toSchema = {'charmurl': 'CharmUrl', 'forceseries': 'ForceSeries', 'minunits': 'MinUnits', 'forcecharmurl': 'ForceCharmUrl', 'settingsyaml': 'SettingsYAML', 'settingsstrings': 'SettingsStrings', 'constraints': 'Constraints', 'servicename': 'ServiceName'}
3861 _toPy = {'ServiceName': 'servicename', 'Constraints': 'constraints', 'SettingsStrings': 'settingsstrings', 'ForceSeries': 'forceseries', 'CharmUrl': 'charmurl', 'SettingsYAML': 'settingsyaml', 'MinUnits': 'minunits', 'ForceCharmUrl': 'forcecharmurl'}
3862 def __init__(self, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, servicename=None, settingsstrings=None, settingsyaml=None):
3863 '''
3864 charmurl : str
3865 constraints : Value
3866 forcecharmurl : bool
3867 forceseries : bool
3868 minunits : int
3869 servicename : str
3870 settingsstrings : typing.Mapping[str, str]
3871 settingsyaml : str
3872 '''
3873 self.charmurl = charmurl
3874 self.constraints = Value.from_json(constraints) if constraints else None
3875 self.forcecharmurl = forcecharmurl
3876 self.forceseries = forceseries
3877 self.minunits = minunits
3878 self.servicename = servicename
3879 self.settingsstrings = settingsstrings
3880 self.settingsyaml = settingsyaml
3881
3882
3883 class ServicesDeploy(Type):
3884 _toSchema = {'services': 'Services'}
3885 _toPy = {'Services': 'services'}
3886 def __init__(self, services=None):
3887 '''
3888 services : typing.Sequence[~ServiceDeploy]
3889 '''
3890 self.services = [ServiceDeploy.from_json(o) for o in services or []]
3891
3892
3893 class SingularClaim(Type):
3894 _toSchema = {'modeltag': 'ModelTag', 'controllertag': 'ControllerTag', 'duration': 'Duration'}
3895 _toPy = {'ControllerTag': 'controllertag', 'Duration': 'duration', 'ModelTag': 'modeltag'}
3896 def __init__(self, controllertag=None, duration=None, modeltag=None):
3897 '''
3898 controllertag : str
3899 duration : int
3900 modeltag : str
3901 '''
3902 self.controllertag = controllertag
3903 self.duration = duration
3904 self.modeltag = modeltag
3905
3906
3907 class SingularClaims(Type):
3908 _toSchema = {'claims': 'Claims'}
3909 _toPy = {'Claims': 'claims'}
3910 def __init__(self, claims=None):
3911 '''
3912 claims : typing.Sequence[~SingularClaim]
3913 '''
3914 self.claims = [SingularClaim.from_json(o) for o in claims or []]
3915
3916
3917 class ListSpacesResults(Type):
3918 _toSchema = {'results': 'Results'}
3919 _toPy = {'Results': 'results'}
3920 def __init__(self, results=None):
3921 '''
3922 results : typing.Sequence[~Space]
3923 '''
3924 self.results = [Space.from_json(o) for o in results or []]
3925
3926
3927 class Space(Type):
3928 _toSchema = {'subnets': 'Subnets', 'error': 'Error', 'name': 'Name'}
3929 _toPy = {'Error': 'error', 'Subnets': 'subnets', 'Name': 'name'}
3930 def __init__(self, error=None, name=None, subnets=None):
3931 '''
3932 error : Error
3933 name : str
3934 subnets : typing.Sequence[~Subnet]
3935 '''
3936 self.error = Error.from_json(error) if error else None
3937 self.name = name
3938 self.subnets = [Subnet.from_json(o) for o in subnets or []]
3939
3940
3941 class StatusHistoryPruneArgs(Type):
3942 _toSchema = {'maxlogsperentity': 'MaxLogsPerEntity'}
3943 _toPy = {'MaxLogsPerEntity': 'maxlogsperentity'}
3944 def __init__(self, maxlogsperentity=None):
3945 '''
3946 maxlogsperentity : int
3947 '''
3948 self.maxlogsperentity = maxlogsperentity
3949
3950
3951 class FilesystemAttachmentInfo(Type):
3952 _toSchema = {'mountpoint': 'mountpoint', 'read_only': 'read-only'}
3953 _toPy = {'mountpoint': 'mountpoint', 'read-only': 'read_only'}
3954 def __init__(self, mountpoint=None, read_only=None):
3955 '''
3956 mountpoint : str
3957 read_only : bool
3958 '''
3959 self.mountpoint = mountpoint
3960 self.read_only = read_only
3961
3962
3963 class FilesystemDetails(Type):
3964 _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments'}
3965 _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage', 'machineattachments': 'machineattachments'}
3966 def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
3967 '''
3968 filesystemtag : str
3969 info : FilesystemInfo
3970 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
3971 status : EntityStatus
3972 storage : StorageDetails
3973 volumetag : str
3974 '''
3975 self.filesystemtag = filesystemtag
3976 self.info = FilesystemInfo.from_json(info) if info else None
3977 self.machineattachments = {k: FilesystemAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
3978 self.status = EntityStatus.from_json(status) if status else None
3979 self.storage = StorageDetails.from_json(storage) if storage else None
3980 self.volumetag = volumetag
3981
3982
3983 class FilesystemDetailsListResult(Type):
3984 _toSchema = {'error': 'error', 'result': 'result'}
3985 _toPy = {'error': 'error', 'result': 'result'}
3986 def __init__(self, error=None, result=None):
3987 '''
3988 error : Error
3989 result : typing.Sequence[~FilesystemDetails]
3990 '''
3991 self.error = Error.from_json(error) if error else None
3992 self.result = [FilesystemDetails.from_json(o) for o in result or []]
3993
3994
3995 class FilesystemDetailsListResults(Type):
3996 _toSchema = {'results': 'results'}
3997 _toPy = {'results': 'results'}
3998 def __init__(self, results=None):
3999 '''
4000 results : typing.Sequence[~FilesystemDetailsListResult]
4001 '''
4002 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
4003
4004
4005 class FilesystemFilter(Type):
4006 _toSchema = {'machines': 'machines'}
4007 _toPy = {'machines': 'machines'}
4008 def __init__(self, machines=None):
4009 '''
4010 machines : typing.Sequence[str]
4011 '''
4012 self.machines = machines
4013
4014
4015 class FilesystemFilters(Type):
4016 _toSchema = {'filters': 'filters'}
4017 _toPy = {'filters': 'filters'}
4018 def __init__(self, filters=None):
4019 '''
4020 filters : typing.Sequence[~FilesystemFilter]
4021 '''
4022 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
4023
4024
4025 class FilesystemInfo(Type):
4026 _toSchema = {'filesystemid': 'filesystemid', 'size': 'size'}
4027 _toPy = {'filesystemid': 'filesystemid', 'size': 'size'}
4028 def __init__(self, filesystemid=None, size=None):
4029 '''
4030 filesystemid : str
4031 size : int
4032 '''
4033 self.filesystemid = filesystemid
4034 self.size = size
4035
4036
4037 class StorageAddParams(Type):
4038 _toSchema = {'unit': 'unit', 'storagename': 'StorageName', 'storage': 'storage'}
4039 _toPy = {'unit': 'unit', 'StorageName': 'storagename', 'storage': 'storage'}
4040 def __init__(self, storagename=None, storage=None, unit=None):
4041 '''
4042 storagename : str
4043 storage : StorageConstraints
4044 unit : str
4045 '''
4046 self.storagename = storagename
4047 self.storage = StorageConstraints.from_json(storage) if storage else None
4048 self.unit = unit
4049
4050
4051 class StorageAttachmentDetails(Type):
4052 _toSchema = {'unittag': 'unittag', 'location': 'location', 'machinetag': 'machinetag', 'storagetag': 'storagetag'}
4053 _toPy = {'unittag': 'unittag', 'location': 'location', 'machinetag': 'machinetag', 'storagetag': 'storagetag'}
4054 def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None):
4055 '''
4056 location : str
4057 machinetag : str
4058 storagetag : str
4059 unittag : str
4060 '''
4061 self.location = location
4062 self.machinetag = machinetag
4063 self.storagetag = storagetag
4064 self.unittag = unittag
4065
4066
4067 class StorageConstraints(Type):
4068 _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'}
4069 _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'}
4070 def __init__(self, count=None, pool=None, size=None):
4071 '''
4072 count : int
4073 pool : str
4074 size : int
4075 '''
4076 self.count = count
4077 self.pool = pool
4078 self.size = size
4079
4080
4081 class StorageDetails(Type):
4082 _toSchema = {'attachments': 'attachments', 'status': 'status', 'persistent': 'Persistent', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag'}
4083 _toPy = {'Persistent': 'persistent', 'status': 'status', 'attachments': 'attachments', 'kind': 'kind', 'ownertag': 'ownertag', 'storagetag': 'storagetag'}
4084 def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None):
4085 '''
4086 persistent : bool
4087 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4088 kind : int
4089 ownertag : str
4090 status : EntityStatus
4091 storagetag : str
4092 '''
4093 self.persistent = persistent
4094 self.attachments = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()}
4095 self.kind = kind
4096 self.ownertag = ownertag
4097 self.status = EntityStatus.from_json(status) if status else None
4098 self.storagetag = storagetag
4099
4100
4101 class StorageDetailsListResult(Type):
4102 _toSchema = {'error': 'error', 'result': 'result'}
4103 _toPy = {'error': 'error', 'result': 'result'}
4104 def __init__(self, error=None, result=None):
4105 '''
4106 error : Error
4107 result : typing.Sequence[~StorageDetails]
4108 '''
4109 self.error = Error.from_json(error) if error else None
4110 self.result = [StorageDetails.from_json(o) for o in result or []]
4111
4112
4113 class StorageDetailsListResults(Type):
4114 _toSchema = {'results': 'results'}
4115 _toPy = {'results': 'results'}
4116 def __init__(self, results=None):
4117 '''
4118 results : typing.Sequence[~StorageDetailsListResult]
4119 '''
4120 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
4121
4122
4123 class StorageDetailsResult(Type):
4124 _toSchema = {'error': 'error', 'result': 'result'}
4125 _toPy = {'error': 'error', 'result': 'result'}
4126 def __init__(self, error=None, result=None):
4127 '''
4128 error : Error
4129 result : StorageDetails
4130 '''
4131 self.error = Error.from_json(error) if error else None
4132 self.result = StorageDetails.from_json(result) if result else None
4133
4134
4135 class StorageDetailsResults(Type):
4136 _toSchema = {'results': 'results'}
4137 _toPy = {'results': 'results'}
4138 def __init__(self, results=None):
4139 '''
4140 results : typing.Sequence[~StorageDetailsResult]
4141 '''
4142 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
4143
4144
4145 class StorageFilter(Type):
4146 _toSchema = {}
4147 _toPy = {}
4148 def __init__(self):
4149 '''
4150
4151 '''
4152 pass
4153
4154
4155 class StorageFilters(Type):
4156 _toSchema = {'filters': 'filters'}
4157 _toPy = {'filters': 'filters'}
4158 def __init__(self, filters=None):
4159 '''
4160 filters : typing.Sequence[~StorageFilter]
4161 '''
4162 self.filters = [StorageFilter.from_json(o) for o in filters or []]
4163
4164
4165 class StoragePool(Type):
4166 _toSchema = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4167 _toPy = {'name': 'name', 'provider': 'provider', 'attrs': 'attrs'}
4168 def __init__(self, attrs=None, name=None, provider=None):
4169 '''
4170 attrs : typing.Mapping[str, typing.Any]
4171 name : str
4172 provider : str
4173 '''
4174 self.attrs = attrs
4175 self.name = name
4176 self.provider = provider
4177
4178
4179 class StoragePoolFilter(Type):
4180 _toSchema = {'providers': 'providers', 'names': 'names'}
4181 _toPy = {'providers': 'providers', 'names': 'names'}
4182 def __init__(self, names=None, providers=None):
4183 '''
4184 names : typing.Sequence[str]
4185 providers : typing.Sequence[str]
4186 '''
4187 self.names = names
4188 self.providers = providers
4189
4190
4191 class StoragePoolFilters(Type):
4192 _toSchema = {'filters': 'filters'}
4193 _toPy = {'filters': 'filters'}
4194 def __init__(self, filters=None):
4195 '''
4196 filters : typing.Sequence[~StoragePoolFilter]
4197 '''
4198 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
4199
4200
4201 class StoragePoolsResult(Type):
4202 _toSchema = {'storagepools': 'storagepools', 'error': 'error'}
4203 _toPy = {'storagepools': 'storagepools', 'error': 'error'}
4204 def __init__(self, error=None, storagepools=None):
4205 '''
4206 error : Error
4207 storagepools : typing.Sequence[~StoragePool]
4208 '''
4209 self.error = Error.from_json(error) if error else None
4210 self.storagepools = [StoragePool.from_json(o) for o in storagepools or []]
4211
4212
4213 class StoragePoolsResults(Type):
4214 _toSchema = {'results': 'results'}
4215 _toPy = {'results': 'results'}
4216 def __init__(self, results=None):
4217 '''
4218 results : typing.Sequence[~StoragePoolsResult]
4219 '''
4220 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
4221
4222
4223 class StoragesAddParams(Type):
4224 _toSchema = {'storages': 'storages'}
4225 _toPy = {'storages': 'storages'}
4226 def __init__(self, storages=None):
4227 '''
4228 storages : typing.Sequence[~StorageAddParams]
4229 '''
4230 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
4231
4232
4233 class VolumeDetails(Type):
4234 _toSchema = {'info': 'info', 'machineattachments': 'machineattachments', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage'}
4235 _toPy = {'info': 'info', 'machineattachments': 'machineattachments', 'status': 'status', 'volumetag': 'volumetag', 'storage': 'storage'}
4236 def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
4237 '''
4238 info : VolumeInfo
4239 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4240 status : EntityStatus
4241 storage : StorageDetails
4242 volumetag : str
4243 '''
4244 self.info = VolumeInfo.from_json(info) if info else None
4245 self.machineattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
4246 self.status = EntityStatus.from_json(status) if status else None
4247 self.storage = StorageDetails.from_json(storage) if storage else None
4248 self.volumetag = volumetag
4249
4250
4251 class VolumeDetailsListResult(Type):
4252 _toSchema = {'error': 'error', 'result': 'result'}
4253 _toPy = {'error': 'error', 'result': 'result'}
4254 def __init__(self, error=None, result=None):
4255 '''
4256 error : Error
4257 result : typing.Sequence[~VolumeDetails]
4258 '''
4259 self.error = Error.from_json(error) if error else None
4260 self.result = [VolumeDetails.from_json(o) for o in result or []]
4261
4262
4263 class VolumeDetailsListResults(Type):
4264 _toSchema = {'results': 'results'}
4265 _toPy = {'results': 'results'}
4266 def __init__(self, results=None):
4267 '''
4268 results : typing.Sequence[~VolumeDetailsListResult]
4269 '''
4270 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
4271
4272
4273 class VolumeFilter(Type):
4274 _toSchema = {'machines': 'machines'}
4275 _toPy = {'machines': 'machines'}
4276 def __init__(self, machines=None):
4277 '''
4278 machines : typing.Sequence[str]
4279 '''
4280 self.machines = machines
4281
4282
4283 class VolumeFilters(Type):
4284 _toSchema = {'filters': 'filters'}
4285 _toPy = {'filters': 'filters'}
4286 def __init__(self, filters=None):
4287 '''
4288 filters : typing.Sequence[~VolumeFilter]
4289 '''
4290 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
4291
4292
4293 class BlockDeviceResult(Type):
4294 _toSchema = {'error': 'error', 'result': 'result'}
4295 _toPy = {'error': 'error', 'result': 'result'}
4296 def __init__(self, error=None, result=None):
4297 '''
4298 error : Error
4299 result : BlockDevice
4300 '''
4301 self.error = Error.from_json(error) if error else None
4302 self.result = BlockDevice.from_json(result) if result else None
4303
4304
4305 class BlockDeviceResults(Type):
4306 _toSchema = {'results': 'results'}
4307 _toPy = {'results': 'results'}
4308 def __init__(self, results=None):
4309 '''
4310 results : typing.Sequence[~BlockDeviceResult]
4311 '''
4312 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
4313
4314
4315 class Filesystem(Type):
4316 _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'volumetag': 'volumetag'}
4317 _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'volumetag': 'volumetag'}
4318 def __init__(self, filesystemtag=None, info=None, volumetag=None):
4319 '''
4320 filesystemtag : str
4321 info : FilesystemInfo
4322 volumetag : str
4323 '''
4324 self.filesystemtag = filesystemtag
4325 self.info = FilesystemInfo.from_json(info) if info else None
4326 self.volumetag = volumetag
4327
4328
4329 class FilesystemAttachment(Type):
4330 _toSchema = {'filesystemtag': 'filesystemtag', 'info': 'info', 'machinetag': 'machinetag'}
4331 _toPy = {'filesystemtag': 'filesystemtag', 'info': 'info', 'machinetag': 'machinetag'}
4332 def __init__(self, filesystemtag=None, info=None, machinetag=None):
4333 '''
4334 filesystemtag : str
4335 info : FilesystemAttachmentInfo
4336 machinetag : str
4337 '''
4338 self.filesystemtag = filesystemtag
4339 self.info = FilesystemAttachmentInfo.from_json(info) if info else None
4340 self.machinetag = machinetag
4341
4342
4343 class FilesystemAttachmentParams(Type):
4344 _toSchema = {'filesystemtag': 'filesystemtag', 'instanceid': 'instanceid', 'mountpoint': 'mountpoint', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'provider': 'provider', 'read_only': 'read-only'}
4345 _toPy = {'filesystemtag': 'filesystemtag', 'instanceid': 'instanceid', 'read-only': 'read_only', 'mountpoint': 'mountpoint', 'machinetag': 'machinetag', 'filesystemid': 'filesystemid', 'provider': 'provider'}
4346 def __init__(self, filesystemid=None, filesystemtag=None, instanceid=None, machinetag=None, mountpoint=None, provider=None, read_only=None):
4347 '''
4348 filesystemid : str
4349 filesystemtag : str
4350 instanceid : str
4351 machinetag : str
4352 mountpoint : str
4353 provider : str
4354 read_only : bool
4355 '''
4356 self.filesystemid = filesystemid
4357 self.filesystemtag = filesystemtag
4358 self.instanceid = instanceid
4359 self.machinetag = machinetag
4360 self.mountpoint = mountpoint
4361 self.provider = provider
4362 self.read_only = read_only
4363
4364
4365 class FilesystemAttachmentParamsResult(Type):
4366 _toSchema = {'error': 'error', 'result': 'result'}
4367 _toPy = {'error': 'error', 'result': 'result'}
4368 def __init__(self, error=None, result=None):
4369 '''
4370 error : Error
4371 result : FilesystemAttachmentParams
4372 '''
4373 self.error = Error.from_json(error) if error else None
4374 self.result = FilesystemAttachmentParams.from_json(result) if result else None
4375
4376
4377 class FilesystemAttachmentParamsResults(Type):
4378 _toSchema = {'results': 'results'}
4379 _toPy = {'results': 'results'}
4380 def __init__(self, results=None):
4381 '''
4382 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4383 '''
4384 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
4385
4386
4387 class FilesystemAttachmentResult(Type):
4388 _toSchema = {'error': 'error', 'result': 'result'}
4389 _toPy = {'error': 'error', 'result': 'result'}
4390 def __init__(self, error=None, result=None):
4391 '''
4392 error : Error
4393 result : FilesystemAttachment
4394 '''
4395 self.error = Error.from_json(error) if error else None
4396 self.result = FilesystemAttachment.from_json(result) if result else None
4397
4398
4399 class FilesystemAttachmentResults(Type):
4400 _toSchema = {'results': 'results'}
4401 _toPy = {'results': 'results'}
4402 def __init__(self, results=None):
4403 '''
4404 results : typing.Sequence[~FilesystemAttachmentResult]
4405 '''
4406 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
4407
4408
4409 class FilesystemAttachments(Type):
4410 _toSchema = {'filesystemattachments': 'filesystemattachments'}
4411 _toPy = {'filesystemattachments': 'filesystemattachments'}
4412 def __init__(self, filesystemattachments=None):
4413 '''
4414 filesystemattachments : typing.Sequence[~FilesystemAttachment]
4415 '''
4416 self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []]
4417
4418
4419 class FilesystemParams(Type):
4420 _toSchema = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'}
4421 _toPy = {'filesystemtag': 'filesystemtag', 'volumetag': 'volumetag', 'tags': 'tags', 'attachment': 'attachment', 'provider': 'provider', 'size': 'size', 'attributes': 'attributes'}
4422 def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None):
4423 '''
4424 attachment : FilesystemAttachmentParams
4425 attributes : typing.Mapping[str, typing.Any]
4426 filesystemtag : str
4427 provider : str
4428 size : int
4429 tags : typing.Mapping[str, str]
4430 volumetag : str
4431 '''
4432 self.attachment = FilesystemAttachmentParams.from_json(attachment) if attachment else None
4433 self.attributes = attributes
4434 self.filesystemtag = filesystemtag
4435 self.provider = provider
4436 self.size = size
4437 self.tags = tags
4438 self.volumetag = volumetag
4439
4440
4441 class FilesystemParamsResult(Type):
4442 _toSchema = {'error': 'error', 'result': 'result'}
4443 _toPy = {'error': 'error', 'result': 'result'}
4444 def __init__(self, error=None, result=None):
4445 '''
4446 error : Error
4447 result : FilesystemParams
4448 '''
4449 self.error = Error.from_json(error) if error else None
4450 self.result = FilesystemParams.from_json(result) if result else None
4451
4452
4453 class FilesystemParamsResults(Type):
4454 _toSchema = {'results': 'results'}
4455 _toPy = {'results': 'results'}
4456 def __init__(self, results=None):
4457 '''
4458 results : typing.Sequence[~FilesystemParamsResult]
4459 '''
4460 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
4461
4462
4463 class FilesystemResult(Type):
4464 _toSchema = {'error': 'error', 'result': 'result'}
4465 _toPy = {'error': 'error', 'result': 'result'}
4466 def __init__(self, error=None, result=None):
4467 '''
4468 error : Error
4469 result : Filesystem
4470 '''
4471 self.error = Error.from_json(error) if error else None
4472 self.result = Filesystem.from_json(result) if result else None
4473
4474
4475 class FilesystemResults(Type):
4476 _toSchema = {'results': 'results'}
4477 _toPy = {'results': 'results'}
4478 def __init__(self, results=None):
4479 '''
4480 results : typing.Sequence[~FilesystemResult]
4481 '''
4482 self.results = [FilesystemResult.from_json(o) for o in results or []]
4483
4484
4485 class Filesystems(Type):
4486 _toSchema = {'filesystems': 'filesystems'}
4487 _toPy = {'filesystems': 'filesystems'}
4488 def __init__(self, filesystems=None):
4489 '''
4490 filesystems : typing.Sequence[~Filesystem]
4491 '''
4492 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
4493
4494
4495 class MachineStorageIds(Type):
4496 _toSchema = {'ids': 'ids'}
4497 _toPy = {'ids': 'ids'}
4498 def __init__(self, ids=None):
4499 '''
4500 ids : typing.Sequence[~MachineStorageId]
4501 '''
4502 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
4503
4504
4505 class MachineStorageIdsWatchResults(Type):
4506 _toSchema = {'results': 'Results'}
4507 _toPy = {'Results': 'results'}
4508 def __init__(self, results=None):
4509 '''
4510 results : typing.Sequence[~MachineStorageIdsWatchResult]
4511 '''
4512 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
4513
4514
4515 class VolumeAttachment(Type):
4516 _toSchema = {'info': 'info', 'machinetag': 'machinetag', 'volumetag': 'volumetag'}
4517 _toPy = {'info': 'info', 'machinetag': 'machinetag', 'volumetag': 'volumetag'}
4518 def __init__(self, info=None, machinetag=None, volumetag=None):
4519 '''
4520 info : VolumeAttachmentInfo
4521 machinetag : str
4522 volumetag : str
4523 '''
4524 self.info = VolumeAttachmentInfo.from_json(info) if info else None
4525 self.machinetag = machinetag
4526 self.volumetag = volumetag
4527
4528
4529 class VolumeAttachmentParamsResult(Type):
4530 _toSchema = {'error': 'error', 'result': 'result'}
4531 _toPy = {'error': 'error', 'result': 'result'}
4532 def __init__(self, error=None, result=None):
4533 '''
4534 error : Error
4535 result : VolumeAttachmentParams
4536 '''
4537 self.error = Error.from_json(error) if error else None
4538 self.result = VolumeAttachmentParams.from_json(result) if result else None
4539
4540
4541 class VolumeAttachmentParamsResults(Type):
4542 _toSchema = {'results': 'results'}
4543 _toPy = {'results': 'results'}
4544 def __init__(self, results=None):
4545 '''
4546 results : typing.Sequence[~VolumeAttachmentParamsResult]
4547 '''
4548 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
4549
4550
4551 class VolumeAttachmentResult(Type):
4552 _toSchema = {'error': 'error', 'result': 'result'}
4553 _toPy = {'error': 'error', 'result': 'result'}
4554 def __init__(self, error=None, result=None):
4555 '''
4556 error : Error
4557 result : VolumeAttachment
4558 '''
4559 self.error = Error.from_json(error) if error else None
4560 self.result = VolumeAttachment.from_json(result) if result else None
4561
4562
4563 class VolumeAttachmentResults(Type):
4564 _toSchema = {'results': 'results'}
4565 _toPy = {'results': 'results'}
4566 def __init__(self, results=None):
4567 '''
4568 results : typing.Sequence[~VolumeAttachmentResult]
4569 '''
4570 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
4571
4572
4573 class VolumeAttachments(Type):
4574 _toSchema = {'volumeattachments': 'volumeattachments'}
4575 _toPy = {'volumeattachments': 'volumeattachments'}
4576 def __init__(self, volumeattachments=None):
4577 '''
4578 volumeattachments : typing.Sequence[~VolumeAttachment]
4579 '''
4580 self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []]
4581
4582
4583 class VolumeParamsResult(Type):
4584 _toSchema = {'error': 'error', 'result': 'result'}
4585 _toPy = {'error': 'error', 'result': 'result'}
4586 def __init__(self, error=None, result=None):
4587 '''
4588 error : Error
4589 result : VolumeParams
4590 '''
4591 self.error = Error.from_json(error) if error else None
4592 self.result = VolumeParams.from_json(result) if result else None
4593
4594
4595 class VolumeParamsResults(Type):
4596 _toSchema = {'results': 'results'}
4597 _toPy = {'results': 'results'}
4598 def __init__(self, results=None):
4599 '''
4600 results : typing.Sequence[~VolumeParamsResult]
4601 '''
4602 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
4603
4604
4605 class VolumeResult(Type):
4606 _toSchema = {'error': 'error', 'result': 'result'}
4607 _toPy = {'error': 'error', 'result': 'result'}
4608 def __init__(self, error=None, result=None):
4609 '''
4610 error : Error
4611 result : Volume
4612 '''
4613 self.error = Error.from_json(error) if error else None
4614 self.result = Volume.from_json(result) if result else None
4615
4616
4617 class VolumeResults(Type):
4618 _toSchema = {'results': 'results'}
4619 _toPy = {'results': 'results'}
4620 def __init__(self, results=None):
4621 '''
4622 results : typing.Sequence[~VolumeResult]
4623 '''
4624 self.results = [VolumeResult.from_json(o) for o in results or []]
4625
4626
4627 class Volumes(Type):
4628 _toSchema = {'volumes': 'volumes'}
4629 _toPy = {'volumes': 'volumes'}
4630 def __init__(self, volumes=None):
4631 '''
4632 volumes : typing.Sequence[~Volume]
4633 '''
4634 self.volumes = [Volume.from_json(o) for o in volumes or []]
4635
4636
4637 class SpaceResult(Type):
4638 _toSchema = {'error': 'Error', 'tag': 'Tag'}
4639 _toPy = {'Tag': 'tag', 'Error': 'error'}
4640 def __init__(self, error=None, tag=None):
4641 '''
4642 error : Error
4643 tag : str
4644 '''
4645 self.error = Error.from_json(error) if error else None
4646 self.tag = tag
4647
4648
4649 class SpaceResults(Type):
4650 _toSchema = {'results': 'Results'}
4651 _toPy = {'Results': 'results'}
4652 def __init__(self, results=None):
4653 '''
4654 results : typing.Sequence[~SpaceResult]
4655 '''
4656 self.results = [SpaceResult.from_json(o) for o in results or []]
4657
4658
4659 class ZoneResult(Type):
4660 _toSchema = {'available': 'Available', 'error': 'Error', 'name': 'Name'}
4661 _toPy = {'Error': 'error', 'Available': 'available', 'Name': 'name'}
4662 def __init__(self, available=None, error=None, name=None):
4663 '''
4664 available : bool
4665 error : Error
4666 name : str
4667 '''
4668 self.available = available
4669 self.error = Error.from_json(error) if error else None
4670 self.name = name
4671
4672
4673 class ZoneResults(Type):
4674 _toSchema = {'results': 'Results'}
4675 _toPy = {'Results': 'results'}
4676 def __init__(self, results=None):
4677 '''
4678 results : typing.Sequence[~ZoneResult]
4679 '''
4680 self.results = [ZoneResult.from_json(o) for o in results or []]
4681
4682
4683 class UndertakerModelInfo(Type):
4684 _toSchema = {'globalname': 'GlobalName', 'name': 'Name', 'life': 'Life', 'uuid': 'UUID', 'issystem': 'IsSystem'}
4685 _toPy = {'UUID': 'uuid', 'Name': 'name', 'Life': 'life', 'GlobalName': 'globalname', 'IsSystem': 'issystem'}
4686 def __init__(self, globalname=None, issystem=None, life=None, name=None, uuid=None):
4687 '''
4688 globalname : str
4689 issystem : bool
4690 life : str
4691 name : str
4692 uuid : str
4693 '''
4694 self.globalname = globalname
4695 self.issystem = issystem
4696 self.life = life
4697 self.name = name
4698 self.uuid = uuid
4699
4700
4701 class UndertakerModelInfoResult(Type):
4702 _toSchema = {'error': 'Error', 'result': 'Result'}
4703 _toPy = {'Error': 'error', 'Result': 'result'}
4704 def __init__(self, error=None, result=None):
4705 '''
4706 error : Error
4707 result : UndertakerModelInfo
4708 '''
4709 self.error = Error.from_json(error) if error else None
4710 self.result = UndertakerModelInfo.from_json(result) if result else None
4711
4712
4713 class CharmURL(Type):
4714 _toSchema = {'url': 'URL'}
4715 _toPy = {'URL': 'url'}
4716 def __init__(self, url=None):
4717 '''
4718 url : str
4719 '''
4720 self.url = url
4721
4722
4723 class CharmURLs(Type):
4724 _toSchema = {'urls': 'URLs'}
4725 _toPy = {'URLs': 'urls'}
4726 def __init__(self, urls=None):
4727 '''
4728 urls : typing.Sequence[~CharmURL]
4729 '''
4730 self.urls = [CharmURL.from_json(o) for o in urls or []]
4731
4732
4733 class ConfigSettingsResult(Type):
4734 _toSchema = {'error': 'Error', 'settings': 'Settings'}
4735 _toPy = {'Error': 'error', 'Settings': 'settings'}
4736 def __init__(self, error=None, settings=None):
4737 '''
4738 error : Error
4739 settings : typing.Mapping[str, typing.Any]
4740 '''
4741 self.error = Error.from_json(error) if error else None
4742 self.settings = settings
4743
4744
4745 class ConfigSettingsResults(Type):
4746 _toSchema = {'results': 'Results'}
4747 _toPy = {'Results': 'results'}
4748 def __init__(self, results=None):
4749 '''
4750 results : typing.Sequence[~ConfigSettingsResult]
4751 '''
4752 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
4753
4754
4755 class Endpoint(Type):
4756 _toSchema = {'relation': 'Relation', 'servicename': 'ServiceName'}
4757 _toPy = {'Relation': 'relation', 'ServiceName': 'servicename'}
4758 def __init__(self, relation=None, servicename=None):
4759 '''
4760 relation : Relation
4761 servicename : str
4762 '''
4763 self.relation = Relation.from_json(relation) if relation else None
4764 self.servicename = servicename
4765
4766
4767 class EntitiesCharmURL(Type):
4768 _toSchema = {'entities': 'Entities'}
4769 _toPy = {'Entities': 'entities'}
4770 def __init__(self, entities=None):
4771 '''
4772 entities : typing.Sequence[~EntityCharmURL]
4773 '''
4774 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
4775
4776
4777 class EntitiesPortRanges(Type):
4778 _toSchema = {'entities': 'Entities'}
4779 _toPy = {'Entities': 'entities'}
4780 def __init__(self, entities=None):
4781 '''
4782 entities : typing.Sequence[~EntityPortRange]
4783 '''
4784 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
4785
4786
4787 class EntityCharmURL(Type):
4788 _toSchema = {'charmurl': 'CharmURL', 'tag': 'Tag'}
4789 _toPy = {'Tag': 'tag', 'CharmURL': 'charmurl'}
4790 def __init__(self, charmurl=None, tag=None):
4791 '''
4792 charmurl : str
4793 tag : str
4794 '''
4795 self.charmurl = charmurl
4796 self.tag = tag
4797
4798
4799 class EntityPortRange(Type):
4800 _toSchema = {'protocol': 'Protocol', 'fromport': 'FromPort', 'tag': 'Tag', 'toport': 'ToPort'}
4801 _toPy = {'Tag': 'tag', 'ToPort': 'toport', 'Protocol': 'protocol', 'FromPort': 'fromport'}
4802 def __init__(self, fromport=None, protocol=None, tag=None, toport=None):
4803 '''
4804 fromport : int
4805 protocol : str
4806 tag : str
4807 toport : int
4808 '''
4809 self.fromport = fromport
4810 self.protocol = protocol
4811 self.tag = tag
4812 self.toport = toport
4813
4814
4815 class GetLeadershipSettingsBulkResults(Type):
4816 _toSchema = {'results': 'Results'}
4817 _toPy = {'Results': 'results'}
4818 def __init__(self, results=None):
4819 '''
4820 results : typing.Sequence[~GetLeadershipSettingsResult]
4821 '''
4822 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
4823
4824
4825 class GetLeadershipSettingsResult(Type):
4826 _toSchema = {'error': 'Error', 'settings': 'Settings'}
4827 _toPy = {'Error': 'error', 'Settings': 'settings'}
4828 def __init__(self, error=None, settings=None):
4829 '''
4830 error : Error
4831 settings : typing.Mapping[str, str]
4832 '''
4833 self.error = Error.from_json(error) if error else None
4834 self.settings = settings
4835
4836
4837 class IntResult(Type):
4838 _toSchema = {'error': 'Error', 'result': 'Result'}
4839 _toPy = {'Error': 'error', 'Result': 'result'}
4840 def __init__(self, error=None, result=None):
4841 '''
4842 error : Error
4843 result : int
4844 '''
4845 self.error = Error.from_json(error) if error else None
4846 self.result = result
4847
4848
4849 class IntResults(Type):
4850 _toSchema = {'results': 'Results'}
4851 _toPy = {'Results': 'results'}
4852 def __init__(self, results=None):
4853 '''
4854 results : typing.Sequence[~IntResult]
4855 '''
4856 self.results = [IntResult.from_json(o) for o in results or []]
4857
4858
4859 class MergeLeadershipSettingsBulkParams(Type):
4860 _toSchema = {'params': 'Params'}
4861 _toPy = {'Params': 'params'}
4862 def __init__(self, params=None):
4863 '''
4864 params : typing.Sequence[~MergeLeadershipSettingsParam]
4865 '''
4866 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
4867
4868
4869 class MergeLeadershipSettingsParam(Type):
4870 _toSchema = {'settings': 'Settings', 'servicetag': 'ServiceTag'}
4871 _toPy = {'Settings': 'settings', 'ServiceTag': 'servicetag'}
4872 def __init__(self, servicetag=None, settings=None):
4873 '''
4874 servicetag : str
4875 settings : typing.Mapping[str, str]
4876 '''
4877 self.servicetag = servicetag
4878 self.settings = settings
4879
4880
4881 class ModelResult(Type):
4882 _toSchema = {'error': 'Error', 'uuid': 'UUID', 'name': 'Name'}
4883 _toPy = {'Error': 'error', 'UUID': 'uuid', 'Name': 'name'}
4884 def __init__(self, error=None, name=None, uuid=None):
4885 '''
4886 error : Error
4887 name : str
4888 uuid : str
4889 '''
4890 self.error = Error.from_json(error) if error else None
4891 self.name = name
4892 self.uuid = uuid
4893
4894
4895 class RelationIds(Type):
4896 _toSchema = {'relationids': 'RelationIds'}
4897 _toPy = {'RelationIds': 'relationids'}
4898 def __init__(self, relationids=None):
4899 '''
4900 relationids : typing.Sequence[int]
4901 '''
4902 self.relationids = relationids
4903
4904
4905 class RelationResult(Type):
4906 _toSchema = {'endpoint': 'Endpoint', 'key': 'Key', 'error': 'Error', 'id_': 'Id', 'life': 'Life'}
4907 _toPy = {'Error': 'error', 'Endpoint': 'endpoint', 'Key': 'key', 'Life': 'life', 'Id': 'id_'}
4908 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
4909 '''
4910 endpoint : Endpoint
4911 error : Error
4912 id_ : int
4913 key : str
4914 life : str
4915 '''
4916 self.endpoint = Endpoint.from_json(endpoint) if endpoint else None
4917 self.error = Error.from_json(error) if error else None
4918 self.id_ = id_
4919 self.key = key
4920 self.life = life
4921
4922
4923 class RelationResults(Type):
4924 _toSchema = {'results': 'Results'}
4925 _toPy = {'Results': 'results'}
4926 def __init__(self, results=None):
4927 '''
4928 results : typing.Sequence[~RelationResult]
4929 '''
4930 self.results = [RelationResult.from_json(o) for o in results or []]
4931
4932
4933 class RelationUnit(Type):
4934 _toSchema = {'unit': 'Unit', 'relation': 'Relation'}
4935 _toPy = {'Relation': 'relation', 'Unit': 'unit'}
4936 def __init__(self, relation=None, unit=None):
4937 '''
4938 relation : str
4939 unit : str
4940 '''
4941 self.relation = relation
4942 self.unit = unit
4943
4944
4945 class RelationUnitPair(Type):
4946 _toSchema = {'relation': 'Relation', 'localunit': 'LocalUnit', 'remoteunit': 'RemoteUnit'}
4947 _toPy = {'Relation': 'relation', 'RemoteUnit': 'remoteunit', 'LocalUnit': 'localunit'}
4948 def __init__(self, localunit=None, relation=None, remoteunit=None):
4949 '''
4950 localunit : str
4951 relation : str
4952 remoteunit : str
4953 '''
4954 self.localunit = localunit
4955 self.relation = relation
4956 self.remoteunit = remoteunit
4957
4958
4959 class RelationUnitPairs(Type):
4960 _toSchema = {'relationunitpairs': 'RelationUnitPairs'}
4961 _toPy = {'RelationUnitPairs': 'relationunitpairs'}
4962 def __init__(self, relationunitpairs=None):
4963 '''
4964 relationunitpairs : typing.Sequence[~RelationUnitPair]
4965 '''
4966 self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []]
4967
4968
4969 class RelationUnitSettings(Type):
4970 _toSchema = {'unit': 'Unit', 'relation': 'Relation', 'settings': 'Settings'}
4971 _toPy = {'Relation': 'relation', 'Unit': 'unit', 'Settings': 'settings'}
4972 def __init__(self, relation=None, settings=None, unit=None):
4973 '''
4974 relation : str
4975 settings : typing.Mapping[str, str]
4976 unit : str
4977 '''
4978 self.relation = relation
4979 self.settings = settings
4980 self.unit = unit
4981
4982
4983 class RelationUnits(Type):
4984 _toSchema = {'relationunits': 'RelationUnits'}
4985 _toPy = {'RelationUnits': 'relationunits'}
4986 def __init__(self, relationunits=None):
4987 '''
4988 relationunits : typing.Sequence[~RelationUnit]
4989 '''
4990 self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []]
4991
4992
4993 class RelationUnitsSettings(Type):
4994 _toSchema = {'relationunits': 'RelationUnits'}
4995 _toPy = {'RelationUnits': 'relationunits'}
4996 def __init__(self, relationunits=None):
4997 '''
4998 relationunits : typing.Sequence[~RelationUnitSettings]
4999 '''
5000 self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []]
5001
5002
5003 class RelationUnitsWatchResults(Type):
5004 _toSchema = {'results': 'Results'}
5005 _toPy = {'Results': 'results'}
5006 def __init__(self, results=None):
5007 '''
5008 results : typing.Sequence[~RelationUnitsWatchResult]
5009 '''
5010 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
5011
5012
5013 class ResolvedModeResult(Type):
5014 _toSchema = {'error': 'Error', 'mode': 'Mode'}
5015 _toPy = {'Error': 'error', 'Mode': 'mode'}
5016 def __init__(self, error=None, mode=None):
5017 '''
5018 error : Error
5019 mode : str
5020 '''
5021 self.error = Error.from_json(error) if error else None
5022 self.mode = mode
5023
5024
5025 class ResolvedModeResults(Type):
5026 _toSchema = {'results': 'Results'}
5027 _toPy = {'Results': 'results'}
5028 def __init__(self, results=None):
5029 '''
5030 results : typing.Sequence[~ResolvedModeResult]
5031 '''
5032 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
5033
5034
5035 class ServiceStatusResult(Type):
5036 _toSchema = {'units': 'Units', 'error': 'Error', 'service': 'Service'}
5037 _toPy = {'Error': 'error', 'Service': 'service', 'Units': 'units'}
5038 def __init__(self, error=None, service=None, units=None):
5039 '''
5040 error : Error
5041 service : StatusResult
5042 units : typing.Mapping[str, ~StatusResult]
5043 '''
5044 self.error = Error.from_json(error) if error else None
5045 self.service = StatusResult.from_json(service) if service else None
5046 self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()}
5047
5048
5049 class ServiceStatusResults(Type):
5050 _toSchema = {'results': 'Results'}
5051 _toPy = {'Results': 'results'}
5052 def __init__(self, results=None):
5053 '''
5054 results : typing.Sequence[~ServiceStatusResult]
5055 '''
5056 self.results = [ServiceStatusResult.from_json(o) for o in results or []]
5057
5058
5059 class SettingsResult(Type):
5060 _toSchema = {'error': 'Error', 'settings': 'Settings'}
5061 _toPy = {'Error': 'error', 'Settings': 'settings'}
5062 def __init__(self, error=None, settings=None):
5063 '''
5064 error : Error
5065 settings : typing.Mapping[str, str]
5066 '''
5067 self.error = Error.from_json(error) if error else None
5068 self.settings = settings
5069
5070
5071 class SettingsResults(Type):
5072 _toSchema = {'results': 'Results'}
5073 _toPy = {'Results': 'results'}
5074 def __init__(self, results=None):
5075 '''
5076 results : typing.Sequence[~SettingsResult]
5077 '''
5078 self.results = [SettingsResult.from_json(o) for o in results or []]
5079
5080
5081 class StorageAttachment(Type):
5082 _toSchema = {'ownertag': 'OwnerTag', 'unittag': 'UnitTag', 'location': 'Location', 'kind': 'Kind', 'life': 'Life', 'storagetag': 'StorageTag'}
5083 _toPy = {'UnitTag': 'unittag', 'OwnerTag': 'ownertag', 'Location': 'location', 'Life': 'life', 'StorageTag': 'storagetag', 'Kind': 'kind'}
5084 def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None):
5085 '''
5086 kind : int
5087 life : str
5088 location : str
5089 ownertag : str
5090 storagetag : str
5091 unittag : str
5092 '''
5093 self.kind = kind
5094 self.life = life
5095 self.location = location
5096 self.ownertag = ownertag
5097 self.storagetag = storagetag
5098 self.unittag = unittag
5099
5100
5101 class StorageAttachmentId(Type):
5102 _toSchema = {'unittag': 'unittag', 'storagetag': 'storagetag'}
5103 _toPy = {'unittag': 'unittag', 'storagetag': 'storagetag'}
5104 def __init__(self, storagetag=None, unittag=None):
5105 '''
5106 storagetag : str
5107 unittag : str
5108 '''
5109 self.storagetag = storagetag
5110 self.unittag = unittag
5111
5112
5113 class StorageAttachmentIds(Type):
5114 _toSchema = {'ids': 'ids'}
5115 _toPy = {'ids': 'ids'}
5116 def __init__(self, ids=None):
5117 '''
5118 ids : typing.Sequence[~StorageAttachmentId]
5119 '''
5120 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
5121
5122
5123 class StorageAttachmentIdsResult(Type):
5124 _toSchema = {'error': 'error', 'result': 'result'}
5125 _toPy = {'error': 'error', 'result': 'result'}
5126 def __init__(self, error=None, result=None):
5127 '''
5128 error : Error
5129 result : StorageAttachmentIds
5130 '''
5131 self.error = Error.from_json(error) if error else None
5132 self.result = StorageAttachmentIds.from_json(result) if result else None
5133
5134
5135 class StorageAttachmentIdsResults(Type):
5136 _toSchema = {'results': 'results'}
5137 _toPy = {'results': 'results'}
5138 def __init__(self, results=None):
5139 '''
5140 results : typing.Sequence[~StorageAttachmentIdsResult]
5141 '''
5142 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
5143
5144
5145 class StorageAttachmentResult(Type):
5146 _toSchema = {'error': 'error', 'result': 'result'}
5147 _toPy = {'error': 'error', 'result': 'result'}
5148 def __init__(self, error=None, result=None):
5149 '''
5150 error : Error
5151 result : StorageAttachment
5152 '''
5153 self.error = Error.from_json(error) if error else None
5154 self.result = StorageAttachment.from_json(result) if result else None
5155
5156
5157 class StorageAttachmentResults(Type):
5158 _toSchema = {'results': 'results'}
5159 _toPy = {'results': 'results'}
5160 def __init__(self, results=None):
5161 '''
5162 results : typing.Sequence[~StorageAttachmentResult]
5163 '''
5164 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
5165
5166
5167 class StringBoolResult(Type):
5168 _toSchema = {'error': 'Error', 'ok': 'Ok', 'result': 'Result'}
5169 _toPy = {'Error': 'error', 'Result': 'result', 'Ok': 'ok'}
5170 def __init__(self, error=None, ok=None, result=None):
5171 '''
5172 error : Error
5173 ok : bool
5174 result : str
5175 '''
5176 self.error = Error.from_json(error) if error else None
5177 self.ok = ok
5178 self.result = result
5179
5180
5181 class StringBoolResults(Type):
5182 _toSchema = {'results': 'Results'}
5183 _toPy = {'Results': 'results'}
5184 def __init__(self, results=None):
5185 '''
5186 results : typing.Sequence[~StringBoolResult]
5187 '''
5188 self.results = [StringBoolResult.from_json(o) for o in results or []]
5189
5190
5191 class UnitNetworkConfig(Type):
5192 _toSchema = {'unittag': 'UnitTag', 'bindingname': 'BindingName'}
5193 _toPy = {'UnitTag': 'unittag', 'BindingName': 'bindingname'}
5194 def __init__(self, bindingname=None, unittag=None):
5195 '''
5196 bindingname : str
5197 unittag : str
5198 '''
5199 self.bindingname = bindingname
5200 self.unittag = unittag
5201
5202
5203 class UnitNetworkConfigResult(Type):
5204 _toSchema = {'info': 'Info', 'error': 'Error'}
5205 _toPy = {'Info': 'info', 'Error': 'error'}
5206 def __init__(self, error=None, info=None):
5207 '''
5208 error : Error
5209 info : typing.Sequence[~NetworkConfig]
5210 '''
5211 self.error = Error.from_json(error) if error else None
5212 self.info = [NetworkConfig.from_json(o) for o in info or []]
5213
5214
5215 class UnitNetworkConfigResults(Type):
5216 _toSchema = {'results': 'Results'}
5217 _toPy = {'Results': 'results'}
5218 def __init__(self, results=None):
5219 '''
5220 results : typing.Sequence[~UnitNetworkConfigResult]
5221 '''
5222 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
5223
5224
5225 class UnitsNetworkConfig(Type):
5226 _toSchema = {'args': 'Args'}
5227 _toPy = {'Args': 'args'}
5228 def __init__(self, args=None):
5229 '''
5230 args : typing.Sequence[~UnitNetworkConfig]
5231 '''
5232 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
5233
5234
5235 class EntitiesVersion(Type):
5236 _toSchema = {'agenttools': 'AgentTools'}
5237 _toPy = {'AgentTools': 'agenttools'}
5238 def __init__(self, agenttools=None):
5239 '''
5240 agenttools : typing.Sequence[~EntityVersion]
5241 '''
5242 self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []]
5243
5244
5245 class EntityVersion(Type):
5246 _toSchema = {'tools': 'Tools', 'tag': 'Tag'}
5247 _toPy = {'Tag': 'tag', 'Tools': 'tools'}
5248 def __init__(self, tag=None, tools=None):
5249 '''
5250 tag : str
5251 tools : Version
5252 '''
5253 self.tag = tag
5254 self.tools = Version.from_json(tools) if tools else None
5255
5256
5257 class VersionResult(Type):
5258 _toSchema = {'error': 'Error', 'version': 'Version'}
5259 _toPy = {'Error': 'error', 'Version': 'version'}
5260 def __init__(self, error=None, version=None):
5261 '''
5262 error : Error
5263 version : Number
5264 '''
5265 self.error = Error.from_json(error) if error else None
5266 self.version = Number.from_json(version) if version else None
5267
5268
5269 class VersionResults(Type):
5270 _toSchema = {'results': 'Results'}
5271 _toPy = {'Results': 'results'}
5272 def __init__(self, results=None):
5273 '''
5274 results : typing.Sequence[~VersionResult]
5275 '''
5276 self.results = [VersionResult.from_json(o) for o in results or []]
5277
5278
5279 class AddUser(Type):
5280 _toSchema = {'model_access_permission': 'model-access-permission', 'display_name': 'display-name', 'username': 'username', 'shared_model_tags': 'shared-model-tags', 'password': 'password'}
5281 _toPy = {'password': 'password', 'model-access-permission': 'model_access_permission', 'display-name': 'display_name', 'username': 'username', 'shared-model-tags': 'shared_model_tags'}
5282 def __init__(self, display_name=None, model_access_permission=None, password=None, shared_model_tags=None, username=None):
5283 '''
5284 display_name : str
5285 model_access_permission : str
5286 password : str
5287 shared_model_tags : typing.Sequence[str]
5288 username : str
5289 '''
5290 self.display_name = display_name
5291 self.model_access_permission = model_access_permission
5292 self.password = password
5293 self.shared_model_tags = shared_model_tags
5294 self.username = username
5295
5296
5297 class AddUserResult(Type):
5298 _toSchema = {'error': 'error', 'tag': 'tag', 'secret_key': 'secret-key'}
5299 _toPy = {'error': 'error', 'secret-key': 'secret_key', 'tag': 'tag'}
5300 def __init__(self, error=None, secret_key=None, tag=None):
5301 '''
5302 error : Error
5303 secret_key : typing.Sequence[int]
5304 tag : str
5305 '''
5306 self.error = Error.from_json(error) if error else None
5307 self.secret_key = secret_key
5308 self.tag = tag
5309
5310
5311 class AddUserResults(Type):
5312 _toSchema = {'results': 'results'}
5313 _toPy = {'results': 'results'}
5314 def __init__(self, results=None):
5315 '''
5316 results : typing.Sequence[~AddUserResult]
5317 '''
5318 self.results = [AddUserResult.from_json(o) for o in results or []]
5319
5320
5321 class AddUsers(Type):
5322 _toSchema = {'users': 'users'}
5323 _toPy = {'users': 'users'}
5324 def __init__(self, users=None):
5325 '''
5326 users : typing.Sequence[~AddUser]
5327 '''
5328 self.users = [AddUser.from_json(o) for o in users or []]
5329
5330
5331 class MacaroonResult(Type):
5332 _toSchema = {'error': 'error', 'result': 'result'}
5333 _toPy = {'error': 'error', 'result': 'result'}
5334 def __init__(self, error=None, result=None):
5335 '''
5336 error : Error
5337 result : Macaroon
5338 '''
5339 self.error = Error.from_json(error) if error else None
5340 self.result = Macaroon.from_json(result) if result else None
5341
5342
5343 class MacaroonResults(Type):
5344 _toSchema = {'results': 'results'}
5345 _toPy = {'results': 'results'}
5346 def __init__(self, results=None):
5347 '''
5348 results : typing.Sequence[~MacaroonResult]
5349 '''
5350 self.results = [MacaroonResult.from_json(o) for o in results or []]
5351
5352
5353 class UserInfo(Type):
5354 _toSchema = {'created_by': 'created-by', 'username': 'username', 'display_name': 'display-name', 'last_connection': 'last-connection', 'disabled': 'disabled', 'date_created': 'date-created'}
5355 _toPy = {'username': 'username', 'created-by': 'created_by', 'display-name': 'display_name', 'disabled': 'disabled', 'last-connection': 'last_connection', 'date-created': 'date_created'}
5356 def __init__(self, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
5357 '''
5358 created_by : str
5359 date_created : str
5360 disabled : bool
5361 display_name : str
5362 last_connection : str
5363 username : str
5364 '''
5365 self.created_by = created_by
5366 self.date_created = date_created
5367 self.disabled = disabled
5368 self.display_name = display_name
5369 self.last_connection = last_connection
5370 self.username = username
5371
5372
5373 class UserInfoRequest(Type):
5374 _toSchema = {'include_disabled': 'include-disabled', 'entities': 'entities'}
5375 _toPy = {'include-disabled': 'include_disabled', 'entities': 'entities'}
5376 def __init__(self, entities=None, include_disabled=None):
5377 '''
5378 entities : typing.Sequence[~Entity]
5379 include_disabled : bool
5380 '''
5381 self.entities = [Entity.from_json(o) for o in entities or []]
5382 self.include_disabled = include_disabled
5383
5384
5385 class UserInfoResult(Type):
5386 _toSchema = {'error': 'error', 'result': 'result'}
5387 _toPy = {'error': 'error', 'result': 'result'}
5388 def __init__(self, error=None, result=None):
5389 '''
5390 error : Error
5391 result : UserInfo
5392 '''
5393 self.error = Error.from_json(error) if error else None
5394 self.result = UserInfo.from_json(result) if result else None
5395
5396
5397 class UserInfoResults(Type):
5398 _toSchema = {'results': 'results'}
5399 _toPy = {'results': 'results'}
5400 def __init__(self, results=None):
5401 '''
5402 results : typing.Sequence[~UserInfoResult]
5403 '''
5404 self.results = [UserInfoResult.from_json(o) for o in results or []]
5405
5406
5407 class Action(Type):
5408 name = 'Action'
5409 version = 1
5410 schema = {'definitions': {'Action': {'additionalProperties': False,
5411 'properties': {'name': {'type': 'string'},
5412 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5413 'type': 'object'}},
5414 'type': 'object'},
5415 'receiver': {'type': 'string'},
5416 'tag': {'type': 'string'}},
5417 'required': ['tag', 'receiver', 'name'],
5418 'type': 'object'},
5419 'ActionResult': {'additionalProperties': False,
5420 'properties': {'action': {'$ref': '#/definitions/Action'},
5421 'completed': {'format': 'date-time',
5422 'type': 'string'},
5423 'enqueued': {'format': 'date-time',
5424 'type': 'string'},
5425 'error': {'$ref': '#/definitions/Error'},
5426 'message': {'type': 'string'},
5427 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5428 'type': 'object'}},
5429 'type': 'object'},
5430 'started': {'format': 'date-time',
5431 'type': 'string'},
5432 'status': {'type': 'string'}},
5433 'type': 'object'},
5434 'ActionResults': {'additionalProperties': False,
5435 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5436 'type': 'array'}},
5437 'type': 'object'},
5438 'Actions': {'additionalProperties': False,
5439 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
5440 'type': 'array'}},
5441 'type': 'object'},
5442 'ActionsByName': {'additionalProperties': False,
5443 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5444 'type': 'array'},
5445 'error': {'$ref': '#/definitions/Error'},
5446 'name': {'type': 'string'}},
5447 'type': 'object'},
5448 'ActionsByNames': {'additionalProperties': False,
5449 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5450 'type': 'array'}},
5451 'type': 'object'},
5452 'ActionsByReceiver': {'additionalProperties': False,
5453 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5454 'type': 'array'},
5455 'error': {'$ref': '#/definitions/Error'},
5456 'receiver': {'type': 'string'}},
5457 'type': 'object'},
5458 'ActionsByReceivers': {'additionalProperties': False,
5459 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5460 'type': 'array'}},
5461 'type': 'object'},
5462 'Entities': {'additionalProperties': False,
5463 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5464 'type': 'array'}},
5465 'required': ['Entities'],
5466 'type': 'object'},
5467 'Entity': {'additionalProperties': False,
5468 'properties': {'Tag': {'type': 'string'}},
5469 'required': ['Tag'],
5470 'type': 'object'},
5471 'Error': {'additionalProperties': False,
5472 'properties': {'Code': {'type': 'string'},
5473 'Info': {'$ref': '#/definitions/ErrorInfo'},
5474 'Message': {'type': 'string'}},
5475 'required': ['Message', 'Code'],
5476 'type': 'object'},
5477 'ErrorInfo': {'additionalProperties': False,
5478 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5479 'MacaroonPath': {'type': 'string'}},
5480 'type': 'object'},
5481 'FindActionsByNames': {'additionalProperties': False,
5482 'properties': {'names': {'items': {'type': 'string'},
5483 'type': 'array'}},
5484 'type': 'object'},
5485 'FindTags': {'additionalProperties': False,
5486 'properties': {'prefixes': {'items': {'type': 'string'},
5487 'type': 'array'}},
5488 'required': ['prefixes'],
5489 'type': 'object'},
5490 'FindTagsResults': {'additionalProperties': False,
5491 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5492 'type': 'array'}},
5493 'type': 'object'}},
5494 'required': ['matches'],
5495 'type': 'object'},
5496 'Macaroon': {'additionalProperties': False,
5497 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5498 'type': 'array'},
5499 'data': {'items': {'type': 'integer'},
5500 'type': 'array'},
5501 'id': {'$ref': '#/definitions/packet'},
5502 'location': {'$ref': '#/definitions/packet'},
5503 'sig': {'items': {'type': 'integer'},
5504 'type': 'array'}},
5505 'required': ['data',
5506 'location',
5507 'id',
5508 'caveats',
5509 'sig'],
5510 'type': 'object'},
5511 'RunParams': {'additionalProperties': False,
5512 'properties': {'Commands': {'type': 'string'},
5513 'Machines': {'items': {'type': 'string'},
5514 'type': 'array'},
5515 'Services': {'items': {'type': 'string'},
5516 'type': 'array'},
5517 'Timeout': {'type': 'integer'},
5518 'Units': {'items': {'type': 'string'},
5519 'type': 'array'}},
5520 'required': ['Commands',
5521 'Timeout',
5522 'Machines',
5523 'Services',
5524 'Units'],
5525 'type': 'object'},
5526 'ServiceCharmActionsResult': {'additionalProperties': False,
5527 'properties': {'actions': {'$ref': '#/definitions/Actions'},
5528 'error': {'$ref': '#/definitions/Error'},
5529 'servicetag': {'type': 'string'}},
5530 'type': 'object'},
5531 'ServicesCharmActionsResults': {'additionalProperties': False,
5532 'properties': {'results': {'items': {'$ref': '#/definitions/ServiceCharmActionsResult'},
5533 'type': 'array'}},
5534 'type': 'object'},
5535 'caveat': {'additionalProperties': False,
5536 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5537 'location': {'$ref': '#/definitions/packet'},
5538 'verificationId': {'$ref': '#/definitions/packet'}},
5539 'required': ['location',
5540 'caveatId',
5541 'verificationId'],
5542 'type': 'object'},
5543 'packet': {'additionalProperties': False,
5544 'properties': {'headerLen': {'type': 'integer'},
5545 'start': {'type': 'integer'},
5546 'totalLen': {'type': 'integer'}},
5547 'required': ['start', 'totalLen', 'headerLen'],
5548 'type': 'object'}},
5549 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5550 'Result': {'$ref': '#/definitions/ActionResults'}},
5551 'type': 'object'},
5552 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5553 'Result': {'$ref': '#/definitions/ActionResults'}},
5554 'type': 'object'},
5555 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5556 'Result': {'$ref': '#/definitions/ActionResults'}},
5557 'type': 'object'},
5558 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
5559 'Result': {'$ref': '#/definitions/FindTagsResults'}},
5560 'type': 'object'},
5561 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
5562 'Result': {'$ref': '#/definitions/ActionsByNames'}},
5563 'type': 'object'},
5564 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5565 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5566 'type': 'object'},
5567 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5568 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5569 'type': 'object'},
5570 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5571 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5572 'type': 'object'},
5573 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5574 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5575 'type': 'object'},
5576 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5577 'Result': {'$ref': '#/definitions/ActionResults'}},
5578 'type': 'object'},
5579 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5580 'Result': {'$ref': '#/definitions/ActionResults'}},
5581 'type': 'object'},
5582 'ServicesCharmActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5583 'Result': {'$ref': '#/definitions/ServicesCharmActionsResults'}},
5584 'type': 'object'}},
5585 'type': 'object'}
5586
5587
5588 @ReturnMapping(ActionResults)
5589 async def Actions(self, entities):
5590 '''
5591 entities : typing.Sequence[~Entity]
5592 Returns -> typing.Sequence[~ActionResult]
5593 '''
5594 # map input types to rpc msg
5595 params = dict()
5596 msg = dict(Type='Action', Request='Actions', Version=1, Params=params)
5597 params['Entities'] = entities
5598 reply = await self.rpc(msg)
5599 return reply
5600
5601
5602
5603 @ReturnMapping(ActionResults)
5604 async def Cancel(self, entities):
5605 '''
5606 entities : typing.Sequence[~Entity]
5607 Returns -> typing.Sequence[~ActionResult]
5608 '''
5609 # map input types to rpc msg
5610 params = dict()
5611 msg = dict(Type='Action', Request='Cancel', Version=1, Params=params)
5612 params['Entities'] = entities
5613 reply = await self.rpc(msg)
5614 return reply
5615
5616
5617
5618 @ReturnMapping(ActionResults)
5619 async def Enqueue(self, actions):
5620 '''
5621 actions : typing.Sequence[~Action]
5622 Returns -> typing.Sequence[~ActionResult]
5623 '''
5624 # map input types to rpc msg
5625 params = dict()
5626 msg = dict(Type='Action', Request='Enqueue', Version=1, Params=params)
5627 params['actions'] = actions
5628 reply = await self.rpc(msg)
5629 return reply
5630
5631
5632
5633 @ReturnMapping(FindTagsResults)
5634 async def FindActionTagsByPrefix(self, prefixes):
5635 '''
5636 prefixes : typing.Sequence[str]
5637 Returns -> typing.Sequence[~Entity]
5638 '''
5639 # map input types to rpc msg
5640 params = dict()
5641 msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=1, Params=params)
5642 params['prefixes'] = prefixes
5643 reply = await self.rpc(msg)
5644 return reply
5645
5646
5647
5648 @ReturnMapping(ActionsByNames)
5649 async def FindActionsByNames(self, names):
5650 '''
5651 names : typing.Sequence[str]
5652 Returns -> typing.Sequence[~ActionsByName]
5653 '''
5654 # map input types to rpc msg
5655 params = dict()
5656 msg = dict(Type='Action', Request='FindActionsByNames', Version=1, Params=params)
5657 params['names'] = names
5658 reply = await self.rpc(msg)
5659 return reply
5660
5661
5662
5663 @ReturnMapping(ActionsByReceivers)
5664 async def ListAll(self, entities):
5665 '''
5666 entities : typing.Sequence[~Entity]
5667 Returns -> typing.Sequence[~ActionsByReceiver]
5668 '''
5669 # map input types to rpc msg
5670 params = dict()
5671 msg = dict(Type='Action', Request='ListAll', Version=1, Params=params)
5672 params['Entities'] = entities
5673 reply = await self.rpc(msg)
5674 return reply
5675
5676
5677
5678 @ReturnMapping(ActionsByReceivers)
5679 async def ListCompleted(self, entities):
5680 '''
5681 entities : typing.Sequence[~Entity]
5682 Returns -> typing.Sequence[~ActionsByReceiver]
5683 '''
5684 # map input types to rpc msg
5685 params = dict()
5686 msg = dict(Type='Action', Request='ListCompleted', Version=1, Params=params)
5687 params['Entities'] = entities
5688 reply = await self.rpc(msg)
5689 return reply
5690
5691
5692
5693 @ReturnMapping(ActionsByReceivers)
5694 async def ListPending(self, entities):
5695 '''
5696 entities : typing.Sequence[~Entity]
5697 Returns -> typing.Sequence[~ActionsByReceiver]
5698 '''
5699 # map input types to rpc msg
5700 params = dict()
5701 msg = dict(Type='Action', Request='ListPending', Version=1, Params=params)
5702 params['Entities'] = entities
5703 reply = await self.rpc(msg)
5704 return reply
5705
5706
5707
5708 @ReturnMapping(ActionsByReceivers)
5709 async def ListRunning(self, entities):
5710 '''
5711 entities : typing.Sequence[~Entity]
5712 Returns -> typing.Sequence[~ActionsByReceiver]
5713 '''
5714 # map input types to rpc msg
5715 params = dict()
5716 msg = dict(Type='Action', Request='ListRunning', Version=1, Params=params)
5717 params['Entities'] = entities
5718 reply = await self.rpc(msg)
5719 return reply
5720
5721
5722
5723 @ReturnMapping(ActionResults)
5724 async def Run(self, commands, machines, services, timeout, units):
5725 '''
5726 commands : str
5727 machines : typing.Sequence[str]
5728 services : typing.Sequence[str]
5729 timeout : int
5730 units : typing.Sequence[str]
5731 Returns -> typing.Sequence[~ActionResult]
5732 '''
5733 # map input types to rpc msg
5734 params = dict()
5735 msg = dict(Type='Action', Request='Run', Version=1, Params=params)
5736 params['Commands'] = commands
5737 params['Machines'] = machines
5738 params['Services'] = services
5739 params['Timeout'] = timeout
5740 params['Units'] = units
5741 reply = await self.rpc(msg)
5742 return reply
5743
5744
5745
5746 @ReturnMapping(ActionResults)
5747 async def RunOnAllMachines(self, commands, machines, services, timeout, units):
5748 '''
5749 commands : str
5750 machines : typing.Sequence[str]
5751 services : typing.Sequence[str]
5752 timeout : int
5753 units : typing.Sequence[str]
5754 Returns -> typing.Sequence[~ActionResult]
5755 '''
5756 # map input types to rpc msg
5757 params = dict()
5758 msg = dict(Type='Action', Request='RunOnAllMachines', Version=1, Params=params)
5759 params['Commands'] = commands
5760 params['Machines'] = machines
5761 params['Services'] = services
5762 params['Timeout'] = timeout
5763 params['Units'] = units
5764 reply = await self.rpc(msg)
5765 return reply
5766
5767
5768
5769 @ReturnMapping(ServicesCharmActionsResults)
5770 async def ServicesCharmActions(self, entities):
5771 '''
5772 entities : typing.Sequence[~Entity]
5773 Returns -> typing.Sequence[~ServiceCharmActionsResult]
5774 '''
5775 # map input types to rpc msg
5776 params = dict()
5777 msg = dict(Type='Action', Request='ServicesCharmActions', Version=1, Params=params)
5778 params['Entities'] = entities
5779 reply = await self.rpc(msg)
5780 return reply
5781
5782
5783 class Addresser(Type):
5784 name = 'Addresser'
5785 version = 2
5786 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
5787 'properties': {'Error': {'$ref': '#/definitions/Error'},
5788 'Result': {'type': 'boolean'}},
5789 'required': ['Error', 'Result'],
5790 'type': 'object'},
5791 'EntitiesWatchResult': {'additionalProperties': False,
5792 'properties': {'Changes': {'items': {'type': 'string'},
5793 'type': 'array'},
5794 'EntityWatcherId': {'type': 'string'},
5795 'Error': {'$ref': '#/definitions/Error'}},
5796 'required': ['EntityWatcherId',
5797 'Changes',
5798 'Error'],
5799 'type': 'object'},
5800 'Error': {'additionalProperties': False,
5801 'properties': {'Code': {'type': 'string'},
5802 'Info': {'$ref': '#/definitions/ErrorInfo'},
5803 'Message': {'type': 'string'}},
5804 'required': ['Message', 'Code'],
5805 'type': 'object'},
5806 'ErrorInfo': {'additionalProperties': False,
5807 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5808 'MacaroonPath': {'type': 'string'}},
5809 'type': 'object'},
5810 'ErrorResult': {'additionalProperties': False,
5811 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5812 'required': ['Error'],
5813 'type': 'object'},
5814 'Macaroon': {'additionalProperties': False,
5815 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5816 'type': 'array'},
5817 'data': {'items': {'type': 'integer'},
5818 'type': 'array'},
5819 'id': {'$ref': '#/definitions/packet'},
5820 'location': {'$ref': '#/definitions/packet'},
5821 'sig': {'items': {'type': 'integer'},
5822 'type': 'array'}},
5823 'required': ['data',
5824 'location',
5825 'id',
5826 'caveats',
5827 'sig'],
5828 'type': 'object'},
5829 'caveat': {'additionalProperties': False,
5830 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5831 'location': {'$ref': '#/definitions/packet'},
5832 'verificationId': {'$ref': '#/definitions/packet'}},
5833 'required': ['location',
5834 'caveatId',
5835 'verificationId'],
5836 'type': 'object'},
5837 'packet': {'additionalProperties': False,
5838 'properties': {'headerLen': {'type': 'integer'},
5839 'start': {'type': 'integer'},
5840 'totalLen': {'type': 'integer'}},
5841 'required': ['start', 'totalLen', 'headerLen'],
5842 'type': 'object'}},
5843 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
5844 'type': 'object'},
5845 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
5846 'type': 'object'},
5847 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
5848 'type': 'object'}},
5849 'type': 'object'}
5850
5851
5852 @ReturnMapping(BoolResult)
5853 async def CanDeallocateAddresses(self):
5854 '''
5855
5856 Returns -> typing.Union[_ForwardRef('Error'), bool]
5857 '''
5858 # map input types to rpc msg
5859 params = dict()
5860 msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params)
5861
5862 reply = await self.rpc(msg)
5863 return reply
5864
5865
5866
5867 @ReturnMapping(ErrorResult)
5868 async def CleanupIPAddresses(self):
5869 '''
5870
5871 Returns -> Error
5872 '''
5873 # map input types to rpc msg
5874 params = dict()
5875 msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params)
5876
5877 reply = await self.rpc(msg)
5878 return reply
5879
5880
5881
5882 @ReturnMapping(EntitiesWatchResult)
5883 async def WatchIPAddresses(self):
5884 '''
5885
5886 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
5887 '''
5888 # map input types to rpc msg
5889 params = dict()
5890 msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params)
5891
5892 reply = await self.rpc(msg)
5893 return reply
5894
5895
5896 class Agent(Type):
5897 name = 'Agent'
5898 version = 2
5899 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
5900 'properties': {'ContainerType': {'type': 'string'},
5901 'Error': {'$ref': '#/definitions/Error'},
5902 'Jobs': {'items': {'type': 'string'},
5903 'type': 'array'},
5904 'Life': {'type': 'string'}},
5905 'required': ['Life',
5906 'Jobs',
5907 'ContainerType',
5908 'Error'],
5909 'type': 'object'},
5910 'AgentGetEntitiesResults': {'additionalProperties': False,
5911 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
5912 'type': 'array'}},
5913 'required': ['Entities'],
5914 'type': 'object'},
5915 'Entities': {'additionalProperties': False,
5916 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5917 'type': 'array'}},
5918 'required': ['Entities'],
5919 'type': 'object'},
5920 'Entity': {'additionalProperties': False,
5921 'properties': {'Tag': {'type': 'string'}},
5922 'required': ['Tag'],
5923 'type': 'object'},
5924 'EntityPassword': {'additionalProperties': False,
5925 'properties': {'Password': {'type': 'string'},
5926 'Tag': {'type': 'string'}},
5927 'required': ['Tag', 'Password'],
5928 'type': 'object'},
5929 'EntityPasswords': {'additionalProperties': False,
5930 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5931 'type': 'array'}},
5932 'required': ['Changes'],
5933 'type': 'object'},
5934 'Error': {'additionalProperties': False,
5935 'properties': {'Code': {'type': 'string'},
5936 'Info': {'$ref': '#/definitions/ErrorInfo'},
5937 'Message': {'type': 'string'}},
5938 'required': ['Message', 'Code'],
5939 'type': 'object'},
5940 'ErrorInfo': {'additionalProperties': False,
5941 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5942 'MacaroonPath': {'type': 'string'}},
5943 'type': 'object'},
5944 'ErrorResult': {'additionalProperties': False,
5945 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5946 'required': ['Error'],
5947 'type': 'object'},
5948 'ErrorResults': {'additionalProperties': False,
5949 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
5950 'type': 'array'}},
5951 'required': ['Results'],
5952 'type': 'object'},
5953 'IsMasterResult': {'additionalProperties': False,
5954 'properties': {'Master': {'type': 'boolean'}},
5955 'required': ['Master'],
5956 'type': 'object'},
5957 'Macaroon': {'additionalProperties': False,
5958 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5959 'type': 'array'},
5960 'data': {'items': {'type': 'integer'},
5961 'type': 'array'},
5962 'id': {'$ref': '#/definitions/packet'},
5963 'location': {'$ref': '#/definitions/packet'},
5964 'sig': {'items': {'type': 'integer'},
5965 'type': 'array'}},
5966 'required': ['data',
5967 'location',
5968 'id',
5969 'caveats',
5970 'sig'],
5971 'type': 'object'},
5972 'ModelConfigResult': {'additionalProperties': False,
5973 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
5974 'type': 'object'}},
5975 'type': 'object'}},
5976 'required': ['Config'],
5977 'type': 'object'},
5978 'NotifyWatchResult': {'additionalProperties': False,
5979 'properties': {'Error': {'$ref': '#/definitions/Error'},
5980 'NotifyWatcherId': {'type': 'string'}},
5981 'required': ['NotifyWatcherId', 'Error'],
5982 'type': 'object'},
5983 'StateServingInfo': {'additionalProperties': False,
5984 'properties': {'APIPort': {'type': 'integer'},
5985 'CAPrivateKey': {'type': 'string'},
5986 'Cert': {'type': 'string'},
5987 'PrivateKey': {'type': 'string'},
5988 'SharedSecret': {'type': 'string'},
5989 'StatePort': {'type': 'integer'},
5990 'SystemIdentity': {'type': 'string'}},
5991 'required': ['APIPort',
5992 'StatePort',
5993 'Cert',
5994 'PrivateKey',
5995 'CAPrivateKey',
5996 'SharedSecret',
5997 'SystemIdentity'],
5998 'type': 'object'},
5999 'caveat': {'additionalProperties': False,
6000 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6001 'location': {'$ref': '#/definitions/packet'},
6002 'verificationId': {'$ref': '#/definitions/packet'}},
6003 'required': ['location',
6004 'caveatId',
6005 'verificationId'],
6006 'type': 'object'},
6007 'packet': {'additionalProperties': False,
6008 'properties': {'headerLen': {'type': 'integer'},
6009 'start': {'type': 'integer'},
6010 'totalLen': {'type': 'integer'}},
6011 'required': ['start', 'totalLen', 'headerLen'],
6012 'type': 'object'}},
6013 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6014 'Result': {'$ref': '#/definitions/ErrorResults'}},
6015 'type': 'object'},
6016 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6017 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6018 'type': 'object'},
6019 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6020 'type': 'object'},
6021 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6022 'type': 'object'},
6023 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6024 'Result': {'$ref': '#/definitions/ErrorResults'}},
6025 'type': 'object'},
6026 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6027 'type': 'object'},
6028 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6029 'type': 'object'}},
6030 'type': 'object'}
6031
6032
6033 @ReturnMapping(ErrorResults)
6034 async def ClearReboot(self, entities):
6035 '''
6036 entities : typing.Sequence[~Entity]
6037 Returns -> typing.Sequence[~ErrorResult]
6038 '''
6039 # map input types to rpc msg
6040 params = dict()
6041 msg = dict(Type='Agent', Request='ClearReboot', Version=2, Params=params)
6042 params['Entities'] = entities
6043 reply = await self.rpc(msg)
6044 return reply
6045
6046
6047
6048 @ReturnMapping(AgentGetEntitiesResults)
6049 async def GetEntities(self, entities):
6050 '''
6051 entities : typing.Sequence[~Entity]
6052 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6053 '''
6054 # map input types to rpc msg
6055 params = dict()
6056 msg = dict(Type='Agent', Request='GetEntities', Version=2, Params=params)
6057 params['Entities'] = entities
6058 reply = await self.rpc(msg)
6059 return reply
6060
6061
6062
6063 @ReturnMapping(IsMasterResult)
6064 async def IsMaster(self):
6065 '''
6066
6067 Returns -> bool
6068 '''
6069 # map input types to rpc msg
6070 params = dict()
6071 msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params)
6072
6073 reply = await self.rpc(msg)
6074 return reply
6075
6076
6077
6078 @ReturnMapping(ModelConfigResult)
6079 async def ModelConfig(self):
6080 '''
6081
6082 Returns -> typing.Mapping[str, typing.Any]
6083 '''
6084 # map input types to rpc msg
6085 params = dict()
6086 msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params)
6087
6088 reply = await self.rpc(msg)
6089 return reply
6090
6091
6092
6093 @ReturnMapping(ErrorResults)
6094 async def SetPasswords(self, changes):
6095 '''
6096 changes : typing.Sequence[~EntityPassword]
6097 Returns -> typing.Sequence[~ErrorResult]
6098 '''
6099 # map input types to rpc msg
6100 params = dict()
6101 msg = dict(Type='Agent', Request='SetPasswords', Version=2, Params=params)
6102 params['Changes'] = changes
6103 reply = await self.rpc(msg)
6104 return reply
6105
6106
6107
6108 @ReturnMapping(StateServingInfo)
6109 async def StateServingInfo(self):
6110 '''
6111
6112 Returns -> typing.Union[int, str]
6113 '''
6114 # map input types to rpc msg
6115 params = dict()
6116 msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params)
6117
6118 reply = await self.rpc(msg)
6119 return reply
6120
6121
6122
6123 @ReturnMapping(NotifyWatchResult)
6124 async def WatchForModelConfigChanges(self):
6125 '''
6126
6127 Returns -> typing.Union[_ForwardRef('Error'), str]
6128 '''
6129 # map input types to rpc msg
6130 params = dict()
6131 msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params)
6132
6133 reply = await self.rpc(msg)
6134 return reply
6135
6136
6137 class AgentTools(Type):
6138 name = 'AgentTools'
6139 version = 1
6140 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6141
6142
6143 @ReturnMapping(None)
6144 async def UpdateToolsAvailable(self):
6145 '''
6146
6147 Returns -> None
6148 '''
6149 # map input types to rpc msg
6150 params = dict()
6151 msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params)
6152
6153 reply = await self.rpc(msg)
6154 return reply
6155
6156
6157 class AllModelWatcher(Type):
6158 name = 'AllModelWatcher'
6159 version = 2
6160 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6161 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6162 'type': 'array'}},
6163 'required': ['Deltas'],
6164 'type': 'object'},
6165 'Delta': {'additionalProperties': False,
6166 'properties': {'Entity': {'additionalProperties': True,
6167 'type': 'object'},
6168 'Removed': {'type': 'boolean'}},
6169 'required': ['Removed', 'Entity'],
6170 'type': 'object'}},
6171 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6172 'type': 'object'},
6173 'Stop': {'type': 'object'}},
6174 'type': 'object'}
6175
6176
6177 @ReturnMapping(AllWatcherNextResults)
6178 async def Next(self):
6179 '''
6180
6181 Returns -> typing.Sequence[~Delta]
6182 '''
6183 # map input types to rpc msg
6184 params = dict()
6185 msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params)
6186
6187 reply = await self.rpc(msg)
6188 return reply
6189
6190
6191
6192 @ReturnMapping(None)
6193 async def Stop(self):
6194 '''
6195
6196 Returns -> None
6197 '''
6198 # map input types to rpc msg
6199 params = dict()
6200 msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params)
6201
6202 reply = await self.rpc(msg)
6203 return reply
6204
6205
6206 class AllWatcher(Type):
6207 name = 'AllWatcher'
6208 version = 1
6209 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6210 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6211 'type': 'array'}},
6212 'required': ['Deltas'],
6213 'type': 'object'},
6214 'Delta': {'additionalProperties': False,
6215 'properties': {'Entity': {'additionalProperties': True,
6216 'type': 'object'},
6217 'Removed': {'type': 'boolean'}},
6218 'required': ['Removed', 'Entity'],
6219 'type': 'object'}},
6220 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6221 'type': 'object'},
6222 'Stop': {'type': 'object'}},
6223 'type': 'object'}
6224
6225
6226 @ReturnMapping(AllWatcherNextResults)
6227 async def Next(self):
6228 '''
6229
6230 Returns -> typing.Sequence[~Delta]
6231 '''
6232 # map input types to rpc msg
6233 params = dict()
6234 msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params)
6235
6236 reply = await self.rpc(msg)
6237 return reply
6238
6239
6240
6241 @ReturnMapping(None)
6242 async def Stop(self):
6243 '''
6244
6245 Returns -> None
6246 '''
6247 # map input types to rpc msg
6248 params = dict()
6249 msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params)
6250
6251 reply = await self.rpc(msg)
6252 return reply
6253
6254
6255 class Annotations(Type):
6256 name = 'Annotations'
6257 version = 2
6258 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6259 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6260 'type': 'object'},
6261 'EntityTag': {'type': 'string'},
6262 'Error': {'$ref': '#/definitions/ErrorResult'}},
6263 'required': ['EntityTag',
6264 'Annotations',
6265 'Error'],
6266 'type': 'object'},
6267 'AnnotationsGetResults': {'additionalProperties': False,
6268 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6269 'type': 'array'}},
6270 'required': ['Results'],
6271 'type': 'object'},
6272 'AnnotationsSet': {'additionalProperties': False,
6273 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6274 'type': 'array'}},
6275 'required': ['Annotations'],
6276 'type': 'object'},
6277 'Entities': {'additionalProperties': False,
6278 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6279 'type': 'array'}},
6280 'required': ['Entities'],
6281 'type': 'object'},
6282 'Entity': {'additionalProperties': False,
6283 'properties': {'Tag': {'type': 'string'}},
6284 'required': ['Tag'],
6285 'type': 'object'},
6286 'EntityAnnotations': {'additionalProperties': False,
6287 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6288 'type': 'object'},
6289 'EntityTag': {'type': 'string'}},
6290 'required': ['EntityTag', 'Annotations'],
6291 'type': 'object'},
6292 'Error': {'additionalProperties': False,
6293 'properties': {'Code': {'type': 'string'},
6294 'Info': {'$ref': '#/definitions/ErrorInfo'},
6295 'Message': {'type': 'string'}},
6296 'required': ['Message', 'Code'],
6297 'type': 'object'},
6298 'ErrorInfo': {'additionalProperties': False,
6299 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6300 'MacaroonPath': {'type': 'string'}},
6301 'type': 'object'},
6302 'ErrorResult': {'additionalProperties': False,
6303 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6304 'required': ['Error'],
6305 'type': 'object'},
6306 'ErrorResults': {'additionalProperties': False,
6307 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6308 'type': 'array'}},
6309 'required': ['Results'],
6310 'type': 'object'},
6311 'Macaroon': {'additionalProperties': False,
6312 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6313 'type': 'array'},
6314 'data': {'items': {'type': 'integer'},
6315 'type': 'array'},
6316 'id': {'$ref': '#/definitions/packet'},
6317 'location': {'$ref': '#/definitions/packet'},
6318 'sig': {'items': {'type': 'integer'},
6319 'type': 'array'}},
6320 'required': ['data',
6321 'location',
6322 'id',
6323 'caveats',
6324 'sig'],
6325 'type': 'object'},
6326 'caveat': {'additionalProperties': False,
6327 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6328 'location': {'$ref': '#/definitions/packet'},
6329 'verificationId': {'$ref': '#/definitions/packet'}},
6330 'required': ['location',
6331 'caveatId',
6332 'verificationId'],
6333 'type': 'object'},
6334 'packet': {'additionalProperties': False,
6335 'properties': {'headerLen': {'type': 'integer'},
6336 'start': {'type': 'integer'},
6337 'totalLen': {'type': 'integer'}},
6338 'required': ['start', 'totalLen', 'headerLen'],
6339 'type': 'object'}},
6340 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6341 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6342 'type': 'object'},
6343 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6344 'Result': {'$ref': '#/definitions/ErrorResults'}},
6345 'type': 'object'}},
6346 'type': 'object'}
6347
6348
6349 @ReturnMapping(AnnotationsGetResults)
6350 async def Get(self, entities):
6351 '''
6352 entities : typing.Sequence[~Entity]
6353 Returns -> typing.Sequence[~AnnotationsGetResult]
6354 '''
6355 # map input types to rpc msg
6356 params = dict()
6357 msg = dict(Type='Annotations', Request='Get', Version=2, Params=params)
6358 params['Entities'] = entities
6359 reply = await self.rpc(msg)
6360 return reply
6361
6362
6363
6364 @ReturnMapping(ErrorResults)
6365 async def Set(self, annotations):
6366 '''
6367 annotations : typing.Sequence[~EntityAnnotations]
6368 Returns -> typing.Sequence[~ErrorResult]
6369 '''
6370 # map input types to rpc msg
6371 params = dict()
6372 msg = dict(Type='Annotations', Request='Set', Version=2, Params=params)
6373 params['Annotations'] = annotations
6374 reply = await self.rpc(msg)
6375 return reply
6376
6377
6378 class Backups(Type):
6379 name = 'Backups'
6380 version = 1
6381 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
6382 'properties': {'Notes': {'type': 'string'}},
6383 'required': ['Notes'],
6384 'type': 'object'},
6385 'BackupsInfoArgs': {'additionalProperties': False,
6386 'properties': {'ID': {'type': 'string'}},
6387 'required': ['ID'],
6388 'type': 'object'},
6389 'BackupsListArgs': {'additionalProperties': False,
6390 'type': 'object'},
6391 'BackupsListResult': {'additionalProperties': False,
6392 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
6393 'type': 'array'}},
6394 'required': ['List'],
6395 'type': 'object'},
6396 'BackupsMetadataResult': {'additionalProperties': False,
6397 'properties': {'CACert': {'type': 'string'},
6398 'CAPrivateKey': {'type': 'string'},
6399 'Checksum': {'type': 'string'},
6400 'ChecksumFormat': {'type': 'string'},
6401 'Finished': {'format': 'date-time',
6402 'type': 'string'},
6403 'Hostname': {'type': 'string'},
6404 'ID': {'type': 'string'},
6405 'Machine': {'type': 'string'},
6406 'Model': {'type': 'string'},
6407 'Notes': {'type': 'string'},
6408 'Size': {'type': 'integer'},
6409 'Started': {'format': 'date-time',
6410 'type': 'string'},
6411 'Stored': {'format': 'date-time',
6412 'type': 'string'},
6413 'Version': {'$ref': '#/definitions/Number'}},
6414 'required': ['ID',
6415 'Checksum',
6416 'ChecksumFormat',
6417 'Size',
6418 'Stored',
6419 'Started',
6420 'Finished',
6421 'Notes',
6422 'Model',
6423 'Machine',
6424 'Hostname',
6425 'Version',
6426 'CACert',
6427 'CAPrivateKey'],
6428 'type': 'object'},
6429 'BackupsRemoveArgs': {'additionalProperties': False,
6430 'properties': {'ID': {'type': 'string'}},
6431 'required': ['ID'],
6432 'type': 'object'},
6433 'Number': {'additionalProperties': False,
6434 'properties': {'Build': {'type': 'integer'},
6435 'Major': {'type': 'integer'},
6436 'Minor': {'type': 'integer'},
6437 'Patch': {'type': 'integer'},
6438 'Tag': {'type': 'string'}},
6439 'required': ['Major',
6440 'Minor',
6441 'Tag',
6442 'Patch',
6443 'Build'],
6444 'type': 'object'},
6445 'RestoreArgs': {'additionalProperties': False,
6446 'properties': {'BackupId': {'type': 'string'}},
6447 'required': ['BackupId'],
6448 'type': 'object'}},
6449 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
6450 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
6451 'type': 'object'},
6452 'FinishRestore': {'type': 'object'},
6453 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
6454 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
6455 'type': 'object'},
6456 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
6457 'Result': {'$ref': '#/definitions/BackupsListResult'}},
6458 'type': 'object'},
6459 'PrepareRestore': {'type': 'object'},
6460 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
6461 'type': 'object'},
6462 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
6463 'type': 'object'}},
6464 'type': 'object'}
6465
6466
6467 @ReturnMapping(BackupsMetadataResult)
6468 async def Create(self, notes):
6469 '''
6470 notes : str
6471 Returns -> typing.Union[str, int, _ForwardRef('Number')]
6472 '''
6473 # map input types to rpc msg
6474 params = dict()
6475 msg = dict(Type='Backups', Request='Create', Version=1, Params=params)
6476 params['Notes'] = notes
6477 reply = await self.rpc(msg)
6478 return reply
6479
6480
6481
6482 @ReturnMapping(None)
6483 async def FinishRestore(self):
6484 '''
6485
6486 Returns -> None
6487 '''
6488 # map input types to rpc msg
6489 params = dict()
6490 msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params)
6491
6492 reply = await self.rpc(msg)
6493 return reply
6494
6495
6496
6497 @ReturnMapping(BackupsMetadataResult)
6498 async def Info(self, id_):
6499 '''
6500 id_ : str
6501 Returns -> typing.Union[str, int, _ForwardRef('Number')]
6502 '''
6503 # map input types to rpc msg
6504 params = dict()
6505 msg = dict(Type='Backups', Request='Info', Version=1, Params=params)
6506 params['ID'] = id_
6507 reply = await self.rpc(msg)
6508 return reply
6509
6510
6511
6512 @ReturnMapping(BackupsListResult)
6513 async def List(self):
6514 '''
6515
6516 Returns -> typing.Sequence[~BackupsMetadataResult]
6517 '''
6518 # map input types to rpc msg
6519 params = dict()
6520 msg = dict(Type='Backups', Request='List', Version=1, Params=params)
6521
6522 reply = await self.rpc(msg)
6523 return reply
6524
6525
6526
6527 @ReturnMapping(None)
6528 async def PrepareRestore(self):
6529 '''
6530
6531 Returns -> None
6532 '''
6533 # map input types to rpc msg
6534 params = dict()
6535 msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params)
6536
6537 reply = await self.rpc(msg)
6538 return reply
6539
6540
6541
6542 @ReturnMapping(None)
6543 async def Remove(self, id_):
6544 '''
6545 id_ : str
6546 Returns -> None
6547 '''
6548 # map input types to rpc msg
6549 params = dict()
6550 msg = dict(Type='Backups', Request='Remove', Version=1, Params=params)
6551 params['ID'] = id_
6552 reply = await self.rpc(msg)
6553 return reply
6554
6555
6556
6557 @ReturnMapping(None)
6558 async def Restore(self, backupid):
6559 '''
6560 backupid : str
6561 Returns -> None
6562 '''
6563 # map input types to rpc msg
6564 params = dict()
6565 msg = dict(Type='Backups', Request='Restore', Version=1, Params=params)
6566 params['BackupId'] = backupid
6567 reply = await self.rpc(msg)
6568 return reply
6569
6570
6571 class Block(Type):
6572 name = 'Block'
6573 version = 2
6574 schema = {'definitions': {'Block': {'additionalProperties': False,
6575 'properties': {'id': {'type': 'string'},
6576 'message': {'type': 'string'},
6577 'tag': {'type': 'string'},
6578 'type': {'type': 'string'}},
6579 'required': ['id', 'tag', 'type'],
6580 'type': 'object'},
6581 'BlockResult': {'additionalProperties': False,
6582 'properties': {'error': {'$ref': '#/definitions/Error'},
6583 'result': {'$ref': '#/definitions/Block'}},
6584 'required': ['result'],
6585 'type': 'object'},
6586 'BlockResults': {'additionalProperties': False,
6587 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
6588 'type': 'array'}},
6589 'type': 'object'},
6590 'BlockSwitchParams': {'additionalProperties': False,
6591 'properties': {'message': {'type': 'string'},
6592 'type': {'type': 'string'}},
6593 'required': ['type'],
6594 'type': 'object'},
6595 'Error': {'additionalProperties': False,
6596 'properties': {'Code': {'type': 'string'},
6597 'Info': {'$ref': '#/definitions/ErrorInfo'},
6598 'Message': {'type': 'string'}},
6599 'required': ['Message', 'Code'],
6600 'type': 'object'},
6601 'ErrorInfo': {'additionalProperties': False,
6602 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6603 'MacaroonPath': {'type': 'string'}},
6604 'type': 'object'},
6605 'ErrorResult': {'additionalProperties': False,
6606 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6607 'required': ['Error'],
6608 'type': 'object'},
6609 'Macaroon': {'additionalProperties': False,
6610 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6611 'type': 'array'},
6612 'data': {'items': {'type': 'integer'},
6613 'type': 'array'},
6614 'id': {'$ref': '#/definitions/packet'},
6615 'location': {'$ref': '#/definitions/packet'},
6616 'sig': {'items': {'type': 'integer'},
6617 'type': 'array'}},
6618 'required': ['data',
6619 'location',
6620 'id',
6621 'caveats',
6622 'sig'],
6623 'type': 'object'},
6624 'caveat': {'additionalProperties': False,
6625 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6626 'location': {'$ref': '#/definitions/packet'},
6627 'verificationId': {'$ref': '#/definitions/packet'}},
6628 'required': ['location',
6629 'caveatId',
6630 'verificationId'],
6631 'type': 'object'},
6632 'packet': {'additionalProperties': False,
6633 'properties': {'headerLen': {'type': 'integer'},
6634 'start': {'type': 'integer'},
6635 'totalLen': {'type': 'integer'}},
6636 'required': ['start', 'totalLen', 'headerLen'],
6637 'type': 'object'}},
6638 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
6639 'type': 'object'},
6640 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
6641 'Result': {'$ref': '#/definitions/ErrorResult'}},
6642 'type': 'object'},
6643 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
6644 'Result': {'$ref': '#/definitions/ErrorResult'}},
6645 'type': 'object'}},
6646 'type': 'object'}
6647
6648
6649 @ReturnMapping(BlockResults)
6650 async def List(self):
6651 '''
6652
6653 Returns -> typing.Sequence[~BlockResult]
6654 '''
6655 # map input types to rpc msg
6656 params = dict()
6657 msg = dict(Type='Block', Request='List', Version=2, Params=params)
6658
6659 reply = await self.rpc(msg)
6660 return reply
6661
6662
6663
6664 @ReturnMapping(ErrorResult)
6665 async def SwitchBlockOff(self, message, type_):
6666 '''
6667 message : str
6668 type_ : str
6669 Returns -> Error
6670 '''
6671 # map input types to rpc msg
6672 params = dict()
6673 msg = dict(Type='Block', Request='SwitchBlockOff', Version=2, Params=params)
6674 params['message'] = message
6675 params['type'] = type_
6676 reply = await self.rpc(msg)
6677 return reply
6678
6679
6680
6681 @ReturnMapping(ErrorResult)
6682 async def SwitchBlockOn(self, message, type_):
6683 '''
6684 message : str
6685 type_ : str
6686 Returns -> Error
6687 '''
6688 # map input types to rpc msg
6689 params = dict()
6690 msg = dict(Type='Block', Request='SwitchBlockOn', Version=2, Params=params)
6691 params['message'] = message
6692 params['type'] = type_
6693 reply = await self.rpc(msg)
6694 return reply
6695
6696
6697 class CharmRevisionUpdater(Type):
6698 name = 'CharmRevisionUpdater'
6699 version = 1
6700 schema = {'definitions': {'Error': {'additionalProperties': False,
6701 'properties': {'Code': {'type': 'string'},
6702 'Info': {'$ref': '#/definitions/ErrorInfo'},
6703 'Message': {'type': 'string'}},
6704 'required': ['Message', 'Code'],
6705 'type': 'object'},
6706 'ErrorInfo': {'additionalProperties': False,
6707 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6708 'MacaroonPath': {'type': 'string'}},
6709 'type': 'object'},
6710 'ErrorResult': {'additionalProperties': False,
6711 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6712 'required': ['Error'],
6713 'type': 'object'},
6714 'Macaroon': {'additionalProperties': False,
6715 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6716 'type': 'array'},
6717 'data': {'items': {'type': 'integer'},
6718 'type': 'array'},
6719 'id': {'$ref': '#/definitions/packet'},
6720 'location': {'$ref': '#/definitions/packet'},
6721 'sig': {'items': {'type': 'integer'},
6722 'type': 'array'}},
6723 'required': ['data',
6724 'location',
6725 'id',
6726 'caveats',
6727 'sig'],
6728 'type': 'object'},
6729 'caveat': {'additionalProperties': False,
6730 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6731 'location': {'$ref': '#/definitions/packet'},
6732 'verificationId': {'$ref': '#/definitions/packet'}},
6733 'required': ['location',
6734 'caveatId',
6735 'verificationId'],
6736 'type': 'object'},
6737 'packet': {'additionalProperties': False,
6738 'properties': {'headerLen': {'type': 'integer'},
6739 'start': {'type': 'integer'},
6740 'totalLen': {'type': 'integer'}},
6741 'required': ['start', 'totalLen', 'headerLen'],
6742 'type': 'object'}},
6743 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
6744 'type': 'object'}},
6745 'type': 'object'}
6746
6747
6748 @ReturnMapping(ErrorResult)
6749 async def UpdateLatestRevisions(self):
6750 '''
6751
6752 Returns -> Error
6753 '''
6754 # map input types to rpc msg
6755 params = dict()
6756 msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=1, Params=params)
6757
6758 reply = await self.rpc(msg)
6759 return reply
6760
6761
6762 class Charms(Type):
6763 name = 'Charms'
6764 version = 2
6765 schema = {'definitions': {'CharmInfo': {'additionalProperties': False,
6766 'properties': {'CharmURL': {'type': 'string'}},
6767 'required': ['CharmURL'],
6768 'type': 'object'},
6769 'CharmsList': {'additionalProperties': False,
6770 'properties': {'Names': {'items': {'type': 'string'},
6771 'type': 'array'}},
6772 'required': ['Names'],
6773 'type': 'object'},
6774 'CharmsListResult': {'additionalProperties': False,
6775 'properties': {'CharmURLs': {'items': {'type': 'string'},
6776 'type': 'array'}},
6777 'required': ['CharmURLs'],
6778 'type': 'object'},
6779 'IsMeteredResult': {'additionalProperties': False,
6780 'properties': {'Metered': {'type': 'boolean'}},
6781 'required': ['Metered'],
6782 'type': 'object'}},
6783 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
6784 'Result': {'$ref': '#/definitions/CharmInfo'}},
6785 'type': 'object'},
6786 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
6787 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
6788 'type': 'object'},
6789 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
6790 'Result': {'$ref': '#/definitions/CharmsListResult'}},
6791 'type': 'object'}},
6792 'type': 'object'}
6793
6794
6795 @ReturnMapping(CharmInfo)
6796 async def CharmInfo(self, charmurl):
6797 '''
6798 charmurl : str
6799 Returns -> str
6800 '''
6801 # map input types to rpc msg
6802 params = dict()
6803 msg = dict(Type='Charms', Request='CharmInfo', Version=2, Params=params)
6804 params['CharmURL'] = charmurl
6805 reply = await self.rpc(msg)
6806 return reply
6807
6808
6809
6810 @ReturnMapping(IsMeteredResult)
6811 async def IsMetered(self, charmurl):
6812 '''
6813 charmurl : str
6814 Returns -> bool
6815 '''
6816 # map input types to rpc msg
6817 params = dict()
6818 msg = dict(Type='Charms', Request='IsMetered', Version=2, Params=params)
6819 params['CharmURL'] = charmurl
6820 reply = await self.rpc(msg)
6821 return reply
6822
6823
6824
6825 @ReturnMapping(CharmsListResult)
6826 async def List(self, names):
6827 '''
6828 names : typing.Sequence[str]
6829 Returns -> typing.Sequence[str]
6830 '''
6831 # map input types to rpc msg
6832 params = dict()
6833 msg = dict(Type='Charms', Request='List', Version=2, Params=params)
6834 params['Names'] = names
6835 reply = await self.rpc(msg)
6836 return reply
6837
6838
6839 class Cleaner(Type):
6840 name = 'Cleaner'
6841 version = 2
6842 schema = {'definitions': {'Error': {'additionalProperties': False,
6843 'properties': {'Code': {'type': 'string'},
6844 'Info': {'$ref': '#/definitions/ErrorInfo'},
6845 'Message': {'type': 'string'}},
6846 'required': ['Message', 'Code'],
6847 'type': 'object'},
6848 'ErrorInfo': {'additionalProperties': False,
6849 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6850 'MacaroonPath': {'type': 'string'}},
6851 'type': 'object'},
6852 'Macaroon': {'additionalProperties': False,
6853 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6854 'type': 'array'},
6855 'data': {'items': {'type': 'integer'},
6856 'type': 'array'},
6857 'id': {'$ref': '#/definitions/packet'},
6858 'location': {'$ref': '#/definitions/packet'},
6859 'sig': {'items': {'type': 'integer'},
6860 'type': 'array'}},
6861 'required': ['data',
6862 'location',
6863 'id',
6864 'caveats',
6865 'sig'],
6866 'type': 'object'},
6867 'NotifyWatchResult': {'additionalProperties': False,
6868 'properties': {'Error': {'$ref': '#/definitions/Error'},
6869 'NotifyWatcherId': {'type': 'string'}},
6870 'required': ['NotifyWatcherId', 'Error'],
6871 'type': 'object'},
6872 'caveat': {'additionalProperties': False,
6873 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6874 'location': {'$ref': '#/definitions/packet'},
6875 'verificationId': {'$ref': '#/definitions/packet'}},
6876 'required': ['location',
6877 'caveatId',
6878 'verificationId'],
6879 'type': 'object'},
6880 'packet': {'additionalProperties': False,
6881 'properties': {'headerLen': {'type': 'integer'},
6882 'start': {'type': 'integer'},
6883 'totalLen': {'type': 'integer'}},
6884 'required': ['start', 'totalLen', 'headerLen'],
6885 'type': 'object'}},
6886 'properties': {'Cleanup': {'type': 'object'},
6887 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6888 'type': 'object'}},
6889 'type': 'object'}
6890
6891
6892 @ReturnMapping(None)
6893 async def Cleanup(self):
6894 '''
6895
6896 Returns -> None
6897 '''
6898 # map input types to rpc msg
6899 params = dict()
6900 msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params)
6901
6902 reply = await self.rpc(msg)
6903 return reply
6904
6905
6906
6907 @ReturnMapping(NotifyWatchResult)
6908 async def WatchCleanups(self):
6909 '''
6910
6911 Returns -> typing.Union[_ForwardRef('Error'), str]
6912 '''
6913 # map input types to rpc msg
6914 params = dict()
6915 msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params)
6916
6917 reply = await self.rpc(msg)
6918 return reply
6919
6920
6921 class Client(Type):
6922 name = 'Client'
6923 version = 1
6924 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
6925 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
6926 'type': 'array'},
6927 'type': 'array'}},
6928 'required': ['Servers'],
6929 'type': 'object'},
6930 'AddCharm': {'additionalProperties': False,
6931 'properties': {'Channel': {'type': 'string'},
6932 'URL': {'type': 'string'}},
6933 'required': ['URL', 'Channel'],
6934 'type': 'object'},
6935 'AddCharmWithAuthorization': {'additionalProperties': False,
6936 'properties': {'Channel': {'type': 'string'},
6937 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
6938 'URL': {'type': 'string'}},
6939 'required': ['URL',
6940 'Channel',
6941 'CharmStoreMacaroon'],
6942 'type': 'object'},
6943 'AddMachineParams': {'additionalProperties': False,
6944 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
6945 'type': 'array'},
6946 'Constraints': {'$ref': '#/definitions/Value'},
6947 'ContainerType': {'type': 'string'},
6948 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
6949 'type': 'array'},
6950 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
6951 'InstanceId': {'type': 'string'},
6952 'Jobs': {'items': {'type': 'string'},
6953 'type': 'array'},
6954 'Nonce': {'type': 'string'},
6955 'ParentId': {'type': 'string'},
6956 'Placement': {'$ref': '#/definitions/Placement'},
6957 'Series': {'type': 'string'}},
6958 'required': ['Series',
6959 'Constraints',
6960 'Jobs',
6961 'Disks',
6962 'Placement',
6963 'ParentId',
6964 'ContainerType',
6965 'InstanceId',
6966 'Nonce',
6967 'HardwareCharacteristics',
6968 'Addrs'],
6969 'type': 'object'},
6970 'AddMachines': {'additionalProperties': False,
6971 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
6972 'type': 'array'}},
6973 'required': ['MachineParams'],
6974 'type': 'object'},
6975 'AddMachinesResult': {'additionalProperties': False,
6976 'properties': {'Error': {'$ref': '#/definitions/Error'},
6977 'Machine': {'type': 'string'}},
6978 'required': ['Machine', 'Error'],
6979 'type': 'object'},
6980 'AddMachinesResults': {'additionalProperties': False,
6981 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
6982 'type': 'array'}},
6983 'required': ['Machines'],
6984 'type': 'object'},
6985 'Address': {'additionalProperties': False,
6986 'properties': {'Scope': {'type': 'string'},
6987 'SpaceName': {'type': 'string'},
6988 'Type': {'type': 'string'},
6989 'Value': {'type': 'string'}},
6990 'required': ['Value', 'Type', 'Scope'],
6991 'type': 'object'},
6992 'AgentVersionResult': {'additionalProperties': False,
6993 'properties': {'Version': {'$ref': '#/definitions/Number'}},
6994 'required': ['Version'],
6995 'type': 'object'},
6996 'AllWatcherId': {'additionalProperties': False,
6997 'properties': {'AllWatcherId': {'type': 'string'}},
6998 'required': ['AllWatcherId'],
6999 'type': 'object'},
7000 'Binary': {'additionalProperties': False,
7001 'properties': {'Arch': {'type': 'string'},
7002 'Number': {'$ref': '#/definitions/Number'},
7003 'Series': {'type': 'string'}},
7004 'required': ['Number', 'Series', 'Arch'],
7005 'type': 'object'},
7006 'BundleChangesChange': {'additionalProperties': False,
7007 'properties': {'args': {'items': {'additionalProperties': True,
7008 'type': 'object'},
7009 'type': 'array'},
7010 'id': {'type': 'string'},
7011 'method': {'type': 'string'},
7012 'requires': {'items': {'type': 'string'},
7013 'type': 'array'}},
7014 'required': ['id',
7015 'method',
7016 'args',
7017 'requires'],
7018 'type': 'object'},
7019 'CharmInfo': {'additionalProperties': False,
7020 'properties': {'CharmURL': {'type': 'string'}},
7021 'required': ['CharmURL'],
7022 'type': 'object'},
7023 'Constraints': {'additionalProperties': False,
7024 'properties': {'Count': {'type': 'integer'},
7025 'Pool': {'type': 'string'},
7026 'Size': {'type': 'integer'}},
7027 'required': ['Pool', 'Size', 'Count'],
7028 'type': 'object'},
7029 'DestroyMachines': {'additionalProperties': False,
7030 'properties': {'Force': {'type': 'boolean'},
7031 'MachineNames': {'items': {'type': 'string'},
7032 'type': 'array'}},
7033 'required': ['MachineNames', 'Force'],
7034 'type': 'object'},
7035 'DetailedStatus': {'additionalProperties': False,
7036 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7037 'type': 'object'}},
7038 'type': 'object'},
7039 'Err': {'additionalProperties': True,
7040 'type': 'object'},
7041 'Info': {'type': 'string'},
7042 'Kind': {'type': 'string'},
7043 'Life': {'type': 'string'},
7044 'Since': {'format': 'date-time',
7045 'type': 'string'},
7046 'Status': {'type': 'string'},
7047 'Version': {'type': 'string'}},
7048 'required': ['Status',
7049 'Info',
7050 'Data',
7051 'Since',
7052 'Kind',
7053 'Version',
7054 'Life',
7055 'Err'],
7056 'type': 'object'},
7057 'EndpointStatus': {'additionalProperties': False,
7058 'properties': {'Name': {'type': 'string'},
7059 'Role': {'type': 'string'},
7060 'ServiceName': {'type': 'string'},
7061 'Subordinate': {'type': 'boolean'}},
7062 'required': ['ServiceName',
7063 'Name',
7064 'Role',
7065 'Subordinate'],
7066 'type': 'object'},
7067 'Entities': {'additionalProperties': False,
7068 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7069 'type': 'array'}},
7070 'required': ['Entities'],
7071 'type': 'object'},
7072 'Entity': {'additionalProperties': False,
7073 'properties': {'Tag': {'type': 'string'}},
7074 'required': ['Tag'],
7075 'type': 'object'},
7076 'EntityStatus': {'additionalProperties': False,
7077 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7078 'type': 'object'}},
7079 'type': 'object'},
7080 'Info': {'type': 'string'},
7081 'Since': {'format': 'date-time',
7082 'type': 'string'},
7083 'Status': {'type': 'string'}},
7084 'required': ['Status',
7085 'Info',
7086 'Data',
7087 'Since'],
7088 'type': 'object'},
7089 'Error': {'additionalProperties': False,
7090 'properties': {'Code': {'type': 'string'},
7091 'Info': {'$ref': '#/definitions/ErrorInfo'},
7092 'Message': {'type': 'string'}},
7093 'required': ['Message', 'Code'],
7094 'type': 'object'},
7095 'ErrorInfo': {'additionalProperties': False,
7096 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7097 'MacaroonPath': {'type': 'string'}},
7098 'type': 'object'},
7099 'ErrorResult': {'additionalProperties': False,
7100 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7101 'required': ['Error'],
7102 'type': 'object'},
7103 'ErrorResults': {'additionalProperties': False,
7104 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7105 'type': 'array'}},
7106 'required': ['Results'],
7107 'type': 'object'},
7108 'FindToolsParams': {'additionalProperties': False,
7109 'properties': {'Arch': {'type': 'string'},
7110 'MajorVersion': {'type': 'integer'},
7111 'MinorVersion': {'type': 'integer'},
7112 'Number': {'$ref': '#/definitions/Number'},
7113 'Series': {'type': 'string'}},
7114 'required': ['Number',
7115 'MajorVersion',
7116 'MinorVersion',
7117 'Arch',
7118 'Series'],
7119 'type': 'object'},
7120 'FindToolsResult': {'additionalProperties': False,
7121 'properties': {'Error': {'$ref': '#/definitions/Error'},
7122 'List': {'items': {'$ref': '#/definitions/Tools'},
7123 'type': 'array'}},
7124 'required': ['List', 'Error'],
7125 'type': 'object'},
7126 'FullStatus': {'additionalProperties': False,
7127 'properties': {'AvailableVersion': {'type': 'string'},
7128 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7129 'type': 'object'},
7130 'ModelName': {'type': 'string'},
7131 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
7132 'type': 'array'},
7133 'Services': {'patternProperties': {'.*': {'$ref': '#/definitions/ServiceStatus'}},
7134 'type': 'object'}},
7135 'required': ['ModelName',
7136 'AvailableVersion',
7137 'Machines',
7138 'Services',
7139 'Relations'],
7140 'type': 'object'},
7141 'GetBundleChangesParams': {'additionalProperties': False,
7142 'properties': {'yaml': {'type': 'string'}},
7143 'required': ['yaml'],
7144 'type': 'object'},
7145 'GetBundleChangesResults': {'additionalProperties': False,
7146 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
7147 'type': 'array'},
7148 'errors': {'items': {'type': 'string'},
7149 'type': 'array'}},
7150 'type': 'object'},
7151 'GetConstraintsResults': {'additionalProperties': False,
7152 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
7153 'required': ['Constraints'],
7154 'type': 'object'},
7155 'HardwareCharacteristics': {'additionalProperties': False,
7156 'properties': {'Arch': {'type': 'string'},
7157 'AvailabilityZone': {'type': 'string'},
7158 'CpuCores': {'type': 'integer'},
7159 'CpuPower': {'type': 'integer'},
7160 'Mem': {'type': 'integer'},
7161 'RootDisk': {'type': 'integer'},
7162 'Tags': {'items': {'type': 'string'},
7163 'type': 'array'}},
7164 'type': 'object'},
7165 'HostPort': {'additionalProperties': False,
7166 'properties': {'Address': {'$ref': '#/definitions/Address'},
7167 'Port': {'type': 'integer'}},
7168 'required': ['Address', 'Port'],
7169 'type': 'object'},
7170 'Macaroon': {'additionalProperties': False,
7171 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7172 'type': 'array'},
7173 'data': {'items': {'type': 'integer'},
7174 'type': 'array'},
7175 'id': {'$ref': '#/definitions/packet'},
7176 'location': {'$ref': '#/definitions/packet'},
7177 'sig': {'items': {'type': 'integer'},
7178 'type': 'array'}},
7179 'required': ['data',
7180 'location',
7181 'id',
7182 'caveats',
7183 'sig'],
7184 'type': 'object'},
7185 'MachineStatus': {'additionalProperties': False,
7186 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
7187 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7188 'type': 'object'},
7189 'DNSName': {'type': 'string'},
7190 'Hardware': {'type': 'string'},
7191 'HasVote': {'type': 'boolean'},
7192 'Id': {'type': 'string'},
7193 'InstanceId': {'type': 'string'},
7194 'InstanceStatus': {'$ref': '#/definitions/DetailedStatus'},
7195 'Jobs': {'items': {'type': 'string'},
7196 'type': 'array'},
7197 'Series': {'type': 'string'},
7198 'WantsVote': {'type': 'boolean'}},
7199 'required': ['AgentStatus',
7200 'InstanceStatus',
7201 'DNSName',
7202 'InstanceId',
7203 'Series',
7204 'Id',
7205 'Containers',
7206 'Hardware',
7207 'Jobs',
7208 'HasVote',
7209 'WantsVote'],
7210 'type': 'object'},
7211 'MeterStatus': {'additionalProperties': False,
7212 'properties': {'Color': {'type': 'string'},
7213 'Message': {'type': 'string'}},
7214 'required': ['Color', 'Message'],
7215 'type': 'object'},
7216 'ModelConfigResults': {'additionalProperties': False,
7217 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7218 'type': 'object'}},
7219 'type': 'object'}},
7220 'required': ['Config'],
7221 'type': 'object'},
7222 'ModelInfo': {'additionalProperties': False,
7223 'properties': {'DefaultSeries': {'type': 'string'},
7224 'Life': {'type': 'string'},
7225 'Name': {'type': 'string'},
7226 'OwnerTag': {'type': 'string'},
7227 'ProviderType': {'type': 'string'},
7228 'ServerUUID': {'type': 'string'},
7229 'Status': {'$ref': '#/definitions/EntityStatus'},
7230 'UUID': {'type': 'string'},
7231 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
7232 'type': 'array'}},
7233 'required': ['Name',
7234 'UUID',
7235 'ServerUUID',
7236 'ProviderType',
7237 'DefaultSeries',
7238 'OwnerTag',
7239 'Life',
7240 'Status',
7241 'Users'],
7242 'type': 'object'},
7243 'ModelSet': {'additionalProperties': False,
7244 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7245 'type': 'object'}},
7246 'type': 'object'}},
7247 'required': ['Config'],
7248 'type': 'object'},
7249 'ModelUnset': {'additionalProperties': False,
7250 'properties': {'Keys': {'items': {'type': 'string'},
7251 'type': 'array'}},
7252 'required': ['Keys'],
7253 'type': 'object'},
7254 'ModelUserInfo': {'additionalProperties': False,
7255 'properties': {'access': {'type': 'string'},
7256 'displayname': {'type': 'string'},
7257 'lastconnection': {'format': 'date-time',
7258 'type': 'string'},
7259 'user': {'type': 'string'}},
7260 'required': ['user',
7261 'displayname',
7262 'lastconnection',
7263 'access'],
7264 'type': 'object'},
7265 'ModelUserInfoResult': {'additionalProperties': False,
7266 'properties': {'error': {'$ref': '#/definitions/Error'},
7267 'result': {'$ref': '#/definitions/ModelUserInfo'}},
7268 'type': 'object'},
7269 'ModelUserInfoResults': {'additionalProperties': False,
7270 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
7271 'type': 'array'}},
7272 'required': ['results'],
7273 'type': 'object'},
7274 'Number': {'additionalProperties': False,
7275 'properties': {'Build': {'type': 'integer'},
7276 'Major': {'type': 'integer'},
7277 'Minor': {'type': 'integer'},
7278 'Patch': {'type': 'integer'},
7279 'Tag': {'type': 'string'}},
7280 'required': ['Major',
7281 'Minor',
7282 'Tag',
7283 'Patch',
7284 'Build'],
7285 'type': 'object'},
7286 'Placement': {'additionalProperties': False,
7287 'properties': {'Directive': {'type': 'string'},
7288 'Scope': {'type': 'string'}},
7289 'required': ['Scope', 'Directive'],
7290 'type': 'object'},
7291 'PrivateAddress': {'additionalProperties': False,
7292 'properties': {'Target': {'type': 'string'}},
7293 'required': ['Target'],
7294 'type': 'object'},
7295 'PrivateAddressResults': {'additionalProperties': False,
7296 'properties': {'PrivateAddress': {'type': 'string'}},
7297 'required': ['PrivateAddress'],
7298 'type': 'object'},
7299 'ProvisioningScriptParams': {'additionalProperties': False,
7300 'properties': {'DataDir': {'type': 'string'},
7301 'DisablePackageCommands': {'type': 'boolean'},
7302 'MachineId': {'type': 'string'},
7303 'Nonce': {'type': 'string'}},
7304 'required': ['MachineId',
7305 'Nonce',
7306 'DataDir',
7307 'DisablePackageCommands'],
7308 'type': 'object'},
7309 'ProvisioningScriptResult': {'additionalProperties': False,
7310 'properties': {'Script': {'type': 'string'}},
7311 'required': ['Script'],
7312 'type': 'object'},
7313 'PublicAddress': {'additionalProperties': False,
7314 'properties': {'Target': {'type': 'string'}},
7315 'required': ['Target'],
7316 'type': 'object'},
7317 'PublicAddressResults': {'additionalProperties': False,
7318 'properties': {'PublicAddress': {'type': 'string'}},
7319 'required': ['PublicAddress'],
7320 'type': 'object'},
7321 'RelationStatus': {'additionalProperties': False,
7322 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
7323 'type': 'array'},
7324 'Id': {'type': 'integer'},
7325 'Interface': {'type': 'string'},
7326 'Key': {'type': 'string'},
7327 'Scope': {'type': 'string'}},
7328 'required': ['Id',
7329 'Key',
7330 'Interface',
7331 'Scope',
7332 'Endpoints'],
7333 'type': 'object'},
7334 'ResolveCharmResult': {'additionalProperties': False,
7335 'properties': {'Error': {'type': 'string'},
7336 'URL': {'$ref': '#/definitions/URL'}},
7337 'type': 'object'},
7338 'ResolveCharmResults': {'additionalProperties': False,
7339 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
7340 'type': 'array'}},
7341 'required': ['URLs'],
7342 'type': 'object'},
7343 'ResolveCharms': {'additionalProperties': False,
7344 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
7345 'type': 'array'}},
7346 'required': ['References'],
7347 'type': 'object'},
7348 'Resolved': {'additionalProperties': False,
7349 'properties': {'Retry': {'type': 'boolean'},
7350 'UnitName': {'type': 'string'}},
7351 'required': ['UnitName', 'Retry'],
7352 'type': 'object'},
7353 'ServiceStatus': {'additionalProperties': False,
7354 'properties': {'CanUpgradeTo': {'type': 'string'},
7355 'Charm': {'type': 'string'},
7356 'Err': {'additionalProperties': True,
7357 'type': 'object'},
7358 'Exposed': {'type': 'boolean'},
7359 'Life': {'type': 'string'},
7360 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7361 'type': 'object'},
7362 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7363 'type': 'array'}},
7364 'type': 'object'},
7365 'Status': {'$ref': '#/definitions/DetailedStatus'},
7366 'SubordinateTo': {'items': {'type': 'string'},
7367 'type': 'array'},
7368 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7369 'type': 'object'}},
7370 'required': ['Err',
7371 'Charm',
7372 'Exposed',
7373 'Life',
7374 'Relations',
7375 'CanUpgradeTo',
7376 'SubordinateTo',
7377 'Units',
7378 'MeterStatuses',
7379 'Status'],
7380 'type': 'object'},
7381 'SetConstraints': {'additionalProperties': False,
7382 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
7383 'ServiceName': {'type': 'string'}},
7384 'required': ['ServiceName', 'Constraints'],
7385 'type': 'object'},
7386 'SetModelAgentVersion': {'additionalProperties': False,
7387 'properties': {'Version': {'$ref': '#/definitions/Number'}},
7388 'required': ['Version'],
7389 'type': 'object'},
7390 'StatusHistoryArgs': {'additionalProperties': False,
7391 'properties': {'Kind': {'type': 'string'},
7392 'Name': {'type': 'string'},
7393 'Size': {'type': 'integer'}},
7394 'required': ['Kind', 'Size', 'Name'],
7395 'type': 'object'},
7396 'StatusHistoryResults': {'additionalProperties': False,
7397 'properties': {'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
7398 'type': 'array'}},
7399 'required': ['Statuses'],
7400 'type': 'object'},
7401 'StatusParams': {'additionalProperties': False,
7402 'properties': {'Patterns': {'items': {'type': 'string'},
7403 'type': 'array'}},
7404 'required': ['Patterns'],
7405 'type': 'object'},
7406 'Tools': {'additionalProperties': False,
7407 'properties': {'sha256': {'type': 'string'},
7408 'size': {'type': 'integer'},
7409 'url': {'type': 'string'},
7410 'version': {'$ref': '#/definitions/Binary'}},
7411 'required': ['version', 'url', 'size'],
7412 'type': 'object'},
7413 'URL': {'additionalProperties': False,
7414 'properties': {'Channel': {'type': 'string'},
7415 'Name': {'type': 'string'},
7416 'Revision': {'type': 'integer'},
7417 'Schema': {'type': 'string'},
7418 'Series': {'type': 'string'},
7419 'User': {'type': 'string'}},
7420 'required': ['Schema',
7421 'User',
7422 'Name',
7423 'Revision',
7424 'Series',
7425 'Channel'],
7426 'type': 'object'},
7427 'UnitStatus': {'additionalProperties': False,
7428 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
7429 'Charm': {'type': 'string'},
7430 'Machine': {'type': 'string'},
7431 'OpenedPorts': {'items': {'type': 'string'},
7432 'type': 'array'},
7433 'PublicAddress': {'type': 'string'},
7434 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7435 'type': 'object'},
7436 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
7437 'required': ['AgentStatus',
7438 'WorkloadStatus',
7439 'Machine',
7440 'OpenedPorts',
7441 'PublicAddress',
7442 'Charm',
7443 'Subordinates'],
7444 'type': 'object'},
7445 'Value': {'additionalProperties': False,
7446 'properties': {'arch': {'type': 'string'},
7447 'container': {'type': 'string'},
7448 'cpu-cores': {'type': 'integer'},
7449 'cpu-power': {'type': 'integer'},
7450 'instance-type': {'type': 'string'},
7451 'mem': {'type': 'integer'},
7452 'root-disk': {'type': 'integer'},
7453 'spaces': {'items': {'type': 'string'},
7454 'type': 'array'},
7455 'tags': {'items': {'type': 'string'},
7456 'type': 'array'},
7457 'virt-type': {'type': 'string'}},
7458 'type': 'object'},
7459 'caveat': {'additionalProperties': False,
7460 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7461 'location': {'$ref': '#/definitions/packet'},
7462 'verificationId': {'$ref': '#/definitions/packet'}},
7463 'required': ['location',
7464 'caveatId',
7465 'verificationId'],
7466 'type': 'object'},
7467 'packet': {'additionalProperties': False,
7468 'properties': {'headerLen': {'type': 'integer'},
7469 'start': {'type': 'integer'},
7470 'totalLen': {'type': 'integer'}},
7471 'required': ['start', 'totalLen', 'headerLen'],
7472 'type': 'object'}},
7473 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
7474 'type': 'object'},
7475 'AbortCurrentUpgrade': {'type': 'object'},
7476 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
7477 'type': 'object'},
7478 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
7479 'type': 'object'},
7480 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7481 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7482 'type': 'object'},
7483 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7484 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7485 'type': 'object'},
7486 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
7487 'type': 'object'},
7488 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7489 'Result': {'$ref': '#/definitions/CharmInfo'}},
7490 'type': 'object'},
7491 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
7492 'type': 'object'},
7493 'DestroyModel': {'type': 'object'},
7494 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
7495 'Result': {'$ref': '#/definitions/FindToolsResult'}},
7496 'type': 'object'},
7497 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
7498 'Result': {'$ref': '#/definitions/FullStatus'}},
7499 'type': 'object'},
7500 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
7501 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
7502 'type': 'object'},
7503 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7504 'type': 'object'},
7505 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7506 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7507 'type': 'object'},
7508 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
7509 'type': 'object'},
7510 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
7511 'type': 'object'},
7512 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
7513 'type': 'object'},
7514 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
7515 'type': 'object'},
7516 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
7517 'type': 'object'},
7518 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
7519 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
7520 'type': 'object'},
7521 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
7522 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
7523 'type': 'object'},
7524 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
7525 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
7526 'type': 'object'},
7527 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
7528 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
7529 'type': 'object'},
7530 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
7531 'type': 'object'},
7532 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7533 'Result': {'$ref': '#/definitions/ErrorResults'}},
7534 'type': 'object'},
7535 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
7536 'type': 'object'},
7537 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7538 'type': 'object'},
7539 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryArgs'},
7540 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
7541 'type': 'object'},
7542 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
7543 'type': 'object'}},
7544 'type': 'object'}
7545
7546
7547 @ReturnMapping(APIHostPortsResult)
7548 async def APIHostPorts(self):
7549 '''
7550
7551 Returns -> typing.Sequence[~HostPort]
7552 '''
7553 # map input types to rpc msg
7554 params = dict()
7555 msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params)
7556
7557 reply = await self.rpc(msg)
7558 return reply
7559
7560
7561
7562 @ReturnMapping(None)
7563 async def AbortCurrentUpgrade(self):
7564 '''
7565
7566 Returns -> None
7567 '''
7568 # map input types to rpc msg
7569 params = dict()
7570 msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params)
7571
7572 reply = await self.rpc(msg)
7573 return reply
7574
7575
7576
7577 @ReturnMapping(None)
7578 async def AddCharm(self, channel, url):
7579 '''
7580 channel : str
7581 url : str
7582 Returns -> None
7583 '''
7584 # map input types to rpc msg
7585 params = dict()
7586 msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params)
7587 params['Channel'] = channel
7588 params['URL'] = url
7589 reply = await self.rpc(msg)
7590 return reply
7591
7592
7593
7594 @ReturnMapping(None)
7595 async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url):
7596 '''
7597 channel : str
7598 charmstoremacaroon : Macaroon
7599 url : str
7600 Returns -> None
7601 '''
7602 # map input types to rpc msg
7603 params = dict()
7604 msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params)
7605 params['Channel'] = channel
7606 params['CharmStoreMacaroon'] = charmstoremacaroon
7607 params['URL'] = url
7608 reply = await self.rpc(msg)
7609 return reply
7610
7611
7612
7613 @ReturnMapping(AddMachinesResults)
7614 async def AddMachines(self, machineparams):
7615 '''
7616 machineparams : typing.Sequence[~AddMachineParams]
7617 Returns -> typing.Sequence[~AddMachinesResult]
7618 '''
7619 # map input types to rpc msg
7620 params = dict()
7621 msg = dict(Type='Client', Request='AddMachines', Version=1, Params=params)
7622 params['MachineParams'] = machineparams
7623 reply = await self.rpc(msg)
7624 return reply
7625
7626
7627
7628 @ReturnMapping(AddMachinesResults)
7629 async def AddMachinesV2(self, machineparams):
7630 '''
7631 machineparams : typing.Sequence[~AddMachineParams]
7632 Returns -> typing.Sequence[~AddMachinesResult]
7633 '''
7634 # map input types to rpc msg
7635 params = dict()
7636 msg = dict(Type='Client', Request='AddMachinesV2', Version=1, Params=params)
7637 params['MachineParams'] = machineparams
7638 reply = await self.rpc(msg)
7639 return reply
7640
7641
7642
7643 @ReturnMapping(AgentVersionResult)
7644 async def AgentVersion(self):
7645 '''
7646
7647 Returns -> Number
7648 '''
7649 # map input types to rpc msg
7650 params = dict()
7651 msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params)
7652
7653 reply = await self.rpc(msg)
7654 return reply
7655
7656
7657
7658 @ReturnMapping(CharmInfo)
7659 async def CharmInfo(self, charmurl):
7660 '''
7661 charmurl : str
7662 Returns -> str
7663 '''
7664 # map input types to rpc msg
7665 params = dict()
7666 msg = dict(Type='Client', Request='CharmInfo', Version=1, Params=params)
7667 params['CharmURL'] = charmurl
7668 reply = await self.rpc(msg)
7669 return reply
7670
7671
7672
7673 @ReturnMapping(None)
7674 async def DestroyMachines(self, force, machinenames):
7675 '''
7676 force : bool
7677 machinenames : typing.Sequence[str]
7678 Returns -> None
7679 '''
7680 # map input types to rpc msg
7681 params = dict()
7682 msg = dict(Type='Client', Request='DestroyMachines', Version=1, Params=params)
7683 params['Force'] = force
7684 params['MachineNames'] = machinenames
7685 reply = await self.rpc(msg)
7686 return reply
7687
7688
7689
7690 @ReturnMapping(None)
7691 async def DestroyModel(self):
7692 '''
7693
7694 Returns -> None
7695 '''
7696 # map input types to rpc msg
7697 params = dict()
7698 msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params)
7699
7700 reply = await self.rpc(msg)
7701 return reply
7702
7703
7704
7705 @ReturnMapping(FindToolsResult)
7706 async def FindTools(self, arch, majorversion, minorversion, number, series):
7707 '''
7708 arch : str
7709 majorversion : int
7710 minorversion : int
7711 number : Number
7712 series : str
7713 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
7714 '''
7715 # map input types to rpc msg
7716 params = dict()
7717 msg = dict(Type='Client', Request='FindTools', Version=1, Params=params)
7718 params['Arch'] = arch
7719 params['MajorVersion'] = majorversion
7720 params['MinorVersion'] = minorversion
7721 params['Number'] = number
7722 params['Series'] = series
7723 reply = await self.rpc(msg)
7724 return reply
7725
7726
7727
7728 @ReturnMapping(FullStatus)
7729 async def FullStatus(self, patterns):
7730 '''
7731 patterns : typing.Sequence[str]
7732 Returns -> typing.Union[typing.Sequence[~RelationStatus], typing.Mapping[str, ~ServiceStatus]]
7733 '''
7734 # map input types to rpc msg
7735 params = dict()
7736 msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params)
7737 params['Patterns'] = patterns
7738 reply = await self.rpc(msg)
7739 return reply
7740
7741
7742
7743 @ReturnMapping(GetBundleChangesResults)
7744 async def GetBundleChanges(self, yaml):
7745 '''
7746 yaml : str
7747 Returns -> typing.Sequence[~BundleChangesChange]
7748 '''
7749 # map input types to rpc msg
7750 params = dict()
7751 msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params)
7752 params['yaml'] = yaml
7753 reply = await self.rpc(msg)
7754 return reply
7755
7756
7757
7758 @ReturnMapping(GetConstraintsResults)
7759 async def GetModelConstraints(self):
7760 '''
7761
7762 Returns -> Value
7763 '''
7764 # map input types to rpc msg
7765 params = dict()
7766 msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params)
7767
7768 reply = await self.rpc(msg)
7769 return reply
7770
7771
7772
7773 @ReturnMapping(AddMachinesResults)
7774 async def InjectMachines(self, machineparams):
7775 '''
7776 machineparams : typing.Sequence[~AddMachineParams]
7777 Returns -> typing.Sequence[~AddMachinesResult]
7778 '''
7779 # map input types to rpc msg
7780 params = dict()
7781 msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params)
7782 params['MachineParams'] = machineparams
7783 reply = await self.rpc(msg)
7784 return reply
7785
7786
7787
7788 @ReturnMapping(ModelConfigResults)
7789 async def ModelGet(self):
7790 '''
7791
7792 Returns -> typing.Mapping[str, typing.Any]
7793 '''
7794 # map input types to rpc msg
7795 params = dict()
7796 msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params)
7797
7798 reply = await self.rpc(msg)
7799 return reply
7800
7801
7802
7803 @ReturnMapping(ModelInfo)
7804 async def ModelInfo(self):
7805 '''
7806
7807 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
7808 '''
7809 # map input types to rpc msg
7810 params = dict()
7811 msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params)
7812
7813 reply = await self.rpc(msg)
7814 return reply
7815
7816
7817
7818 @ReturnMapping(None)
7819 async def ModelSet(self, config):
7820 '''
7821 config : typing.Mapping[str, typing.Any]
7822 Returns -> None
7823 '''
7824 # map input types to rpc msg
7825 params = dict()
7826 msg = dict(Type='Client', Request='ModelSet', Version=1, Params=params)
7827 params['Config'] = config
7828 reply = await self.rpc(msg)
7829 return reply
7830
7831
7832
7833 @ReturnMapping(None)
7834 async def ModelUnset(self, keys):
7835 '''
7836 keys : typing.Sequence[str]
7837 Returns -> None
7838 '''
7839 # map input types to rpc msg
7840 params = dict()
7841 msg = dict(Type='Client', Request='ModelUnset', Version=1, Params=params)
7842 params['Keys'] = keys
7843 reply = await self.rpc(msg)
7844 return reply
7845
7846
7847
7848 @ReturnMapping(ModelUserInfoResults)
7849 async def ModelUserInfo(self):
7850 '''
7851
7852 Returns -> typing.Sequence[~ModelUserInfoResult]
7853 '''
7854 # map input types to rpc msg
7855 params = dict()
7856 msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params)
7857
7858 reply = await self.rpc(msg)
7859 return reply
7860
7861
7862
7863 @ReturnMapping(PrivateAddressResults)
7864 async def PrivateAddress(self, target):
7865 '''
7866 target : str
7867 Returns -> str
7868 '''
7869 # map input types to rpc msg
7870 params = dict()
7871 msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params)
7872 params['Target'] = target
7873 reply = await self.rpc(msg)
7874 return reply
7875
7876
7877
7878 @ReturnMapping(ProvisioningScriptResult)
7879 async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce):
7880 '''
7881 datadir : str
7882 disablepackagecommands : bool
7883 machineid : str
7884 nonce : str
7885 Returns -> str
7886 '''
7887 # map input types to rpc msg
7888 params = dict()
7889 msg = dict(Type='Client', Request='ProvisioningScript', Version=1, Params=params)
7890 params['DataDir'] = datadir
7891 params['DisablePackageCommands'] = disablepackagecommands
7892 params['MachineId'] = machineid
7893 params['Nonce'] = nonce
7894 reply = await self.rpc(msg)
7895 return reply
7896
7897
7898
7899 @ReturnMapping(PublicAddressResults)
7900 async def PublicAddress(self, target):
7901 '''
7902 target : str
7903 Returns -> str
7904 '''
7905 # map input types to rpc msg
7906 params = dict()
7907 msg = dict(Type='Client', Request='PublicAddress', Version=1, Params=params)
7908 params['Target'] = target
7909 reply = await self.rpc(msg)
7910 return reply
7911
7912
7913
7914 @ReturnMapping(ResolveCharmResults)
7915 async def ResolveCharms(self, references):
7916 '''
7917 references : typing.Sequence[~URL]
7918 Returns -> typing.Sequence[~ResolveCharmResult]
7919 '''
7920 # map input types to rpc msg
7921 params = dict()
7922 msg = dict(Type='Client', Request='ResolveCharms', Version=1, Params=params)
7923 params['References'] = references
7924 reply = await self.rpc(msg)
7925 return reply
7926
7927
7928
7929 @ReturnMapping(None)
7930 async def Resolved(self, retry, unitname):
7931 '''
7932 retry : bool
7933 unitname : str
7934 Returns -> None
7935 '''
7936 # map input types to rpc msg
7937 params = dict()
7938 msg = dict(Type='Client', Request='Resolved', Version=1, Params=params)
7939 params['Retry'] = retry
7940 params['UnitName'] = unitname
7941 reply = await self.rpc(msg)
7942 return reply
7943
7944
7945
7946 @ReturnMapping(ErrorResults)
7947 async def RetryProvisioning(self, entities):
7948 '''
7949 entities : typing.Sequence[~Entity]
7950 Returns -> typing.Sequence[~ErrorResult]
7951 '''
7952 # map input types to rpc msg
7953 params = dict()
7954 msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params)
7955 params['Entities'] = entities
7956 reply = await self.rpc(msg)
7957 return reply
7958
7959
7960
7961 @ReturnMapping(None)
7962 async def SetModelAgentVersion(self, build, major, minor, patch, tag):
7963 '''
7964 build : int
7965 major : int
7966 minor : int
7967 patch : int
7968 tag : str
7969 Returns -> None
7970 '''
7971 # map input types to rpc msg
7972 params = dict()
7973 msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params)
7974 params['Build'] = build
7975 params['Major'] = major
7976 params['Minor'] = minor
7977 params['Patch'] = patch
7978 params['Tag'] = tag
7979 reply = await self.rpc(msg)
7980 return reply
7981
7982
7983
7984 @ReturnMapping(None)
7985 async def SetModelConstraints(self, constraints, servicename):
7986 '''
7987 constraints : Value
7988 servicename : str
7989 Returns -> None
7990 '''
7991 # map input types to rpc msg
7992 params = dict()
7993 msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params)
7994 params['Constraints'] = constraints
7995 params['ServiceName'] = servicename
7996 reply = await self.rpc(msg)
7997 return reply
7998
7999
8000
8001 @ReturnMapping(StatusHistoryResults)
8002 async def StatusHistory(self, kind, name, size):
8003 '''
8004 kind : str
8005 name : str
8006 size : int
8007 Returns -> typing.Sequence[~DetailedStatus]
8008 '''
8009 # map input types to rpc msg
8010 params = dict()
8011 msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params)
8012 params['Kind'] = kind
8013 params['Name'] = name
8014 params['Size'] = size
8015 reply = await self.rpc(msg)
8016 return reply
8017
8018
8019
8020 @ReturnMapping(AllWatcherId)
8021 async def WatchAll(self):
8022 '''
8023
8024 Returns -> str
8025 '''
8026 # map input types to rpc msg
8027 params = dict()
8028 msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params)
8029
8030 reply = await self.rpc(msg)
8031 return reply
8032
8033
8034 class Controller(Type):
8035 name = 'Controller'
8036 version = 2
8037 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
8038 'properties': {'AllWatcherId': {'type': 'string'}},
8039 'required': ['AllWatcherId'],
8040 'type': 'object'},
8041 'DestroyControllerArgs': {'additionalProperties': False,
8042 'properties': {'destroy-models': {'type': 'boolean'}},
8043 'required': ['destroy-models'],
8044 'type': 'object'},
8045 'Entities': {'additionalProperties': False,
8046 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8047 'type': 'array'}},
8048 'required': ['Entities'],
8049 'type': 'object'},
8050 'Entity': {'additionalProperties': False,
8051 'properties': {'Tag': {'type': 'string'}},
8052 'required': ['Tag'],
8053 'type': 'object'},
8054 'Error': {'additionalProperties': False,
8055 'properties': {'Code': {'type': 'string'},
8056 'Info': {'$ref': '#/definitions/ErrorInfo'},
8057 'Message': {'type': 'string'}},
8058 'required': ['Message', 'Code'],
8059 'type': 'object'},
8060 'ErrorInfo': {'additionalProperties': False,
8061 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8062 'MacaroonPath': {'type': 'string'}},
8063 'type': 'object'},
8064 'InitiateModelMigrationArgs': {'additionalProperties': False,
8065 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
8066 'type': 'array'}},
8067 'required': ['specs'],
8068 'type': 'object'},
8069 'InitiateModelMigrationResult': {'additionalProperties': False,
8070 'properties': {'error': {'$ref': '#/definitions/Error'},
8071 'id': {'type': 'string'},
8072 'model-tag': {'type': 'string'}},
8073 'required': ['model-tag',
8074 'error',
8075 'id'],
8076 'type': 'object'},
8077 'InitiateModelMigrationResults': {'additionalProperties': False,
8078 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
8079 'type': 'array'}},
8080 'required': ['results'],
8081 'type': 'object'},
8082 'Macaroon': {'additionalProperties': False,
8083 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8084 'type': 'array'},
8085 'data': {'items': {'type': 'integer'},
8086 'type': 'array'},
8087 'id': {'$ref': '#/definitions/packet'},
8088 'location': {'$ref': '#/definitions/packet'},
8089 'sig': {'items': {'type': 'integer'},
8090 'type': 'array'}},
8091 'required': ['data',
8092 'location',
8093 'id',
8094 'caveats',
8095 'sig'],
8096 'type': 'object'},
8097 'Model': {'additionalProperties': False,
8098 'properties': {'Name': {'type': 'string'},
8099 'OwnerTag': {'type': 'string'},
8100 'UUID': {'type': 'string'}},
8101 'required': ['Name', 'UUID', 'OwnerTag'],
8102 'type': 'object'},
8103 'ModelBlockInfo': {'additionalProperties': False,
8104 'properties': {'blocks': {'items': {'type': 'string'},
8105 'type': 'array'},
8106 'model-uuid': {'type': 'string'},
8107 'name': {'type': 'string'},
8108 'owner-tag': {'type': 'string'}},
8109 'required': ['name',
8110 'model-uuid',
8111 'owner-tag',
8112 'blocks'],
8113 'type': 'object'},
8114 'ModelBlockInfoList': {'additionalProperties': False,
8115 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
8116 'type': 'array'}},
8117 'type': 'object'},
8118 'ModelConfigResults': {'additionalProperties': False,
8119 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8120 'type': 'object'}},
8121 'type': 'object'}},
8122 'required': ['Config'],
8123 'type': 'object'},
8124 'ModelMigrationSpec': {'additionalProperties': False,
8125 'properties': {'model-tag': {'type': 'string'},
8126 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
8127 'required': ['model-tag',
8128 'target-info'],
8129 'type': 'object'},
8130 'ModelMigrationTargetInfo': {'additionalProperties': False,
8131 'properties': {'addrs': {'items': {'type': 'string'},
8132 'type': 'array'},
8133 'auth-tag': {'type': 'string'},
8134 'ca-cert': {'type': 'string'},
8135 'controller-tag': {'type': 'string'},
8136 'password': {'type': 'string'}},
8137 'required': ['controller-tag',
8138 'addrs',
8139 'ca-cert',
8140 'auth-tag',
8141 'password'],
8142 'type': 'object'},
8143 'ModelStatus': {'additionalProperties': False,
8144 'properties': {'hosted-machine-count': {'type': 'integer'},
8145 'life': {'type': 'string'},
8146 'model-tag': {'type': 'string'},
8147 'owner-tag': {'type': 'string'},
8148 'service-count': {'type': 'integer'}},
8149 'required': ['model-tag',
8150 'life',
8151 'hosted-machine-count',
8152 'service-count',
8153 'owner-tag'],
8154 'type': 'object'},
8155 'ModelStatusResults': {'additionalProperties': False,
8156 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
8157 'type': 'array'}},
8158 'required': ['models'],
8159 'type': 'object'},
8160 'RemoveBlocksArgs': {'additionalProperties': False,
8161 'properties': {'all': {'type': 'boolean'}},
8162 'required': ['all'],
8163 'type': 'object'},
8164 'UserModel': {'additionalProperties': False,
8165 'properties': {'LastConnection': {'format': 'date-time',
8166 'type': 'string'},
8167 'Model': {'$ref': '#/definitions/Model'}},
8168 'required': ['Model', 'LastConnection'],
8169 'type': 'object'},
8170 'UserModelList': {'additionalProperties': False,
8171 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
8172 'type': 'array'}},
8173 'required': ['UserModels'],
8174 'type': 'object'},
8175 'caveat': {'additionalProperties': False,
8176 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8177 'location': {'$ref': '#/definitions/packet'},
8178 'verificationId': {'$ref': '#/definitions/packet'}},
8179 'required': ['location',
8180 'caveatId',
8181 'verificationId'],
8182 'type': 'object'},
8183 'packet': {'additionalProperties': False,
8184 'properties': {'headerLen': {'type': 'integer'},
8185 'start': {'type': 'integer'},
8186 'totalLen': {'type': 'integer'}},
8187 'required': ['start', 'totalLen', 'headerLen'],
8188 'type': 'object'}},
8189 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
8190 'type': 'object'},
8191 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
8192 'type': 'object'},
8193 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
8194 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
8195 'type': 'object'},
8196 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
8197 'type': 'object'},
8198 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8199 'type': 'object'},
8200 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8201 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
8202 'type': 'object'},
8203 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
8204 'type': 'object'},
8205 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8206 'type': 'object'}},
8207 'type': 'object'}
8208
8209
8210 @ReturnMapping(UserModelList)
8211 async def AllModels(self):
8212 '''
8213
8214 Returns -> typing.Sequence[~UserModel]
8215 '''
8216 # map input types to rpc msg
8217 params = dict()
8218 msg = dict(Type='Controller', Request='AllModels', Version=2, Params=params)
8219
8220 reply = await self.rpc(msg)
8221 return reply
8222
8223
8224
8225 @ReturnMapping(None)
8226 async def DestroyController(self, destroy_models):
8227 '''
8228 destroy_models : bool
8229 Returns -> None
8230 '''
8231 # map input types to rpc msg
8232 params = dict()
8233 msg = dict(Type='Controller', Request='DestroyController', Version=2, Params=params)
8234 params['destroy-models'] = destroy_models
8235 reply = await self.rpc(msg)
8236 return reply
8237
8238
8239
8240 @ReturnMapping(InitiateModelMigrationResults)
8241 async def InitiateModelMigration(self, specs):
8242 '''
8243 specs : typing.Sequence[~ModelMigrationSpec]
8244 Returns -> typing.Sequence[~InitiateModelMigrationResult]
8245 '''
8246 # map input types to rpc msg
8247 params = dict()
8248 msg = dict(Type='Controller', Request='InitiateModelMigration', Version=2, Params=params)
8249 params['specs'] = specs
8250 reply = await self.rpc(msg)
8251 return reply
8252
8253
8254
8255 @ReturnMapping(ModelBlockInfoList)
8256 async def ListBlockedModels(self):
8257 '''
8258
8259 Returns -> typing.Sequence[~ModelBlockInfo]
8260 '''
8261 # map input types to rpc msg
8262 params = dict()
8263 msg = dict(Type='Controller', Request='ListBlockedModels', Version=2, Params=params)
8264
8265 reply = await self.rpc(msg)
8266 return reply
8267
8268
8269
8270 @ReturnMapping(ModelConfigResults)
8271 async def ModelConfig(self):
8272 '''
8273
8274 Returns -> typing.Mapping[str, typing.Any]
8275 '''
8276 # map input types to rpc msg
8277 params = dict()
8278 msg = dict(Type='Controller', Request='ModelConfig', Version=2, Params=params)
8279
8280 reply = await self.rpc(msg)
8281 return reply
8282
8283
8284
8285 @ReturnMapping(ModelStatusResults)
8286 async def ModelStatus(self, entities):
8287 '''
8288 entities : typing.Sequence[~Entity]
8289 Returns -> typing.Sequence[~ModelStatus]
8290 '''
8291 # map input types to rpc msg
8292 params = dict()
8293 msg = dict(Type='Controller', Request='ModelStatus', Version=2, Params=params)
8294 params['Entities'] = entities
8295 reply = await self.rpc(msg)
8296 return reply
8297
8298
8299
8300 @ReturnMapping(None)
8301 async def RemoveBlocks(self, all_):
8302 '''
8303 all_ : bool
8304 Returns -> None
8305 '''
8306 # map input types to rpc msg
8307 params = dict()
8308 msg = dict(Type='Controller', Request='RemoveBlocks', Version=2, Params=params)
8309 params['all'] = all_
8310 reply = await self.rpc(msg)
8311 return reply
8312
8313
8314
8315 @ReturnMapping(AllWatcherId)
8316 async def WatchAllModels(self):
8317 '''
8318
8319 Returns -> str
8320 '''
8321 # map input types to rpc msg
8322 params = dict()
8323 msg = dict(Type='Controller', Request='WatchAllModels', Version=2, Params=params)
8324
8325 reply = await self.rpc(msg)
8326 return reply
8327
8328
8329 class Deployer(Type):
8330 name = 'Deployer'
8331 version = 1
8332 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8333 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8334 'type': 'array'},
8335 'type': 'array'}},
8336 'required': ['Servers'],
8337 'type': 'object'},
8338 'Address': {'additionalProperties': False,
8339 'properties': {'Scope': {'type': 'string'},
8340 'SpaceName': {'type': 'string'},
8341 'Type': {'type': 'string'},
8342 'Value': {'type': 'string'}},
8343 'required': ['Value', 'Type', 'Scope'],
8344 'type': 'object'},
8345 'BytesResult': {'additionalProperties': False,
8346 'properties': {'Result': {'items': {'type': 'integer'},
8347 'type': 'array'}},
8348 'required': ['Result'],
8349 'type': 'object'},
8350 'DeployerConnectionValues': {'additionalProperties': False,
8351 'properties': {'APIAddresses': {'items': {'type': 'string'},
8352 'type': 'array'},
8353 'StateAddresses': {'items': {'type': 'string'},
8354 'type': 'array'}},
8355 'required': ['StateAddresses',
8356 'APIAddresses'],
8357 'type': 'object'},
8358 'Entities': {'additionalProperties': False,
8359 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8360 'type': 'array'}},
8361 'required': ['Entities'],
8362 'type': 'object'},
8363 'Entity': {'additionalProperties': False,
8364 'properties': {'Tag': {'type': 'string'}},
8365 'required': ['Tag'],
8366 'type': 'object'},
8367 'EntityPassword': {'additionalProperties': False,
8368 'properties': {'Password': {'type': 'string'},
8369 'Tag': {'type': 'string'}},
8370 'required': ['Tag', 'Password'],
8371 'type': 'object'},
8372 'EntityPasswords': {'additionalProperties': False,
8373 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
8374 'type': 'array'}},
8375 'required': ['Changes'],
8376 'type': 'object'},
8377 'Error': {'additionalProperties': False,
8378 'properties': {'Code': {'type': 'string'},
8379 'Info': {'$ref': '#/definitions/ErrorInfo'},
8380 'Message': {'type': 'string'}},
8381 'required': ['Message', 'Code'],
8382 'type': 'object'},
8383 'ErrorInfo': {'additionalProperties': False,
8384 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8385 'MacaroonPath': {'type': 'string'}},
8386 'type': 'object'},
8387 'ErrorResult': {'additionalProperties': False,
8388 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8389 'required': ['Error'],
8390 'type': 'object'},
8391 'ErrorResults': {'additionalProperties': False,
8392 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8393 'type': 'array'}},
8394 'required': ['Results'],
8395 'type': 'object'},
8396 'HostPort': {'additionalProperties': False,
8397 'properties': {'Address': {'$ref': '#/definitions/Address'},
8398 'Port': {'type': 'integer'}},
8399 'required': ['Address', 'Port'],
8400 'type': 'object'},
8401 'LifeResult': {'additionalProperties': False,
8402 'properties': {'Error': {'$ref': '#/definitions/Error'},
8403 'Life': {'type': 'string'}},
8404 'required': ['Life', 'Error'],
8405 'type': 'object'},
8406 'LifeResults': {'additionalProperties': False,
8407 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
8408 'type': 'array'}},
8409 'required': ['Results'],
8410 'type': 'object'},
8411 'Macaroon': {'additionalProperties': False,
8412 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8413 'type': 'array'},
8414 'data': {'items': {'type': 'integer'},
8415 'type': 'array'},
8416 'id': {'$ref': '#/definitions/packet'},
8417 'location': {'$ref': '#/definitions/packet'},
8418 'sig': {'items': {'type': 'integer'},
8419 'type': 'array'}},
8420 'required': ['data',
8421 'location',
8422 'id',
8423 'caveats',
8424 'sig'],
8425 'type': 'object'},
8426 'NotifyWatchResult': {'additionalProperties': False,
8427 'properties': {'Error': {'$ref': '#/definitions/Error'},
8428 'NotifyWatcherId': {'type': 'string'}},
8429 'required': ['NotifyWatcherId', 'Error'],
8430 'type': 'object'},
8431 'StringResult': {'additionalProperties': False,
8432 'properties': {'Error': {'$ref': '#/definitions/Error'},
8433 'Result': {'type': 'string'}},
8434 'required': ['Error', 'Result'],
8435 'type': 'object'},
8436 'StringsResult': {'additionalProperties': False,
8437 'properties': {'Error': {'$ref': '#/definitions/Error'},
8438 'Result': {'items': {'type': 'string'},
8439 'type': 'array'}},
8440 'required': ['Error', 'Result'],
8441 'type': 'object'},
8442 'StringsWatchResult': {'additionalProperties': False,
8443 'properties': {'Changes': {'items': {'type': 'string'},
8444 'type': 'array'},
8445 'Error': {'$ref': '#/definitions/Error'},
8446 'StringsWatcherId': {'type': 'string'}},
8447 'required': ['StringsWatcherId',
8448 'Changes',
8449 'Error'],
8450 'type': 'object'},
8451 'StringsWatchResults': {'additionalProperties': False,
8452 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8453 'type': 'array'}},
8454 'required': ['Results'],
8455 'type': 'object'},
8456 'caveat': {'additionalProperties': False,
8457 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8458 'location': {'$ref': '#/definitions/packet'},
8459 'verificationId': {'$ref': '#/definitions/packet'}},
8460 'required': ['location',
8461 'caveatId',
8462 'verificationId'],
8463 'type': 'object'},
8464 'packet': {'additionalProperties': False,
8465 'properties': {'headerLen': {'type': 'integer'},
8466 'start': {'type': 'integer'},
8467 'totalLen': {'type': 'integer'}},
8468 'required': ['start', 'totalLen', 'headerLen'],
8469 'type': 'object'}},
8470 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
8471 'type': 'object'},
8472 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8473 'type': 'object'},
8474 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
8475 'type': 'object'},
8476 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
8477 'type': 'object'},
8478 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8479 'Result': {'$ref': '#/definitions/LifeResults'}},
8480 'type': 'object'},
8481 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
8482 'type': 'object'},
8483 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8484 'Result': {'$ref': '#/definitions/ErrorResults'}},
8485 'type': 'object'},
8486 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
8487 'Result': {'$ref': '#/definitions/ErrorResults'}},
8488 'type': 'object'},
8489 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
8490 'type': 'object'},
8491 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8492 'type': 'object'},
8493 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8494 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8495 'type': 'object'}},
8496 'type': 'object'}
8497
8498
8499 @ReturnMapping(StringsResult)
8500 async def APIAddresses(self):
8501 '''
8502
8503 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
8504 '''
8505 # map input types to rpc msg
8506 params = dict()
8507 msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params)
8508
8509 reply = await self.rpc(msg)
8510 return reply
8511
8512
8513
8514 @ReturnMapping(APIHostPortsResult)
8515 async def APIHostPorts(self):
8516 '''
8517
8518 Returns -> typing.Sequence[~HostPort]
8519 '''
8520 # map input types to rpc msg
8521 params = dict()
8522 msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params)
8523
8524 reply = await self.rpc(msg)
8525 return reply
8526
8527
8528
8529 @ReturnMapping(BytesResult)
8530 async def CACert(self):
8531 '''
8532
8533 Returns -> typing.Sequence[int]
8534 '''
8535 # map input types to rpc msg
8536 params = dict()
8537 msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params)
8538
8539 reply = await self.rpc(msg)
8540 return reply
8541
8542
8543
8544 @ReturnMapping(DeployerConnectionValues)
8545 async def ConnectionInfo(self):
8546 '''
8547
8548 Returns -> typing.Sequence[str]
8549 '''
8550 # map input types to rpc msg
8551 params = dict()
8552 msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params)
8553
8554 reply = await self.rpc(msg)
8555 return reply
8556
8557
8558
8559 @ReturnMapping(LifeResults)
8560 async def Life(self, entities):
8561 '''
8562 entities : typing.Sequence[~Entity]
8563 Returns -> typing.Sequence[~LifeResult]
8564 '''
8565 # map input types to rpc msg
8566 params = dict()
8567 msg = dict(Type='Deployer', Request='Life', Version=1, Params=params)
8568 params['Entities'] = entities
8569 reply = await self.rpc(msg)
8570 return reply
8571
8572
8573
8574 @ReturnMapping(StringResult)
8575 async def ModelUUID(self):
8576 '''
8577
8578 Returns -> typing.Union[_ForwardRef('Error'), str]
8579 '''
8580 # map input types to rpc msg
8581 params = dict()
8582 msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params)
8583
8584 reply = await self.rpc(msg)
8585 return reply
8586
8587
8588
8589 @ReturnMapping(ErrorResults)
8590 async def Remove(self, entities):
8591 '''
8592 entities : typing.Sequence[~Entity]
8593 Returns -> typing.Sequence[~ErrorResult]
8594 '''
8595 # map input types to rpc msg
8596 params = dict()
8597 msg = dict(Type='Deployer', Request='Remove', Version=1, Params=params)
8598 params['Entities'] = entities
8599 reply = await self.rpc(msg)
8600 return reply
8601
8602
8603
8604 @ReturnMapping(ErrorResults)
8605 async def SetPasswords(self, changes):
8606 '''
8607 changes : typing.Sequence[~EntityPassword]
8608 Returns -> typing.Sequence[~ErrorResult]
8609 '''
8610 # map input types to rpc msg
8611 params = dict()
8612 msg = dict(Type='Deployer', Request='SetPasswords', Version=1, Params=params)
8613 params['Changes'] = changes
8614 reply = await self.rpc(msg)
8615 return reply
8616
8617
8618
8619 @ReturnMapping(StringsResult)
8620 async def StateAddresses(self):
8621 '''
8622
8623 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
8624 '''
8625 # map input types to rpc msg
8626 params = dict()
8627 msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params)
8628
8629 reply = await self.rpc(msg)
8630 return reply
8631
8632
8633
8634 @ReturnMapping(NotifyWatchResult)
8635 async def WatchAPIHostPorts(self):
8636 '''
8637
8638 Returns -> typing.Union[_ForwardRef('Error'), str]
8639 '''
8640 # map input types to rpc msg
8641 params = dict()
8642 msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params)
8643
8644 reply = await self.rpc(msg)
8645 return reply
8646
8647
8648
8649 @ReturnMapping(StringsWatchResults)
8650 async def WatchUnits(self, entities):
8651 '''
8652 entities : typing.Sequence[~Entity]
8653 Returns -> typing.Sequence[~StringsWatchResult]
8654 '''
8655 # map input types to rpc msg
8656 params = dict()
8657 msg = dict(Type='Deployer', Request='WatchUnits', Version=1, Params=params)
8658 params['Entities'] = entities
8659 reply = await self.rpc(msg)
8660 return reply
8661
8662
8663 class DiscoverSpaces(Type):
8664 name = 'DiscoverSpaces'
8665 version = 2
8666 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
8667 'properties': {'SpaceTag': {'type': 'string'},
8668 'SubnetProviderId': {'type': 'string'},
8669 'SubnetTag': {'type': 'string'},
8670 'Zones': {'items': {'type': 'string'},
8671 'type': 'array'}},
8672 'required': ['SpaceTag'],
8673 'type': 'object'},
8674 'AddSubnetsParams': {'additionalProperties': False,
8675 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
8676 'type': 'array'}},
8677 'required': ['Subnets'],
8678 'type': 'object'},
8679 'CreateSpaceParams': {'additionalProperties': False,
8680 'properties': {'ProviderId': {'type': 'string'},
8681 'Public': {'type': 'boolean'},
8682 'SpaceTag': {'type': 'string'},
8683 'SubnetTags': {'items': {'type': 'string'},
8684 'type': 'array'}},
8685 'required': ['SubnetTags',
8686 'SpaceTag',
8687 'Public'],
8688 'type': 'object'},
8689 'CreateSpacesParams': {'additionalProperties': False,
8690 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
8691 'type': 'array'}},
8692 'required': ['Spaces'],
8693 'type': 'object'},
8694 'DiscoverSpacesResults': {'additionalProperties': False,
8695 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
8696 'type': 'array'}},
8697 'required': ['Results'],
8698 'type': 'object'},
8699 'Error': {'additionalProperties': False,
8700 'properties': {'Code': {'type': 'string'},
8701 'Info': {'$ref': '#/definitions/ErrorInfo'},
8702 'Message': {'type': 'string'}},
8703 'required': ['Message', 'Code'],
8704 'type': 'object'},
8705 'ErrorInfo': {'additionalProperties': False,
8706 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8707 'MacaroonPath': {'type': 'string'}},
8708 'type': 'object'},
8709 'ErrorResult': {'additionalProperties': False,
8710 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8711 'required': ['Error'],
8712 'type': 'object'},
8713 'ErrorResults': {'additionalProperties': False,
8714 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8715 'type': 'array'}},
8716 'required': ['Results'],
8717 'type': 'object'},
8718 'ListSubnetsResults': {'additionalProperties': False,
8719 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
8720 'type': 'array'}},
8721 'required': ['Results'],
8722 'type': 'object'},
8723 'Macaroon': {'additionalProperties': False,
8724 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8725 'type': 'array'},
8726 'data': {'items': {'type': 'integer'},
8727 'type': 'array'},
8728 'id': {'$ref': '#/definitions/packet'},
8729 'location': {'$ref': '#/definitions/packet'},
8730 'sig': {'items': {'type': 'integer'},
8731 'type': 'array'}},
8732 'required': ['data',
8733 'location',
8734 'id',
8735 'caveats',
8736 'sig'],
8737 'type': 'object'},
8738 'ModelConfigResult': {'additionalProperties': False,
8739 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8740 'type': 'object'}},
8741 'type': 'object'}},
8742 'required': ['Config'],
8743 'type': 'object'},
8744 'ProviderSpace': {'additionalProperties': False,
8745 'properties': {'Error': {'$ref': '#/definitions/Error'},
8746 'Name': {'type': 'string'},
8747 'ProviderId': {'type': 'string'},
8748 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
8749 'type': 'array'}},
8750 'required': ['Name',
8751 'ProviderId',
8752 'Subnets'],
8753 'type': 'object'},
8754 'Subnet': {'additionalProperties': False,
8755 'properties': {'CIDR': {'type': 'string'},
8756 'Life': {'type': 'string'},
8757 'ProviderId': {'type': 'string'},
8758 'SpaceTag': {'type': 'string'},
8759 'StaticRangeHighIP': {'items': {'type': 'integer'},
8760 'type': 'array'},
8761 'StaticRangeLowIP': {'items': {'type': 'integer'},
8762 'type': 'array'},
8763 'Status': {'type': 'string'},
8764 'VLANTag': {'type': 'integer'},
8765 'Zones': {'items': {'type': 'string'},
8766 'type': 'array'}},
8767 'required': ['CIDR',
8768 'VLANTag',
8769 'Life',
8770 'SpaceTag',
8771 'Zones'],
8772 'type': 'object'},
8773 'SubnetsFilters': {'additionalProperties': False,
8774 'properties': {'SpaceTag': {'type': 'string'},
8775 'Zone': {'type': 'string'}},
8776 'type': 'object'},
8777 'caveat': {'additionalProperties': False,
8778 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8779 'location': {'$ref': '#/definitions/packet'},
8780 'verificationId': {'$ref': '#/definitions/packet'}},
8781 'required': ['location',
8782 'caveatId',
8783 'verificationId'],
8784 'type': 'object'},
8785 'packet': {'additionalProperties': False,
8786 'properties': {'headerLen': {'type': 'integer'},
8787 'start': {'type': 'integer'},
8788 'totalLen': {'type': 'integer'}},
8789 'required': ['start', 'totalLen', 'headerLen'],
8790 'type': 'object'}},
8791 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
8792 'Result': {'$ref': '#/definitions/ErrorResults'}},
8793 'type': 'object'},
8794 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
8795 'Result': {'$ref': '#/definitions/ErrorResults'}},
8796 'type': 'object'},
8797 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
8798 'type': 'object'},
8799 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
8800 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
8801 'type': 'object'},
8802 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
8803 'type': 'object'}},
8804 'type': 'object'}
8805
8806
8807 @ReturnMapping(ErrorResults)
8808 async def AddSubnets(self, subnets):
8809 '''
8810 subnets : typing.Sequence[~AddSubnetParams]
8811 Returns -> typing.Sequence[~ErrorResult]
8812 '''
8813 # map input types to rpc msg
8814 params = dict()
8815 msg = dict(Type='DiscoverSpaces', Request='AddSubnets', Version=2, Params=params)
8816 params['Subnets'] = subnets
8817 reply = await self.rpc(msg)
8818 return reply
8819
8820
8821
8822 @ReturnMapping(ErrorResults)
8823 async def CreateSpaces(self, spaces):
8824 '''
8825 spaces : typing.Sequence[~CreateSpaceParams]
8826 Returns -> typing.Sequence[~ErrorResult]
8827 '''
8828 # map input types to rpc msg
8829 params = dict()
8830 msg = dict(Type='DiscoverSpaces', Request='CreateSpaces', Version=2, Params=params)
8831 params['Spaces'] = spaces
8832 reply = await self.rpc(msg)
8833 return reply
8834
8835
8836
8837 @ReturnMapping(DiscoverSpacesResults)
8838 async def ListSpaces(self):
8839 '''
8840
8841 Returns -> typing.Sequence[~ProviderSpace]
8842 '''
8843 # map input types to rpc msg
8844 params = dict()
8845 msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params)
8846
8847 reply = await self.rpc(msg)
8848 return reply
8849
8850
8851
8852 @ReturnMapping(ListSubnetsResults)
8853 async def ListSubnets(self, spacetag, zone):
8854 '''
8855 spacetag : str
8856 zone : str
8857 Returns -> typing.Sequence[~Subnet]
8858 '''
8859 # map input types to rpc msg
8860 params = dict()
8861 msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params)
8862 params['SpaceTag'] = spacetag
8863 params['Zone'] = zone
8864 reply = await self.rpc(msg)
8865 return reply
8866
8867
8868
8869 @ReturnMapping(ModelConfigResult)
8870 async def ModelConfig(self):
8871 '''
8872
8873 Returns -> typing.Mapping[str, typing.Any]
8874 '''
8875 # map input types to rpc msg
8876 params = dict()
8877 msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params)
8878
8879 reply = await self.rpc(msg)
8880 return reply
8881
8882
8883 class DiskManager(Type):
8884 name = 'DiskManager'
8885 version = 2
8886 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
8887 'properties': {'BusAddress': {'type': 'string'},
8888 'DeviceLinks': {'items': {'type': 'string'},
8889 'type': 'array'},
8890 'DeviceName': {'type': 'string'},
8891 'FilesystemType': {'type': 'string'},
8892 'HardwareId': {'type': 'string'},
8893 'InUse': {'type': 'boolean'},
8894 'Label': {'type': 'string'},
8895 'MountPoint': {'type': 'string'},
8896 'Size': {'type': 'integer'},
8897 'UUID': {'type': 'string'}},
8898 'required': ['DeviceName',
8899 'DeviceLinks',
8900 'Label',
8901 'UUID',
8902 'HardwareId',
8903 'BusAddress',
8904 'Size',
8905 'FilesystemType',
8906 'InUse',
8907 'MountPoint'],
8908 'type': 'object'},
8909 'Error': {'additionalProperties': False,
8910 'properties': {'Code': {'type': 'string'},
8911 'Info': {'$ref': '#/definitions/ErrorInfo'},
8912 'Message': {'type': 'string'}},
8913 'required': ['Message', 'Code'],
8914 'type': 'object'},
8915 'ErrorInfo': {'additionalProperties': False,
8916 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8917 'MacaroonPath': {'type': 'string'}},
8918 'type': 'object'},
8919 'ErrorResult': {'additionalProperties': False,
8920 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8921 'required': ['Error'],
8922 'type': 'object'},
8923 'ErrorResults': {'additionalProperties': False,
8924 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8925 'type': 'array'}},
8926 'required': ['Results'],
8927 'type': 'object'},
8928 'Macaroon': {'additionalProperties': False,
8929 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8930 'type': 'array'},
8931 'data': {'items': {'type': 'integer'},
8932 'type': 'array'},
8933 'id': {'$ref': '#/definitions/packet'},
8934 'location': {'$ref': '#/definitions/packet'},
8935 'sig': {'items': {'type': 'integer'},
8936 'type': 'array'}},
8937 'required': ['data',
8938 'location',
8939 'id',
8940 'caveats',
8941 'sig'],
8942 'type': 'object'},
8943 'MachineBlockDevices': {'additionalProperties': False,
8944 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
8945 'type': 'array'},
8946 'machine': {'type': 'string'}},
8947 'required': ['machine'],
8948 'type': 'object'},
8949 'SetMachineBlockDevices': {'additionalProperties': False,
8950 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
8951 'type': 'array'}},
8952 'required': ['machineblockdevices'],
8953 'type': 'object'},
8954 'caveat': {'additionalProperties': False,
8955 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8956 'location': {'$ref': '#/definitions/packet'},
8957 'verificationId': {'$ref': '#/definitions/packet'}},
8958 'required': ['location',
8959 'caveatId',
8960 'verificationId'],
8961 'type': 'object'},
8962 'packet': {'additionalProperties': False,
8963 'properties': {'headerLen': {'type': 'integer'},
8964 'start': {'type': 'integer'},
8965 'totalLen': {'type': 'integer'}},
8966 'required': ['start', 'totalLen', 'headerLen'],
8967 'type': 'object'}},
8968 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
8969 'Result': {'$ref': '#/definitions/ErrorResults'}},
8970 'type': 'object'}},
8971 'type': 'object'}
8972
8973
8974 @ReturnMapping(ErrorResults)
8975 async def SetMachineBlockDevices(self, machineblockdevices):
8976 '''
8977 machineblockdevices : typing.Sequence[~MachineBlockDevices]
8978 Returns -> typing.Sequence[~ErrorResult]
8979 '''
8980 # map input types to rpc msg
8981 params = dict()
8982 msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params)
8983 params['machineblockdevices'] = machineblockdevices
8984 reply = await self.rpc(msg)
8985 return reply
8986
8987
8988 class EntityWatcher(Type):
8989 name = 'EntityWatcher'
8990 version = 2
8991 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
8992 'properties': {'Changes': {'items': {'type': 'string'},
8993 'type': 'array'},
8994 'EntityWatcherId': {'type': 'string'},
8995 'Error': {'$ref': '#/definitions/Error'}},
8996 'required': ['EntityWatcherId',
8997 'Changes',
8998 'Error'],
8999 'type': 'object'},
9000 'Error': {'additionalProperties': False,
9001 'properties': {'Code': {'type': 'string'},
9002 'Info': {'$ref': '#/definitions/ErrorInfo'},
9003 'Message': {'type': 'string'}},
9004 'required': ['Message', 'Code'],
9005 'type': 'object'},
9006 'ErrorInfo': {'additionalProperties': False,
9007 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9008 'MacaroonPath': {'type': 'string'}},
9009 'type': 'object'},
9010 'Macaroon': {'additionalProperties': False,
9011 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9012 'type': 'array'},
9013 'data': {'items': {'type': 'integer'},
9014 'type': 'array'},
9015 'id': {'$ref': '#/definitions/packet'},
9016 'location': {'$ref': '#/definitions/packet'},
9017 'sig': {'items': {'type': 'integer'},
9018 'type': 'array'}},
9019 'required': ['data',
9020 'location',
9021 'id',
9022 'caveats',
9023 'sig'],
9024 'type': 'object'},
9025 'caveat': {'additionalProperties': False,
9026 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9027 'location': {'$ref': '#/definitions/packet'},
9028 'verificationId': {'$ref': '#/definitions/packet'}},
9029 'required': ['location',
9030 'caveatId',
9031 'verificationId'],
9032 'type': 'object'},
9033 'packet': {'additionalProperties': False,
9034 'properties': {'headerLen': {'type': 'integer'},
9035 'start': {'type': 'integer'},
9036 'totalLen': {'type': 'integer'}},
9037 'required': ['start', 'totalLen', 'headerLen'],
9038 'type': 'object'}},
9039 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
9040 'type': 'object'},
9041 'Stop': {'type': 'object'}},
9042 'type': 'object'}
9043
9044
9045 @ReturnMapping(EntitiesWatchResult)
9046 async def Next(self):
9047 '''
9048
9049 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9050 '''
9051 # map input types to rpc msg
9052 params = dict()
9053 msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params)
9054
9055 reply = await self.rpc(msg)
9056 return reply
9057
9058
9059
9060 @ReturnMapping(None)
9061 async def Stop(self):
9062 '''
9063
9064 Returns -> None
9065 '''
9066 # map input types to rpc msg
9067 params = dict()
9068 msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params)
9069
9070 reply = await self.rpc(msg)
9071 return reply
9072
9073
9074 class FilesystemAttachmentsWatcher(Type):
9075 name = 'FilesystemAttachmentsWatcher'
9076 version = 2
9077 schema = {'definitions': {'Error': {'additionalProperties': False,
9078 'properties': {'Code': {'type': 'string'},
9079 'Info': {'$ref': '#/definitions/ErrorInfo'},
9080 'Message': {'type': 'string'}},
9081 'required': ['Message', 'Code'],
9082 'type': 'object'},
9083 'ErrorInfo': {'additionalProperties': False,
9084 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9085 'MacaroonPath': {'type': 'string'}},
9086 'type': 'object'},
9087 'Macaroon': {'additionalProperties': False,
9088 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9089 'type': 'array'},
9090 'data': {'items': {'type': 'integer'},
9091 'type': 'array'},
9092 'id': {'$ref': '#/definitions/packet'},
9093 'location': {'$ref': '#/definitions/packet'},
9094 'sig': {'items': {'type': 'integer'},
9095 'type': 'array'}},
9096 'required': ['data',
9097 'location',
9098 'id',
9099 'caveats',
9100 'sig'],
9101 'type': 'object'},
9102 'MachineStorageId': {'additionalProperties': False,
9103 'properties': {'attachmenttag': {'type': 'string'},
9104 'machinetag': {'type': 'string'}},
9105 'required': ['machinetag',
9106 'attachmenttag'],
9107 'type': 'object'},
9108 'MachineStorageIdsWatchResult': {'additionalProperties': False,
9109 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
9110 'type': 'array'},
9111 'Error': {'$ref': '#/definitions/Error'},
9112 'MachineStorageIdsWatcherId': {'type': 'string'}},
9113 'required': ['MachineStorageIdsWatcherId',
9114 'Changes',
9115 'Error'],
9116 'type': 'object'},
9117 'caveat': {'additionalProperties': False,
9118 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9119 'location': {'$ref': '#/definitions/packet'},
9120 'verificationId': {'$ref': '#/definitions/packet'}},
9121 'required': ['location',
9122 'caveatId',
9123 'verificationId'],
9124 'type': 'object'},
9125 'packet': {'additionalProperties': False,
9126 'properties': {'headerLen': {'type': 'integer'},
9127 'start': {'type': 'integer'},
9128 'totalLen': {'type': 'integer'}},
9129 'required': ['start', 'totalLen', 'headerLen'],
9130 'type': 'object'}},
9131 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
9132 'type': 'object'},
9133 'Stop': {'type': 'object'}},
9134 'type': 'object'}
9135
9136
9137 @ReturnMapping(MachineStorageIdsWatchResult)
9138 async def Next(self):
9139 '''
9140
9141 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
9142 '''
9143 # map input types to rpc msg
9144 params = dict()
9145 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params)
9146
9147 reply = await self.rpc(msg)
9148 return reply
9149
9150
9151
9152 @ReturnMapping(None)
9153 async def Stop(self):
9154 '''
9155
9156 Returns -> None
9157 '''
9158 # map input types to rpc msg
9159 params = dict()
9160 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params)
9161
9162 reply = await self.rpc(msg)
9163 return reply
9164
9165
9166 class Firewaller(Type):
9167 name = 'Firewaller'
9168 version = 2
9169 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
9170 'properties': {'Error': {'$ref': '#/definitions/Error'},
9171 'Result': {'type': 'boolean'}},
9172 'required': ['Error', 'Result'],
9173 'type': 'object'},
9174 'BoolResults': {'additionalProperties': False,
9175 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
9176 'type': 'array'}},
9177 'required': ['Results'],
9178 'type': 'object'},
9179 'Entities': {'additionalProperties': False,
9180 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9181 'type': 'array'}},
9182 'required': ['Entities'],
9183 'type': 'object'},
9184 'Entity': {'additionalProperties': False,
9185 'properties': {'Tag': {'type': 'string'}},
9186 'required': ['Tag'],
9187 'type': 'object'},
9188 'Error': {'additionalProperties': False,
9189 'properties': {'Code': {'type': 'string'},
9190 'Info': {'$ref': '#/definitions/ErrorInfo'},
9191 'Message': {'type': 'string'}},
9192 'required': ['Message', 'Code'],
9193 'type': 'object'},
9194 'ErrorInfo': {'additionalProperties': False,
9195 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9196 'MacaroonPath': {'type': 'string'}},
9197 'type': 'object'},
9198 'LifeResult': {'additionalProperties': False,
9199 'properties': {'Error': {'$ref': '#/definitions/Error'},
9200 'Life': {'type': 'string'}},
9201 'required': ['Life', 'Error'],
9202 'type': 'object'},
9203 'LifeResults': {'additionalProperties': False,
9204 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9205 'type': 'array'}},
9206 'required': ['Results'],
9207 'type': 'object'},
9208 'Macaroon': {'additionalProperties': False,
9209 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9210 'type': 'array'},
9211 'data': {'items': {'type': 'integer'},
9212 'type': 'array'},
9213 'id': {'$ref': '#/definitions/packet'},
9214 'location': {'$ref': '#/definitions/packet'},
9215 'sig': {'items': {'type': 'integer'},
9216 'type': 'array'}},
9217 'required': ['data',
9218 'location',
9219 'id',
9220 'caveats',
9221 'sig'],
9222 'type': 'object'},
9223 'MachinePortRange': {'additionalProperties': False,
9224 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
9225 'RelationTag': {'type': 'string'},
9226 'UnitTag': {'type': 'string'}},
9227 'required': ['UnitTag',
9228 'RelationTag',
9229 'PortRange'],
9230 'type': 'object'},
9231 'MachinePorts': {'additionalProperties': False,
9232 'properties': {'MachineTag': {'type': 'string'},
9233 'SubnetTag': {'type': 'string'}},
9234 'required': ['MachineTag', 'SubnetTag'],
9235 'type': 'object'},
9236 'MachinePortsParams': {'additionalProperties': False,
9237 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
9238 'type': 'array'}},
9239 'required': ['Params'],
9240 'type': 'object'},
9241 'MachinePortsResult': {'additionalProperties': False,
9242 'properties': {'Error': {'$ref': '#/definitions/Error'},
9243 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
9244 'type': 'array'}},
9245 'required': ['Error', 'Ports'],
9246 'type': 'object'},
9247 'MachinePortsResults': {'additionalProperties': False,
9248 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
9249 'type': 'array'}},
9250 'required': ['Results'],
9251 'type': 'object'},
9252 'ModelConfigResult': {'additionalProperties': False,
9253 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
9254 'type': 'object'}},
9255 'type': 'object'}},
9256 'required': ['Config'],
9257 'type': 'object'},
9258 'NotifyWatchResult': {'additionalProperties': False,
9259 'properties': {'Error': {'$ref': '#/definitions/Error'},
9260 'NotifyWatcherId': {'type': 'string'}},
9261 'required': ['NotifyWatcherId', 'Error'],
9262 'type': 'object'},
9263 'NotifyWatchResults': {'additionalProperties': False,
9264 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9265 'type': 'array'}},
9266 'required': ['Results'],
9267 'type': 'object'},
9268 'PortRange': {'additionalProperties': False,
9269 'properties': {'FromPort': {'type': 'integer'},
9270 'Protocol': {'type': 'string'},
9271 'ToPort': {'type': 'integer'}},
9272 'required': ['FromPort', 'ToPort', 'Protocol'],
9273 'type': 'object'},
9274 'StringResult': {'additionalProperties': False,
9275 'properties': {'Error': {'$ref': '#/definitions/Error'},
9276 'Result': {'type': 'string'}},
9277 'required': ['Error', 'Result'],
9278 'type': 'object'},
9279 'StringResults': {'additionalProperties': False,
9280 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
9281 'type': 'array'}},
9282 'required': ['Results'],
9283 'type': 'object'},
9284 'StringsResult': {'additionalProperties': False,
9285 'properties': {'Error': {'$ref': '#/definitions/Error'},
9286 'Result': {'items': {'type': 'string'},
9287 'type': 'array'}},
9288 'required': ['Error', 'Result'],
9289 'type': 'object'},
9290 'StringsResults': {'additionalProperties': False,
9291 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
9292 'type': 'array'}},
9293 'required': ['Results'],
9294 'type': 'object'},
9295 'StringsWatchResult': {'additionalProperties': False,
9296 'properties': {'Changes': {'items': {'type': 'string'},
9297 'type': 'array'},
9298 'Error': {'$ref': '#/definitions/Error'},
9299 'StringsWatcherId': {'type': 'string'}},
9300 'required': ['StringsWatcherId',
9301 'Changes',
9302 'Error'],
9303 'type': 'object'},
9304 'StringsWatchResults': {'additionalProperties': False,
9305 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9306 'type': 'array'}},
9307 'required': ['Results'],
9308 'type': 'object'},
9309 'caveat': {'additionalProperties': False,
9310 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9311 'location': {'$ref': '#/definitions/packet'},
9312 'verificationId': {'$ref': '#/definitions/packet'}},
9313 'required': ['location',
9314 'caveatId',
9315 'verificationId'],
9316 'type': 'object'},
9317 'packet': {'additionalProperties': False,
9318 'properties': {'headerLen': {'type': 'integer'},
9319 'start': {'type': 'integer'},
9320 'totalLen': {'type': 'integer'}},
9321 'required': ['start', 'totalLen', 'headerLen'],
9322 'type': 'object'}},
9323 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9324 'Result': {'$ref': '#/definitions/StringResults'}},
9325 'type': 'object'},
9326 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9327 'Result': {'$ref': '#/definitions/BoolResults'}},
9328 'type': 'object'},
9329 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9330 'Result': {'$ref': '#/definitions/StringsResults'}},
9331 'type': 'object'},
9332 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
9333 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
9334 'type': 'object'},
9335 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9336 'Result': {'$ref': '#/definitions/StringResults'}},
9337 'type': 'object'},
9338 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9339 'Result': {'$ref': '#/definitions/LifeResults'}},
9340 'type': 'object'},
9341 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9342 'type': 'object'},
9343 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9344 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9345 'type': 'object'},
9346 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9347 'type': 'object'},
9348 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
9349 'type': 'object'},
9350 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9351 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9352 'type': 'object'},
9353 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9354 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9355 'type': 'object'}},
9356 'type': 'object'}
9357
9358
9359 @ReturnMapping(StringResults)
9360 async def GetAssignedMachine(self, entities):
9361 '''
9362 entities : typing.Sequence[~Entity]
9363 Returns -> typing.Sequence[~StringResult]
9364 '''
9365 # map input types to rpc msg
9366 params = dict()
9367 msg = dict(Type='Firewaller', Request='GetAssignedMachine', Version=2, Params=params)
9368 params['Entities'] = entities
9369 reply = await self.rpc(msg)
9370 return reply
9371
9372
9373
9374 @ReturnMapping(BoolResults)
9375 async def GetExposed(self, entities):
9376 '''
9377 entities : typing.Sequence[~Entity]
9378 Returns -> typing.Sequence[~BoolResult]
9379 '''
9380 # map input types to rpc msg
9381 params = dict()
9382 msg = dict(Type='Firewaller', Request='GetExposed', Version=2, Params=params)
9383 params['Entities'] = entities
9384 reply = await self.rpc(msg)
9385 return reply
9386
9387
9388
9389 @ReturnMapping(StringsResults)
9390 async def GetMachineActiveSubnets(self, entities):
9391 '''
9392 entities : typing.Sequence[~Entity]
9393 Returns -> typing.Sequence[~StringsResult]
9394 '''
9395 # map input types to rpc msg
9396 params = dict()
9397 msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=2, Params=params)
9398 params['Entities'] = entities
9399 reply = await self.rpc(msg)
9400 return reply
9401
9402
9403
9404 @ReturnMapping(MachinePortsResults)
9405 async def GetMachinePorts(self, params):
9406 '''
9407 params : typing.Sequence[~MachinePorts]
9408 Returns -> typing.Sequence[~MachinePortsResult]
9409 '''
9410 # map input types to rpc msg
9411 params = dict()
9412 msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=2, Params=params)
9413 params['Params'] = params
9414 reply = await self.rpc(msg)
9415 return reply
9416
9417
9418
9419 @ReturnMapping(StringResults)
9420 async def InstanceId(self, entities):
9421 '''
9422 entities : typing.Sequence[~Entity]
9423 Returns -> typing.Sequence[~StringResult]
9424 '''
9425 # map input types to rpc msg
9426 params = dict()
9427 msg = dict(Type='Firewaller', Request='InstanceId', Version=2, Params=params)
9428 params['Entities'] = entities
9429 reply = await self.rpc(msg)
9430 return reply
9431
9432
9433
9434 @ReturnMapping(LifeResults)
9435 async def Life(self, entities):
9436 '''
9437 entities : typing.Sequence[~Entity]
9438 Returns -> typing.Sequence[~LifeResult]
9439 '''
9440 # map input types to rpc msg
9441 params = dict()
9442 msg = dict(Type='Firewaller', Request='Life', Version=2, Params=params)
9443 params['Entities'] = entities
9444 reply = await self.rpc(msg)
9445 return reply
9446
9447
9448
9449 @ReturnMapping(ModelConfigResult)
9450 async def ModelConfig(self):
9451 '''
9452
9453 Returns -> typing.Mapping[str, typing.Any]
9454 '''
9455 # map input types to rpc msg
9456 params = dict()
9457 msg = dict(Type='Firewaller', Request='ModelConfig', Version=2, Params=params)
9458
9459 reply = await self.rpc(msg)
9460 return reply
9461
9462
9463
9464 @ReturnMapping(NotifyWatchResults)
9465 async def Watch(self, entities):
9466 '''
9467 entities : typing.Sequence[~Entity]
9468 Returns -> typing.Sequence[~NotifyWatchResult]
9469 '''
9470 # map input types to rpc msg
9471 params = dict()
9472 msg = dict(Type='Firewaller', Request='Watch', Version=2, Params=params)
9473 params['Entities'] = entities
9474 reply = await self.rpc(msg)
9475 return reply
9476
9477
9478
9479 @ReturnMapping(NotifyWatchResult)
9480 async def WatchForModelConfigChanges(self):
9481 '''
9482
9483 Returns -> typing.Union[_ForwardRef('Error'), str]
9484 '''
9485 # map input types to rpc msg
9486 params = dict()
9487 msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=2, Params=params)
9488
9489 reply = await self.rpc(msg)
9490 return reply
9491
9492
9493
9494 @ReturnMapping(StringsWatchResult)
9495 async def WatchModelMachines(self):
9496 '''
9497
9498 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9499 '''
9500 # map input types to rpc msg
9501 params = dict()
9502 msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=2, Params=params)
9503
9504 reply = await self.rpc(msg)
9505 return reply
9506
9507
9508
9509 @ReturnMapping(StringsWatchResults)
9510 async def WatchOpenedPorts(self, entities):
9511 '''
9512 entities : typing.Sequence[~Entity]
9513 Returns -> typing.Sequence[~StringsWatchResult]
9514 '''
9515 # map input types to rpc msg
9516 params = dict()
9517 msg = dict(Type='Firewaller', Request='WatchOpenedPorts', Version=2, Params=params)
9518 params['Entities'] = entities
9519 reply = await self.rpc(msg)
9520 return reply
9521
9522
9523
9524 @ReturnMapping(StringsWatchResults)
9525 async def WatchUnits(self, entities):
9526 '''
9527 entities : typing.Sequence[~Entity]
9528 Returns -> typing.Sequence[~StringsWatchResult]
9529 '''
9530 # map input types to rpc msg
9531 params = dict()
9532 msg = dict(Type='Firewaller', Request='WatchUnits', Version=2, Params=params)
9533 params['Entities'] = entities
9534 reply = await self.rpc(msg)
9535 return reply
9536
9537
9538 class HighAvailability(Type):
9539 name = 'HighAvailability'
9540 version = 2
9541 schema = {'definitions': {'Address': {'additionalProperties': False,
9542 'properties': {'Scope': {'type': 'string'},
9543 'SpaceName': {'type': 'string'},
9544 'SpaceProviderId': {'type': 'string'},
9545 'Type': {'type': 'string'},
9546 'Value': {'type': 'string'}},
9547 'required': ['Value',
9548 'Type',
9549 'Scope',
9550 'SpaceName',
9551 'SpaceProviderId'],
9552 'type': 'object'},
9553 'ControllersChangeResult': {'additionalProperties': False,
9554 'properties': {'Error': {'$ref': '#/definitions/Error'},
9555 'Result': {'$ref': '#/definitions/ControllersChanges'}},
9556 'required': ['Result', 'Error'],
9557 'type': 'object'},
9558 'ControllersChangeResults': {'additionalProperties': False,
9559 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
9560 'type': 'array'}},
9561 'required': ['Results'],
9562 'type': 'object'},
9563 'ControllersChanges': {'additionalProperties': False,
9564 'properties': {'added': {'items': {'type': 'string'},
9565 'type': 'array'},
9566 'converted': {'items': {'type': 'string'},
9567 'type': 'array'},
9568 'demoted': {'items': {'type': 'string'},
9569 'type': 'array'},
9570 'maintained': {'items': {'type': 'string'},
9571 'type': 'array'},
9572 'promoted': {'items': {'type': 'string'},
9573 'type': 'array'},
9574 'removed': {'items': {'type': 'string'},
9575 'type': 'array'}},
9576 'type': 'object'},
9577 'ControllersSpec': {'additionalProperties': False,
9578 'properties': {'ModelTag': {'type': 'string'},
9579 'constraints': {'$ref': '#/definitions/Value'},
9580 'num-controllers': {'type': 'integer'},
9581 'placement': {'items': {'type': 'string'},
9582 'type': 'array'},
9583 'series': {'type': 'string'}},
9584 'required': ['ModelTag',
9585 'num-controllers'],
9586 'type': 'object'},
9587 'ControllersSpecs': {'additionalProperties': False,
9588 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
9589 'type': 'array'}},
9590 'required': ['Specs'],
9591 'type': 'object'},
9592 'Error': {'additionalProperties': False,
9593 'properties': {'Code': {'type': 'string'},
9594 'Info': {'$ref': '#/definitions/ErrorInfo'},
9595 'Message': {'type': 'string'}},
9596 'required': ['Message', 'Code'],
9597 'type': 'object'},
9598 'ErrorInfo': {'additionalProperties': False,
9599 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9600 'MacaroonPath': {'type': 'string'}},
9601 'type': 'object'},
9602 'HAMember': {'additionalProperties': False,
9603 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
9604 'Series': {'type': 'string'},
9605 'Tag': {'type': 'string'}},
9606 'required': ['Tag', 'PublicAddress', 'Series'],
9607 'type': 'object'},
9608 'Macaroon': {'additionalProperties': False,
9609 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9610 'type': 'array'},
9611 'data': {'items': {'type': 'integer'},
9612 'type': 'array'},
9613 'id': {'$ref': '#/definitions/packet'},
9614 'location': {'$ref': '#/definitions/packet'},
9615 'sig': {'items': {'type': 'integer'},
9616 'type': 'array'}},
9617 'required': ['data',
9618 'location',
9619 'id',
9620 'caveats',
9621 'sig'],
9622 'type': 'object'},
9623 'Member': {'additionalProperties': False,
9624 'properties': {'Address': {'type': 'string'},
9625 'Arbiter': {'type': 'boolean'},
9626 'BuildIndexes': {'type': 'boolean'},
9627 'Hidden': {'type': 'boolean'},
9628 'Id': {'type': 'integer'},
9629 'Priority': {'type': 'number'},
9630 'SlaveDelay': {'type': 'integer'},
9631 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
9632 'type': 'object'},
9633 'Votes': {'type': 'integer'}},
9634 'required': ['Id',
9635 'Address',
9636 'Arbiter',
9637 'BuildIndexes',
9638 'Hidden',
9639 'Priority',
9640 'Tags',
9641 'SlaveDelay',
9642 'Votes'],
9643 'type': 'object'},
9644 'MongoUpgradeResults': {'additionalProperties': False,
9645 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
9646 'Members': {'items': {'$ref': '#/definitions/HAMember'},
9647 'type': 'array'},
9648 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
9649 'type': 'array'}},
9650 'required': ['RsMembers',
9651 'Master',
9652 'Members'],
9653 'type': 'object'},
9654 'ResumeReplicationParams': {'additionalProperties': False,
9655 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
9656 'type': 'array'}},
9657 'required': ['Members'],
9658 'type': 'object'},
9659 'UpgradeMongoParams': {'additionalProperties': False,
9660 'properties': {'Target': {'$ref': '#/definitions/Version'}},
9661 'required': ['Target'],
9662 'type': 'object'},
9663 'Value': {'additionalProperties': False,
9664 'properties': {'arch': {'type': 'string'},
9665 'container': {'type': 'string'},
9666 'cpu-cores': {'type': 'integer'},
9667 'cpu-power': {'type': 'integer'},
9668 'instance-type': {'type': 'string'},
9669 'mem': {'type': 'integer'},
9670 'root-disk': {'type': 'integer'},
9671 'spaces': {'items': {'type': 'string'},
9672 'type': 'array'},
9673 'tags': {'items': {'type': 'string'},
9674 'type': 'array'},
9675 'virt-type': {'type': 'string'}},
9676 'type': 'object'},
9677 'Version': {'additionalProperties': False,
9678 'properties': {'Major': {'type': 'integer'},
9679 'Minor': {'type': 'integer'},
9680 'Patch': {'type': 'string'},
9681 'StorageEngine': {'type': 'string'}},
9682 'required': ['Major',
9683 'Minor',
9684 'Patch',
9685 'StorageEngine'],
9686 'type': 'object'},
9687 'caveat': {'additionalProperties': False,
9688 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9689 'location': {'$ref': '#/definitions/packet'},
9690 'verificationId': {'$ref': '#/definitions/packet'}},
9691 'required': ['location',
9692 'caveatId',
9693 'verificationId'],
9694 'type': 'object'},
9695 'packet': {'additionalProperties': False,
9696 'properties': {'headerLen': {'type': 'integer'},
9697 'start': {'type': 'integer'},
9698 'totalLen': {'type': 'integer'}},
9699 'required': ['start', 'totalLen', 'headerLen'],
9700 'type': 'object'}},
9701 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
9702 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
9703 'type': 'object'},
9704 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
9705 'type': 'object'},
9706 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
9707 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
9708 'type': 'object'}},
9709 'type': 'object'}
9710
9711
9712 @ReturnMapping(ControllersChangeResults)
9713 async def EnableHA(self, specs):
9714 '''
9715 specs : typing.Sequence[~ControllersSpec]
9716 Returns -> typing.Sequence[~ControllersChangeResult]
9717 '''
9718 # map input types to rpc msg
9719 params = dict()
9720 msg = dict(Type='HighAvailability', Request='EnableHA', Version=2, Params=params)
9721 params['Specs'] = specs
9722 reply = await self.rpc(msg)
9723 return reply
9724
9725
9726
9727 @ReturnMapping(None)
9728 async def ResumeHAReplicationAfterUpgrade(self, members):
9729 '''
9730 members : typing.Sequence[~Member]
9731 Returns -> None
9732 '''
9733 # map input types to rpc msg
9734 params = dict()
9735 msg = dict(Type='HighAvailability', Request='ResumeHAReplicationAfterUpgrade', Version=2, Params=params)
9736 params['Members'] = members
9737 reply = await self.rpc(msg)
9738 return reply
9739
9740
9741
9742 @ReturnMapping(MongoUpgradeResults)
9743 async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine):
9744 '''
9745 major : int
9746 minor : int
9747 patch : str
9748 storageengine : str
9749 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
9750 '''
9751 # map input types to rpc msg
9752 params = dict()
9753 msg = dict(Type='HighAvailability', Request='StopHAReplicationForUpgrade', Version=2, Params=params)
9754 params['Major'] = major
9755 params['Minor'] = minor
9756 params['Patch'] = patch
9757 params['StorageEngine'] = storageengine
9758 reply = await self.rpc(msg)
9759 return reply
9760
9761
9762 class HostKeyReporter(Type):
9763 name = 'HostKeyReporter'
9764 version = 1
9765 schema = {'definitions': {'Error': {'additionalProperties': False,
9766 'properties': {'Code': {'type': 'string'},
9767 'Info': {'$ref': '#/definitions/ErrorInfo'},
9768 'Message': {'type': 'string'}},
9769 'required': ['Message', 'Code'],
9770 'type': 'object'},
9771 'ErrorInfo': {'additionalProperties': False,
9772 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9773 'MacaroonPath': {'type': 'string'}},
9774 'type': 'object'},
9775 'ErrorResult': {'additionalProperties': False,
9776 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9777 'required': ['Error'],
9778 'type': 'object'},
9779 'ErrorResults': {'additionalProperties': False,
9780 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9781 'type': 'array'}},
9782 'required': ['Results'],
9783 'type': 'object'},
9784 'Macaroon': {'additionalProperties': False,
9785 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9786 'type': 'array'},
9787 'data': {'items': {'type': 'integer'},
9788 'type': 'array'},
9789 'id': {'$ref': '#/definitions/packet'},
9790 'location': {'$ref': '#/definitions/packet'},
9791 'sig': {'items': {'type': 'integer'},
9792 'type': 'array'}},
9793 'required': ['data',
9794 'location',
9795 'id',
9796 'caveats',
9797 'sig'],
9798 'type': 'object'},
9799 'SSHHostKeySet': {'additionalProperties': False,
9800 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
9801 'type': 'array'}},
9802 'required': ['entity-keys'],
9803 'type': 'object'},
9804 'SSHHostKeys': {'additionalProperties': False,
9805 'properties': {'public-keys': {'items': {'type': 'string'},
9806 'type': 'array'},
9807 'tag': {'type': 'string'}},
9808 'required': ['tag', 'public-keys'],
9809 'type': 'object'},
9810 'caveat': {'additionalProperties': False,
9811 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9812 'location': {'$ref': '#/definitions/packet'},
9813 'verificationId': {'$ref': '#/definitions/packet'}},
9814 'required': ['location',
9815 'caveatId',
9816 'verificationId'],
9817 'type': 'object'},
9818 'packet': {'additionalProperties': False,
9819 'properties': {'headerLen': {'type': 'integer'},
9820 'start': {'type': 'integer'},
9821 'totalLen': {'type': 'integer'}},
9822 'required': ['start', 'totalLen', 'headerLen'],
9823 'type': 'object'}},
9824 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
9825 'Result': {'$ref': '#/definitions/ErrorResults'}},
9826 'type': 'object'}},
9827 'type': 'object'}
9828
9829
9830 @ReturnMapping(ErrorResults)
9831 async def ReportKeys(self, entity_keys):
9832 '''
9833 entity_keys : typing.Sequence[~SSHHostKeys]
9834 Returns -> typing.Sequence[~ErrorResult]
9835 '''
9836 # map input types to rpc msg
9837 params = dict()
9838 msg = dict(Type='HostKeyReporter', Request='ReportKeys', Version=1, Params=params)
9839 params['entity-keys'] = entity_keys
9840 reply = await self.rpc(msg)
9841 return reply
9842
9843
9844 class ImageManager(Type):
9845 name = 'ImageManager'
9846 version = 2
9847 schema = {'definitions': {'Error': {'additionalProperties': False,
9848 'properties': {'Code': {'type': 'string'},
9849 'Info': {'$ref': '#/definitions/ErrorInfo'},
9850 'Message': {'type': 'string'}},
9851 'required': ['Message', 'Code'],
9852 'type': 'object'},
9853 'ErrorInfo': {'additionalProperties': False,
9854 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9855 'MacaroonPath': {'type': 'string'}},
9856 'type': 'object'},
9857 'ErrorResult': {'additionalProperties': False,
9858 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9859 'required': ['Error'],
9860 'type': 'object'},
9861 'ErrorResults': {'additionalProperties': False,
9862 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9863 'type': 'array'}},
9864 'required': ['Results'],
9865 'type': 'object'},
9866 'ImageFilterParams': {'additionalProperties': False,
9867 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
9868 'type': 'array'}},
9869 'required': ['images'],
9870 'type': 'object'},
9871 'ImageMetadata': {'additionalProperties': False,
9872 'properties': {'arch': {'type': 'string'},
9873 'created': {'format': 'date-time',
9874 'type': 'string'},
9875 'kind': {'type': 'string'},
9876 'series': {'type': 'string'},
9877 'url': {'type': 'string'}},
9878 'required': ['kind',
9879 'arch',
9880 'series',
9881 'url',
9882 'created'],
9883 'type': 'object'},
9884 'ImageSpec': {'additionalProperties': False,
9885 'properties': {'arch': {'type': 'string'},
9886 'kind': {'type': 'string'},
9887 'series': {'type': 'string'}},
9888 'required': ['kind', 'arch', 'series'],
9889 'type': 'object'},
9890 'ListImageResult': {'additionalProperties': False,
9891 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
9892 'type': 'array'}},
9893 'required': ['result'],
9894 'type': 'object'},
9895 'Macaroon': {'additionalProperties': False,
9896 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9897 'type': 'array'},
9898 'data': {'items': {'type': 'integer'},
9899 'type': 'array'},
9900 'id': {'$ref': '#/definitions/packet'},
9901 'location': {'$ref': '#/definitions/packet'},
9902 'sig': {'items': {'type': 'integer'},
9903 'type': 'array'}},
9904 'required': ['data',
9905 'location',
9906 'id',
9907 'caveats',
9908 'sig'],
9909 'type': 'object'},
9910 'caveat': {'additionalProperties': False,
9911 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9912 'location': {'$ref': '#/definitions/packet'},
9913 'verificationId': {'$ref': '#/definitions/packet'}},
9914 'required': ['location',
9915 'caveatId',
9916 'verificationId'],
9917 'type': 'object'},
9918 'packet': {'additionalProperties': False,
9919 'properties': {'headerLen': {'type': 'integer'},
9920 'start': {'type': 'integer'},
9921 'totalLen': {'type': 'integer'}},
9922 'required': ['start', 'totalLen', 'headerLen'],
9923 'type': 'object'}},
9924 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
9925 'Result': {'$ref': '#/definitions/ErrorResults'}},
9926 'type': 'object'},
9927 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
9928 'Result': {'$ref': '#/definitions/ListImageResult'}},
9929 'type': 'object'}},
9930 'type': 'object'}
9931
9932
9933 @ReturnMapping(ErrorResults)
9934 async def DeleteImages(self, images):
9935 '''
9936 images : typing.Sequence[~ImageSpec]
9937 Returns -> typing.Sequence[~ErrorResult]
9938 '''
9939 # map input types to rpc msg
9940 params = dict()
9941 msg = dict(Type='ImageManager', Request='DeleteImages', Version=2, Params=params)
9942 params['images'] = images
9943 reply = await self.rpc(msg)
9944 return reply
9945
9946
9947
9948 @ReturnMapping(ListImageResult)
9949 async def ListImages(self, images):
9950 '''
9951 images : typing.Sequence[~ImageSpec]
9952 Returns -> typing.Sequence[~ImageMetadata]
9953 '''
9954 # map input types to rpc msg
9955 params = dict()
9956 msg = dict(Type='ImageManager', Request='ListImages', Version=2, Params=params)
9957 params['images'] = images
9958 reply = await self.rpc(msg)
9959 return reply
9960
9961
9962 class ImageMetadata(Type):
9963 name = 'ImageMetadata'
9964 version = 2
9965 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
9966 'properties': {'arch': {'type': 'string'},
9967 'image_id': {'type': 'string'},
9968 'priority': {'type': 'integer'},
9969 'region': {'type': 'string'},
9970 'root_storage_size': {'type': 'integer'},
9971 'root_storage_type': {'type': 'string'},
9972 'series': {'type': 'string'},
9973 'source': {'type': 'string'},
9974 'stream': {'type': 'string'},
9975 'version': {'type': 'string'},
9976 'virt_type': {'type': 'string'}},
9977 'required': ['image_id',
9978 'region',
9979 'version',
9980 'series',
9981 'arch',
9982 'source',
9983 'priority'],
9984 'type': 'object'},
9985 'CloudImageMetadataList': {'additionalProperties': False,
9986 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
9987 'type': 'array'}},
9988 'type': 'object'},
9989 'Error': {'additionalProperties': False,
9990 'properties': {'Code': {'type': 'string'},
9991 'Info': {'$ref': '#/definitions/ErrorInfo'},
9992 'Message': {'type': 'string'}},
9993 'required': ['Message', 'Code'],
9994 'type': 'object'},
9995 'ErrorInfo': {'additionalProperties': False,
9996 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9997 'MacaroonPath': {'type': 'string'}},
9998 'type': 'object'},
9999 'ErrorResult': {'additionalProperties': False,
10000 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10001 'required': ['Error'],
10002 'type': 'object'},
10003 'ErrorResults': {'additionalProperties': False,
10004 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10005 'type': 'array'}},
10006 'required': ['Results'],
10007 'type': 'object'},
10008 'ImageMetadataFilter': {'additionalProperties': False,
10009 'properties': {'arches': {'items': {'type': 'string'},
10010 'type': 'array'},
10011 'region': {'type': 'string'},
10012 'root-storage-type': {'type': 'string'},
10013 'series': {'items': {'type': 'string'},
10014 'type': 'array'},
10015 'stream': {'type': 'string'},
10016 'virt_type': {'type': 'string'}},
10017 'type': 'object'},
10018 'ListCloudImageMetadataResult': {'additionalProperties': False,
10019 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10020 'type': 'array'}},
10021 'required': ['result'],
10022 'type': 'object'},
10023 'Macaroon': {'additionalProperties': False,
10024 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10025 'type': 'array'},
10026 'data': {'items': {'type': 'integer'},
10027 'type': 'array'},
10028 'id': {'$ref': '#/definitions/packet'},
10029 'location': {'$ref': '#/definitions/packet'},
10030 'sig': {'items': {'type': 'integer'},
10031 'type': 'array'}},
10032 'required': ['data',
10033 'location',
10034 'id',
10035 'caveats',
10036 'sig'],
10037 'type': 'object'},
10038 'MetadataImageIds': {'additionalProperties': False,
10039 'properties': {'image_ids': {'items': {'type': 'string'},
10040 'type': 'array'}},
10041 'required': ['image_ids'],
10042 'type': 'object'},
10043 'MetadataSaveParams': {'additionalProperties': False,
10044 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10045 'type': 'array'}},
10046 'type': 'object'},
10047 'caveat': {'additionalProperties': False,
10048 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10049 'location': {'$ref': '#/definitions/packet'},
10050 'verificationId': {'$ref': '#/definitions/packet'}},
10051 'required': ['location',
10052 'caveatId',
10053 'verificationId'],
10054 'type': 'object'},
10055 'packet': {'additionalProperties': False,
10056 'properties': {'headerLen': {'type': 'integer'},
10057 'start': {'type': 'integer'},
10058 'totalLen': {'type': 'integer'}},
10059 'required': ['start', 'totalLen', 'headerLen'],
10060 'type': 'object'}},
10061 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
10062 'Result': {'$ref': '#/definitions/ErrorResults'}},
10063 'type': 'object'},
10064 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10065 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10066 'type': 'object'},
10067 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10068 'Result': {'$ref': '#/definitions/ErrorResults'}},
10069 'type': 'object'},
10070 'UpdateFromPublishedImages': {'type': 'object'}},
10071 'type': 'object'}
10072
10073
10074 @ReturnMapping(ErrorResults)
10075 async def Delete(self, image_ids):
10076 '''
10077 image_ids : typing.Sequence[str]
10078 Returns -> typing.Sequence[~ErrorResult]
10079 '''
10080 # map input types to rpc msg
10081 params = dict()
10082 msg = dict(Type='ImageMetadata', Request='Delete', Version=2, Params=params)
10083 params['image_ids'] = image_ids
10084 reply = await self.rpc(msg)
10085 return reply
10086
10087
10088
10089 @ReturnMapping(ListCloudImageMetadataResult)
10090 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
10091 '''
10092 arches : typing.Sequence[str]
10093 region : str
10094 root_storage_type : str
10095 series : typing.Sequence[str]
10096 stream : str
10097 virt_type : str
10098 Returns -> typing.Sequence[~CloudImageMetadata]
10099 '''
10100 # map input types to rpc msg
10101 params = dict()
10102 msg = dict(Type='ImageMetadata', Request='List', Version=2, Params=params)
10103 params['arches'] = arches
10104 params['region'] = region
10105 params['root-storage-type'] = root_storage_type
10106 params['series'] = series
10107 params['stream'] = stream
10108 params['virt_type'] = virt_type
10109 reply = await self.rpc(msg)
10110 return reply
10111
10112
10113
10114 @ReturnMapping(ErrorResults)
10115 async def Save(self, metadata):
10116 '''
10117 metadata : typing.Sequence[~CloudImageMetadataList]
10118 Returns -> typing.Sequence[~ErrorResult]
10119 '''
10120 # map input types to rpc msg
10121 params = dict()
10122 msg = dict(Type='ImageMetadata', Request='Save', Version=2, Params=params)
10123 params['metadata'] = metadata
10124 reply = await self.rpc(msg)
10125 return reply
10126
10127
10128
10129 @ReturnMapping(None)
10130 async def UpdateFromPublishedImages(self):
10131 '''
10132
10133 Returns -> None
10134 '''
10135 # map input types to rpc msg
10136 params = dict()
10137 msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params)
10138
10139 reply = await self.rpc(msg)
10140 return reply
10141
10142
10143 class InstancePoller(Type):
10144 name = 'InstancePoller'
10145 version = 2
10146 schema = {'definitions': {'Address': {'additionalProperties': False,
10147 'properties': {'Scope': {'type': 'string'},
10148 'SpaceName': {'type': 'string'},
10149 'Type': {'type': 'string'},
10150 'Value': {'type': 'string'}},
10151 'required': ['Value', 'Type', 'Scope'],
10152 'type': 'object'},
10153 'BoolResult': {'additionalProperties': False,
10154 'properties': {'Error': {'$ref': '#/definitions/Error'},
10155 'Result': {'type': 'boolean'}},
10156 'required': ['Error', 'Result'],
10157 'type': 'object'},
10158 'BoolResults': {'additionalProperties': False,
10159 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10160 'type': 'array'}},
10161 'required': ['Results'],
10162 'type': 'object'},
10163 'Entities': {'additionalProperties': False,
10164 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10165 'type': 'array'}},
10166 'required': ['Entities'],
10167 'type': 'object'},
10168 'Entity': {'additionalProperties': False,
10169 'properties': {'Tag': {'type': 'string'}},
10170 'required': ['Tag'],
10171 'type': 'object'},
10172 'EntityStatusArgs': {'additionalProperties': False,
10173 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10174 'type': 'object'}},
10175 'type': 'object'},
10176 'Info': {'type': 'string'},
10177 'Status': {'type': 'string'},
10178 'Tag': {'type': 'string'}},
10179 'required': ['Tag',
10180 'Status',
10181 'Info',
10182 'Data'],
10183 'type': 'object'},
10184 'Error': {'additionalProperties': False,
10185 'properties': {'Code': {'type': 'string'},
10186 'Info': {'$ref': '#/definitions/ErrorInfo'},
10187 'Message': {'type': 'string'}},
10188 'required': ['Message', 'Code'],
10189 'type': 'object'},
10190 'ErrorInfo': {'additionalProperties': False,
10191 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10192 'MacaroonPath': {'type': 'string'}},
10193 'type': 'object'},
10194 'ErrorResult': {'additionalProperties': False,
10195 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10196 'required': ['Error'],
10197 'type': 'object'},
10198 'ErrorResults': {'additionalProperties': False,
10199 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10200 'type': 'array'}},
10201 'required': ['Results'],
10202 'type': 'object'},
10203 'LifeResult': {'additionalProperties': False,
10204 'properties': {'Error': {'$ref': '#/definitions/Error'},
10205 'Life': {'type': 'string'}},
10206 'required': ['Life', 'Error'],
10207 'type': 'object'},
10208 'LifeResults': {'additionalProperties': False,
10209 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10210 'type': 'array'}},
10211 'required': ['Results'],
10212 'type': 'object'},
10213 'Macaroon': {'additionalProperties': False,
10214 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10215 'type': 'array'},
10216 'data': {'items': {'type': 'integer'},
10217 'type': 'array'},
10218 'id': {'$ref': '#/definitions/packet'},
10219 'location': {'$ref': '#/definitions/packet'},
10220 'sig': {'items': {'type': 'integer'},
10221 'type': 'array'}},
10222 'required': ['data',
10223 'location',
10224 'id',
10225 'caveats',
10226 'sig'],
10227 'type': 'object'},
10228 'MachineAddresses': {'additionalProperties': False,
10229 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
10230 'type': 'array'},
10231 'Tag': {'type': 'string'}},
10232 'required': ['Tag', 'Addresses'],
10233 'type': 'object'},
10234 'MachineAddressesResult': {'additionalProperties': False,
10235 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
10236 'type': 'array'},
10237 'Error': {'$ref': '#/definitions/Error'}},
10238 'required': ['Error', 'Addresses'],
10239 'type': 'object'},
10240 'MachineAddressesResults': {'additionalProperties': False,
10241 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
10242 'type': 'array'}},
10243 'required': ['Results'],
10244 'type': 'object'},
10245 'ModelConfigResult': {'additionalProperties': False,
10246 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10247 'type': 'object'}},
10248 'type': 'object'}},
10249 'required': ['Config'],
10250 'type': 'object'},
10251 'NotifyWatchResult': {'additionalProperties': False,
10252 'properties': {'Error': {'$ref': '#/definitions/Error'},
10253 'NotifyWatcherId': {'type': 'string'}},
10254 'required': ['NotifyWatcherId', 'Error'],
10255 'type': 'object'},
10256 'SetMachinesAddresses': {'additionalProperties': False,
10257 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
10258 'type': 'array'}},
10259 'required': ['MachineAddresses'],
10260 'type': 'object'},
10261 'SetStatus': {'additionalProperties': False,
10262 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10263 'type': 'array'}},
10264 'required': ['Entities'],
10265 'type': 'object'},
10266 'StatusResult': {'additionalProperties': False,
10267 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10268 'type': 'object'}},
10269 'type': 'object'},
10270 'Error': {'$ref': '#/definitions/Error'},
10271 'Id': {'type': 'string'},
10272 'Info': {'type': 'string'},
10273 'Life': {'type': 'string'},
10274 'Since': {'format': 'date-time',
10275 'type': 'string'},
10276 'Status': {'type': 'string'}},
10277 'required': ['Error',
10278 'Id',
10279 'Life',
10280 'Status',
10281 'Info',
10282 'Data',
10283 'Since'],
10284 'type': 'object'},
10285 'StatusResults': {'additionalProperties': False,
10286 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
10287 'type': 'array'}},
10288 'required': ['Results'],
10289 'type': 'object'},
10290 'StringResult': {'additionalProperties': False,
10291 'properties': {'Error': {'$ref': '#/definitions/Error'},
10292 'Result': {'type': 'string'}},
10293 'required': ['Error', 'Result'],
10294 'type': 'object'},
10295 'StringResults': {'additionalProperties': False,
10296 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
10297 'type': 'array'}},
10298 'required': ['Results'],
10299 'type': 'object'},
10300 'StringsWatchResult': {'additionalProperties': False,
10301 'properties': {'Changes': {'items': {'type': 'string'},
10302 'type': 'array'},
10303 'Error': {'$ref': '#/definitions/Error'},
10304 'StringsWatcherId': {'type': 'string'}},
10305 'required': ['StringsWatcherId',
10306 'Changes',
10307 'Error'],
10308 'type': 'object'},
10309 'caveat': {'additionalProperties': False,
10310 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10311 'location': {'$ref': '#/definitions/packet'},
10312 'verificationId': {'$ref': '#/definitions/packet'}},
10313 'required': ['location',
10314 'caveatId',
10315 'verificationId'],
10316 'type': 'object'},
10317 'packet': {'additionalProperties': False,
10318 'properties': {'headerLen': {'type': 'integer'},
10319 'start': {'type': 'integer'},
10320 'totalLen': {'type': 'integer'}},
10321 'required': ['start', 'totalLen', 'headerLen'],
10322 'type': 'object'}},
10323 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10324 'Result': {'$ref': '#/definitions/BoolResults'}},
10325 'type': 'object'},
10326 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10327 'Result': {'$ref': '#/definitions/StringResults'}},
10328 'type': 'object'},
10329 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10330 'Result': {'$ref': '#/definitions/StatusResults'}},
10331 'type': 'object'},
10332 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10333 'Result': {'$ref': '#/definitions/LifeResults'}},
10334 'type': 'object'},
10335 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10336 'type': 'object'},
10337 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10338 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
10339 'type': 'object'},
10340 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10341 'Result': {'$ref': '#/definitions/ErrorResults'}},
10342 'type': 'object'},
10343 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
10344 'Result': {'$ref': '#/definitions/ErrorResults'}},
10345 'type': 'object'},
10346 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10347 'Result': {'$ref': '#/definitions/StatusResults'}},
10348 'type': 'object'},
10349 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10350 'type': 'object'},
10351 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10352 'type': 'object'}},
10353 'type': 'object'}
10354
10355
10356 @ReturnMapping(BoolResults)
10357 async def AreManuallyProvisioned(self, entities):
10358 '''
10359 entities : typing.Sequence[~Entity]
10360 Returns -> typing.Sequence[~BoolResult]
10361 '''
10362 # map input types to rpc msg
10363 params = dict()
10364 msg = dict(Type='InstancePoller', Request='AreManuallyProvisioned', Version=2, Params=params)
10365 params['Entities'] = entities
10366 reply = await self.rpc(msg)
10367 return reply
10368
10369
10370
10371 @ReturnMapping(StringResults)
10372 async def InstanceId(self, entities):
10373 '''
10374 entities : typing.Sequence[~Entity]
10375 Returns -> typing.Sequence[~StringResult]
10376 '''
10377 # map input types to rpc msg
10378 params = dict()
10379 msg = dict(Type='InstancePoller', Request='InstanceId', Version=2, Params=params)
10380 params['Entities'] = entities
10381 reply = await self.rpc(msg)
10382 return reply
10383
10384
10385
10386 @ReturnMapping(StatusResults)
10387 async def InstanceStatus(self, entities):
10388 '''
10389 entities : typing.Sequence[~Entity]
10390 Returns -> typing.Sequence[~StatusResult]
10391 '''
10392 # map input types to rpc msg
10393 params = dict()
10394 msg = dict(Type='InstancePoller', Request='InstanceStatus', Version=2, Params=params)
10395 params['Entities'] = entities
10396 reply = await self.rpc(msg)
10397 return reply
10398
10399
10400
10401 @ReturnMapping(LifeResults)
10402 async def Life(self, entities):
10403 '''
10404 entities : typing.Sequence[~Entity]
10405 Returns -> typing.Sequence[~LifeResult]
10406 '''
10407 # map input types to rpc msg
10408 params = dict()
10409 msg = dict(Type='InstancePoller', Request='Life', Version=2, Params=params)
10410 params['Entities'] = entities
10411 reply = await self.rpc(msg)
10412 return reply
10413
10414
10415
10416 @ReturnMapping(ModelConfigResult)
10417 async def ModelConfig(self):
10418 '''
10419
10420 Returns -> typing.Mapping[str, typing.Any]
10421 '''
10422 # map input types to rpc msg
10423 params = dict()
10424 msg = dict(Type='InstancePoller', Request='ModelConfig', Version=2, Params=params)
10425
10426 reply = await self.rpc(msg)
10427 return reply
10428
10429
10430
10431 @ReturnMapping(MachineAddressesResults)
10432 async def ProviderAddresses(self, entities):
10433 '''
10434 entities : typing.Sequence[~Entity]
10435 Returns -> typing.Sequence[~MachineAddressesResult]
10436 '''
10437 # map input types to rpc msg
10438 params = dict()
10439 msg = dict(Type='InstancePoller', Request='ProviderAddresses', Version=2, Params=params)
10440 params['Entities'] = entities
10441 reply = await self.rpc(msg)
10442 return reply
10443
10444
10445
10446 @ReturnMapping(ErrorResults)
10447 async def SetInstanceStatus(self, entities):
10448 '''
10449 entities : typing.Sequence[~EntityStatusArgs]
10450 Returns -> typing.Sequence[~ErrorResult]
10451 '''
10452 # map input types to rpc msg
10453 params = dict()
10454 msg = dict(Type='InstancePoller', Request='SetInstanceStatus', Version=2, Params=params)
10455 params['Entities'] = entities
10456 reply = await self.rpc(msg)
10457 return reply
10458
10459
10460
10461 @ReturnMapping(ErrorResults)
10462 async def SetProviderAddresses(self, machineaddresses):
10463 '''
10464 machineaddresses : typing.Sequence[~MachineAddresses]
10465 Returns -> typing.Sequence[~ErrorResult]
10466 '''
10467 # map input types to rpc msg
10468 params = dict()
10469 msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=2, Params=params)
10470 params['MachineAddresses'] = machineaddresses
10471 reply = await self.rpc(msg)
10472 return reply
10473
10474
10475
10476 @ReturnMapping(StatusResults)
10477 async def Status(self, entities):
10478 '''
10479 entities : typing.Sequence[~Entity]
10480 Returns -> typing.Sequence[~StatusResult]
10481 '''
10482 # map input types to rpc msg
10483 params = dict()
10484 msg = dict(Type='InstancePoller', Request='Status', Version=2, Params=params)
10485 params['Entities'] = entities
10486 reply = await self.rpc(msg)
10487 return reply
10488
10489
10490
10491 @ReturnMapping(NotifyWatchResult)
10492 async def WatchForModelConfigChanges(self):
10493 '''
10494
10495 Returns -> typing.Union[_ForwardRef('Error'), str]
10496 '''
10497 # map input types to rpc msg
10498 params = dict()
10499 msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=2, Params=params)
10500
10501 reply = await self.rpc(msg)
10502 return reply
10503
10504
10505
10506 @ReturnMapping(StringsWatchResult)
10507 async def WatchModelMachines(self):
10508 '''
10509
10510 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10511 '''
10512 # map input types to rpc msg
10513 params = dict()
10514 msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=2, Params=params)
10515
10516 reply = await self.rpc(msg)
10517 return reply
10518
10519
10520 class KeyManager(Type):
10521 name = 'KeyManager'
10522 version = 1
10523 schema = {'definitions': {'Entities': {'additionalProperties': False,
10524 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10525 'type': 'array'}},
10526 'required': ['Entities'],
10527 'type': 'object'},
10528 'Entity': {'additionalProperties': False,
10529 'properties': {'Tag': {'type': 'string'}},
10530 'required': ['Tag'],
10531 'type': 'object'},
10532 'Error': {'additionalProperties': False,
10533 'properties': {'Code': {'type': 'string'},
10534 'Info': {'$ref': '#/definitions/ErrorInfo'},
10535 'Message': {'type': 'string'}},
10536 'required': ['Message', 'Code'],
10537 'type': 'object'},
10538 'ErrorInfo': {'additionalProperties': False,
10539 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10540 'MacaroonPath': {'type': 'string'}},
10541 'type': 'object'},
10542 'ErrorResult': {'additionalProperties': False,
10543 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10544 'required': ['Error'],
10545 'type': 'object'},
10546 'ErrorResults': {'additionalProperties': False,
10547 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10548 'type': 'array'}},
10549 'required': ['Results'],
10550 'type': 'object'},
10551 'ListSSHKeys': {'additionalProperties': False,
10552 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
10553 'Mode': {'type': 'boolean'}},
10554 'required': ['Entities', 'Mode'],
10555 'type': 'object'},
10556 'Macaroon': {'additionalProperties': False,
10557 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10558 'type': 'array'},
10559 'data': {'items': {'type': 'integer'},
10560 'type': 'array'},
10561 'id': {'$ref': '#/definitions/packet'},
10562 'location': {'$ref': '#/definitions/packet'},
10563 'sig': {'items': {'type': 'integer'},
10564 'type': 'array'}},
10565 'required': ['data',
10566 'location',
10567 'id',
10568 'caveats',
10569 'sig'],
10570 'type': 'object'},
10571 'ModifyUserSSHKeys': {'additionalProperties': False,
10572 'properties': {'Keys': {'items': {'type': 'string'},
10573 'type': 'array'},
10574 'User': {'type': 'string'}},
10575 'required': ['User', 'Keys'],
10576 'type': 'object'},
10577 'StringsResult': {'additionalProperties': False,
10578 'properties': {'Error': {'$ref': '#/definitions/Error'},
10579 'Result': {'items': {'type': 'string'},
10580 'type': 'array'}},
10581 'required': ['Error', 'Result'],
10582 'type': 'object'},
10583 'StringsResults': {'additionalProperties': False,
10584 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10585 'type': 'array'}},
10586 'required': ['Results'],
10587 'type': 'object'},
10588 'caveat': {'additionalProperties': False,
10589 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10590 'location': {'$ref': '#/definitions/packet'},
10591 'verificationId': {'$ref': '#/definitions/packet'}},
10592 'required': ['location',
10593 'caveatId',
10594 'verificationId'],
10595 'type': 'object'},
10596 'packet': {'additionalProperties': False,
10597 'properties': {'headerLen': {'type': 'integer'},
10598 'start': {'type': 'integer'},
10599 'totalLen': {'type': 'integer'}},
10600 'required': ['start', 'totalLen', 'headerLen'],
10601 'type': 'object'}},
10602 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10603 'Result': {'$ref': '#/definitions/ErrorResults'}},
10604 'type': 'object'},
10605 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10606 'Result': {'$ref': '#/definitions/ErrorResults'}},
10607 'type': 'object'},
10608 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10609 'Result': {'$ref': '#/definitions/ErrorResults'}},
10610 'type': 'object'},
10611 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
10612 'Result': {'$ref': '#/definitions/StringsResults'}},
10613 'type': 'object'}},
10614 'type': 'object'}
10615
10616
10617 @ReturnMapping(ErrorResults)
10618 async def AddKeys(self, keys, user):
10619 '''
10620 keys : typing.Sequence[str]
10621 user : str
10622 Returns -> typing.Sequence[~ErrorResult]
10623 '''
10624 # map input types to rpc msg
10625 params = dict()
10626 msg = dict(Type='KeyManager', Request='AddKeys', Version=1, Params=params)
10627 params['Keys'] = keys
10628 params['User'] = user
10629 reply = await self.rpc(msg)
10630 return reply
10631
10632
10633
10634 @ReturnMapping(ErrorResults)
10635 async def DeleteKeys(self, keys, user):
10636 '''
10637 keys : typing.Sequence[str]
10638 user : str
10639 Returns -> typing.Sequence[~ErrorResult]
10640 '''
10641 # map input types to rpc msg
10642 params = dict()
10643 msg = dict(Type='KeyManager', Request='DeleteKeys', Version=1, Params=params)
10644 params['Keys'] = keys
10645 params['User'] = user
10646 reply = await self.rpc(msg)
10647 return reply
10648
10649
10650
10651 @ReturnMapping(ErrorResults)
10652 async def ImportKeys(self, keys, user):
10653 '''
10654 keys : typing.Sequence[str]
10655 user : str
10656 Returns -> typing.Sequence[~ErrorResult]
10657 '''
10658 # map input types to rpc msg
10659 params = dict()
10660 msg = dict(Type='KeyManager', Request='ImportKeys', Version=1, Params=params)
10661 params['Keys'] = keys
10662 params['User'] = user
10663 reply = await self.rpc(msg)
10664 return reply
10665
10666
10667
10668 @ReturnMapping(StringsResults)
10669 async def ListKeys(self, entities, mode):
10670 '''
10671 entities : Entities
10672 mode : bool
10673 Returns -> typing.Sequence[~StringsResult]
10674 '''
10675 # map input types to rpc msg
10676 params = dict()
10677 msg = dict(Type='KeyManager', Request='ListKeys', Version=1, Params=params)
10678 params['Entities'] = entities
10679 params['Mode'] = mode
10680 reply = await self.rpc(msg)
10681 return reply
10682
10683
10684 class KeyUpdater(Type):
10685 name = 'KeyUpdater'
10686 version = 1
10687 schema = {'definitions': {'Entities': {'additionalProperties': False,
10688 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10689 'type': 'array'}},
10690 'required': ['Entities'],
10691 'type': 'object'},
10692 'Entity': {'additionalProperties': False,
10693 'properties': {'Tag': {'type': 'string'}},
10694 'required': ['Tag'],
10695 'type': 'object'},
10696 'Error': {'additionalProperties': False,
10697 'properties': {'Code': {'type': 'string'},
10698 'Info': {'$ref': '#/definitions/ErrorInfo'},
10699 'Message': {'type': 'string'}},
10700 'required': ['Message', 'Code'],
10701 'type': 'object'},
10702 'ErrorInfo': {'additionalProperties': False,
10703 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10704 'MacaroonPath': {'type': 'string'}},
10705 'type': 'object'},
10706 'Macaroon': {'additionalProperties': False,
10707 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10708 'type': 'array'},
10709 'data': {'items': {'type': 'integer'},
10710 'type': 'array'},
10711 'id': {'$ref': '#/definitions/packet'},
10712 'location': {'$ref': '#/definitions/packet'},
10713 'sig': {'items': {'type': 'integer'},
10714 'type': 'array'}},
10715 'required': ['data',
10716 'location',
10717 'id',
10718 'caveats',
10719 'sig'],
10720 'type': 'object'},
10721 'NotifyWatchResult': {'additionalProperties': False,
10722 'properties': {'Error': {'$ref': '#/definitions/Error'},
10723 'NotifyWatcherId': {'type': 'string'}},
10724 'required': ['NotifyWatcherId', 'Error'],
10725 'type': 'object'},
10726 'NotifyWatchResults': {'additionalProperties': False,
10727 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10728 'type': 'array'}},
10729 'required': ['Results'],
10730 'type': 'object'},
10731 'StringsResult': {'additionalProperties': False,
10732 'properties': {'Error': {'$ref': '#/definitions/Error'},
10733 'Result': {'items': {'type': 'string'},
10734 'type': 'array'}},
10735 'required': ['Error', 'Result'],
10736 'type': 'object'},
10737 'StringsResults': {'additionalProperties': False,
10738 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10739 'type': 'array'}},
10740 'required': ['Results'],
10741 'type': 'object'},
10742 'caveat': {'additionalProperties': False,
10743 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10744 'location': {'$ref': '#/definitions/packet'},
10745 'verificationId': {'$ref': '#/definitions/packet'}},
10746 'required': ['location',
10747 'caveatId',
10748 'verificationId'],
10749 'type': 'object'},
10750 'packet': {'additionalProperties': False,
10751 'properties': {'headerLen': {'type': 'integer'},
10752 'start': {'type': 'integer'},
10753 'totalLen': {'type': 'integer'}},
10754 'required': ['start', 'totalLen', 'headerLen'],
10755 'type': 'object'}},
10756 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10757 'Result': {'$ref': '#/definitions/StringsResults'}},
10758 'type': 'object'},
10759 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10760 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10761 'type': 'object'}},
10762 'type': 'object'}
10763
10764
10765 @ReturnMapping(StringsResults)
10766 async def AuthorisedKeys(self, entities):
10767 '''
10768 entities : typing.Sequence[~Entity]
10769 Returns -> typing.Sequence[~StringsResult]
10770 '''
10771 # map input types to rpc msg
10772 params = dict()
10773 msg = dict(Type='KeyUpdater', Request='AuthorisedKeys', Version=1, Params=params)
10774 params['Entities'] = entities
10775 reply = await self.rpc(msg)
10776 return reply
10777
10778
10779
10780 @ReturnMapping(NotifyWatchResults)
10781 async def WatchAuthorisedKeys(self, entities):
10782 '''
10783 entities : typing.Sequence[~Entity]
10784 Returns -> typing.Sequence[~NotifyWatchResult]
10785 '''
10786 # map input types to rpc msg
10787 params = dict()
10788 msg = dict(Type='KeyUpdater', Request='WatchAuthorisedKeys', Version=1, Params=params)
10789 params['Entities'] = entities
10790 reply = await self.rpc(msg)
10791 return reply
10792
10793
10794 class LeadershipService(Type):
10795 name = 'LeadershipService'
10796 version = 2
10797 schema = {'definitions': {'ClaimLeadershipBulkParams': {'additionalProperties': False,
10798 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
10799 'type': 'array'}},
10800 'required': ['Params'],
10801 'type': 'object'},
10802 'ClaimLeadershipBulkResults': {'additionalProperties': False,
10803 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10804 'type': 'array'}},
10805 'required': ['Results'],
10806 'type': 'object'},
10807 'ClaimLeadershipParams': {'additionalProperties': False,
10808 'properties': {'DurationSeconds': {'type': 'number'},
10809 'ServiceTag': {'type': 'string'},
10810 'UnitTag': {'type': 'string'}},
10811 'required': ['ServiceTag',
10812 'UnitTag',
10813 'DurationSeconds'],
10814 'type': 'object'},
10815 'Error': {'additionalProperties': False,
10816 'properties': {'Code': {'type': 'string'},
10817 'Info': {'$ref': '#/definitions/ErrorInfo'},
10818 'Message': {'type': 'string'}},
10819 'required': ['Message', 'Code'],
10820 'type': 'object'},
10821 'ErrorInfo': {'additionalProperties': False,
10822 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10823 'MacaroonPath': {'type': 'string'}},
10824 'type': 'object'},
10825 'ErrorResult': {'additionalProperties': False,
10826 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10827 'required': ['Error'],
10828 'type': 'object'},
10829 'Macaroon': {'additionalProperties': False,
10830 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10831 'type': 'array'},
10832 'data': {'items': {'type': 'integer'},
10833 'type': 'array'},
10834 'id': {'$ref': '#/definitions/packet'},
10835 'location': {'$ref': '#/definitions/packet'},
10836 'sig': {'items': {'type': 'integer'},
10837 'type': 'array'}},
10838 'required': ['data',
10839 'location',
10840 'id',
10841 'caveats',
10842 'sig'],
10843 'type': 'object'},
10844 'ServiceTag': {'additionalProperties': False,
10845 'properties': {'Name': {'type': 'string'}},
10846 'required': ['Name'],
10847 'type': 'object'},
10848 'caveat': {'additionalProperties': False,
10849 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10850 'location': {'$ref': '#/definitions/packet'},
10851 'verificationId': {'$ref': '#/definitions/packet'}},
10852 'required': ['location',
10853 'caveatId',
10854 'verificationId'],
10855 'type': 'object'},
10856 'packet': {'additionalProperties': False,
10857 'properties': {'headerLen': {'type': 'integer'},
10858 'start': {'type': 'integer'},
10859 'totalLen': {'type': 'integer'}},
10860 'required': ['start', 'totalLen', 'headerLen'],
10861 'type': 'object'}},
10862 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ServiceTag'},
10863 'Result': {'$ref': '#/definitions/ErrorResult'}},
10864 'type': 'object'},
10865 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
10866 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
10867 'type': 'object'}},
10868 'type': 'object'}
10869
10870
10871 @ReturnMapping(ErrorResult)
10872 async def BlockUntilLeadershipReleased(self, name):
10873 '''
10874 name : str
10875 Returns -> Error
10876 '''
10877 # map input types to rpc msg
10878 params = dict()
10879 msg = dict(Type='LeadershipService', Request='BlockUntilLeadershipReleased', Version=2, Params=params)
10880 params['Name'] = name
10881 reply = await self.rpc(msg)
10882 return reply
10883
10884
10885
10886 @ReturnMapping(ClaimLeadershipBulkResults)
10887 async def ClaimLeadership(self, params):
10888 '''
10889 params : typing.Sequence[~ClaimLeadershipParams]
10890 Returns -> typing.Sequence[~ErrorResult]
10891 '''
10892 # map input types to rpc msg
10893 params = dict()
10894 msg = dict(Type='LeadershipService', Request='ClaimLeadership', Version=2, Params=params)
10895 params['Params'] = params
10896 reply = await self.rpc(msg)
10897 return reply
10898
10899
10900 class LifeFlag(Type):
10901 name = 'LifeFlag'
10902 version = 1
10903 schema = {'definitions': {'Entities': {'additionalProperties': False,
10904 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10905 'type': 'array'}},
10906 'required': ['Entities'],
10907 'type': 'object'},
10908 'Entity': {'additionalProperties': False,
10909 'properties': {'Tag': {'type': 'string'}},
10910 'required': ['Tag'],
10911 'type': 'object'},
10912 'Error': {'additionalProperties': False,
10913 'properties': {'Code': {'type': 'string'},
10914 'Info': {'$ref': '#/definitions/ErrorInfo'},
10915 'Message': {'type': 'string'}},
10916 'required': ['Message', 'Code'],
10917 'type': 'object'},
10918 'ErrorInfo': {'additionalProperties': False,
10919 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10920 'MacaroonPath': {'type': 'string'}},
10921 'type': 'object'},
10922 'LifeResult': {'additionalProperties': False,
10923 'properties': {'Error': {'$ref': '#/definitions/Error'},
10924 'Life': {'type': 'string'}},
10925 'required': ['Life', 'Error'],
10926 'type': 'object'},
10927 'LifeResults': {'additionalProperties': False,
10928 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10929 'type': 'array'}},
10930 'required': ['Results'],
10931 'type': 'object'},
10932 'Macaroon': {'additionalProperties': False,
10933 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10934 'type': 'array'},
10935 'data': {'items': {'type': 'integer'},
10936 'type': 'array'},
10937 'id': {'$ref': '#/definitions/packet'},
10938 'location': {'$ref': '#/definitions/packet'},
10939 'sig': {'items': {'type': 'integer'},
10940 'type': 'array'}},
10941 'required': ['data',
10942 'location',
10943 'id',
10944 'caveats',
10945 'sig'],
10946 'type': 'object'},
10947 'NotifyWatchResult': {'additionalProperties': False,
10948 'properties': {'Error': {'$ref': '#/definitions/Error'},
10949 'NotifyWatcherId': {'type': 'string'}},
10950 'required': ['NotifyWatcherId', 'Error'],
10951 'type': 'object'},
10952 'NotifyWatchResults': {'additionalProperties': False,
10953 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10954 'type': 'array'}},
10955 'required': ['Results'],
10956 'type': 'object'},
10957 'caveat': {'additionalProperties': False,
10958 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10959 'location': {'$ref': '#/definitions/packet'},
10960 'verificationId': {'$ref': '#/definitions/packet'}},
10961 'required': ['location',
10962 'caveatId',
10963 'verificationId'],
10964 'type': 'object'},
10965 'packet': {'additionalProperties': False,
10966 'properties': {'headerLen': {'type': 'integer'},
10967 'start': {'type': 'integer'},
10968 'totalLen': {'type': 'integer'}},
10969 'required': ['start', 'totalLen', 'headerLen'],
10970 'type': 'object'}},
10971 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10972 'Result': {'$ref': '#/definitions/LifeResults'}},
10973 'type': 'object'},
10974 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10975 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10976 'type': 'object'}},
10977 'type': 'object'}
10978
10979
10980 @ReturnMapping(LifeResults)
10981 async def Life(self, entities):
10982 '''
10983 entities : typing.Sequence[~Entity]
10984 Returns -> typing.Sequence[~LifeResult]
10985 '''
10986 # map input types to rpc msg
10987 params = dict()
10988 msg = dict(Type='LifeFlag', Request='Life', Version=1, Params=params)
10989 params['Entities'] = entities
10990 reply = await self.rpc(msg)
10991 return reply
10992
10993
10994
10995 @ReturnMapping(NotifyWatchResults)
10996 async def Watch(self, entities):
10997 '''
10998 entities : typing.Sequence[~Entity]
10999 Returns -> typing.Sequence[~NotifyWatchResult]
11000 '''
11001 # map input types to rpc msg
11002 params = dict()
11003 msg = dict(Type='LifeFlag', Request='Watch', Version=1, Params=params)
11004 params['Entities'] = entities
11005 reply = await self.rpc(msg)
11006 return reply
11007
11008
11009 class Logger(Type):
11010 name = 'Logger'
11011 version = 1
11012 schema = {'definitions': {'Entities': {'additionalProperties': False,
11013 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11014 'type': 'array'}},
11015 'required': ['Entities'],
11016 'type': 'object'},
11017 'Entity': {'additionalProperties': False,
11018 'properties': {'Tag': {'type': 'string'}},
11019 'required': ['Tag'],
11020 'type': 'object'},
11021 'Error': {'additionalProperties': False,
11022 'properties': {'Code': {'type': 'string'},
11023 'Info': {'$ref': '#/definitions/ErrorInfo'},
11024 'Message': {'type': 'string'}},
11025 'required': ['Message', 'Code'],
11026 'type': 'object'},
11027 'ErrorInfo': {'additionalProperties': False,
11028 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11029 'MacaroonPath': {'type': 'string'}},
11030 'type': 'object'},
11031 'Macaroon': {'additionalProperties': False,
11032 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11033 'type': 'array'},
11034 'data': {'items': {'type': 'integer'},
11035 'type': 'array'},
11036 'id': {'$ref': '#/definitions/packet'},
11037 'location': {'$ref': '#/definitions/packet'},
11038 'sig': {'items': {'type': 'integer'},
11039 'type': 'array'}},
11040 'required': ['data',
11041 'location',
11042 'id',
11043 'caveats',
11044 'sig'],
11045 'type': 'object'},
11046 'NotifyWatchResult': {'additionalProperties': False,
11047 'properties': {'Error': {'$ref': '#/definitions/Error'},
11048 'NotifyWatcherId': {'type': 'string'}},
11049 'required': ['NotifyWatcherId', 'Error'],
11050 'type': 'object'},
11051 'NotifyWatchResults': {'additionalProperties': False,
11052 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11053 'type': 'array'}},
11054 'required': ['Results'],
11055 'type': 'object'},
11056 'StringResult': {'additionalProperties': False,
11057 'properties': {'Error': {'$ref': '#/definitions/Error'},
11058 'Result': {'type': 'string'}},
11059 'required': ['Error', 'Result'],
11060 'type': 'object'},
11061 'StringResults': {'additionalProperties': False,
11062 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11063 'type': 'array'}},
11064 'required': ['Results'],
11065 'type': 'object'},
11066 'caveat': {'additionalProperties': False,
11067 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11068 'location': {'$ref': '#/definitions/packet'},
11069 'verificationId': {'$ref': '#/definitions/packet'}},
11070 'required': ['location',
11071 'caveatId',
11072 'verificationId'],
11073 'type': 'object'},
11074 'packet': {'additionalProperties': False,
11075 'properties': {'headerLen': {'type': 'integer'},
11076 'start': {'type': 'integer'},
11077 'totalLen': {'type': 'integer'}},
11078 'required': ['start', 'totalLen', 'headerLen'],
11079 'type': 'object'}},
11080 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11081 'Result': {'$ref': '#/definitions/StringResults'}},
11082 'type': 'object'},
11083 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11084 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11085 'type': 'object'}},
11086 'type': 'object'}
11087
11088
11089 @ReturnMapping(StringResults)
11090 async def LoggingConfig(self, entities):
11091 '''
11092 entities : typing.Sequence[~Entity]
11093 Returns -> typing.Sequence[~StringResult]
11094 '''
11095 # map input types to rpc msg
11096 params = dict()
11097 msg = dict(Type='Logger', Request='LoggingConfig', Version=1, Params=params)
11098 params['Entities'] = entities
11099 reply = await self.rpc(msg)
11100 return reply
11101
11102
11103
11104 @ReturnMapping(NotifyWatchResults)
11105 async def WatchLoggingConfig(self, entities):
11106 '''
11107 entities : typing.Sequence[~Entity]
11108 Returns -> typing.Sequence[~NotifyWatchResult]
11109 '''
11110 # map input types to rpc msg
11111 params = dict()
11112 msg = dict(Type='Logger', Request='WatchLoggingConfig', Version=1, Params=params)
11113 params['Entities'] = entities
11114 reply = await self.rpc(msg)
11115 return reply
11116
11117
11118 class MachineActions(Type):
11119 name = 'MachineActions'
11120 version = 1
11121 schema = {'definitions': {'Action': {'additionalProperties': False,
11122 'properties': {'name': {'type': 'string'},
11123 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11124 'type': 'object'}},
11125 'type': 'object'},
11126 'receiver': {'type': 'string'},
11127 'tag': {'type': 'string'}},
11128 'required': ['tag', 'receiver', 'name'],
11129 'type': 'object'},
11130 'ActionExecutionResult': {'additionalProperties': False,
11131 'properties': {'actiontag': {'type': 'string'},
11132 'message': {'type': 'string'},
11133 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11134 'type': 'object'}},
11135 'type': 'object'},
11136 'status': {'type': 'string'}},
11137 'required': ['actiontag', 'status'],
11138 'type': 'object'},
11139 'ActionExecutionResults': {'additionalProperties': False,
11140 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11141 'type': 'array'}},
11142 'type': 'object'},
11143 'ActionResult': {'additionalProperties': False,
11144 'properties': {'action': {'$ref': '#/definitions/Action'},
11145 'completed': {'format': 'date-time',
11146 'type': 'string'},
11147 'enqueued': {'format': 'date-time',
11148 'type': 'string'},
11149 'error': {'$ref': '#/definitions/Error'},
11150 'message': {'type': 'string'},
11151 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11152 'type': 'object'}},
11153 'type': 'object'},
11154 'started': {'format': 'date-time',
11155 'type': 'string'},
11156 'status': {'type': 'string'}},
11157 'type': 'object'},
11158 'ActionResults': {'additionalProperties': False,
11159 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11160 'type': 'array'}},
11161 'type': 'object'},
11162 'ActionsByReceiver': {'additionalProperties': False,
11163 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11164 'type': 'array'},
11165 'error': {'$ref': '#/definitions/Error'},
11166 'receiver': {'type': 'string'}},
11167 'type': 'object'},
11168 'ActionsByReceivers': {'additionalProperties': False,
11169 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11170 'type': 'array'}},
11171 'type': 'object'},
11172 'Entities': {'additionalProperties': False,
11173 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11174 'type': 'array'}},
11175 'required': ['Entities'],
11176 'type': 'object'},
11177 'Entity': {'additionalProperties': False,
11178 'properties': {'Tag': {'type': 'string'}},
11179 'required': ['Tag'],
11180 'type': 'object'},
11181 'Error': {'additionalProperties': False,
11182 'properties': {'Code': {'type': 'string'},
11183 'Info': {'$ref': '#/definitions/ErrorInfo'},
11184 'Message': {'type': 'string'}},
11185 'required': ['Message', 'Code'],
11186 'type': 'object'},
11187 'ErrorInfo': {'additionalProperties': False,
11188 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11189 'MacaroonPath': {'type': 'string'}},
11190 'type': 'object'},
11191 'ErrorResult': {'additionalProperties': False,
11192 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11193 'required': ['Error'],
11194 'type': 'object'},
11195 'ErrorResults': {'additionalProperties': False,
11196 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11197 'type': 'array'}},
11198 'required': ['Results'],
11199 'type': 'object'},
11200 'Macaroon': {'additionalProperties': False,
11201 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11202 'type': 'array'},
11203 'data': {'items': {'type': 'integer'},
11204 'type': 'array'},
11205 'id': {'$ref': '#/definitions/packet'},
11206 'location': {'$ref': '#/definitions/packet'},
11207 'sig': {'items': {'type': 'integer'},
11208 'type': 'array'}},
11209 'required': ['data',
11210 'location',
11211 'id',
11212 'caveats',
11213 'sig'],
11214 'type': 'object'},
11215 'StringsWatchResult': {'additionalProperties': False,
11216 'properties': {'Changes': {'items': {'type': 'string'},
11217 'type': 'array'},
11218 'Error': {'$ref': '#/definitions/Error'},
11219 'StringsWatcherId': {'type': 'string'}},
11220 'required': ['StringsWatcherId',
11221 'Changes',
11222 'Error'],
11223 'type': 'object'},
11224 'StringsWatchResults': {'additionalProperties': False,
11225 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11226 'type': 'array'}},
11227 'required': ['Results'],
11228 'type': 'object'},
11229 'caveat': {'additionalProperties': False,
11230 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11231 'location': {'$ref': '#/definitions/packet'},
11232 'verificationId': {'$ref': '#/definitions/packet'}},
11233 'required': ['location',
11234 'caveatId',
11235 'verificationId'],
11236 'type': 'object'},
11237 'packet': {'additionalProperties': False,
11238 'properties': {'headerLen': {'type': 'integer'},
11239 'start': {'type': 'integer'},
11240 'totalLen': {'type': 'integer'}},
11241 'required': ['start', 'totalLen', 'headerLen'],
11242 'type': 'object'}},
11243 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11244 'Result': {'$ref': '#/definitions/ActionResults'}},
11245 'type': 'object'},
11246 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11247 'Result': {'$ref': '#/definitions/ErrorResults'}},
11248 'type': 'object'},
11249 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
11250 'Result': {'$ref': '#/definitions/ErrorResults'}},
11251 'type': 'object'},
11252 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11253 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
11254 'type': 'object'},
11255 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11256 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11257 'type': 'object'}},
11258 'type': 'object'}
11259
11260
11261 @ReturnMapping(ActionResults)
11262 async def Actions(self, entities):
11263 '''
11264 entities : typing.Sequence[~Entity]
11265 Returns -> typing.Sequence[~ActionResult]
11266 '''
11267 # map input types to rpc msg
11268 params = dict()
11269 msg = dict(Type='MachineActions', Request='Actions', Version=1, Params=params)
11270 params['Entities'] = entities
11271 reply = await self.rpc(msg)
11272 return reply
11273
11274
11275
11276 @ReturnMapping(ErrorResults)
11277 async def BeginActions(self, entities):
11278 '''
11279 entities : typing.Sequence[~Entity]
11280 Returns -> typing.Sequence[~ErrorResult]
11281 '''
11282 # map input types to rpc msg
11283 params = dict()
11284 msg = dict(Type='MachineActions', Request='BeginActions', Version=1, Params=params)
11285 params['Entities'] = entities
11286 reply = await self.rpc(msg)
11287 return reply
11288
11289
11290
11291 @ReturnMapping(ErrorResults)
11292 async def FinishActions(self, results):
11293 '''
11294 results : typing.Sequence[~ActionExecutionResult]
11295 Returns -> typing.Sequence[~ErrorResult]
11296 '''
11297 # map input types to rpc msg
11298 params = dict()
11299 msg = dict(Type='MachineActions', Request='FinishActions', Version=1, Params=params)
11300 params['results'] = results
11301 reply = await self.rpc(msg)
11302 return reply
11303
11304
11305
11306 @ReturnMapping(ActionsByReceivers)
11307 async def RunningActions(self, entities):
11308 '''
11309 entities : typing.Sequence[~Entity]
11310 Returns -> typing.Sequence[~ActionsByReceiver]
11311 '''
11312 # map input types to rpc msg
11313 params = dict()
11314 msg = dict(Type='MachineActions', Request='RunningActions', Version=1, Params=params)
11315 params['Entities'] = entities
11316 reply = await self.rpc(msg)
11317 return reply
11318
11319
11320
11321 @ReturnMapping(StringsWatchResults)
11322 async def WatchActionNotifications(self, entities):
11323 '''
11324 entities : typing.Sequence[~Entity]
11325 Returns -> typing.Sequence[~StringsWatchResult]
11326 '''
11327 # map input types to rpc msg
11328 params = dict()
11329 msg = dict(Type='MachineActions', Request='WatchActionNotifications', Version=1, Params=params)
11330 params['Entities'] = entities
11331 reply = await self.rpc(msg)
11332 return reply
11333
11334
11335 class MachineManager(Type):
11336 name = 'MachineManager'
11337 version = 2
11338 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
11339 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
11340 'type': 'array'},
11341 'Constraints': {'$ref': '#/definitions/Value'},
11342 'ContainerType': {'type': 'string'},
11343 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
11344 'type': 'array'},
11345 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
11346 'InstanceId': {'type': 'string'},
11347 'Jobs': {'items': {'type': 'string'},
11348 'type': 'array'},
11349 'Nonce': {'type': 'string'},
11350 'ParentId': {'type': 'string'},
11351 'Placement': {'$ref': '#/definitions/Placement'},
11352 'Series': {'type': 'string'}},
11353 'required': ['Series',
11354 'Constraints',
11355 'Jobs',
11356 'Disks',
11357 'Placement',
11358 'ParentId',
11359 'ContainerType',
11360 'InstanceId',
11361 'Nonce',
11362 'HardwareCharacteristics',
11363 'Addrs'],
11364 'type': 'object'},
11365 'AddMachines': {'additionalProperties': False,
11366 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
11367 'type': 'array'}},
11368 'required': ['MachineParams'],
11369 'type': 'object'},
11370 'AddMachinesResult': {'additionalProperties': False,
11371 'properties': {'Error': {'$ref': '#/definitions/Error'},
11372 'Machine': {'type': 'string'}},
11373 'required': ['Machine', 'Error'],
11374 'type': 'object'},
11375 'AddMachinesResults': {'additionalProperties': False,
11376 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
11377 'type': 'array'}},
11378 'required': ['Machines'],
11379 'type': 'object'},
11380 'Address': {'additionalProperties': False,
11381 'properties': {'Scope': {'type': 'string'},
11382 'SpaceName': {'type': 'string'},
11383 'Type': {'type': 'string'},
11384 'Value': {'type': 'string'}},
11385 'required': ['Value', 'Type', 'Scope'],
11386 'type': 'object'},
11387 'Constraints': {'additionalProperties': False,
11388 'properties': {'Count': {'type': 'integer'},
11389 'Pool': {'type': 'string'},
11390 'Size': {'type': 'integer'}},
11391 'required': ['Pool', 'Size', 'Count'],
11392 'type': 'object'},
11393 'Error': {'additionalProperties': False,
11394 'properties': {'Code': {'type': 'string'},
11395 'Info': {'$ref': '#/definitions/ErrorInfo'},
11396 'Message': {'type': 'string'}},
11397 'required': ['Message', 'Code'],
11398 'type': 'object'},
11399 'ErrorInfo': {'additionalProperties': False,
11400 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11401 'MacaroonPath': {'type': 'string'}},
11402 'type': 'object'},
11403 'HardwareCharacteristics': {'additionalProperties': False,
11404 'properties': {'Arch': {'type': 'string'},
11405 'AvailabilityZone': {'type': 'string'},
11406 'CpuCores': {'type': 'integer'},
11407 'CpuPower': {'type': 'integer'},
11408 'Mem': {'type': 'integer'},
11409 'RootDisk': {'type': 'integer'},
11410 'Tags': {'items': {'type': 'string'},
11411 'type': 'array'}},
11412 'type': 'object'},
11413 'Macaroon': {'additionalProperties': False,
11414 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11415 'type': 'array'},
11416 'data': {'items': {'type': 'integer'},
11417 'type': 'array'},
11418 'id': {'$ref': '#/definitions/packet'},
11419 'location': {'$ref': '#/definitions/packet'},
11420 'sig': {'items': {'type': 'integer'},
11421 'type': 'array'}},
11422 'required': ['data',
11423 'location',
11424 'id',
11425 'caveats',
11426 'sig'],
11427 'type': 'object'},
11428 'Placement': {'additionalProperties': False,
11429 'properties': {'Directive': {'type': 'string'},
11430 'Scope': {'type': 'string'}},
11431 'required': ['Scope', 'Directive'],
11432 'type': 'object'},
11433 'Value': {'additionalProperties': False,
11434 'properties': {'arch': {'type': 'string'},
11435 'container': {'type': 'string'},
11436 'cpu-cores': {'type': 'integer'},
11437 'cpu-power': {'type': 'integer'},
11438 'instance-type': {'type': 'string'},
11439 'mem': {'type': 'integer'},
11440 'root-disk': {'type': 'integer'},
11441 'spaces': {'items': {'type': 'string'},
11442 'type': 'array'},
11443 'tags': {'items': {'type': 'string'},
11444 'type': 'array'},
11445 'virt-type': {'type': 'string'}},
11446 'type': 'object'},
11447 'caveat': {'additionalProperties': False,
11448 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11449 'location': {'$ref': '#/definitions/packet'},
11450 'verificationId': {'$ref': '#/definitions/packet'}},
11451 'required': ['location',
11452 'caveatId',
11453 'verificationId'],
11454 'type': 'object'},
11455 'packet': {'additionalProperties': False,
11456 'properties': {'headerLen': {'type': 'integer'},
11457 'start': {'type': 'integer'},
11458 'totalLen': {'type': 'integer'}},
11459 'required': ['start', 'totalLen', 'headerLen'],
11460 'type': 'object'}},
11461 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
11462 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
11463 'type': 'object'}},
11464 'type': 'object'}
11465
11466
11467 @ReturnMapping(AddMachinesResults)
11468 async def AddMachines(self, machineparams):
11469 '''
11470 machineparams : typing.Sequence[~AddMachineParams]
11471 Returns -> typing.Sequence[~AddMachinesResult]
11472 '''
11473 # map input types to rpc msg
11474 params = dict()
11475 msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params)
11476 params['MachineParams'] = machineparams
11477 reply = await self.rpc(msg)
11478 return reply
11479
11480
11481 class Machiner(Type):
11482 name = 'Machiner'
11483 version = 1
11484 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
11485 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
11486 'type': 'array'},
11487 'type': 'array'}},
11488 'required': ['Servers'],
11489 'type': 'object'},
11490 'Address': {'additionalProperties': False,
11491 'properties': {'Scope': {'type': 'string'},
11492 'SpaceName': {'type': 'string'},
11493 'Type': {'type': 'string'},
11494 'Value': {'type': 'string'}},
11495 'required': ['Value', 'Type', 'Scope'],
11496 'type': 'object'},
11497 'BytesResult': {'additionalProperties': False,
11498 'properties': {'Result': {'items': {'type': 'integer'},
11499 'type': 'array'}},
11500 'required': ['Result'],
11501 'type': 'object'},
11502 'Entities': {'additionalProperties': False,
11503 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11504 'type': 'array'}},
11505 'required': ['Entities'],
11506 'type': 'object'},
11507 'Entity': {'additionalProperties': False,
11508 'properties': {'Tag': {'type': 'string'}},
11509 'required': ['Tag'],
11510 'type': 'object'},
11511 'EntityStatusArgs': {'additionalProperties': False,
11512 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11513 'type': 'object'}},
11514 'type': 'object'},
11515 'Info': {'type': 'string'},
11516 'Status': {'type': 'string'},
11517 'Tag': {'type': 'string'}},
11518 'required': ['Tag',
11519 'Status',
11520 'Info',
11521 'Data'],
11522 'type': 'object'},
11523 'Error': {'additionalProperties': False,
11524 'properties': {'Code': {'type': 'string'},
11525 'Info': {'$ref': '#/definitions/ErrorInfo'},
11526 'Message': {'type': 'string'}},
11527 'required': ['Message', 'Code'],
11528 'type': 'object'},
11529 'ErrorInfo': {'additionalProperties': False,
11530 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11531 'MacaroonPath': {'type': 'string'}},
11532 'type': 'object'},
11533 'ErrorResult': {'additionalProperties': False,
11534 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11535 'required': ['Error'],
11536 'type': 'object'},
11537 'ErrorResults': {'additionalProperties': False,
11538 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11539 'type': 'array'}},
11540 'required': ['Results'],
11541 'type': 'object'},
11542 'HostPort': {'additionalProperties': False,
11543 'properties': {'Address': {'$ref': '#/definitions/Address'},
11544 'Port': {'type': 'integer'}},
11545 'required': ['Address', 'Port'],
11546 'type': 'object'},
11547 'JobsResult': {'additionalProperties': False,
11548 'properties': {'Error': {'$ref': '#/definitions/Error'},
11549 'Jobs': {'items': {'type': 'string'},
11550 'type': 'array'}},
11551 'required': ['Jobs', 'Error'],
11552 'type': 'object'},
11553 'JobsResults': {'additionalProperties': False,
11554 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
11555 'type': 'array'}},
11556 'required': ['Results'],
11557 'type': 'object'},
11558 'LifeResult': {'additionalProperties': False,
11559 'properties': {'Error': {'$ref': '#/definitions/Error'},
11560 'Life': {'type': 'string'}},
11561 'required': ['Life', 'Error'],
11562 'type': 'object'},
11563 'LifeResults': {'additionalProperties': False,
11564 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11565 'type': 'array'}},
11566 'required': ['Results'],
11567 'type': 'object'},
11568 'Macaroon': {'additionalProperties': False,
11569 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11570 'type': 'array'},
11571 'data': {'items': {'type': 'integer'},
11572 'type': 'array'},
11573 'id': {'$ref': '#/definitions/packet'},
11574 'location': {'$ref': '#/definitions/packet'},
11575 'sig': {'items': {'type': 'integer'},
11576 'type': 'array'}},
11577 'required': ['data',
11578 'location',
11579 'id',
11580 'caveats',
11581 'sig'],
11582 'type': 'object'},
11583 'MachineAddresses': {'additionalProperties': False,
11584 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11585 'type': 'array'},
11586 'Tag': {'type': 'string'}},
11587 'required': ['Tag', 'Addresses'],
11588 'type': 'object'},
11589 'NetworkConfig': {'additionalProperties': False,
11590 'properties': {'Address': {'type': 'string'},
11591 'CIDR': {'type': 'string'},
11592 'ConfigType': {'type': 'string'},
11593 'DNSSearchDomains': {'items': {'type': 'string'},
11594 'type': 'array'},
11595 'DNSServers': {'items': {'type': 'string'},
11596 'type': 'array'},
11597 'DeviceIndex': {'type': 'integer'},
11598 'Disabled': {'type': 'boolean'},
11599 'GatewayAddress': {'type': 'string'},
11600 'InterfaceName': {'type': 'string'},
11601 'InterfaceType': {'type': 'string'},
11602 'MACAddress': {'type': 'string'},
11603 'MTU': {'type': 'integer'},
11604 'NoAutoStart': {'type': 'boolean'},
11605 'ParentInterfaceName': {'type': 'string'},
11606 'ProviderAddressId': {'type': 'string'},
11607 'ProviderId': {'type': 'string'},
11608 'ProviderSpaceId': {'type': 'string'},
11609 'ProviderSubnetId': {'type': 'string'},
11610 'ProviderVLANId': {'type': 'string'},
11611 'VLANTag': {'type': 'integer'}},
11612 'required': ['DeviceIndex',
11613 'MACAddress',
11614 'CIDR',
11615 'MTU',
11616 'ProviderId',
11617 'ProviderSubnetId',
11618 'ProviderSpaceId',
11619 'ProviderAddressId',
11620 'ProviderVLANId',
11621 'VLANTag',
11622 'InterfaceName',
11623 'ParentInterfaceName',
11624 'InterfaceType',
11625 'Disabled'],
11626 'type': 'object'},
11627 'NotifyWatchResult': {'additionalProperties': False,
11628 'properties': {'Error': {'$ref': '#/definitions/Error'},
11629 'NotifyWatcherId': {'type': 'string'}},
11630 'required': ['NotifyWatcherId', 'Error'],
11631 'type': 'object'},
11632 'NotifyWatchResults': {'additionalProperties': False,
11633 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11634 'type': 'array'}},
11635 'required': ['Results'],
11636 'type': 'object'},
11637 'SetMachineNetworkConfig': {'additionalProperties': False,
11638 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
11639 'type': 'array'},
11640 'Tag': {'type': 'string'}},
11641 'required': ['Tag', 'Config'],
11642 'type': 'object'},
11643 'SetMachinesAddresses': {'additionalProperties': False,
11644 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11645 'type': 'array'}},
11646 'required': ['MachineAddresses'],
11647 'type': 'object'},
11648 'SetStatus': {'additionalProperties': False,
11649 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11650 'type': 'array'}},
11651 'required': ['Entities'],
11652 'type': 'object'},
11653 'StringResult': {'additionalProperties': False,
11654 'properties': {'Error': {'$ref': '#/definitions/Error'},
11655 'Result': {'type': 'string'}},
11656 'required': ['Error', 'Result'],
11657 'type': 'object'},
11658 'StringsResult': {'additionalProperties': False,
11659 'properties': {'Error': {'$ref': '#/definitions/Error'},
11660 'Result': {'items': {'type': 'string'},
11661 'type': 'array'}},
11662 'required': ['Error', 'Result'],
11663 'type': 'object'},
11664 'caveat': {'additionalProperties': False,
11665 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11666 'location': {'$ref': '#/definitions/packet'},
11667 'verificationId': {'$ref': '#/definitions/packet'}},
11668 'required': ['location',
11669 'caveatId',
11670 'verificationId'],
11671 'type': 'object'},
11672 'packet': {'additionalProperties': False,
11673 'properties': {'headerLen': {'type': 'integer'},
11674 'start': {'type': 'integer'},
11675 'totalLen': {'type': 'integer'}},
11676 'required': ['start', 'totalLen', 'headerLen'],
11677 'type': 'object'}},
11678 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11679 'type': 'object'},
11680 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
11681 'type': 'object'},
11682 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
11683 'type': 'object'},
11684 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11685 'Result': {'$ref': '#/definitions/ErrorResults'}},
11686 'type': 'object'},
11687 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11688 'Result': {'$ref': '#/definitions/JobsResults'}},
11689 'type': 'object'},
11690 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11691 'Result': {'$ref': '#/definitions/LifeResults'}},
11692 'type': 'object'},
11693 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
11694 'type': 'object'},
11695 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11696 'Result': {'$ref': '#/definitions/ErrorResults'}},
11697 'type': 'object'},
11698 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
11699 'type': 'object'},
11700 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11701 'Result': {'$ref': '#/definitions/ErrorResults'}},
11702 'type': 'object'},
11703 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11704 'Result': {'$ref': '#/definitions/ErrorResults'}},
11705 'type': 'object'},
11706 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11707 'Result': {'$ref': '#/definitions/ErrorResults'}},
11708 'type': 'object'},
11709 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11710 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11711 'type': 'object'},
11712 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11713 'type': 'object'}},
11714 'type': 'object'}
11715
11716
11717 @ReturnMapping(StringsResult)
11718 async def APIAddresses(self):
11719 '''
11720
11721 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
11722 '''
11723 # map input types to rpc msg
11724 params = dict()
11725 msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params)
11726
11727 reply = await self.rpc(msg)
11728 return reply
11729
11730
11731
11732 @ReturnMapping(APIHostPortsResult)
11733 async def APIHostPorts(self):
11734 '''
11735
11736 Returns -> typing.Sequence[~HostPort]
11737 '''
11738 # map input types to rpc msg
11739 params = dict()
11740 msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params)
11741
11742 reply = await self.rpc(msg)
11743 return reply
11744
11745
11746
11747 @ReturnMapping(BytesResult)
11748 async def CACert(self):
11749 '''
11750
11751 Returns -> typing.Sequence[int]
11752 '''
11753 # map input types to rpc msg
11754 params = dict()
11755 msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params)
11756
11757 reply = await self.rpc(msg)
11758 return reply
11759
11760
11761
11762 @ReturnMapping(ErrorResults)
11763 async def EnsureDead(self, entities):
11764 '''
11765 entities : typing.Sequence[~Entity]
11766 Returns -> typing.Sequence[~ErrorResult]
11767 '''
11768 # map input types to rpc msg
11769 params = dict()
11770 msg = dict(Type='Machiner', Request='EnsureDead', Version=1, Params=params)
11771 params['Entities'] = entities
11772 reply = await self.rpc(msg)
11773 return reply
11774
11775
11776
11777 @ReturnMapping(JobsResults)
11778 async def Jobs(self, entities):
11779 '''
11780 entities : typing.Sequence[~Entity]
11781 Returns -> typing.Sequence[~JobsResult]
11782 '''
11783 # map input types to rpc msg
11784 params = dict()
11785 msg = dict(Type='Machiner', Request='Jobs', Version=1, Params=params)
11786 params['Entities'] = entities
11787 reply = await self.rpc(msg)
11788 return reply
11789
11790
11791
11792 @ReturnMapping(LifeResults)
11793 async def Life(self, entities):
11794 '''
11795 entities : typing.Sequence[~Entity]
11796 Returns -> typing.Sequence[~LifeResult]
11797 '''
11798 # map input types to rpc msg
11799 params = dict()
11800 msg = dict(Type='Machiner', Request='Life', Version=1, Params=params)
11801 params['Entities'] = entities
11802 reply = await self.rpc(msg)
11803 return reply
11804
11805
11806
11807 @ReturnMapping(StringResult)
11808 async def ModelUUID(self):
11809 '''
11810
11811 Returns -> typing.Union[_ForwardRef('Error'), str]
11812 '''
11813 # map input types to rpc msg
11814 params = dict()
11815 msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params)
11816
11817 reply = await self.rpc(msg)
11818 return reply
11819
11820
11821
11822 @ReturnMapping(ErrorResults)
11823 async def SetMachineAddresses(self, machineaddresses):
11824 '''
11825 machineaddresses : typing.Sequence[~MachineAddresses]
11826 Returns -> typing.Sequence[~ErrorResult]
11827 '''
11828 # map input types to rpc msg
11829 params = dict()
11830 msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params)
11831 params['MachineAddresses'] = machineaddresses
11832 reply = await self.rpc(msg)
11833 return reply
11834
11835
11836
11837 @ReturnMapping(None)
11838 async def SetObservedNetworkConfig(self, config, tag):
11839 '''
11840 config : typing.Sequence[~NetworkConfig]
11841 tag : str
11842 Returns -> None
11843 '''
11844 # map input types to rpc msg
11845 params = dict()
11846 msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params)
11847 params['Config'] = config
11848 params['Tag'] = tag
11849 reply = await self.rpc(msg)
11850 return reply
11851
11852
11853
11854 @ReturnMapping(ErrorResults)
11855 async def SetProviderNetworkConfig(self, entities):
11856 '''
11857 entities : typing.Sequence[~Entity]
11858 Returns -> typing.Sequence[~ErrorResult]
11859 '''
11860 # map input types to rpc msg
11861 params = dict()
11862 msg = dict(Type='Machiner', Request='SetProviderNetworkConfig', Version=1, Params=params)
11863 params['Entities'] = entities
11864 reply = await self.rpc(msg)
11865 return reply
11866
11867
11868
11869 @ReturnMapping(ErrorResults)
11870 async def SetStatus(self, entities):
11871 '''
11872 entities : typing.Sequence[~EntityStatusArgs]
11873 Returns -> typing.Sequence[~ErrorResult]
11874 '''
11875 # map input types to rpc msg
11876 params = dict()
11877 msg = dict(Type='Machiner', Request='SetStatus', Version=1, Params=params)
11878 params['Entities'] = entities
11879 reply = await self.rpc(msg)
11880 return reply
11881
11882
11883
11884 @ReturnMapping(ErrorResults)
11885 async def UpdateStatus(self, entities):
11886 '''
11887 entities : typing.Sequence[~EntityStatusArgs]
11888 Returns -> typing.Sequence[~ErrorResult]
11889 '''
11890 # map input types to rpc msg
11891 params = dict()
11892 msg = dict(Type='Machiner', Request='UpdateStatus', Version=1, Params=params)
11893 params['Entities'] = entities
11894 reply = await self.rpc(msg)
11895 return reply
11896
11897
11898
11899 @ReturnMapping(NotifyWatchResults)
11900 async def Watch(self, entities):
11901 '''
11902 entities : typing.Sequence[~Entity]
11903 Returns -> typing.Sequence[~NotifyWatchResult]
11904 '''
11905 # map input types to rpc msg
11906 params = dict()
11907 msg = dict(Type='Machiner', Request='Watch', Version=1, Params=params)
11908 params['Entities'] = entities
11909 reply = await self.rpc(msg)
11910 return reply
11911
11912
11913
11914 @ReturnMapping(NotifyWatchResult)
11915 async def WatchAPIHostPorts(self):
11916 '''
11917
11918 Returns -> typing.Union[_ForwardRef('Error'), str]
11919 '''
11920 # map input types to rpc msg
11921 params = dict()
11922 msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params)
11923
11924 reply = await self.rpc(msg)
11925 return reply
11926
11927
11928 class MeterStatus(Type):
11929 name = 'MeterStatus'
11930 version = 1
11931 schema = {'definitions': {'Entities': {'additionalProperties': False,
11932 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11933 'type': 'array'}},
11934 'required': ['Entities'],
11935 'type': 'object'},
11936 'Entity': {'additionalProperties': False,
11937 'properties': {'Tag': {'type': 'string'}},
11938 'required': ['Tag'],
11939 'type': 'object'},
11940 'Error': {'additionalProperties': False,
11941 'properties': {'Code': {'type': 'string'},
11942 'Info': {'$ref': '#/definitions/ErrorInfo'},
11943 'Message': {'type': 'string'}},
11944 'required': ['Message', 'Code'],
11945 'type': 'object'},
11946 'ErrorInfo': {'additionalProperties': False,
11947 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11948 'MacaroonPath': {'type': 'string'}},
11949 'type': 'object'},
11950 'Macaroon': {'additionalProperties': False,
11951 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11952 'type': 'array'},
11953 'data': {'items': {'type': 'integer'},
11954 'type': 'array'},
11955 'id': {'$ref': '#/definitions/packet'},
11956 'location': {'$ref': '#/definitions/packet'},
11957 'sig': {'items': {'type': 'integer'},
11958 'type': 'array'}},
11959 'required': ['data',
11960 'location',
11961 'id',
11962 'caveats',
11963 'sig'],
11964 'type': 'object'},
11965 'MeterStatusResult': {'additionalProperties': False,
11966 'properties': {'Code': {'type': 'string'},
11967 'Error': {'$ref': '#/definitions/Error'},
11968 'Info': {'type': 'string'}},
11969 'required': ['Code', 'Info', 'Error'],
11970 'type': 'object'},
11971 'MeterStatusResults': {'additionalProperties': False,
11972 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
11973 'type': 'array'}},
11974 'required': ['Results'],
11975 'type': 'object'},
11976 'NotifyWatchResult': {'additionalProperties': False,
11977 'properties': {'Error': {'$ref': '#/definitions/Error'},
11978 'NotifyWatcherId': {'type': 'string'}},
11979 'required': ['NotifyWatcherId', 'Error'],
11980 'type': 'object'},
11981 'NotifyWatchResults': {'additionalProperties': False,
11982 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11983 'type': 'array'}},
11984 'required': ['Results'],
11985 'type': 'object'},
11986 'caveat': {'additionalProperties': False,
11987 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11988 'location': {'$ref': '#/definitions/packet'},
11989 'verificationId': {'$ref': '#/definitions/packet'}},
11990 'required': ['location',
11991 'caveatId',
11992 'verificationId'],
11993 'type': 'object'},
11994 'packet': {'additionalProperties': False,
11995 'properties': {'headerLen': {'type': 'integer'},
11996 'start': {'type': 'integer'},
11997 'totalLen': {'type': 'integer'}},
11998 'required': ['start', 'totalLen', 'headerLen'],
11999 'type': 'object'}},
12000 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12001 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
12002 'type': 'object'},
12003 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12004 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12005 'type': 'object'}},
12006 'type': 'object'}
12007
12008
12009 @ReturnMapping(MeterStatusResults)
12010 async def GetMeterStatus(self, entities):
12011 '''
12012 entities : typing.Sequence[~Entity]
12013 Returns -> typing.Sequence[~MeterStatusResult]
12014 '''
12015 # map input types to rpc msg
12016 params = dict()
12017 msg = dict(Type='MeterStatus', Request='GetMeterStatus', Version=1, Params=params)
12018 params['Entities'] = entities
12019 reply = await self.rpc(msg)
12020 return reply
12021
12022
12023
12024 @ReturnMapping(NotifyWatchResults)
12025 async def WatchMeterStatus(self, entities):
12026 '''
12027 entities : typing.Sequence[~Entity]
12028 Returns -> typing.Sequence[~NotifyWatchResult]
12029 '''
12030 # map input types to rpc msg
12031 params = dict()
12032 msg = dict(Type='MeterStatus', Request='WatchMeterStatus', Version=1, Params=params)
12033 params['Entities'] = entities
12034 reply = await self.rpc(msg)
12035 return reply
12036
12037
12038 class MetricsAdder(Type):
12039 name = 'MetricsAdder'
12040 version = 2
12041 schema = {'definitions': {'Error': {'additionalProperties': False,
12042 'properties': {'Code': {'type': 'string'},
12043 'Info': {'$ref': '#/definitions/ErrorInfo'},
12044 'Message': {'type': 'string'}},
12045 'required': ['Message', 'Code'],
12046 'type': 'object'},
12047 'ErrorInfo': {'additionalProperties': False,
12048 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12049 'MacaroonPath': {'type': 'string'}},
12050 'type': 'object'},
12051 'ErrorResult': {'additionalProperties': False,
12052 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12053 'required': ['Error'],
12054 'type': 'object'},
12055 'ErrorResults': {'additionalProperties': False,
12056 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12057 'type': 'array'}},
12058 'required': ['Results'],
12059 'type': 'object'},
12060 'Macaroon': {'additionalProperties': False,
12061 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12062 'type': 'array'},
12063 'data': {'items': {'type': 'integer'},
12064 'type': 'array'},
12065 'id': {'$ref': '#/definitions/packet'},
12066 'location': {'$ref': '#/definitions/packet'},
12067 'sig': {'items': {'type': 'integer'},
12068 'type': 'array'}},
12069 'required': ['data',
12070 'location',
12071 'id',
12072 'caveats',
12073 'sig'],
12074 'type': 'object'},
12075 'Metric': {'additionalProperties': False,
12076 'properties': {'Key': {'type': 'string'},
12077 'Time': {'format': 'date-time',
12078 'type': 'string'},
12079 'Value': {'type': 'string'}},
12080 'required': ['Key', 'Value', 'Time'],
12081 'type': 'object'},
12082 'MetricBatch': {'additionalProperties': False,
12083 'properties': {'CharmURL': {'type': 'string'},
12084 'Created': {'format': 'date-time',
12085 'type': 'string'},
12086 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
12087 'type': 'array'},
12088 'UUID': {'type': 'string'}},
12089 'required': ['UUID',
12090 'CharmURL',
12091 'Created',
12092 'Metrics'],
12093 'type': 'object'},
12094 'MetricBatchParam': {'additionalProperties': False,
12095 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
12096 'Tag': {'type': 'string'}},
12097 'required': ['Tag', 'Batch'],
12098 'type': 'object'},
12099 'MetricBatchParams': {'additionalProperties': False,
12100 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12101 'type': 'array'}},
12102 'required': ['Batches'],
12103 'type': 'object'},
12104 'caveat': {'additionalProperties': False,
12105 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12106 'location': {'$ref': '#/definitions/packet'},
12107 'verificationId': {'$ref': '#/definitions/packet'}},
12108 'required': ['location',
12109 'caveatId',
12110 'verificationId'],
12111 'type': 'object'},
12112 'packet': {'additionalProperties': False,
12113 'properties': {'headerLen': {'type': 'integer'},
12114 'start': {'type': 'integer'},
12115 'totalLen': {'type': 'integer'}},
12116 'required': ['start', 'totalLen', 'headerLen'],
12117 'type': 'object'}},
12118 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
12119 'Result': {'$ref': '#/definitions/ErrorResults'}},
12120 'type': 'object'}},
12121 'type': 'object'}
12122
12123
12124 @ReturnMapping(ErrorResults)
12125 async def AddMetricBatches(self, batches):
12126 '''
12127 batches : typing.Sequence[~MetricBatchParam]
12128 Returns -> typing.Sequence[~ErrorResult]
12129 '''
12130 # map input types to rpc msg
12131 params = dict()
12132 msg = dict(Type='MetricsAdder', Request='AddMetricBatches', Version=2, Params=params)
12133 params['Batches'] = batches
12134 reply = await self.rpc(msg)
12135 return reply
12136
12137
12138 class MetricsDebug(Type):
12139 name = 'MetricsDebug'
12140 version = 1
12141 schema = {'definitions': {'Entities': {'additionalProperties': False,
12142 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12143 'type': 'array'}},
12144 'required': ['Entities'],
12145 'type': 'object'},
12146 'Entity': {'additionalProperties': False,
12147 'properties': {'Tag': {'type': 'string'}},
12148 'required': ['Tag'],
12149 'type': 'object'},
12150 'EntityMetrics': {'additionalProperties': False,
12151 'properties': {'error': {'$ref': '#/definitions/Error'},
12152 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12153 'type': 'array'}},
12154 'type': 'object'},
12155 'Error': {'additionalProperties': False,
12156 'properties': {'Code': {'type': 'string'},
12157 'Info': {'$ref': '#/definitions/ErrorInfo'},
12158 'Message': {'type': 'string'}},
12159 'required': ['Message', 'Code'],
12160 'type': 'object'},
12161 'ErrorInfo': {'additionalProperties': False,
12162 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12163 'MacaroonPath': {'type': 'string'}},
12164 'type': 'object'},
12165 'ErrorResult': {'additionalProperties': False,
12166 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12167 'required': ['Error'],
12168 'type': 'object'},
12169 'ErrorResults': {'additionalProperties': False,
12170 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12171 'type': 'array'}},
12172 'required': ['Results'],
12173 'type': 'object'},
12174 'Macaroon': {'additionalProperties': False,
12175 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12176 'type': 'array'},
12177 'data': {'items': {'type': 'integer'},
12178 'type': 'array'},
12179 'id': {'$ref': '#/definitions/packet'},
12180 'location': {'$ref': '#/definitions/packet'},
12181 'sig': {'items': {'type': 'integer'},
12182 'type': 'array'}},
12183 'required': ['data',
12184 'location',
12185 'id',
12186 'caveats',
12187 'sig'],
12188 'type': 'object'},
12189 'MeterStatusParam': {'additionalProperties': False,
12190 'properties': {'code': {'type': 'string'},
12191 'info': {'type': 'string'},
12192 'tag': {'type': 'string'}},
12193 'required': ['tag', 'code', 'info'],
12194 'type': 'object'},
12195 'MeterStatusParams': {'additionalProperties': False,
12196 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
12197 'type': 'array'}},
12198 'required': ['statues'],
12199 'type': 'object'},
12200 'MetricResult': {'additionalProperties': False,
12201 'properties': {'key': {'type': 'string'},
12202 'time': {'format': 'date-time',
12203 'type': 'string'},
12204 'value': {'type': 'string'}},
12205 'required': ['time', 'key', 'value'],
12206 'type': 'object'},
12207 'MetricResults': {'additionalProperties': False,
12208 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
12209 'type': 'array'}},
12210 'required': ['results'],
12211 'type': 'object'},
12212 'caveat': {'additionalProperties': False,
12213 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12214 'location': {'$ref': '#/definitions/packet'},
12215 'verificationId': {'$ref': '#/definitions/packet'}},
12216 'required': ['location',
12217 'caveatId',
12218 'verificationId'],
12219 'type': 'object'},
12220 'packet': {'additionalProperties': False,
12221 'properties': {'headerLen': {'type': 'integer'},
12222 'start': {'type': 'integer'},
12223 'totalLen': {'type': 'integer'}},
12224 'required': ['start', 'totalLen', 'headerLen'],
12225 'type': 'object'}},
12226 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12227 'Result': {'$ref': '#/definitions/MetricResults'}},
12228 'type': 'object'},
12229 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
12230 'Result': {'$ref': '#/definitions/ErrorResults'}},
12231 'type': 'object'}},
12232 'type': 'object'}
12233
12234
12235 @ReturnMapping(MetricResults)
12236 async def GetMetrics(self, entities):
12237 '''
12238 entities : typing.Sequence[~Entity]
12239 Returns -> typing.Sequence[~EntityMetrics]
12240 '''
12241 # map input types to rpc msg
12242 params = dict()
12243 msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=1, Params=params)
12244 params['Entities'] = entities
12245 reply = await self.rpc(msg)
12246 return reply
12247
12248
12249
12250 @ReturnMapping(ErrorResults)
12251 async def SetMeterStatus(self, statues):
12252 '''
12253 statues : typing.Sequence[~MeterStatusParam]
12254 Returns -> typing.Sequence[~ErrorResult]
12255 '''
12256 # map input types to rpc msg
12257 params = dict()
12258 msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=1, Params=params)
12259 params['statues'] = statues
12260 reply = await self.rpc(msg)
12261 return reply
12262
12263
12264 class MetricsManager(Type):
12265 name = 'MetricsManager'
12266 version = 1
12267 schema = {'definitions': {'Entities': {'additionalProperties': False,
12268 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12269 'type': 'array'}},
12270 'required': ['Entities'],
12271 'type': 'object'},
12272 'Entity': {'additionalProperties': False,
12273 'properties': {'Tag': {'type': 'string'}},
12274 'required': ['Tag'],
12275 'type': 'object'},
12276 'Error': {'additionalProperties': False,
12277 'properties': {'Code': {'type': 'string'},
12278 'Info': {'$ref': '#/definitions/ErrorInfo'},
12279 'Message': {'type': 'string'}},
12280 'required': ['Message', 'Code'],
12281 'type': 'object'},
12282 'ErrorInfo': {'additionalProperties': False,
12283 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12284 'MacaroonPath': {'type': 'string'}},
12285 'type': 'object'},
12286 'ErrorResult': {'additionalProperties': False,
12287 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12288 'required': ['Error'],
12289 'type': 'object'},
12290 'ErrorResults': {'additionalProperties': False,
12291 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12292 'type': 'array'}},
12293 'required': ['Results'],
12294 'type': 'object'},
12295 'Macaroon': {'additionalProperties': False,
12296 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12297 'type': 'array'},
12298 'data': {'items': {'type': 'integer'},
12299 'type': 'array'},
12300 'id': {'$ref': '#/definitions/packet'},
12301 'location': {'$ref': '#/definitions/packet'},
12302 'sig': {'items': {'type': 'integer'},
12303 'type': 'array'}},
12304 'required': ['data',
12305 'location',
12306 'id',
12307 'caveats',
12308 'sig'],
12309 'type': 'object'},
12310 'caveat': {'additionalProperties': False,
12311 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12312 'location': {'$ref': '#/definitions/packet'},
12313 'verificationId': {'$ref': '#/definitions/packet'}},
12314 'required': ['location',
12315 'caveatId',
12316 'verificationId'],
12317 'type': 'object'},
12318 'packet': {'additionalProperties': False,
12319 'properties': {'headerLen': {'type': 'integer'},
12320 'start': {'type': 'integer'},
12321 'totalLen': {'type': 'integer'}},
12322 'required': ['start', 'totalLen', 'headerLen'],
12323 'type': 'object'}},
12324 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12325 'Result': {'$ref': '#/definitions/ErrorResults'}},
12326 'type': 'object'},
12327 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12328 'Result': {'$ref': '#/definitions/ErrorResults'}},
12329 'type': 'object'}},
12330 'type': 'object'}
12331
12332
12333 @ReturnMapping(ErrorResults)
12334 async def CleanupOldMetrics(self, entities):
12335 '''
12336 entities : typing.Sequence[~Entity]
12337 Returns -> typing.Sequence[~ErrorResult]
12338 '''
12339 # map input types to rpc msg
12340 params = dict()
12341 msg = dict(Type='MetricsManager', Request='CleanupOldMetrics', Version=1, Params=params)
12342 params['Entities'] = entities
12343 reply = await self.rpc(msg)
12344 return reply
12345
12346
12347
12348 @ReturnMapping(ErrorResults)
12349 async def SendMetrics(self, entities):
12350 '''
12351 entities : typing.Sequence[~Entity]
12352 Returns -> typing.Sequence[~ErrorResult]
12353 '''
12354 # map input types to rpc msg
12355 params = dict()
12356 msg = dict(Type='MetricsManager', Request='SendMetrics', Version=1, Params=params)
12357 params['Entities'] = entities
12358 reply = await self.rpc(msg)
12359 return reply
12360
12361
12362 class MigrationFlag(Type):
12363 name = 'MigrationFlag'
12364 version = 1
12365 schema = {'definitions': {'Entities': {'additionalProperties': False,
12366 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12367 'type': 'array'}},
12368 'required': ['Entities'],
12369 'type': 'object'},
12370 'Entity': {'additionalProperties': False,
12371 'properties': {'Tag': {'type': 'string'}},
12372 'required': ['Tag'],
12373 'type': 'object'},
12374 'Error': {'additionalProperties': False,
12375 'properties': {'Code': {'type': 'string'},
12376 'Info': {'$ref': '#/definitions/ErrorInfo'},
12377 'Message': {'type': 'string'}},
12378 'required': ['Message', 'Code'],
12379 'type': 'object'},
12380 'ErrorInfo': {'additionalProperties': False,
12381 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12382 'MacaroonPath': {'type': 'string'}},
12383 'type': 'object'},
12384 'Macaroon': {'additionalProperties': False,
12385 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12386 'type': 'array'},
12387 'data': {'items': {'type': 'integer'},
12388 'type': 'array'},
12389 'id': {'$ref': '#/definitions/packet'},
12390 'location': {'$ref': '#/definitions/packet'},
12391 'sig': {'items': {'type': 'integer'},
12392 'type': 'array'}},
12393 'required': ['data',
12394 'location',
12395 'id',
12396 'caveats',
12397 'sig'],
12398 'type': 'object'},
12399 'NotifyWatchResult': {'additionalProperties': False,
12400 'properties': {'Error': {'$ref': '#/definitions/Error'},
12401 'NotifyWatcherId': {'type': 'string'}},
12402 'required': ['NotifyWatcherId', 'Error'],
12403 'type': 'object'},
12404 'NotifyWatchResults': {'additionalProperties': False,
12405 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12406 'type': 'array'}},
12407 'required': ['Results'],
12408 'type': 'object'},
12409 'PhaseResult': {'additionalProperties': False,
12410 'properties': {'Error': {'$ref': '#/definitions/Error'},
12411 'phase': {'type': 'string'}},
12412 'required': ['phase', 'Error'],
12413 'type': 'object'},
12414 'PhaseResults': {'additionalProperties': False,
12415 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
12416 'type': 'array'}},
12417 'required': ['Results'],
12418 'type': 'object'},
12419 'caveat': {'additionalProperties': False,
12420 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12421 'location': {'$ref': '#/definitions/packet'},
12422 'verificationId': {'$ref': '#/definitions/packet'}},
12423 'required': ['location',
12424 'caveatId',
12425 'verificationId'],
12426 'type': 'object'},
12427 'packet': {'additionalProperties': False,
12428 'properties': {'headerLen': {'type': 'integer'},
12429 'start': {'type': 'integer'},
12430 'totalLen': {'type': 'integer'}},
12431 'required': ['start', 'totalLen', 'headerLen'],
12432 'type': 'object'}},
12433 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12434 'Result': {'$ref': '#/definitions/PhaseResults'}},
12435 'type': 'object'},
12436 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12437 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12438 'type': 'object'}},
12439 'type': 'object'}
12440
12441
12442 @ReturnMapping(PhaseResults)
12443 async def Phase(self, entities):
12444 '''
12445 entities : typing.Sequence[~Entity]
12446 Returns -> typing.Sequence[~PhaseResult]
12447 '''
12448 # map input types to rpc msg
12449 params = dict()
12450 msg = dict(Type='MigrationFlag', Request='Phase', Version=1, Params=params)
12451 params['Entities'] = entities
12452 reply = await self.rpc(msg)
12453 return reply
12454
12455
12456
12457 @ReturnMapping(NotifyWatchResults)
12458 async def Watch(self, entities):
12459 '''
12460 entities : typing.Sequence[~Entity]
12461 Returns -> typing.Sequence[~NotifyWatchResult]
12462 '''
12463 # map input types to rpc msg
12464 params = dict()
12465 msg = dict(Type='MigrationFlag', Request='Watch', Version=1, Params=params)
12466 params['Entities'] = entities
12467 reply = await self.rpc(msg)
12468 return reply
12469
12470
12471 class MigrationMaster(Type):
12472 name = 'MigrationMaster'
12473 version = 1
12474 schema = {'definitions': {'Error': {'additionalProperties': False,
12475 'properties': {'Code': {'type': 'string'},
12476 'Info': {'$ref': '#/definitions/ErrorInfo'},
12477 'Message': {'type': 'string'}},
12478 'required': ['Message', 'Code'],
12479 'type': 'object'},
12480 'ErrorInfo': {'additionalProperties': False,
12481 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12482 'MacaroonPath': {'type': 'string'}},
12483 'type': 'object'},
12484 'FullMigrationStatus': {'additionalProperties': False,
12485 'properties': {'attempt': {'type': 'integer'},
12486 'phase': {'type': 'string'},
12487 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
12488 'required': ['spec',
12489 'attempt',
12490 'phase'],
12491 'type': 'object'},
12492 'Macaroon': {'additionalProperties': False,
12493 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12494 'type': 'array'},
12495 'data': {'items': {'type': 'integer'},
12496 'type': 'array'},
12497 'id': {'$ref': '#/definitions/packet'},
12498 'location': {'$ref': '#/definitions/packet'},
12499 'sig': {'items': {'type': 'integer'},
12500 'type': 'array'}},
12501 'required': ['data',
12502 'location',
12503 'id',
12504 'caveats',
12505 'sig'],
12506 'type': 'object'},
12507 'ModelMigrationSpec': {'additionalProperties': False,
12508 'properties': {'model-tag': {'type': 'string'},
12509 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
12510 'required': ['model-tag',
12511 'target-info'],
12512 'type': 'object'},
12513 'ModelMigrationTargetInfo': {'additionalProperties': False,
12514 'properties': {'addrs': {'items': {'type': 'string'},
12515 'type': 'array'},
12516 'auth-tag': {'type': 'string'},
12517 'ca-cert': {'type': 'string'},
12518 'controller-tag': {'type': 'string'},
12519 'password': {'type': 'string'}},
12520 'required': ['controller-tag',
12521 'addrs',
12522 'ca-cert',
12523 'auth-tag',
12524 'password'],
12525 'type': 'object'},
12526 'NotifyWatchResult': {'additionalProperties': False,
12527 'properties': {'Error': {'$ref': '#/definitions/Error'},
12528 'NotifyWatcherId': {'type': 'string'}},
12529 'required': ['NotifyWatcherId', 'Error'],
12530 'type': 'object'},
12531 'SerializedModel': {'additionalProperties': False,
12532 'properties': {'bytes': {'items': {'type': 'integer'},
12533 'type': 'array'}},
12534 'required': ['bytes'],
12535 'type': 'object'},
12536 'SetMigrationPhaseArgs': {'additionalProperties': False,
12537 'properties': {'phase': {'type': 'string'}},
12538 'required': ['phase'],
12539 'type': 'object'},
12540 'caveat': {'additionalProperties': False,
12541 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12542 'location': {'$ref': '#/definitions/packet'},
12543 'verificationId': {'$ref': '#/definitions/packet'}},
12544 'required': ['location',
12545 'caveatId',
12546 'verificationId'],
12547 'type': 'object'},
12548 'packet': {'additionalProperties': False,
12549 'properties': {'headerLen': {'type': 'integer'},
12550 'start': {'type': 'integer'},
12551 'totalLen': {'type': 'integer'}},
12552 'required': ['start', 'totalLen', 'headerLen'],
12553 'type': 'object'}},
12554 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
12555 'type': 'object'},
12556 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
12557 'type': 'object'},
12558 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
12559 'type': 'object'},
12560 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12561 'type': 'object'}},
12562 'type': 'object'}
12563
12564
12565 @ReturnMapping(SerializedModel)
12566 async def Export(self):
12567 '''
12568
12569 Returns -> typing.Sequence[int]
12570 '''
12571 # map input types to rpc msg
12572 params = dict()
12573 msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params)
12574
12575 reply = await self.rpc(msg)
12576 return reply
12577
12578
12579
12580 @ReturnMapping(FullMigrationStatus)
12581 async def GetMigrationStatus(self):
12582 '''
12583
12584 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
12585 '''
12586 # map input types to rpc msg
12587 params = dict()
12588 msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params)
12589
12590 reply = await self.rpc(msg)
12591 return reply
12592
12593
12594
12595 @ReturnMapping(None)
12596 async def SetPhase(self, phase):
12597 '''
12598 phase : str
12599 Returns -> None
12600 '''
12601 # map input types to rpc msg
12602 params = dict()
12603 msg = dict(Type='MigrationMaster', Request='SetPhase', Version=1, Params=params)
12604 params['phase'] = phase
12605 reply = await self.rpc(msg)
12606 return reply
12607
12608
12609
12610 @ReturnMapping(NotifyWatchResult)
12611 async def Watch(self):
12612 '''
12613
12614 Returns -> typing.Union[_ForwardRef('Error'), str]
12615 '''
12616 # map input types to rpc msg
12617 params = dict()
12618 msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params)
12619
12620 reply = await self.rpc(msg)
12621 return reply
12622
12623
12624 class MigrationMinion(Type):
12625 name = 'MigrationMinion'
12626 version = 1
12627 schema = {'definitions': {'Error': {'additionalProperties': False,
12628 'properties': {'Code': {'type': 'string'},
12629 'Info': {'$ref': '#/definitions/ErrorInfo'},
12630 'Message': {'type': 'string'}},
12631 'required': ['Message', 'Code'],
12632 'type': 'object'},
12633 'ErrorInfo': {'additionalProperties': False,
12634 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12635 'MacaroonPath': {'type': 'string'}},
12636 'type': 'object'},
12637 'Macaroon': {'additionalProperties': False,
12638 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12639 'type': 'array'},
12640 'data': {'items': {'type': 'integer'},
12641 'type': 'array'},
12642 'id': {'$ref': '#/definitions/packet'},
12643 'location': {'$ref': '#/definitions/packet'},
12644 'sig': {'items': {'type': 'integer'},
12645 'type': 'array'}},
12646 'required': ['data',
12647 'location',
12648 'id',
12649 'caveats',
12650 'sig'],
12651 'type': 'object'},
12652 'NotifyWatchResult': {'additionalProperties': False,
12653 'properties': {'Error': {'$ref': '#/definitions/Error'},
12654 'NotifyWatcherId': {'type': 'string'}},
12655 'required': ['NotifyWatcherId', 'Error'],
12656 'type': 'object'},
12657 'caveat': {'additionalProperties': False,
12658 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12659 'location': {'$ref': '#/definitions/packet'},
12660 'verificationId': {'$ref': '#/definitions/packet'}},
12661 'required': ['location',
12662 'caveatId',
12663 'verificationId'],
12664 'type': 'object'},
12665 'packet': {'additionalProperties': False,
12666 'properties': {'headerLen': {'type': 'integer'},
12667 'start': {'type': 'integer'},
12668 'totalLen': {'type': 'integer'}},
12669 'required': ['start', 'totalLen', 'headerLen'],
12670 'type': 'object'}},
12671 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12672 'type': 'object'}},
12673 'type': 'object'}
12674
12675
12676 @ReturnMapping(NotifyWatchResult)
12677 async def Watch(self):
12678 '''
12679
12680 Returns -> typing.Union[_ForwardRef('Error'), str]
12681 '''
12682 # map input types to rpc msg
12683 params = dict()
12684 msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params)
12685
12686 reply = await self.rpc(msg)
12687 return reply
12688
12689
12690 class MigrationStatusWatcher(Type):
12691 name = 'MigrationStatusWatcher'
12692 version = 1
12693 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
12694 'properties': {'attempt': {'type': 'integer'},
12695 'phase': {'type': 'string'},
12696 'source-api-addrs': {'items': {'type': 'string'},
12697 'type': 'array'},
12698 'source-ca-cert': {'type': 'string'},
12699 'target-api-addrs': {'items': {'type': 'string'},
12700 'type': 'array'},
12701 'target-ca-cert': {'type': 'string'}},
12702 'required': ['attempt',
12703 'phase',
12704 'source-api-addrs',
12705 'source-ca-cert',
12706 'target-api-addrs',
12707 'target-ca-cert'],
12708 'type': 'object'}},
12709 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
12710 'type': 'object'},
12711 'Stop': {'type': 'object'}},
12712 'type': 'object'}
12713
12714
12715 @ReturnMapping(MigrationStatus)
12716 async def Next(self):
12717 '''
12718
12719 Returns -> typing.Union[int, typing.Sequence[str]]
12720 '''
12721 # map input types to rpc msg
12722 params = dict()
12723 msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params)
12724
12725 reply = await self.rpc(msg)
12726 return reply
12727
12728
12729
12730 @ReturnMapping(None)
12731 async def Stop(self):
12732 '''
12733
12734 Returns -> None
12735 '''
12736 # map input types to rpc msg
12737 params = dict()
12738 msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params)
12739
12740 reply = await self.rpc(msg)
12741 return reply
12742
12743
12744 class MigrationTarget(Type):
12745 name = 'MigrationTarget'
12746 version = 1
12747 schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
12748 'properties': {'model-tag': {'type': 'string'}},
12749 'required': ['model-tag'],
12750 'type': 'object'},
12751 'SerializedModel': {'additionalProperties': False,
12752 'properties': {'bytes': {'items': {'type': 'integer'},
12753 'type': 'array'}},
12754 'required': ['bytes'],
12755 'type': 'object'}},
12756 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
12757 'type': 'object'},
12758 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
12759 'type': 'object'},
12760 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
12761 'type': 'object'}},
12762 'type': 'object'}
12763
12764
12765 @ReturnMapping(None)
12766 async def Abort(self, model_tag):
12767 '''
12768 model_tag : str
12769 Returns -> None
12770 '''
12771 # map input types to rpc msg
12772 params = dict()
12773 msg = dict(Type='MigrationTarget', Request='Abort', Version=1, Params=params)
12774 params['model-tag'] = model_tag
12775 reply = await self.rpc(msg)
12776 return reply
12777
12778
12779
12780 @ReturnMapping(None)
12781 async def Activate(self, model_tag):
12782 '''
12783 model_tag : str
12784 Returns -> None
12785 '''
12786 # map input types to rpc msg
12787 params = dict()
12788 msg = dict(Type='MigrationTarget', Request='Activate', Version=1, Params=params)
12789 params['model-tag'] = model_tag
12790 reply = await self.rpc(msg)
12791 return reply
12792
12793
12794
12795 @ReturnMapping(None)
12796 async def Import(self, bytes_):
12797 '''
12798 bytes_ : typing.Sequence[int]
12799 Returns -> None
12800 '''
12801 # map input types to rpc msg
12802 params = dict()
12803 msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params)
12804 params['bytes'] = bytes_
12805 reply = await self.rpc(msg)
12806 return reply
12807
12808
12809 class ModelManager(Type):
12810 name = 'ModelManager'
12811 version = 2
12812 schema = {'definitions': {'Entities': {'additionalProperties': False,
12813 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12814 'type': 'array'}},
12815 'required': ['Entities'],
12816 'type': 'object'},
12817 'Entity': {'additionalProperties': False,
12818 'properties': {'Tag': {'type': 'string'}},
12819 'required': ['Tag'],
12820 'type': 'object'},
12821 'EntityStatus': {'additionalProperties': False,
12822 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
12823 'type': 'object'}},
12824 'type': 'object'},
12825 'Info': {'type': 'string'},
12826 'Since': {'format': 'date-time',
12827 'type': 'string'},
12828 'Status': {'type': 'string'}},
12829 'required': ['Status',
12830 'Info',
12831 'Data',
12832 'Since'],
12833 'type': 'object'},
12834 'Error': {'additionalProperties': False,
12835 'properties': {'Code': {'type': 'string'},
12836 'Info': {'$ref': '#/definitions/ErrorInfo'},
12837 'Message': {'type': 'string'}},
12838 'required': ['Message', 'Code'],
12839 'type': 'object'},
12840 'ErrorInfo': {'additionalProperties': False,
12841 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12842 'MacaroonPath': {'type': 'string'}},
12843 'type': 'object'},
12844 'ErrorResult': {'additionalProperties': False,
12845 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12846 'required': ['Error'],
12847 'type': 'object'},
12848 'ErrorResults': {'additionalProperties': False,
12849 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12850 'type': 'array'}},
12851 'required': ['Results'],
12852 'type': 'object'},
12853 'Macaroon': {'additionalProperties': False,
12854 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12855 'type': 'array'},
12856 'data': {'items': {'type': 'integer'},
12857 'type': 'array'},
12858 'id': {'$ref': '#/definitions/packet'},
12859 'location': {'$ref': '#/definitions/packet'},
12860 'sig': {'items': {'type': 'integer'},
12861 'type': 'array'}},
12862 'required': ['data',
12863 'location',
12864 'id',
12865 'caveats',
12866 'sig'],
12867 'type': 'object'},
12868 'Model': {'additionalProperties': False,
12869 'properties': {'Name': {'type': 'string'},
12870 'OwnerTag': {'type': 'string'},
12871 'UUID': {'type': 'string'}},
12872 'required': ['Name', 'UUID', 'OwnerTag'],
12873 'type': 'object'},
12874 'ModelConfigResult': {'additionalProperties': False,
12875 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12876 'type': 'object'}},
12877 'type': 'object'}},
12878 'required': ['Config'],
12879 'type': 'object'},
12880 'ModelCreateArgs': {'additionalProperties': False,
12881 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
12882 'type': 'object'}},
12883 'type': 'object'},
12884 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12885 'type': 'object'}},
12886 'type': 'object'},
12887 'OwnerTag': {'type': 'string'}},
12888 'required': ['OwnerTag',
12889 'Account',
12890 'Config'],
12891 'type': 'object'},
12892 'ModelInfo': {'additionalProperties': False,
12893 'properties': {'DefaultSeries': {'type': 'string'},
12894 'Life': {'type': 'string'},
12895 'Name': {'type': 'string'},
12896 'OwnerTag': {'type': 'string'},
12897 'ProviderType': {'type': 'string'},
12898 'ServerUUID': {'type': 'string'},
12899 'Status': {'$ref': '#/definitions/EntityStatus'},
12900 'UUID': {'type': 'string'},
12901 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
12902 'type': 'array'}},
12903 'required': ['Name',
12904 'UUID',
12905 'ServerUUID',
12906 'ProviderType',
12907 'DefaultSeries',
12908 'OwnerTag',
12909 'Life',
12910 'Status',
12911 'Users'],
12912 'type': 'object'},
12913 'ModelInfoResult': {'additionalProperties': False,
12914 'properties': {'error': {'$ref': '#/definitions/Error'},
12915 'result': {'$ref': '#/definitions/ModelInfo'}},
12916 'type': 'object'},
12917 'ModelInfoResults': {'additionalProperties': False,
12918 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
12919 'type': 'array'}},
12920 'required': ['results'],
12921 'type': 'object'},
12922 'ModelSkeletonConfigArgs': {'additionalProperties': False,
12923 'properties': {'Provider': {'type': 'string'},
12924 'Region': {'type': 'string'}},
12925 'required': ['Provider', 'Region'],
12926 'type': 'object'},
12927 'ModelUserInfo': {'additionalProperties': False,
12928 'properties': {'access': {'type': 'string'},
12929 'displayname': {'type': 'string'},
12930 'lastconnection': {'format': 'date-time',
12931 'type': 'string'},
12932 'user': {'type': 'string'}},
12933 'required': ['user',
12934 'displayname',
12935 'lastconnection',
12936 'access'],
12937 'type': 'object'},
12938 'ModifyModelAccess': {'additionalProperties': False,
12939 'properties': {'access': {'type': 'string'},
12940 'action': {'type': 'string'},
12941 'model-tag': {'type': 'string'},
12942 'user-tag': {'type': 'string'}},
12943 'required': ['user-tag',
12944 'action',
12945 'access',
12946 'model-tag'],
12947 'type': 'object'},
12948 'ModifyModelAccessRequest': {'additionalProperties': False,
12949 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
12950 'type': 'array'}},
12951 'required': ['changes'],
12952 'type': 'object'},
12953 'UserModel': {'additionalProperties': False,
12954 'properties': {'LastConnection': {'format': 'date-time',
12955 'type': 'string'},
12956 'Model': {'$ref': '#/definitions/Model'}},
12957 'required': ['Model', 'LastConnection'],
12958 'type': 'object'},
12959 'UserModelList': {'additionalProperties': False,
12960 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
12961 'type': 'array'}},
12962 'required': ['UserModels'],
12963 'type': 'object'},
12964 'caveat': {'additionalProperties': False,
12965 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12966 'location': {'$ref': '#/definitions/packet'},
12967 'verificationId': {'$ref': '#/definitions/packet'}},
12968 'required': ['location',
12969 'caveatId',
12970 'verificationId'],
12971 'type': 'object'},
12972 'packet': {'additionalProperties': False,
12973 'properties': {'headerLen': {'type': 'integer'},
12974 'start': {'type': 'integer'},
12975 'totalLen': {'type': 'integer'}},
12976 'required': ['start', 'totalLen', 'headerLen'],
12977 'type': 'object'}},
12978 'properties': {'ConfigSkeleton': {'properties': {'Params': {'$ref': '#/definitions/ModelSkeletonConfigArgs'},
12979 'Result': {'$ref': '#/definitions/ModelConfigResult'}},
12980 'type': 'object'},
12981 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
12982 'Result': {'$ref': '#/definitions/Model'}},
12983 'type': 'object'},
12984 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
12985 'Result': {'$ref': '#/definitions/UserModelList'}},
12986 'type': 'object'},
12987 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12988 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
12989 'type': 'object'},
12990 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
12991 'Result': {'$ref': '#/definitions/ErrorResults'}},
12992 'type': 'object'}},
12993 'type': 'object'}
12994
12995
12996 @ReturnMapping(ModelConfigResult)
12997 async def ConfigSkeleton(self, provider, region):
12998 '''
12999 provider : str
13000 region : str
13001 Returns -> typing.Mapping[str, typing.Any]
13002 '''
13003 # map input types to rpc msg
13004 params = dict()
13005 msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params)
13006 params['Provider'] = provider
13007 params['Region'] = region
13008 reply = await self.rpc(msg)
13009 return reply
13010
13011
13012
13013 @ReturnMapping(Model)
13014 async def CreateModel(self, account, config, ownertag):
13015 '''
13016 account : typing.Mapping[str, typing.Any]
13017 config : typing.Mapping[str, typing.Any]
13018 ownertag : str
13019 Returns -> <class 'str'>
13020 '''
13021 # map input types to rpc msg
13022 params = dict()
13023 msg = dict(Type='ModelManager', Request='CreateModel', Version=2, Params=params)
13024 params['Account'] = account
13025 params['Config'] = config
13026 params['OwnerTag'] = ownertag
13027 reply = await self.rpc(msg)
13028 return reply
13029
13030
13031
13032 @ReturnMapping(UserModelList)
13033 async def ListModels(self, tag):
13034 '''
13035 tag : str
13036 Returns -> typing.Sequence[~UserModel]
13037 '''
13038 # map input types to rpc msg
13039 params = dict()
13040 msg = dict(Type='ModelManager', Request='ListModels', Version=2, Params=params)
13041 params['Tag'] = tag
13042 reply = await self.rpc(msg)
13043 return reply
13044
13045
13046
13047 @ReturnMapping(ModelInfoResults)
13048 async def ModelInfo(self, entities):
13049 '''
13050 entities : typing.Sequence[~Entity]
13051 Returns -> typing.Sequence[~ModelInfoResult]
13052 '''
13053 # map input types to rpc msg
13054 params = dict()
13055 msg = dict(Type='ModelManager', Request='ModelInfo', Version=2, Params=params)
13056 params['Entities'] = entities
13057 reply = await self.rpc(msg)
13058 return reply
13059
13060
13061
13062 @ReturnMapping(ErrorResults)
13063 async def ModifyModelAccess(self, changes):
13064 '''
13065 changes : typing.Sequence[~ModifyModelAccess]
13066 Returns -> typing.Sequence[~ErrorResult]
13067 '''
13068 # map input types to rpc msg
13069 params = dict()
13070 msg = dict(Type='ModelManager', Request='ModifyModelAccess', Version=2, Params=params)
13071 params['changes'] = changes
13072 reply = await self.rpc(msg)
13073 return reply
13074
13075
13076 class NotifyWatcher(Type):
13077 name = 'NotifyWatcher'
13078 version = 1
13079 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13080 'type': 'object'}
13081
13082
13083 @ReturnMapping(None)
13084 async def Next(self):
13085 '''
13086
13087 Returns -> None
13088 '''
13089 # map input types to rpc msg
13090 params = dict()
13091 msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params)
13092
13093 reply = await self.rpc(msg)
13094 return reply
13095
13096
13097
13098 @ReturnMapping(None)
13099 async def Stop(self):
13100 '''
13101
13102 Returns -> None
13103 '''
13104 # map input types to rpc msg
13105 params = dict()
13106 msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params)
13107
13108 reply = await self.rpc(msg)
13109 return reply
13110
13111
13112 class Pinger(Type):
13113 name = 'Pinger'
13114 version = 1
13115 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13116 'type': 'object'}
13117
13118
13119 @ReturnMapping(None)
13120 async def Ping(self):
13121 '''
13122
13123 Returns -> None
13124 '''
13125 # map input types to rpc msg
13126 params = dict()
13127 msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params)
13128
13129 reply = await self.rpc(msg)
13130 return reply
13131
13132
13133
13134 @ReturnMapping(None)
13135 async def Stop(self):
13136 '''
13137
13138 Returns -> None
13139 '''
13140 # map input types to rpc msg
13141 params = dict()
13142 msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params)
13143
13144 reply = await self.rpc(msg)
13145 return reply
13146
13147
13148 class Provisioner(Type):
13149 name = 'Provisioner'
13150 version = 2
13151 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13152 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13153 'type': 'array'},
13154 'type': 'array'}},
13155 'required': ['Servers'],
13156 'type': 'object'},
13157 'Address': {'additionalProperties': False,
13158 'properties': {'Scope': {'type': 'string'},
13159 'SpaceName': {'type': 'string'},
13160 'Type': {'type': 'string'},
13161 'Value': {'type': 'string'}},
13162 'required': ['Value', 'Type', 'Scope'],
13163 'type': 'object'},
13164 'Binary': {'additionalProperties': False,
13165 'properties': {'Arch': {'type': 'string'},
13166 'Number': {'$ref': '#/definitions/Number'},
13167 'Series': {'type': 'string'}},
13168 'required': ['Number', 'Series', 'Arch'],
13169 'type': 'object'},
13170 'BytesResult': {'additionalProperties': False,
13171 'properties': {'Result': {'items': {'type': 'integer'},
13172 'type': 'array'}},
13173 'required': ['Result'],
13174 'type': 'object'},
13175 'CloudImageMetadata': {'additionalProperties': False,
13176 'properties': {'arch': {'type': 'string'},
13177 'image_id': {'type': 'string'},
13178 'priority': {'type': 'integer'},
13179 'region': {'type': 'string'},
13180 'root_storage_size': {'type': 'integer'},
13181 'root_storage_type': {'type': 'string'},
13182 'series': {'type': 'string'},
13183 'source': {'type': 'string'},
13184 'stream': {'type': 'string'},
13185 'version': {'type': 'string'},
13186 'virt_type': {'type': 'string'}},
13187 'required': ['image_id',
13188 'region',
13189 'version',
13190 'series',
13191 'arch',
13192 'source',
13193 'priority'],
13194 'type': 'object'},
13195 'ConstraintsResult': {'additionalProperties': False,
13196 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
13197 'Error': {'$ref': '#/definitions/Error'}},
13198 'required': ['Error', 'Constraints'],
13199 'type': 'object'},
13200 'ConstraintsResults': {'additionalProperties': False,
13201 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
13202 'type': 'array'}},
13203 'required': ['Results'],
13204 'type': 'object'},
13205 'ContainerConfig': {'additionalProperties': False,
13206 'properties': {'AllowLXCLoopMounts': {'type': 'boolean'},
13207 'AptMirror': {'type': 'string'},
13208 'AptProxy': {'$ref': '#/definitions/Settings'},
13209 'AuthorizedKeys': {'type': 'string'},
13210 'PreferIPv6': {'type': 'boolean'},
13211 'ProviderType': {'type': 'string'},
13212 'Proxy': {'$ref': '#/definitions/Settings'},
13213 'SSLHostnameVerification': {'type': 'boolean'},
13214 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}},
13215 'required': ['ProviderType',
13216 'AuthorizedKeys',
13217 'SSLHostnameVerification',
13218 'Proxy',
13219 'AptProxy',
13220 'AptMirror',
13221 'PreferIPv6',
13222 'AllowLXCLoopMounts',
13223 'UpdateBehavior'],
13224 'type': 'object'},
13225 'ContainerManagerConfig': {'additionalProperties': False,
13226 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
13227 'type': 'object'}},
13228 'required': ['ManagerConfig'],
13229 'type': 'object'},
13230 'ContainerManagerConfigParams': {'additionalProperties': False,
13231 'properties': {'Type': {'type': 'string'}},
13232 'required': ['Type'],
13233 'type': 'object'},
13234 'DistributionGroupResult': {'additionalProperties': False,
13235 'properties': {'Error': {'$ref': '#/definitions/Error'},
13236 'Result': {'items': {'type': 'string'},
13237 'type': 'array'}},
13238 'required': ['Error', 'Result'],
13239 'type': 'object'},
13240 'DistributionGroupResults': {'additionalProperties': False,
13241 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
13242 'type': 'array'}},
13243 'required': ['Results'],
13244 'type': 'object'},
13245 'Entities': {'additionalProperties': False,
13246 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13247 'type': 'array'}},
13248 'required': ['Entities'],
13249 'type': 'object'},
13250 'Entity': {'additionalProperties': False,
13251 'properties': {'Tag': {'type': 'string'}},
13252 'required': ['Tag'],
13253 'type': 'object'},
13254 'EntityPassword': {'additionalProperties': False,
13255 'properties': {'Password': {'type': 'string'},
13256 'Tag': {'type': 'string'}},
13257 'required': ['Tag', 'Password'],
13258 'type': 'object'},
13259 'EntityPasswords': {'additionalProperties': False,
13260 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
13261 'type': 'array'}},
13262 'required': ['Changes'],
13263 'type': 'object'},
13264 'EntityStatusArgs': {'additionalProperties': False,
13265 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13266 'type': 'object'}},
13267 'type': 'object'},
13268 'Info': {'type': 'string'},
13269 'Status': {'type': 'string'},
13270 'Tag': {'type': 'string'}},
13271 'required': ['Tag',
13272 'Status',
13273 'Info',
13274 'Data'],
13275 'type': 'object'},
13276 'Error': {'additionalProperties': False,
13277 'properties': {'Code': {'type': 'string'},
13278 'Info': {'$ref': '#/definitions/ErrorInfo'},
13279 'Message': {'type': 'string'}},
13280 'required': ['Message', 'Code'],
13281 'type': 'object'},
13282 'ErrorInfo': {'additionalProperties': False,
13283 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13284 'MacaroonPath': {'type': 'string'}},
13285 'type': 'object'},
13286 'ErrorResult': {'additionalProperties': False,
13287 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13288 'required': ['Error'],
13289 'type': 'object'},
13290 'ErrorResults': {'additionalProperties': False,
13291 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13292 'type': 'array'}},
13293 'required': ['Results'],
13294 'type': 'object'},
13295 'FindToolsParams': {'additionalProperties': False,
13296 'properties': {'Arch': {'type': 'string'},
13297 'MajorVersion': {'type': 'integer'},
13298 'MinorVersion': {'type': 'integer'},
13299 'Number': {'$ref': '#/definitions/Number'},
13300 'Series': {'type': 'string'}},
13301 'required': ['Number',
13302 'MajorVersion',
13303 'MinorVersion',
13304 'Arch',
13305 'Series'],
13306 'type': 'object'},
13307 'FindToolsResult': {'additionalProperties': False,
13308 'properties': {'Error': {'$ref': '#/definitions/Error'},
13309 'List': {'items': {'$ref': '#/definitions/Tools'},
13310 'type': 'array'}},
13311 'required': ['List', 'Error'],
13312 'type': 'object'},
13313 'HardwareCharacteristics': {'additionalProperties': False,
13314 'properties': {'Arch': {'type': 'string'},
13315 'AvailabilityZone': {'type': 'string'},
13316 'CpuCores': {'type': 'integer'},
13317 'CpuPower': {'type': 'integer'},
13318 'Mem': {'type': 'integer'},
13319 'RootDisk': {'type': 'integer'},
13320 'Tags': {'items': {'type': 'string'},
13321 'type': 'array'}},
13322 'type': 'object'},
13323 'HostPort': {'additionalProperties': False,
13324 'properties': {'Address': {'$ref': '#/definitions/Address'},
13325 'Port': {'type': 'integer'}},
13326 'required': ['Address', 'Port'],
13327 'type': 'object'},
13328 'InstanceInfo': {'additionalProperties': False,
13329 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13330 'InstanceId': {'type': 'string'},
13331 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
13332 'type': 'array'},
13333 'Nonce': {'type': 'string'},
13334 'Tag': {'type': 'string'},
13335 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13336 'type': 'object'},
13337 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
13338 'type': 'array'}},
13339 'required': ['Tag',
13340 'InstanceId',
13341 'Nonce',
13342 'Characteristics',
13343 'Volumes',
13344 'VolumeAttachments',
13345 'NetworkConfig'],
13346 'type': 'object'},
13347 'InstancesInfo': {'additionalProperties': False,
13348 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
13349 'type': 'array'}},
13350 'required': ['Machines'],
13351 'type': 'object'},
13352 'LifeResult': {'additionalProperties': False,
13353 'properties': {'Error': {'$ref': '#/definitions/Error'},
13354 'Life': {'type': 'string'}},
13355 'required': ['Life', 'Error'],
13356 'type': 'object'},
13357 'LifeResults': {'additionalProperties': False,
13358 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
13359 'type': 'array'}},
13360 'required': ['Results'],
13361 'type': 'object'},
13362 'Macaroon': {'additionalProperties': False,
13363 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13364 'type': 'array'},
13365 'data': {'items': {'type': 'integer'},
13366 'type': 'array'},
13367 'id': {'$ref': '#/definitions/packet'},
13368 'location': {'$ref': '#/definitions/packet'},
13369 'sig': {'items': {'type': 'integer'},
13370 'type': 'array'}},
13371 'required': ['data',
13372 'location',
13373 'id',
13374 'caveats',
13375 'sig'],
13376 'type': 'object'},
13377 'MachineContainers': {'additionalProperties': False,
13378 'properties': {'ContainerTypes': {'items': {'type': 'string'},
13379 'type': 'array'},
13380 'MachineTag': {'type': 'string'}},
13381 'required': ['MachineTag',
13382 'ContainerTypes'],
13383 'type': 'object'},
13384 'MachineContainersParams': {'additionalProperties': False,
13385 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
13386 'type': 'array'}},
13387 'required': ['Params'],
13388 'type': 'object'},
13389 'MachineNetworkConfigResult': {'additionalProperties': False,
13390 'properties': {'Error': {'$ref': '#/definitions/Error'},
13391 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
13392 'type': 'array'}},
13393 'required': ['Error', 'Info'],
13394 'type': 'object'},
13395 'MachineNetworkConfigResults': {'additionalProperties': False,
13396 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
13397 'type': 'array'}},
13398 'required': ['Results'],
13399 'type': 'object'},
13400 'ModelConfigResult': {'additionalProperties': False,
13401 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13402 'type': 'object'}},
13403 'type': 'object'}},
13404 'required': ['Config'],
13405 'type': 'object'},
13406 'NetworkConfig': {'additionalProperties': False,
13407 'properties': {'Address': {'type': 'string'},
13408 'CIDR': {'type': 'string'},
13409 'ConfigType': {'type': 'string'},
13410 'DNSSearchDomains': {'items': {'type': 'string'},
13411 'type': 'array'},
13412 'DNSServers': {'items': {'type': 'string'},
13413 'type': 'array'},
13414 'DeviceIndex': {'type': 'integer'},
13415 'Disabled': {'type': 'boolean'},
13416 'GatewayAddress': {'type': 'string'},
13417 'InterfaceName': {'type': 'string'},
13418 'InterfaceType': {'type': 'string'},
13419 'MACAddress': {'type': 'string'},
13420 'MTU': {'type': 'integer'},
13421 'NoAutoStart': {'type': 'boolean'},
13422 'ParentInterfaceName': {'type': 'string'},
13423 'ProviderAddressId': {'type': 'string'},
13424 'ProviderId': {'type': 'string'},
13425 'ProviderSpaceId': {'type': 'string'},
13426 'ProviderSubnetId': {'type': 'string'},
13427 'ProviderVLANId': {'type': 'string'},
13428 'VLANTag': {'type': 'integer'}},
13429 'required': ['DeviceIndex',
13430 'MACAddress',
13431 'CIDR',
13432 'MTU',
13433 'ProviderId',
13434 'ProviderSubnetId',
13435 'ProviderSpaceId',
13436 'ProviderAddressId',
13437 'ProviderVLANId',
13438 'VLANTag',
13439 'InterfaceName',
13440 'ParentInterfaceName',
13441 'InterfaceType',
13442 'Disabled'],
13443 'type': 'object'},
13444 'NotifyWatchResult': {'additionalProperties': False,
13445 'properties': {'Error': {'$ref': '#/definitions/Error'},
13446 'NotifyWatcherId': {'type': 'string'}},
13447 'required': ['NotifyWatcherId', 'Error'],
13448 'type': 'object'},
13449 'Number': {'additionalProperties': False,
13450 'properties': {'Build': {'type': 'integer'},
13451 'Major': {'type': 'integer'},
13452 'Minor': {'type': 'integer'},
13453 'Patch': {'type': 'integer'},
13454 'Tag': {'type': 'string'}},
13455 'required': ['Major',
13456 'Minor',
13457 'Tag',
13458 'Patch',
13459 'Build'],
13460 'type': 'object'},
13461 'ProvisioningInfo': {'additionalProperties': False,
13462 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
13463 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
13464 'type': 'object'},
13465 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
13466 'type': 'array'},
13467 'Jobs': {'items': {'type': 'string'},
13468 'type': 'array'},
13469 'Placement': {'type': 'string'},
13470 'Series': {'type': 'string'},
13471 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
13472 'type': 'array'}},
13473 'type': 'object'},
13474 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
13475 'type': 'object'},
13476 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
13477 'type': 'array'}},
13478 'required': ['Constraints',
13479 'Series',
13480 'Placement',
13481 'Jobs',
13482 'Volumes',
13483 'Tags',
13484 'SubnetsToZones',
13485 'ImageMetadata',
13486 'EndpointBindings'],
13487 'type': 'object'},
13488 'ProvisioningInfoResult': {'additionalProperties': False,
13489 'properties': {'Error': {'$ref': '#/definitions/Error'},
13490 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
13491 'required': ['Error', 'Result'],
13492 'type': 'object'},
13493 'ProvisioningInfoResults': {'additionalProperties': False,
13494 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
13495 'type': 'array'}},
13496 'required': ['Results'],
13497 'type': 'object'},
13498 'SetStatus': {'additionalProperties': False,
13499 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13500 'type': 'array'}},
13501 'required': ['Entities'],
13502 'type': 'object'},
13503 'Settings': {'additionalProperties': False,
13504 'properties': {'Ftp': {'type': 'string'},
13505 'Http': {'type': 'string'},
13506 'Https': {'type': 'string'},
13507 'NoProxy': {'type': 'string'}},
13508 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
13509 'type': 'object'},
13510 'StatusResult': {'additionalProperties': False,
13511 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13512 'type': 'object'}},
13513 'type': 'object'},
13514 'Error': {'$ref': '#/definitions/Error'},
13515 'Id': {'type': 'string'},
13516 'Info': {'type': 'string'},
13517 'Life': {'type': 'string'},
13518 'Since': {'format': 'date-time',
13519 'type': 'string'},
13520 'Status': {'type': 'string'}},
13521 'required': ['Error',
13522 'Id',
13523 'Life',
13524 'Status',
13525 'Info',
13526 'Data',
13527 'Since'],
13528 'type': 'object'},
13529 'StatusResults': {'additionalProperties': False,
13530 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
13531 'type': 'array'}},
13532 'required': ['Results'],
13533 'type': 'object'},
13534 'StringResult': {'additionalProperties': False,
13535 'properties': {'Error': {'$ref': '#/definitions/Error'},
13536 'Result': {'type': 'string'}},
13537 'required': ['Error', 'Result'],
13538 'type': 'object'},
13539 'StringResults': {'additionalProperties': False,
13540 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
13541 'type': 'array'}},
13542 'required': ['Results'],
13543 'type': 'object'},
13544 'StringsResult': {'additionalProperties': False,
13545 'properties': {'Error': {'$ref': '#/definitions/Error'},
13546 'Result': {'items': {'type': 'string'},
13547 'type': 'array'}},
13548 'required': ['Error', 'Result'],
13549 'type': 'object'},
13550 'StringsWatchResult': {'additionalProperties': False,
13551 'properties': {'Changes': {'items': {'type': 'string'},
13552 'type': 'array'},
13553 'Error': {'$ref': '#/definitions/Error'},
13554 'StringsWatcherId': {'type': 'string'}},
13555 'required': ['StringsWatcherId',
13556 'Changes',
13557 'Error'],
13558 'type': 'object'},
13559 'StringsWatchResults': {'additionalProperties': False,
13560 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13561 'type': 'array'}},
13562 'required': ['Results'],
13563 'type': 'object'},
13564 'Tools': {'additionalProperties': False,
13565 'properties': {'sha256': {'type': 'string'},
13566 'size': {'type': 'integer'},
13567 'url': {'type': 'string'},
13568 'version': {'$ref': '#/definitions/Binary'}},
13569 'required': ['version', 'url', 'size'],
13570 'type': 'object'},
13571 'ToolsResult': {'additionalProperties': False,
13572 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
13573 'Error': {'$ref': '#/definitions/Error'},
13574 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
13575 'type': 'array'}},
13576 'required': ['ToolsList',
13577 'DisableSSLHostnameVerification',
13578 'Error'],
13579 'type': 'object'},
13580 'ToolsResults': {'additionalProperties': False,
13581 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
13582 'type': 'array'}},
13583 'required': ['Results'],
13584 'type': 'object'},
13585 'UpdateBehavior': {'additionalProperties': False,
13586 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
13587 'EnableOSUpgrade': {'type': 'boolean'}},
13588 'required': ['EnableOSRefreshUpdate',
13589 'EnableOSUpgrade'],
13590 'type': 'object'},
13591 'Value': {'additionalProperties': False,
13592 'properties': {'arch': {'type': 'string'},
13593 'container': {'type': 'string'},
13594 'cpu-cores': {'type': 'integer'},
13595 'cpu-power': {'type': 'integer'},
13596 'instance-type': {'type': 'string'},
13597 'mem': {'type': 'integer'},
13598 'root-disk': {'type': 'integer'},
13599 'spaces': {'items': {'type': 'string'},
13600 'type': 'array'},
13601 'tags': {'items': {'type': 'string'},
13602 'type': 'array'},
13603 'virt-type': {'type': 'string'}},
13604 'type': 'object'},
13605 'Volume': {'additionalProperties': False,
13606 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13607 'volumetag': {'type': 'string'}},
13608 'required': ['volumetag', 'info'],
13609 'type': 'object'},
13610 'VolumeAttachmentInfo': {'additionalProperties': False,
13611 'properties': {'busaddress': {'type': 'string'},
13612 'devicelink': {'type': 'string'},
13613 'devicename': {'type': 'string'},
13614 'read-only': {'type': 'boolean'}},
13615 'type': 'object'},
13616 'VolumeAttachmentParams': {'additionalProperties': False,
13617 'properties': {'instanceid': {'type': 'string'},
13618 'machinetag': {'type': 'string'},
13619 'provider': {'type': 'string'},
13620 'read-only': {'type': 'boolean'},
13621 'volumeid': {'type': 'string'},
13622 'volumetag': {'type': 'string'}},
13623 'required': ['volumetag',
13624 'machinetag',
13625 'provider'],
13626 'type': 'object'},
13627 'VolumeInfo': {'additionalProperties': False,
13628 'properties': {'hardwareid': {'type': 'string'},
13629 'persistent': {'type': 'boolean'},
13630 'size': {'type': 'integer'},
13631 'volumeid': {'type': 'string'}},
13632 'required': ['volumeid', 'size', 'persistent'],
13633 'type': 'object'},
13634 'VolumeParams': {'additionalProperties': False,
13635 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
13636 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
13637 'type': 'object'}},
13638 'type': 'object'},
13639 'provider': {'type': 'string'},
13640 'size': {'type': 'integer'},
13641 'tags': {'patternProperties': {'.*': {'type': 'string'}},
13642 'type': 'object'},
13643 'volumetag': {'type': 'string'}},
13644 'required': ['volumetag', 'size', 'provider'],
13645 'type': 'object'},
13646 'WatchContainer': {'additionalProperties': False,
13647 'properties': {'ContainerType': {'type': 'string'},
13648 'MachineTag': {'type': 'string'}},
13649 'required': ['MachineTag', 'ContainerType'],
13650 'type': 'object'},
13651 'WatchContainers': {'additionalProperties': False,
13652 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
13653 'type': 'array'}},
13654 'required': ['Params'],
13655 'type': 'object'},
13656 'caveat': {'additionalProperties': False,
13657 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13658 'location': {'$ref': '#/definitions/packet'},
13659 'verificationId': {'$ref': '#/definitions/packet'}},
13660 'required': ['location',
13661 'caveatId',
13662 'verificationId'],
13663 'type': 'object'},
13664 'packet': {'additionalProperties': False,
13665 'properties': {'headerLen': {'type': 'integer'},
13666 'start': {'type': 'integer'},
13667 'totalLen': {'type': 'integer'}},
13668 'required': ['start', 'totalLen', 'headerLen'],
13669 'type': 'object'}},
13670 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13671 'type': 'object'},
13672 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13673 'type': 'object'},
13674 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13675 'type': 'object'},
13676 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13677 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
13678 'type': 'object'},
13679 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
13680 'type': 'object'},
13681 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
13682 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
13683 'type': 'object'},
13684 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13685 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
13686 'type': 'object'},
13687 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13688 'Result': {'$ref': '#/definitions/ErrorResults'}},
13689 'type': 'object'},
13690 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
13691 'Result': {'$ref': '#/definitions/FindToolsResult'}},
13692 'type': 'object'},
13693 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13694 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
13695 'type': 'object'},
13696 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13697 'Result': {'$ref': '#/definitions/StringResults'}},
13698 'type': 'object'},
13699 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13700 'Result': {'$ref': '#/definitions/StatusResults'}},
13701 'type': 'object'},
13702 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13703 'Result': {'$ref': '#/definitions/LifeResults'}},
13704 'type': 'object'},
13705 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
13706 'type': 'object'},
13707 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
13708 'type': 'object'},
13709 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13710 'type': 'object'},
13711 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13712 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
13713 'type': 'object'},
13714 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13715 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
13716 'type': 'object'},
13717 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13718 'Result': {'$ref': '#/definitions/ErrorResults'}},
13719 'type': 'object'},
13720 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13721 'Result': {'$ref': '#/definitions/ErrorResults'}},
13722 'type': 'object'},
13723 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13724 'Result': {'$ref': '#/definitions/StringResults'}},
13725 'type': 'object'},
13726 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
13727 'Result': {'$ref': '#/definitions/ErrorResults'}},
13728 'type': 'object'},
13729 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13730 'Result': {'$ref': '#/definitions/ErrorResults'}},
13731 'type': 'object'},
13732 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
13733 'Result': {'$ref': '#/definitions/ErrorResults'}},
13734 'type': 'object'},
13735 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13736 'Result': {'$ref': '#/definitions/ErrorResults'}},
13737 'type': 'object'},
13738 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
13739 'Result': {'$ref': '#/definitions/ErrorResults'}},
13740 'type': 'object'},
13741 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13742 'type': 'object'},
13743 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13744 'Result': {'$ref': '#/definitions/StatusResults'}},
13745 'type': 'object'},
13746 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13747 'Result': {'$ref': '#/definitions/ToolsResults'}},
13748 'type': 'object'},
13749 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13750 'Result': {'$ref': '#/definitions/ErrorResults'}},
13751 'type': 'object'},
13752 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13753 'type': 'object'},
13754 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
13755 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13756 'type': 'object'},
13757 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
13758 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13759 'type': 'object'},
13760 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13761 'type': 'object'},
13762 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13763 'type': 'object'},
13764 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
13765 'type': 'object'}},
13766 'type': 'object'}
13767
13768
13769 @ReturnMapping(StringsResult)
13770 async def APIAddresses(self):
13771 '''
13772
13773 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
13774 '''
13775 # map input types to rpc msg
13776 params = dict()
13777 msg = dict(Type='Provisioner', Request='APIAddresses', Version=2, Params=params)
13778
13779 reply = await self.rpc(msg)
13780 return reply
13781
13782
13783
13784 @ReturnMapping(APIHostPortsResult)
13785 async def APIHostPorts(self):
13786 '''
13787
13788 Returns -> typing.Sequence[~HostPort]
13789 '''
13790 # map input types to rpc msg
13791 params = dict()
13792 msg = dict(Type='Provisioner', Request='APIHostPorts', Version=2, Params=params)
13793
13794 reply = await self.rpc(msg)
13795 return reply
13796
13797
13798
13799 @ReturnMapping(BytesResult)
13800 async def CACert(self):
13801 '''
13802
13803 Returns -> typing.Sequence[int]
13804 '''
13805 # map input types to rpc msg
13806 params = dict()
13807 msg = dict(Type='Provisioner', Request='CACert', Version=2, Params=params)
13808
13809 reply = await self.rpc(msg)
13810 return reply
13811
13812
13813
13814 @ReturnMapping(ConstraintsResults)
13815 async def Constraints(self, entities):
13816 '''
13817 entities : typing.Sequence[~Entity]
13818 Returns -> typing.Sequence[~ConstraintsResult]
13819 '''
13820 # map input types to rpc msg
13821 params = dict()
13822 msg = dict(Type='Provisioner', Request='Constraints', Version=2, Params=params)
13823 params['Entities'] = entities
13824 reply = await self.rpc(msg)
13825 return reply
13826
13827
13828
13829 @ReturnMapping(ContainerConfig)
13830 async def ContainerConfig(self):
13831 '''
13832
13833 Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')]
13834 '''
13835 # map input types to rpc msg
13836 params = dict()
13837 msg = dict(Type='Provisioner', Request='ContainerConfig', Version=2, Params=params)
13838
13839 reply = await self.rpc(msg)
13840 return reply
13841
13842
13843
13844 @ReturnMapping(ContainerManagerConfig)
13845 async def ContainerManagerConfig(self, type_):
13846 '''
13847 type_ : str
13848 Returns -> typing.Mapping[str, str]
13849 '''
13850 # map input types to rpc msg
13851 params = dict()
13852 msg = dict(Type='Provisioner', Request='ContainerManagerConfig', Version=2, Params=params)
13853 params['Type'] = type_
13854 reply = await self.rpc(msg)
13855 return reply
13856
13857
13858
13859 @ReturnMapping(DistributionGroupResults)
13860 async def DistributionGroup(self, entities):
13861 '''
13862 entities : typing.Sequence[~Entity]
13863 Returns -> typing.Sequence[~DistributionGroupResult]
13864 '''
13865 # map input types to rpc msg
13866 params = dict()
13867 msg = dict(Type='Provisioner', Request='DistributionGroup', Version=2, Params=params)
13868 params['Entities'] = entities
13869 reply = await self.rpc(msg)
13870 return reply
13871
13872
13873
13874 @ReturnMapping(ErrorResults)
13875 async def EnsureDead(self, entities):
13876 '''
13877 entities : typing.Sequence[~Entity]
13878 Returns -> typing.Sequence[~ErrorResult]
13879 '''
13880 # map input types to rpc msg
13881 params = dict()
13882 msg = dict(Type='Provisioner', Request='EnsureDead', Version=2, Params=params)
13883 params['Entities'] = entities
13884 reply = await self.rpc(msg)
13885 return reply
13886
13887
13888
13889 @ReturnMapping(FindToolsResult)
13890 async def FindTools(self, arch, majorversion, minorversion, number, series):
13891 '''
13892 arch : str
13893 majorversion : int
13894 minorversion : int
13895 number : Number
13896 series : str
13897 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
13898 '''
13899 # map input types to rpc msg
13900 params = dict()
13901 msg = dict(Type='Provisioner', Request='FindTools', Version=2, Params=params)
13902 params['Arch'] = arch
13903 params['MajorVersion'] = majorversion
13904 params['MinorVersion'] = minorversion
13905 params['Number'] = number
13906 params['Series'] = series
13907 reply = await self.rpc(msg)
13908 return reply
13909
13910
13911
13912 @ReturnMapping(MachineNetworkConfigResults)
13913 async def GetContainerInterfaceInfo(self, entities):
13914 '''
13915 entities : typing.Sequence[~Entity]
13916 Returns -> typing.Sequence[~MachineNetworkConfigResult]
13917 '''
13918 # map input types to rpc msg
13919 params = dict()
13920 msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=2, Params=params)
13921 params['Entities'] = entities
13922 reply = await self.rpc(msg)
13923 return reply
13924
13925
13926
13927 @ReturnMapping(StringResults)
13928 async def InstanceId(self, entities):
13929 '''
13930 entities : typing.Sequence[~Entity]
13931 Returns -> typing.Sequence[~StringResult]
13932 '''
13933 # map input types to rpc msg
13934 params = dict()
13935 msg = dict(Type='Provisioner', Request='InstanceId', Version=2, Params=params)
13936 params['Entities'] = entities
13937 reply = await self.rpc(msg)
13938 return reply
13939
13940
13941
13942 @ReturnMapping(StatusResults)
13943 async def InstanceStatus(self, entities):
13944 '''
13945 entities : typing.Sequence[~Entity]
13946 Returns -> typing.Sequence[~StatusResult]
13947 '''
13948 # map input types to rpc msg
13949 params = dict()
13950 msg = dict(Type='Provisioner', Request='InstanceStatus', Version=2, Params=params)
13951 params['Entities'] = entities
13952 reply = await self.rpc(msg)
13953 return reply
13954
13955
13956
13957 @ReturnMapping(LifeResults)
13958 async def Life(self, entities):
13959 '''
13960 entities : typing.Sequence[~Entity]
13961 Returns -> typing.Sequence[~LifeResult]
13962 '''
13963 # map input types to rpc msg
13964 params = dict()
13965 msg = dict(Type='Provisioner', Request='Life', Version=2, Params=params)
13966 params['Entities'] = entities
13967 reply = await self.rpc(msg)
13968 return reply
13969
13970
13971
13972 @ReturnMapping(StatusResults)
13973 async def MachinesWithTransientErrors(self):
13974 '''
13975
13976 Returns -> typing.Sequence[~StatusResult]
13977 '''
13978 # map input types to rpc msg
13979 params = dict()
13980 msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=2, Params=params)
13981
13982 reply = await self.rpc(msg)
13983 return reply
13984
13985
13986
13987 @ReturnMapping(ModelConfigResult)
13988 async def ModelConfig(self):
13989 '''
13990
13991 Returns -> typing.Mapping[str, typing.Any]
13992 '''
13993 # map input types to rpc msg
13994 params = dict()
13995 msg = dict(Type='Provisioner', Request='ModelConfig', Version=2, Params=params)
13996
13997 reply = await self.rpc(msg)
13998 return reply
13999
14000
14001
14002 @ReturnMapping(StringResult)
14003 async def ModelUUID(self):
14004 '''
14005
14006 Returns -> typing.Union[_ForwardRef('Error'), str]
14007 '''
14008 # map input types to rpc msg
14009 params = dict()
14010 msg = dict(Type='Provisioner', Request='ModelUUID', Version=2, Params=params)
14011
14012 reply = await self.rpc(msg)
14013 return reply
14014
14015
14016
14017 @ReturnMapping(MachineNetworkConfigResults)
14018 async def PrepareContainerInterfaceInfo(self, entities):
14019 '''
14020 entities : typing.Sequence[~Entity]
14021 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14022 '''
14023 # map input types to rpc msg
14024 params = dict()
14025 msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=2, Params=params)
14026 params['Entities'] = entities
14027 reply = await self.rpc(msg)
14028 return reply
14029
14030
14031
14032 @ReturnMapping(ProvisioningInfoResults)
14033 async def ProvisioningInfo(self, entities):
14034 '''
14035 entities : typing.Sequence[~Entity]
14036 Returns -> typing.Sequence[~ProvisioningInfoResult]
14037 '''
14038 # map input types to rpc msg
14039 params = dict()
14040 msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=2, Params=params)
14041 params['Entities'] = entities
14042 reply = await self.rpc(msg)
14043 return reply
14044
14045
14046
14047 @ReturnMapping(ErrorResults)
14048 async def ReleaseContainerAddresses(self, entities):
14049 '''
14050 entities : typing.Sequence[~Entity]
14051 Returns -> typing.Sequence[~ErrorResult]
14052 '''
14053 # map input types to rpc msg
14054 params = dict()
14055 msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=2, Params=params)
14056 params['Entities'] = entities
14057 reply = await self.rpc(msg)
14058 return reply
14059
14060
14061
14062 @ReturnMapping(ErrorResults)
14063 async def Remove(self, entities):
14064 '''
14065 entities : typing.Sequence[~Entity]
14066 Returns -> typing.Sequence[~ErrorResult]
14067 '''
14068 # map input types to rpc msg
14069 params = dict()
14070 msg = dict(Type='Provisioner', Request='Remove', Version=2, Params=params)
14071 params['Entities'] = entities
14072 reply = await self.rpc(msg)
14073 return reply
14074
14075
14076
14077 @ReturnMapping(StringResults)
14078 async def Series(self, entities):
14079 '''
14080 entities : typing.Sequence[~Entity]
14081 Returns -> typing.Sequence[~StringResult]
14082 '''
14083 # map input types to rpc msg
14084 params = dict()
14085 msg = dict(Type='Provisioner', Request='Series', Version=2, Params=params)
14086 params['Entities'] = entities
14087 reply = await self.rpc(msg)
14088 return reply
14089
14090
14091
14092 @ReturnMapping(ErrorResults)
14093 async def SetInstanceInfo(self, machines):
14094 '''
14095 machines : typing.Sequence[~InstanceInfo]
14096 Returns -> typing.Sequence[~ErrorResult]
14097 '''
14098 # map input types to rpc msg
14099 params = dict()
14100 msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=2, Params=params)
14101 params['Machines'] = machines
14102 reply = await self.rpc(msg)
14103 return reply
14104
14105
14106
14107 @ReturnMapping(ErrorResults)
14108 async def SetInstanceStatus(self, entities):
14109 '''
14110 entities : typing.Sequence[~EntityStatusArgs]
14111 Returns -> typing.Sequence[~ErrorResult]
14112 '''
14113 # map input types to rpc msg
14114 params = dict()
14115 msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=2, Params=params)
14116 params['Entities'] = entities
14117 reply = await self.rpc(msg)
14118 return reply
14119
14120
14121
14122 @ReturnMapping(ErrorResults)
14123 async def SetPasswords(self, changes):
14124 '''
14125 changes : typing.Sequence[~EntityPassword]
14126 Returns -> typing.Sequence[~ErrorResult]
14127 '''
14128 # map input types to rpc msg
14129 params = dict()
14130 msg = dict(Type='Provisioner', Request='SetPasswords', Version=2, Params=params)
14131 params['Changes'] = changes
14132 reply = await self.rpc(msg)
14133 return reply
14134
14135
14136
14137 @ReturnMapping(ErrorResults)
14138 async def SetStatus(self, entities):
14139 '''
14140 entities : typing.Sequence[~EntityStatusArgs]
14141 Returns -> typing.Sequence[~ErrorResult]
14142 '''
14143 # map input types to rpc msg
14144 params = dict()
14145 msg = dict(Type='Provisioner', Request='SetStatus', Version=2, Params=params)
14146 params['Entities'] = entities
14147 reply = await self.rpc(msg)
14148 return reply
14149
14150
14151
14152 @ReturnMapping(ErrorResults)
14153 async def SetSupportedContainers(self, params):
14154 '''
14155 params : typing.Sequence[~MachineContainers]
14156 Returns -> typing.Sequence[~ErrorResult]
14157 '''
14158 # map input types to rpc msg
14159 params = dict()
14160 msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=2, Params=params)
14161 params['Params'] = params
14162 reply = await self.rpc(msg)
14163 return reply
14164
14165
14166
14167 @ReturnMapping(StringsResult)
14168 async def StateAddresses(self):
14169 '''
14170
14171 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14172 '''
14173 # map input types to rpc msg
14174 params = dict()
14175 msg = dict(Type='Provisioner', Request='StateAddresses', Version=2, Params=params)
14176
14177 reply = await self.rpc(msg)
14178 return reply
14179
14180
14181
14182 @ReturnMapping(StatusResults)
14183 async def Status(self, entities):
14184 '''
14185 entities : typing.Sequence[~Entity]
14186 Returns -> typing.Sequence[~StatusResult]
14187 '''
14188 # map input types to rpc msg
14189 params = dict()
14190 msg = dict(Type='Provisioner', Request='Status', Version=2, Params=params)
14191 params['Entities'] = entities
14192 reply = await self.rpc(msg)
14193 return reply
14194
14195
14196
14197 @ReturnMapping(ToolsResults)
14198 async def Tools(self, entities):
14199 '''
14200 entities : typing.Sequence[~Entity]
14201 Returns -> typing.Sequence[~ToolsResult]
14202 '''
14203 # map input types to rpc msg
14204 params = dict()
14205 msg = dict(Type='Provisioner', Request='Tools', Version=2, Params=params)
14206 params['Entities'] = entities
14207 reply = await self.rpc(msg)
14208 return reply
14209
14210
14211
14212 @ReturnMapping(ErrorResults)
14213 async def UpdateStatus(self, entities):
14214 '''
14215 entities : typing.Sequence[~EntityStatusArgs]
14216 Returns -> typing.Sequence[~ErrorResult]
14217 '''
14218 # map input types to rpc msg
14219 params = dict()
14220 msg = dict(Type='Provisioner', Request='UpdateStatus', Version=2, Params=params)
14221 params['Entities'] = entities
14222 reply = await self.rpc(msg)
14223 return reply
14224
14225
14226
14227 @ReturnMapping(NotifyWatchResult)
14228 async def WatchAPIHostPorts(self):
14229 '''
14230
14231 Returns -> typing.Union[_ForwardRef('Error'), str]
14232 '''
14233 # map input types to rpc msg
14234 params = dict()
14235 msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=2, Params=params)
14236
14237 reply = await self.rpc(msg)
14238 return reply
14239
14240
14241
14242 @ReturnMapping(StringsWatchResults)
14243 async def WatchAllContainers(self, params):
14244 '''
14245 params : typing.Sequence[~WatchContainer]
14246 Returns -> typing.Sequence[~StringsWatchResult]
14247 '''
14248 # map input types to rpc msg
14249 params = dict()
14250 msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=2, Params=params)
14251 params['Params'] = params
14252 reply = await self.rpc(msg)
14253 return reply
14254
14255
14256
14257 @ReturnMapping(StringsWatchResults)
14258 async def WatchContainers(self, params):
14259 '''
14260 params : typing.Sequence[~WatchContainer]
14261 Returns -> typing.Sequence[~StringsWatchResult]
14262 '''
14263 # map input types to rpc msg
14264 params = dict()
14265 msg = dict(Type='Provisioner', Request='WatchContainers', Version=2, Params=params)
14266 params['Params'] = params
14267 reply = await self.rpc(msg)
14268 return reply
14269
14270
14271
14272 @ReturnMapping(NotifyWatchResult)
14273 async def WatchForModelConfigChanges(self):
14274 '''
14275
14276 Returns -> typing.Union[_ForwardRef('Error'), str]
14277 '''
14278 # map input types to rpc msg
14279 params = dict()
14280 msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
14281
14282 reply = await self.rpc(msg)
14283 return reply
14284
14285
14286
14287 @ReturnMapping(NotifyWatchResult)
14288 async def WatchMachineErrorRetry(self):
14289 '''
14290
14291 Returns -> typing.Union[_ForwardRef('Error'), str]
14292 '''
14293 # map input types to rpc msg
14294 params = dict()
14295 msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=2, Params=params)
14296
14297 reply = await self.rpc(msg)
14298 return reply
14299
14300
14301
14302 @ReturnMapping(StringsWatchResult)
14303 async def WatchModelMachines(self):
14304 '''
14305
14306 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
14307 '''
14308 # map input types to rpc msg
14309 params = dict()
14310 msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=2, Params=params)
14311
14312 reply = await self.rpc(msg)
14313 return reply
14314
14315
14316 class ProxyUpdater(Type):
14317 name = 'ProxyUpdater'
14318 version = 1
14319 schema = {'definitions': {'Entities': {'additionalProperties': False,
14320 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14321 'type': 'array'}},
14322 'required': ['Entities'],
14323 'type': 'object'},
14324 'Entity': {'additionalProperties': False,
14325 'properties': {'Tag': {'type': 'string'}},
14326 'required': ['Tag'],
14327 'type': 'object'},
14328 'Error': {'additionalProperties': False,
14329 'properties': {'Code': {'type': 'string'},
14330 'Info': {'$ref': '#/definitions/ErrorInfo'},
14331 'Message': {'type': 'string'}},
14332 'required': ['Message', 'Code'],
14333 'type': 'object'},
14334 'ErrorInfo': {'additionalProperties': False,
14335 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14336 'MacaroonPath': {'type': 'string'}},
14337 'type': 'object'},
14338 'Macaroon': {'additionalProperties': False,
14339 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14340 'type': 'array'},
14341 'data': {'items': {'type': 'integer'},
14342 'type': 'array'},
14343 'id': {'$ref': '#/definitions/packet'},
14344 'location': {'$ref': '#/definitions/packet'},
14345 'sig': {'items': {'type': 'integer'},
14346 'type': 'array'}},
14347 'required': ['data',
14348 'location',
14349 'id',
14350 'caveats',
14351 'sig'],
14352 'type': 'object'},
14353 'NotifyWatchResult': {'additionalProperties': False,
14354 'properties': {'Error': {'$ref': '#/definitions/Error'},
14355 'NotifyWatcherId': {'type': 'string'}},
14356 'required': ['NotifyWatcherId', 'Error'],
14357 'type': 'object'},
14358 'NotifyWatchResults': {'additionalProperties': False,
14359 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14360 'type': 'array'}},
14361 'required': ['Results'],
14362 'type': 'object'},
14363 'ProxyConfig': {'additionalProperties': False,
14364 'properties': {'FTP': {'type': 'string'},
14365 'HTTP': {'type': 'string'},
14366 'HTTPS': {'type': 'string'},
14367 'NoProxy': {'type': 'string'}},
14368 'required': ['HTTP',
14369 'HTTPS',
14370 'FTP',
14371 'NoProxy'],
14372 'type': 'object'},
14373 'ProxyConfigResult': {'additionalProperties': False,
14374 'properties': {'APTProxySettings': {'$ref': '#/definitions/ProxyConfig'},
14375 'Error': {'$ref': '#/definitions/Error'},
14376 'ProxySettings': {'$ref': '#/definitions/ProxyConfig'}},
14377 'required': ['ProxySettings',
14378 'APTProxySettings'],
14379 'type': 'object'},
14380 'ProxyConfigResults': {'additionalProperties': False,
14381 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
14382 'type': 'array'}},
14383 'required': ['Results'],
14384 'type': 'object'},
14385 'caveat': {'additionalProperties': False,
14386 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14387 'location': {'$ref': '#/definitions/packet'},
14388 'verificationId': {'$ref': '#/definitions/packet'}},
14389 'required': ['location',
14390 'caveatId',
14391 'verificationId'],
14392 'type': 'object'},
14393 'packet': {'additionalProperties': False,
14394 'properties': {'headerLen': {'type': 'integer'},
14395 'start': {'type': 'integer'},
14396 'totalLen': {'type': 'integer'}},
14397 'required': ['start', 'totalLen', 'headerLen'],
14398 'type': 'object'}},
14399 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14400 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
14401 'type': 'object'},
14402 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14403 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14404 'type': 'object'}},
14405 'type': 'object'}
14406
14407
14408 @ReturnMapping(ProxyConfigResults)
14409 async def ProxyConfig(self, entities):
14410 '''
14411 entities : typing.Sequence[~Entity]
14412 Returns -> typing.Sequence[~ProxyConfigResult]
14413 '''
14414 # map input types to rpc msg
14415 params = dict()
14416 msg = dict(Type='ProxyUpdater', Request='ProxyConfig', Version=1, Params=params)
14417 params['Entities'] = entities
14418 reply = await self.rpc(msg)
14419 return reply
14420
14421
14422
14423 @ReturnMapping(NotifyWatchResults)
14424 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
14425 '''
14426 entities : typing.Sequence[~Entity]
14427 Returns -> typing.Sequence[~NotifyWatchResult]
14428 '''
14429 # map input types to rpc msg
14430 params = dict()
14431 msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params)
14432 params['Entities'] = entities
14433 reply = await self.rpc(msg)
14434 return reply
14435
14436
14437 class Reboot(Type):
14438 name = 'Reboot'
14439 version = 2
14440 schema = {'definitions': {'Entities': {'additionalProperties': False,
14441 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14442 'type': 'array'}},
14443 'required': ['Entities'],
14444 'type': 'object'},
14445 'Entity': {'additionalProperties': False,
14446 'properties': {'Tag': {'type': 'string'}},
14447 'required': ['Tag'],
14448 'type': 'object'},
14449 'Error': {'additionalProperties': False,
14450 'properties': {'Code': {'type': 'string'},
14451 'Info': {'$ref': '#/definitions/ErrorInfo'},
14452 'Message': {'type': 'string'}},
14453 'required': ['Message', 'Code'],
14454 'type': 'object'},
14455 'ErrorInfo': {'additionalProperties': False,
14456 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14457 'MacaroonPath': {'type': 'string'}},
14458 'type': 'object'},
14459 'ErrorResult': {'additionalProperties': False,
14460 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14461 'required': ['Error'],
14462 'type': 'object'},
14463 'ErrorResults': {'additionalProperties': False,
14464 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14465 'type': 'array'}},
14466 'required': ['Results'],
14467 'type': 'object'},
14468 'Macaroon': {'additionalProperties': False,
14469 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14470 'type': 'array'},
14471 'data': {'items': {'type': 'integer'},
14472 'type': 'array'},
14473 'id': {'$ref': '#/definitions/packet'},
14474 'location': {'$ref': '#/definitions/packet'},
14475 'sig': {'items': {'type': 'integer'},
14476 'type': 'array'}},
14477 'required': ['data',
14478 'location',
14479 'id',
14480 'caveats',
14481 'sig'],
14482 'type': 'object'},
14483 'NotifyWatchResult': {'additionalProperties': False,
14484 'properties': {'Error': {'$ref': '#/definitions/Error'},
14485 'NotifyWatcherId': {'type': 'string'}},
14486 'required': ['NotifyWatcherId', 'Error'],
14487 'type': 'object'},
14488 'RebootActionResult': {'additionalProperties': False,
14489 'properties': {'error': {'$ref': '#/definitions/Error'},
14490 'result': {'type': 'string'}},
14491 'type': 'object'},
14492 'RebootActionResults': {'additionalProperties': False,
14493 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
14494 'type': 'array'}},
14495 'type': 'object'},
14496 'caveat': {'additionalProperties': False,
14497 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14498 'location': {'$ref': '#/definitions/packet'},
14499 'verificationId': {'$ref': '#/definitions/packet'}},
14500 'required': ['location',
14501 'caveatId',
14502 'verificationId'],
14503 'type': 'object'},
14504 'packet': {'additionalProperties': False,
14505 'properties': {'headerLen': {'type': 'integer'},
14506 'start': {'type': 'integer'},
14507 'totalLen': {'type': 'integer'}},
14508 'required': ['start', 'totalLen', 'headerLen'],
14509 'type': 'object'}},
14510 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14511 'Result': {'$ref': '#/definitions/ErrorResults'}},
14512 'type': 'object'},
14513 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14514 'Result': {'$ref': '#/definitions/RebootActionResults'}},
14515 'type': 'object'},
14516 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14517 'Result': {'$ref': '#/definitions/ErrorResults'}},
14518 'type': 'object'},
14519 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14520 'type': 'object'}},
14521 'type': 'object'}
14522
14523
14524 @ReturnMapping(ErrorResults)
14525 async def ClearReboot(self, entities):
14526 '''
14527 entities : typing.Sequence[~Entity]
14528 Returns -> typing.Sequence[~ErrorResult]
14529 '''
14530 # map input types to rpc msg
14531 params = dict()
14532 msg = dict(Type='Reboot', Request='ClearReboot', Version=2, Params=params)
14533 params['Entities'] = entities
14534 reply = await self.rpc(msg)
14535 return reply
14536
14537
14538
14539 @ReturnMapping(RebootActionResults)
14540 async def GetRebootAction(self, entities):
14541 '''
14542 entities : typing.Sequence[~Entity]
14543 Returns -> typing.Sequence[~RebootActionResult]
14544 '''
14545 # map input types to rpc msg
14546 params = dict()
14547 msg = dict(Type='Reboot', Request='GetRebootAction', Version=2, Params=params)
14548 params['Entities'] = entities
14549 reply = await self.rpc(msg)
14550 return reply
14551
14552
14553
14554 @ReturnMapping(ErrorResults)
14555 async def RequestReboot(self, entities):
14556 '''
14557 entities : typing.Sequence[~Entity]
14558 Returns -> typing.Sequence[~ErrorResult]
14559 '''
14560 # map input types to rpc msg
14561 params = dict()
14562 msg = dict(Type='Reboot', Request='RequestReboot', Version=2, Params=params)
14563 params['Entities'] = entities
14564 reply = await self.rpc(msg)
14565 return reply
14566
14567
14568
14569 @ReturnMapping(NotifyWatchResult)
14570 async def WatchForRebootEvent(self):
14571 '''
14572
14573 Returns -> typing.Union[_ForwardRef('Error'), str]
14574 '''
14575 # map input types to rpc msg
14576 params = dict()
14577 msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params)
14578
14579 reply = await self.rpc(msg)
14580 return reply
14581
14582
14583 class RelationUnitsWatcher(Type):
14584 name = 'RelationUnitsWatcher'
14585 version = 1
14586 schema = {'definitions': {'Error': {'additionalProperties': False,
14587 'properties': {'Code': {'type': 'string'},
14588 'Info': {'$ref': '#/definitions/ErrorInfo'},
14589 'Message': {'type': 'string'}},
14590 'required': ['Message', 'Code'],
14591 'type': 'object'},
14592 'ErrorInfo': {'additionalProperties': False,
14593 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14594 'MacaroonPath': {'type': 'string'}},
14595 'type': 'object'},
14596 'Macaroon': {'additionalProperties': False,
14597 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14598 'type': 'array'},
14599 'data': {'items': {'type': 'integer'},
14600 'type': 'array'},
14601 'id': {'$ref': '#/definitions/packet'},
14602 'location': {'$ref': '#/definitions/packet'},
14603 'sig': {'items': {'type': 'integer'},
14604 'type': 'array'}},
14605 'required': ['data',
14606 'location',
14607 'id',
14608 'caveats',
14609 'sig'],
14610 'type': 'object'},
14611 'RelationUnitsChange': {'additionalProperties': False,
14612 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
14613 'type': 'object'},
14614 'Departed': {'items': {'type': 'string'},
14615 'type': 'array'}},
14616 'required': ['Changed', 'Departed'],
14617 'type': 'object'},
14618 'RelationUnitsWatchResult': {'additionalProperties': False,
14619 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
14620 'Error': {'$ref': '#/definitions/Error'},
14621 'RelationUnitsWatcherId': {'type': 'string'}},
14622 'required': ['RelationUnitsWatcherId',
14623 'Changes',
14624 'Error'],
14625 'type': 'object'},
14626 'UnitSettings': {'additionalProperties': False,
14627 'properties': {'Version': {'type': 'integer'}},
14628 'required': ['Version'],
14629 'type': 'object'},
14630 'caveat': {'additionalProperties': False,
14631 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14632 'location': {'$ref': '#/definitions/packet'},
14633 'verificationId': {'$ref': '#/definitions/packet'}},
14634 'required': ['location',
14635 'caveatId',
14636 'verificationId'],
14637 'type': 'object'},
14638 'packet': {'additionalProperties': False,
14639 'properties': {'headerLen': {'type': 'integer'},
14640 'start': {'type': 'integer'},
14641 'totalLen': {'type': 'integer'}},
14642 'required': ['start', 'totalLen', 'headerLen'],
14643 'type': 'object'}},
14644 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
14645 'type': 'object'},
14646 'Stop': {'type': 'object'}},
14647 'type': 'object'}
14648
14649
14650 @ReturnMapping(RelationUnitsWatchResult)
14651 async def Next(self):
14652 '''
14653
14654 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
14655 '''
14656 # map input types to rpc msg
14657 params = dict()
14658 msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params)
14659
14660 reply = await self.rpc(msg)
14661 return reply
14662
14663
14664
14665 @ReturnMapping(None)
14666 async def Stop(self):
14667 '''
14668
14669 Returns -> None
14670 '''
14671 # map input types to rpc msg
14672 params = dict()
14673 msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params)
14674
14675 reply = await self.rpc(msg)
14676 return reply
14677
14678
14679 class Resumer(Type):
14680 name = 'Resumer'
14681 version = 2
14682 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
14683
14684
14685 @ReturnMapping(None)
14686 async def ResumeTransactions(self):
14687 '''
14688
14689 Returns -> None
14690 '''
14691 # map input types to rpc msg
14692 params = dict()
14693 msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params)
14694
14695 reply = await self.rpc(msg)
14696 return reply
14697
14698
14699 class RetryStrategy(Type):
14700 name = 'RetryStrategy'
14701 version = 1
14702 schema = {'definitions': {'Entities': {'additionalProperties': False,
14703 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14704 'type': 'array'}},
14705 'required': ['Entities'],
14706 'type': 'object'},
14707 'Entity': {'additionalProperties': False,
14708 'properties': {'Tag': {'type': 'string'}},
14709 'required': ['Tag'],
14710 'type': 'object'},
14711 'Error': {'additionalProperties': False,
14712 'properties': {'Code': {'type': 'string'},
14713 'Info': {'$ref': '#/definitions/ErrorInfo'},
14714 'Message': {'type': 'string'}},
14715 'required': ['Message', 'Code'],
14716 'type': 'object'},
14717 'ErrorInfo': {'additionalProperties': False,
14718 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14719 'MacaroonPath': {'type': 'string'}},
14720 'type': 'object'},
14721 'Macaroon': {'additionalProperties': False,
14722 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14723 'type': 'array'},
14724 'data': {'items': {'type': 'integer'},
14725 'type': 'array'},
14726 'id': {'$ref': '#/definitions/packet'},
14727 'location': {'$ref': '#/definitions/packet'},
14728 'sig': {'items': {'type': 'integer'},
14729 'type': 'array'}},
14730 'required': ['data',
14731 'location',
14732 'id',
14733 'caveats',
14734 'sig'],
14735 'type': 'object'},
14736 'NotifyWatchResult': {'additionalProperties': False,
14737 'properties': {'Error': {'$ref': '#/definitions/Error'},
14738 'NotifyWatcherId': {'type': 'string'}},
14739 'required': ['NotifyWatcherId', 'Error'],
14740 'type': 'object'},
14741 'NotifyWatchResults': {'additionalProperties': False,
14742 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14743 'type': 'array'}},
14744 'required': ['Results'],
14745 'type': 'object'},
14746 'RetryStrategy': {'additionalProperties': False,
14747 'properties': {'JitterRetryTime': {'type': 'boolean'},
14748 'MaxRetryTime': {'type': 'integer'},
14749 'MinRetryTime': {'type': 'integer'},
14750 'RetryTimeFactor': {'type': 'integer'},
14751 'ShouldRetry': {'type': 'boolean'}},
14752 'required': ['ShouldRetry',
14753 'MinRetryTime',
14754 'MaxRetryTime',
14755 'JitterRetryTime',
14756 'RetryTimeFactor'],
14757 'type': 'object'},
14758 'RetryStrategyResult': {'additionalProperties': False,
14759 'properties': {'Error': {'$ref': '#/definitions/Error'},
14760 'Result': {'$ref': '#/definitions/RetryStrategy'}},
14761 'required': ['Error', 'Result'],
14762 'type': 'object'},
14763 'RetryStrategyResults': {'additionalProperties': False,
14764 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
14765 'type': 'array'}},
14766 'required': ['Results'],
14767 'type': 'object'},
14768 'caveat': {'additionalProperties': False,
14769 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14770 'location': {'$ref': '#/definitions/packet'},
14771 'verificationId': {'$ref': '#/definitions/packet'}},
14772 'required': ['location',
14773 'caveatId',
14774 'verificationId'],
14775 'type': 'object'},
14776 'packet': {'additionalProperties': False,
14777 'properties': {'headerLen': {'type': 'integer'},
14778 'start': {'type': 'integer'},
14779 'totalLen': {'type': 'integer'}},
14780 'required': ['start', 'totalLen', 'headerLen'],
14781 'type': 'object'}},
14782 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14783 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
14784 'type': 'object'},
14785 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14786 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14787 'type': 'object'}},
14788 'type': 'object'}
14789
14790
14791 @ReturnMapping(RetryStrategyResults)
14792 async def RetryStrategy(self, entities):
14793 '''
14794 entities : typing.Sequence[~Entity]
14795 Returns -> typing.Sequence[~RetryStrategyResult]
14796 '''
14797 # map input types to rpc msg
14798 params = dict()
14799 msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params)
14800 params['Entities'] = entities
14801 reply = await self.rpc(msg)
14802 return reply
14803
14804
14805
14806 @ReturnMapping(NotifyWatchResults)
14807 async def WatchRetryStrategy(self, entities):
14808 '''
14809 entities : typing.Sequence[~Entity]
14810 Returns -> typing.Sequence[~NotifyWatchResult]
14811 '''
14812 # map input types to rpc msg
14813 params = dict()
14814 msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, Params=params)
14815 params['Entities'] = entities
14816 reply = await self.rpc(msg)
14817 return reply
14818
14819
14820 class SSHClient(Type):
14821 name = 'SSHClient'
14822 version = 1
14823 schema = {'definitions': {'Entities': {'additionalProperties': False,
14824 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14825 'type': 'array'}},
14826 'required': ['Entities'],
14827 'type': 'object'},
14828 'Entity': {'additionalProperties': False,
14829 'properties': {'Tag': {'type': 'string'}},
14830 'required': ['Tag'],
14831 'type': 'object'},
14832 'Error': {'additionalProperties': False,
14833 'properties': {'Code': {'type': 'string'},
14834 'Info': {'$ref': '#/definitions/ErrorInfo'},
14835 'Message': {'type': 'string'}},
14836 'required': ['Message', 'Code'],
14837 'type': 'object'},
14838 'ErrorInfo': {'additionalProperties': False,
14839 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14840 'MacaroonPath': {'type': 'string'}},
14841 'type': 'object'},
14842 'Macaroon': {'additionalProperties': False,
14843 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14844 'type': 'array'},
14845 'data': {'items': {'type': 'integer'},
14846 'type': 'array'},
14847 'id': {'$ref': '#/definitions/packet'},
14848 'location': {'$ref': '#/definitions/packet'},
14849 'sig': {'items': {'type': 'integer'},
14850 'type': 'array'}},
14851 'required': ['data',
14852 'location',
14853 'id',
14854 'caveats',
14855 'sig'],
14856 'type': 'object'},
14857 'SSHAddressResult': {'additionalProperties': False,
14858 'properties': {'address': {'type': 'string'},
14859 'error': {'$ref': '#/definitions/Error'}},
14860 'type': 'object'},
14861 'SSHAddressResults': {'additionalProperties': False,
14862 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
14863 'type': 'array'}},
14864 'required': ['results'],
14865 'type': 'object'},
14866 'SSHProxyResult': {'additionalProperties': False,
14867 'properties': {'use-proxy': {'type': 'boolean'}},
14868 'required': ['use-proxy'],
14869 'type': 'object'},
14870 'SSHPublicKeysResult': {'additionalProperties': False,
14871 'properties': {'error': {'$ref': '#/definitions/Error'},
14872 'public-keys': {'items': {'type': 'string'},
14873 'type': 'array'}},
14874 'type': 'object'},
14875 'SSHPublicKeysResults': {'additionalProperties': False,
14876 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
14877 'type': 'array'}},
14878 'required': ['results'],
14879 'type': 'object'},
14880 'caveat': {'additionalProperties': False,
14881 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14882 'location': {'$ref': '#/definitions/packet'},
14883 'verificationId': {'$ref': '#/definitions/packet'}},
14884 'required': ['location',
14885 'caveatId',
14886 'verificationId'],
14887 'type': 'object'},
14888 'packet': {'additionalProperties': False,
14889 'properties': {'headerLen': {'type': 'integer'},
14890 'start': {'type': 'integer'},
14891 'totalLen': {'type': 'integer'}},
14892 'required': ['start', 'totalLen', 'headerLen'],
14893 'type': 'object'}},
14894 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14895 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
14896 'type': 'object'},
14897 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
14898 'type': 'object'},
14899 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14900 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
14901 'type': 'object'},
14902 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14903 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
14904 'type': 'object'}},
14905 'type': 'object'}
14906
14907
14908 @ReturnMapping(SSHAddressResults)
14909 async def PrivateAddress(self, entities):
14910 '''
14911 entities : typing.Sequence[~Entity]
14912 Returns -> typing.Sequence[~SSHAddressResult]
14913 '''
14914 # map input types to rpc msg
14915 params = dict()
14916 msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params)
14917 params['Entities'] = entities
14918 reply = await self.rpc(msg)
14919 return reply
14920
14921
14922
14923 @ReturnMapping(SSHProxyResult)
14924 async def Proxy(self):
14925 '''
14926
14927 Returns -> bool
14928 '''
14929 # map input types to rpc msg
14930 params = dict()
14931 msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params)
14932
14933 reply = await self.rpc(msg)
14934 return reply
14935
14936
14937
14938 @ReturnMapping(SSHAddressResults)
14939 async def PublicAddress(self, entities):
14940 '''
14941 entities : typing.Sequence[~Entity]
14942 Returns -> typing.Sequence[~SSHAddressResult]
14943 '''
14944 # map input types to rpc msg
14945 params = dict()
14946 msg = dict(Type='SSHClient', Request='PublicAddress', Version=1, Params=params)
14947 params['Entities'] = entities
14948 reply = await self.rpc(msg)
14949 return reply
14950
14951
14952
14953 @ReturnMapping(SSHPublicKeysResults)
14954 async def PublicKeys(self, entities):
14955 '''
14956 entities : typing.Sequence[~Entity]
14957 Returns -> typing.Sequence[~SSHPublicKeysResult]
14958 '''
14959 # map input types to rpc msg
14960 params = dict()
14961 msg = dict(Type='SSHClient', Request='PublicKeys', Version=1, Params=params)
14962 params['Entities'] = entities
14963 reply = await self.rpc(msg)
14964 return reply
14965
14966
14967 class Service(Type):
14968 name = 'Service'
14969 version = 3
14970 schema = {'definitions': {'AddRelation': {'additionalProperties': False,
14971 'properties': {'Endpoints': {'items': {'type': 'string'},
14972 'type': 'array'}},
14973 'required': ['Endpoints'],
14974 'type': 'object'},
14975 'AddRelationResults': {'additionalProperties': False,
14976 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
14977 'type': 'object'}},
14978 'required': ['Endpoints'],
14979 'type': 'object'},
14980 'AddServiceUnits': {'additionalProperties': False,
14981 'properties': {'NumUnits': {'type': 'integer'},
14982 'Placement': {'items': {'$ref': '#/definitions/Placement'},
14983 'type': 'array'},
14984 'ServiceName': {'type': 'string'}},
14985 'required': ['ServiceName',
14986 'NumUnits',
14987 'Placement'],
14988 'type': 'object'},
14989 'AddServiceUnitsResults': {'additionalProperties': False,
14990 'properties': {'Units': {'items': {'type': 'string'},
14991 'type': 'array'}},
14992 'required': ['Units'],
14993 'type': 'object'},
14994 'Constraints': {'additionalProperties': False,
14995 'properties': {'Count': {'type': 'integer'},
14996 'Pool': {'type': 'string'},
14997 'Size': {'type': 'integer'}},
14998 'required': ['Pool', 'Size', 'Count'],
14999 'type': 'object'},
15000 'DestroyRelation': {'additionalProperties': False,
15001 'properties': {'Endpoints': {'items': {'type': 'string'},
15002 'type': 'array'}},
15003 'required': ['Endpoints'],
15004 'type': 'object'},
15005 'DestroyServiceUnits': {'additionalProperties': False,
15006 'properties': {'UnitNames': {'items': {'type': 'string'},
15007 'type': 'array'}},
15008 'required': ['UnitNames'],
15009 'type': 'object'},
15010 'Error': {'additionalProperties': False,
15011 'properties': {'Code': {'type': 'string'},
15012 'Info': {'$ref': '#/definitions/ErrorInfo'},
15013 'Message': {'type': 'string'}},
15014 'required': ['Message', 'Code'],
15015 'type': 'object'},
15016 'ErrorInfo': {'additionalProperties': False,
15017 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15018 'MacaroonPath': {'type': 'string'}},
15019 'type': 'object'},
15020 'ErrorResult': {'additionalProperties': False,
15021 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15022 'required': ['Error'],
15023 'type': 'object'},
15024 'ErrorResults': {'additionalProperties': False,
15025 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15026 'type': 'array'}},
15027 'required': ['Results'],
15028 'type': 'object'},
15029 'GetConstraintsResults': {'additionalProperties': False,
15030 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
15031 'required': ['Constraints'],
15032 'type': 'object'},
15033 'GetServiceConstraints': {'additionalProperties': False,
15034 'properties': {'ServiceName': {'type': 'string'}},
15035 'required': ['ServiceName'],
15036 'type': 'object'},
15037 'Macaroon': {'additionalProperties': False,
15038 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15039 'type': 'array'},
15040 'data': {'items': {'type': 'integer'},
15041 'type': 'array'},
15042 'id': {'$ref': '#/definitions/packet'},
15043 'location': {'$ref': '#/definitions/packet'},
15044 'sig': {'items': {'type': 'integer'},
15045 'type': 'array'}},
15046 'required': ['data',
15047 'location',
15048 'id',
15049 'caveats',
15050 'sig'],
15051 'type': 'object'},
15052 'Placement': {'additionalProperties': False,
15053 'properties': {'Directive': {'type': 'string'},
15054 'Scope': {'type': 'string'}},
15055 'required': ['Scope', 'Directive'],
15056 'type': 'object'},
15057 'Relation': {'additionalProperties': False,
15058 'properties': {'Interface': {'type': 'string'},
15059 'Limit': {'type': 'integer'},
15060 'Name': {'type': 'string'},
15061 'Optional': {'type': 'boolean'},
15062 'Role': {'type': 'string'},
15063 'Scope': {'type': 'string'}},
15064 'required': ['Name',
15065 'Role',
15066 'Interface',
15067 'Optional',
15068 'Limit',
15069 'Scope'],
15070 'type': 'object'},
15071 'ServiceCharmRelations': {'additionalProperties': False,
15072 'properties': {'ServiceName': {'type': 'string'}},
15073 'required': ['ServiceName'],
15074 'type': 'object'},
15075 'ServiceCharmRelationsResults': {'additionalProperties': False,
15076 'properties': {'CharmRelations': {'items': {'type': 'string'},
15077 'type': 'array'}},
15078 'required': ['CharmRelations'],
15079 'type': 'object'},
15080 'ServiceDeploy': {'additionalProperties': False,
15081 'properties': {'Channel': {'type': 'string'},
15082 'CharmUrl': {'type': 'string'},
15083 'Config': {'patternProperties': {'.*': {'type': 'string'}},
15084 'type': 'object'},
15085 'ConfigYAML': {'type': 'string'},
15086 'Constraints': {'$ref': '#/definitions/Value'},
15087 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
15088 'type': 'object'},
15089 'NumUnits': {'type': 'integer'},
15090 'Placement': {'items': {'$ref': '#/definitions/Placement'},
15091 'type': 'array'},
15092 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
15093 'type': 'object'},
15094 'Series': {'type': 'string'},
15095 'ServiceName': {'type': 'string'},
15096 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
15097 'type': 'object'}},
15098 'required': ['ServiceName',
15099 'Series',
15100 'CharmUrl',
15101 'Channel',
15102 'NumUnits',
15103 'Config',
15104 'ConfigYAML',
15105 'Constraints',
15106 'Placement',
15107 'Storage',
15108 'EndpointBindings',
15109 'Resources'],
15110 'type': 'object'},
15111 'ServiceDestroy': {'additionalProperties': False,
15112 'properties': {'ServiceName': {'type': 'string'}},
15113 'required': ['ServiceName'],
15114 'type': 'object'},
15115 'ServiceExpose': {'additionalProperties': False,
15116 'properties': {'ServiceName': {'type': 'string'}},
15117 'required': ['ServiceName'],
15118 'type': 'object'},
15119 'ServiceGet': {'additionalProperties': False,
15120 'properties': {'ServiceName': {'type': 'string'}},
15121 'required': ['ServiceName'],
15122 'type': 'object'},
15123 'ServiceGetResults': {'additionalProperties': False,
15124 'properties': {'Charm': {'type': 'string'},
15125 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15126 'type': 'object'}},
15127 'type': 'object'},
15128 'Constraints': {'$ref': '#/definitions/Value'},
15129 'Service': {'type': 'string'}},
15130 'required': ['Service',
15131 'Charm',
15132 'Config',
15133 'Constraints'],
15134 'type': 'object'},
15135 'ServiceMetricCredential': {'additionalProperties': False,
15136 'properties': {'MetricCredentials': {'items': {'type': 'integer'},
15137 'type': 'array'},
15138 'ServiceName': {'type': 'string'}},
15139 'required': ['ServiceName',
15140 'MetricCredentials'],
15141 'type': 'object'},
15142 'ServiceMetricCredentials': {'additionalProperties': False,
15143 'properties': {'Creds': {'items': {'$ref': '#/definitions/ServiceMetricCredential'},
15144 'type': 'array'}},
15145 'required': ['Creds'],
15146 'type': 'object'},
15147 'ServiceSet': {'additionalProperties': False,
15148 'properties': {'Options': {'patternProperties': {'.*': {'type': 'string'}},
15149 'type': 'object'},
15150 'ServiceName': {'type': 'string'}},
15151 'required': ['ServiceName', 'Options'],
15152 'type': 'object'},
15153 'ServiceSetCharm': {'additionalProperties': False,
15154 'properties': {'charmurl': {'type': 'string'},
15155 'cs-channel': {'type': 'string'},
15156 'forceseries': {'type': 'boolean'},
15157 'forceunits': {'type': 'boolean'},
15158 'resourceids': {'patternProperties': {'.*': {'type': 'string'}},
15159 'type': 'object'},
15160 'servicename': {'type': 'string'}},
15161 'required': ['servicename',
15162 'charmurl',
15163 'cs-channel',
15164 'forceunits',
15165 'forceseries',
15166 'resourceids'],
15167 'type': 'object'},
15168 'ServiceUnexpose': {'additionalProperties': False,
15169 'properties': {'ServiceName': {'type': 'string'}},
15170 'required': ['ServiceName'],
15171 'type': 'object'},
15172 'ServiceUnset': {'additionalProperties': False,
15173 'properties': {'Options': {'items': {'type': 'string'},
15174 'type': 'array'},
15175 'ServiceName': {'type': 'string'}},
15176 'required': ['ServiceName', 'Options'],
15177 'type': 'object'},
15178 'ServiceUpdate': {'additionalProperties': False,
15179 'properties': {'CharmUrl': {'type': 'string'},
15180 'Constraints': {'$ref': '#/definitions/Value'},
15181 'ForceCharmUrl': {'type': 'boolean'},
15182 'ForceSeries': {'type': 'boolean'},
15183 'MinUnits': {'type': 'integer'},
15184 'ServiceName': {'type': 'string'},
15185 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}},
15186 'type': 'object'},
15187 'SettingsYAML': {'type': 'string'}},
15188 'required': ['ServiceName',
15189 'CharmUrl',
15190 'ForceCharmUrl',
15191 'ForceSeries',
15192 'MinUnits',
15193 'SettingsStrings',
15194 'SettingsYAML',
15195 'Constraints'],
15196 'type': 'object'},
15197 'ServicesDeploy': {'additionalProperties': False,
15198 'properties': {'Services': {'items': {'$ref': '#/definitions/ServiceDeploy'},
15199 'type': 'array'}},
15200 'required': ['Services'],
15201 'type': 'object'},
15202 'SetConstraints': {'additionalProperties': False,
15203 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
15204 'ServiceName': {'type': 'string'}},
15205 'required': ['ServiceName', 'Constraints'],
15206 'type': 'object'},
15207 'StringResult': {'additionalProperties': False,
15208 'properties': {'Error': {'$ref': '#/definitions/Error'},
15209 'Result': {'type': 'string'}},
15210 'required': ['Error', 'Result'],
15211 'type': 'object'},
15212 'Value': {'additionalProperties': False,
15213 'properties': {'arch': {'type': 'string'},
15214 'container': {'type': 'string'},
15215 'cpu-cores': {'type': 'integer'},
15216 'cpu-power': {'type': 'integer'},
15217 'instance-type': {'type': 'string'},
15218 'mem': {'type': 'integer'},
15219 'root-disk': {'type': 'integer'},
15220 'spaces': {'items': {'type': 'string'},
15221 'type': 'array'},
15222 'tags': {'items': {'type': 'string'},
15223 'type': 'array'},
15224 'virt-type': {'type': 'string'}},
15225 'type': 'object'},
15226 'caveat': {'additionalProperties': False,
15227 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15228 'location': {'$ref': '#/definitions/packet'},
15229 'verificationId': {'$ref': '#/definitions/packet'}},
15230 'required': ['location',
15231 'caveatId',
15232 'verificationId'],
15233 'type': 'object'},
15234 'packet': {'additionalProperties': False,
15235 'properties': {'headerLen': {'type': 'integer'},
15236 'start': {'type': 'integer'},
15237 'totalLen': {'type': 'integer'}},
15238 'required': ['start', 'totalLen', 'headerLen'],
15239 'type': 'object'}},
15240 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
15241 'Result': {'$ref': '#/definitions/AddRelationResults'}},
15242 'type': 'object'},
15243 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddServiceUnits'},
15244 'Result': {'$ref': '#/definitions/AddServiceUnitsResults'}},
15245 'type': 'object'},
15246 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ServiceCharmRelations'},
15247 'Result': {'$ref': '#/definitions/ServiceCharmRelationsResults'}},
15248 'type': 'object'},
15249 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ServicesDeploy'},
15250 'Result': {'$ref': '#/definitions/ErrorResults'}},
15251 'type': 'object'},
15252 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ServiceDestroy'}},
15253 'type': 'object'},
15254 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
15255 'type': 'object'},
15256 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyServiceUnits'}},
15257 'type': 'object'},
15258 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ServiceExpose'}},
15259 'type': 'object'},
15260 'Get': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
15261 'Result': {'$ref': '#/definitions/ServiceGetResults'}},
15262 'type': 'object'},
15263 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
15264 'Result': {'$ref': '#/definitions/StringResult'}},
15265 'type': 'object'},
15266 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetServiceConstraints'},
15267 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
15268 'type': 'object'},
15269 'Set': {'properties': {'Params': {'$ref': '#/definitions/ServiceSet'}},
15270 'type': 'object'},
15271 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ServiceSetCharm'}},
15272 'type': 'object'},
15273 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
15274 'type': 'object'},
15275 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ServiceMetricCredentials'},
15276 'Result': {'$ref': '#/definitions/ErrorResults'}},
15277 'type': 'object'},
15278 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnexpose'}},
15279 'type': 'object'},
15280 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnset'}},
15281 'type': 'object'},
15282 'Update': {'properties': {'Params': {'$ref': '#/definitions/ServiceUpdate'}},
15283 'type': 'object'}},
15284 'type': 'object'}
15285
15286
15287 @ReturnMapping(AddRelationResults)
15288 async def AddRelation(self, endpoints):
15289 '''
15290 endpoints : typing.Sequence[str]
15291 Returns -> typing.Mapping[str, ~Relation]
15292 '''
15293 # map input types to rpc msg
15294 params = dict()
15295 msg = dict(Type='Service', Request='AddRelation', Version=3, Params=params)
15296 params['Endpoints'] = endpoints
15297 reply = await self.rpc(msg)
15298 return reply
15299
15300
15301
15302 @ReturnMapping(AddServiceUnitsResults)
15303 async def AddUnits(self, numunits, placement, servicename):
15304 '''
15305 numunits : int
15306 placement : typing.Sequence[~Placement]
15307 servicename : str
15308 Returns -> typing.Sequence[str]
15309 '''
15310 # map input types to rpc msg
15311 params = dict()
15312 msg = dict(Type='Service', Request='AddUnits', Version=3, Params=params)
15313 params['NumUnits'] = numunits
15314 params['Placement'] = placement
15315 params['ServiceName'] = servicename
15316 reply = await self.rpc(msg)
15317 return reply
15318
15319
15320
15321 @ReturnMapping(ServiceCharmRelationsResults)
15322 async def CharmRelations(self, servicename):
15323 '''
15324 servicename : str
15325 Returns -> typing.Sequence[str]
15326 '''
15327 # map input types to rpc msg
15328 params = dict()
15329 msg = dict(Type='Service', Request='CharmRelations', Version=3, Params=params)
15330 params['ServiceName'] = servicename
15331 reply = await self.rpc(msg)
15332 return reply
15333
15334
15335
15336 @ReturnMapping(ErrorResults)
15337 async def Deploy(self, services):
15338 '''
15339 services : typing.Sequence[~ServiceDeploy]
15340 Returns -> typing.Sequence[~ErrorResult]
15341 '''
15342 # map input types to rpc msg
15343 params = dict()
15344 msg = dict(Type='Service', Request='Deploy', Version=3, Params=params)
15345 params['Services'] = services
15346 reply = await self.rpc(msg)
15347 return reply
15348
15349
15350
15351 @ReturnMapping(None)
15352 async def Destroy(self, servicename):
15353 '''
15354 servicename : str
15355 Returns -> None
15356 '''
15357 # map input types to rpc msg
15358 params = dict()
15359 msg = dict(Type='Service', Request='Destroy', Version=3, Params=params)
15360 params['ServiceName'] = servicename
15361 reply = await self.rpc(msg)
15362 return reply
15363
15364
15365
15366 @ReturnMapping(None)
15367 async def DestroyRelation(self, endpoints):
15368 '''
15369 endpoints : typing.Sequence[str]
15370 Returns -> None
15371 '''
15372 # map input types to rpc msg
15373 params = dict()
15374 msg = dict(Type='Service', Request='DestroyRelation', Version=3, Params=params)
15375 params['Endpoints'] = endpoints
15376 reply = await self.rpc(msg)
15377 return reply
15378
15379
15380
15381 @ReturnMapping(None)
15382 async def DestroyUnits(self, unitnames):
15383 '''
15384 unitnames : typing.Sequence[str]
15385 Returns -> None
15386 '''
15387 # map input types to rpc msg
15388 params = dict()
15389 msg = dict(Type='Service', Request='DestroyUnits', Version=3, Params=params)
15390 params['UnitNames'] = unitnames
15391 reply = await self.rpc(msg)
15392 return reply
15393
15394
15395
15396 @ReturnMapping(None)
15397 async def Expose(self, servicename):
15398 '''
15399 servicename : str
15400 Returns -> None
15401 '''
15402 # map input types to rpc msg
15403 params = dict()
15404 msg = dict(Type='Service', Request='Expose', Version=3, Params=params)
15405 params['ServiceName'] = servicename
15406 reply = await self.rpc(msg)
15407 return reply
15408
15409
15410
15411 @ReturnMapping(ServiceGetResults)
15412 async def Get(self, servicename):
15413 '''
15414 servicename : str
15415 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
15416 '''
15417 # map input types to rpc msg
15418 params = dict()
15419 msg = dict(Type='Service', Request='Get', Version=3, Params=params)
15420 params['ServiceName'] = servicename
15421 reply = await self.rpc(msg)
15422 return reply
15423
15424
15425
15426 @ReturnMapping(StringResult)
15427 async def GetCharmURL(self, servicename):
15428 '''
15429 servicename : str
15430 Returns -> typing.Union[_ForwardRef('Error'), str]
15431 '''
15432 # map input types to rpc msg
15433 params = dict()
15434 msg = dict(Type='Service', Request='GetCharmURL', Version=3, Params=params)
15435 params['ServiceName'] = servicename
15436 reply = await self.rpc(msg)
15437 return reply
15438
15439
15440
15441 @ReturnMapping(GetConstraintsResults)
15442 async def GetConstraints(self, servicename):
15443 '''
15444 servicename : str
15445 Returns -> Value
15446 '''
15447 # map input types to rpc msg
15448 params = dict()
15449 msg = dict(Type='Service', Request='GetConstraints', Version=3, Params=params)
15450 params['ServiceName'] = servicename
15451 reply = await self.rpc(msg)
15452 return reply
15453
15454
15455
15456 @ReturnMapping(None)
15457 async def Set(self, options, servicename):
15458 '''
15459 options : typing.Mapping[str, str]
15460 servicename : str
15461 Returns -> None
15462 '''
15463 # map input types to rpc msg
15464 params = dict()
15465 msg = dict(Type='Service', Request='Set', Version=3, Params=params)
15466 params['Options'] = options
15467 params['ServiceName'] = servicename
15468 reply = await self.rpc(msg)
15469 return reply
15470
15471
15472
15473 @ReturnMapping(None)
15474 async def SetCharm(self, charmurl, cs_channel, forceseries, forceunits, resourceids, servicename):
15475 '''
15476 charmurl : str
15477 cs_channel : str
15478 forceseries : bool
15479 forceunits : bool
15480 resourceids : typing.Mapping[str, str]
15481 servicename : str
15482 Returns -> None
15483 '''
15484 # map input types to rpc msg
15485 params = dict()
15486 msg = dict(Type='Service', Request='SetCharm', Version=3, Params=params)
15487 params['charmurl'] = charmurl
15488 params['cs-channel'] = cs_channel
15489 params['forceseries'] = forceseries
15490 params['forceunits'] = forceunits
15491 params['resourceids'] = resourceids
15492 params['servicename'] = servicename
15493 reply = await self.rpc(msg)
15494 return reply
15495
15496
15497
15498 @ReturnMapping(None)
15499 async def SetConstraints(self, constraints, servicename):
15500 '''
15501 constraints : Value
15502 servicename : str
15503 Returns -> None
15504 '''
15505 # map input types to rpc msg
15506 params = dict()
15507 msg = dict(Type='Service', Request='SetConstraints', Version=3, Params=params)
15508 params['Constraints'] = constraints
15509 params['ServiceName'] = servicename
15510 reply = await self.rpc(msg)
15511 return reply
15512
15513
15514
15515 @ReturnMapping(ErrorResults)
15516 async def SetMetricCredentials(self, creds):
15517 '''
15518 creds : typing.Sequence[~ServiceMetricCredential]
15519 Returns -> typing.Sequence[~ErrorResult]
15520 '''
15521 # map input types to rpc msg
15522 params = dict()
15523 msg = dict(Type='Service', Request='SetMetricCredentials', Version=3, Params=params)
15524 params['Creds'] = creds
15525 reply = await self.rpc(msg)
15526 return reply
15527
15528
15529
15530 @ReturnMapping(None)
15531 async def Unexpose(self, servicename):
15532 '''
15533 servicename : str
15534 Returns -> None
15535 '''
15536 # map input types to rpc msg
15537 params = dict()
15538 msg = dict(Type='Service', Request='Unexpose', Version=3, Params=params)
15539 params['ServiceName'] = servicename
15540 reply = await self.rpc(msg)
15541 return reply
15542
15543
15544
15545 @ReturnMapping(None)
15546 async def Unset(self, options, servicename):
15547 '''
15548 options : typing.Sequence[str]
15549 servicename : str
15550 Returns -> None
15551 '''
15552 # map input types to rpc msg
15553 params = dict()
15554 msg = dict(Type='Service', Request='Unset', Version=3, Params=params)
15555 params['Options'] = options
15556 params['ServiceName'] = servicename
15557 reply = await self.rpc(msg)
15558 return reply
15559
15560
15561
15562 @ReturnMapping(None)
15563 async def Update(self, charmurl, constraints, forcecharmurl, forceseries, minunits, servicename, settingsstrings, settingsyaml):
15564 '''
15565 charmurl : str
15566 constraints : Value
15567 forcecharmurl : bool
15568 forceseries : bool
15569 minunits : int
15570 servicename : str
15571 settingsstrings : typing.Mapping[str, str]
15572 settingsyaml : str
15573 Returns -> None
15574 '''
15575 # map input types to rpc msg
15576 params = dict()
15577 msg = dict(Type='Service', Request='Update', Version=3, Params=params)
15578 params['CharmUrl'] = charmurl
15579 params['Constraints'] = constraints
15580 params['ForceCharmUrl'] = forcecharmurl
15581 params['ForceSeries'] = forceseries
15582 params['MinUnits'] = minunits
15583 params['ServiceName'] = servicename
15584 params['SettingsStrings'] = settingsstrings
15585 params['SettingsYAML'] = settingsyaml
15586 reply = await self.rpc(msg)
15587 return reply
15588
15589
15590 class ServiceScaler(Type):
15591 name = 'ServiceScaler'
15592 version = 1
15593 schema = {'definitions': {'Entities': {'additionalProperties': False,
15594 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15595 'type': 'array'}},
15596 'required': ['Entities'],
15597 'type': 'object'},
15598 'Entity': {'additionalProperties': False,
15599 'properties': {'Tag': {'type': 'string'}},
15600 'required': ['Tag'],
15601 'type': 'object'},
15602 'Error': {'additionalProperties': False,
15603 'properties': {'Code': {'type': 'string'},
15604 'Info': {'$ref': '#/definitions/ErrorInfo'},
15605 'Message': {'type': 'string'}},
15606 'required': ['Message', 'Code'],
15607 'type': 'object'},
15608 'ErrorInfo': {'additionalProperties': False,
15609 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15610 'MacaroonPath': {'type': 'string'}},
15611 'type': 'object'},
15612 'ErrorResult': {'additionalProperties': False,
15613 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15614 'required': ['Error'],
15615 'type': 'object'},
15616 'ErrorResults': {'additionalProperties': False,
15617 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15618 'type': 'array'}},
15619 'required': ['Results'],
15620 'type': 'object'},
15621 'Macaroon': {'additionalProperties': False,
15622 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15623 'type': 'array'},
15624 'data': {'items': {'type': 'integer'},
15625 'type': 'array'},
15626 'id': {'$ref': '#/definitions/packet'},
15627 'location': {'$ref': '#/definitions/packet'},
15628 'sig': {'items': {'type': 'integer'},
15629 'type': 'array'}},
15630 'required': ['data',
15631 'location',
15632 'id',
15633 'caveats',
15634 'sig'],
15635 'type': 'object'},
15636 'StringsWatchResult': {'additionalProperties': False,
15637 'properties': {'Changes': {'items': {'type': 'string'},
15638 'type': 'array'},
15639 'Error': {'$ref': '#/definitions/Error'},
15640 'StringsWatcherId': {'type': 'string'}},
15641 'required': ['StringsWatcherId',
15642 'Changes',
15643 'Error'],
15644 'type': 'object'},
15645 'caveat': {'additionalProperties': False,
15646 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15647 'location': {'$ref': '#/definitions/packet'},
15648 'verificationId': {'$ref': '#/definitions/packet'}},
15649 'required': ['location',
15650 'caveatId',
15651 'verificationId'],
15652 'type': 'object'},
15653 'packet': {'additionalProperties': False,
15654 'properties': {'headerLen': {'type': 'integer'},
15655 'start': {'type': 'integer'},
15656 'totalLen': {'type': 'integer'}},
15657 'required': ['start', 'totalLen', 'headerLen'],
15658 'type': 'object'}},
15659 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15660 'Result': {'$ref': '#/definitions/ErrorResults'}},
15661 'type': 'object'},
15662 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15663 'type': 'object'}},
15664 'type': 'object'}
15665
15666
15667 @ReturnMapping(ErrorResults)
15668 async def Rescale(self, entities):
15669 '''
15670 entities : typing.Sequence[~Entity]
15671 Returns -> typing.Sequence[~ErrorResult]
15672 '''
15673 # map input types to rpc msg
15674 params = dict()
15675 msg = dict(Type='ServiceScaler', Request='Rescale', Version=1, Params=params)
15676 params['Entities'] = entities
15677 reply = await self.rpc(msg)
15678 return reply
15679
15680
15681
15682 @ReturnMapping(StringsWatchResult)
15683 async def Watch(self):
15684 '''
15685
15686 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
15687 '''
15688 # map input types to rpc msg
15689 params = dict()
15690 msg = dict(Type='ServiceScaler', Request='Watch', Version=1, Params=params)
15691
15692 reply = await self.rpc(msg)
15693 return reply
15694
15695
15696 class Singular(Type):
15697 name = 'Singular'
15698 version = 1
15699 schema = {'definitions': {'Entities': {'additionalProperties': False,
15700 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15701 'type': 'array'}},
15702 'required': ['Entities'],
15703 'type': 'object'},
15704 'Entity': {'additionalProperties': False,
15705 'properties': {'Tag': {'type': 'string'}},
15706 'required': ['Tag'],
15707 'type': 'object'},
15708 'Error': {'additionalProperties': False,
15709 'properties': {'Code': {'type': 'string'},
15710 'Info': {'$ref': '#/definitions/ErrorInfo'},
15711 'Message': {'type': 'string'}},
15712 'required': ['Message', 'Code'],
15713 'type': 'object'},
15714 'ErrorInfo': {'additionalProperties': False,
15715 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15716 'MacaroonPath': {'type': 'string'}},
15717 'type': 'object'},
15718 'ErrorResult': {'additionalProperties': False,
15719 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15720 'required': ['Error'],
15721 'type': 'object'},
15722 'ErrorResults': {'additionalProperties': False,
15723 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15724 'type': 'array'}},
15725 'required': ['Results'],
15726 'type': 'object'},
15727 'Macaroon': {'additionalProperties': False,
15728 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15729 'type': 'array'},
15730 'data': {'items': {'type': 'integer'},
15731 'type': 'array'},
15732 'id': {'$ref': '#/definitions/packet'},
15733 'location': {'$ref': '#/definitions/packet'},
15734 'sig': {'items': {'type': 'integer'},
15735 'type': 'array'}},
15736 'required': ['data',
15737 'location',
15738 'id',
15739 'caveats',
15740 'sig'],
15741 'type': 'object'},
15742 'SingularClaim': {'additionalProperties': False,
15743 'properties': {'ControllerTag': {'type': 'string'},
15744 'Duration': {'type': 'integer'},
15745 'ModelTag': {'type': 'string'}},
15746 'required': ['ModelTag',
15747 'ControllerTag',
15748 'Duration'],
15749 'type': 'object'},
15750 'SingularClaims': {'additionalProperties': False,
15751 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15752 'type': 'array'}},
15753 'required': ['Claims'],
15754 'type': 'object'},
15755 'caveat': {'additionalProperties': False,
15756 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15757 'location': {'$ref': '#/definitions/packet'},
15758 'verificationId': {'$ref': '#/definitions/packet'}},
15759 'required': ['location',
15760 'caveatId',
15761 'verificationId'],
15762 'type': 'object'},
15763 'packet': {'additionalProperties': False,
15764 'properties': {'headerLen': {'type': 'integer'},
15765 'start': {'type': 'integer'},
15766 'totalLen': {'type': 'integer'}},
15767 'required': ['start', 'totalLen', 'headerLen'],
15768 'type': 'object'}},
15769 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
15770 'Result': {'$ref': '#/definitions/ErrorResults'}},
15771 'type': 'object'},
15772 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15773 'Result': {'$ref': '#/definitions/ErrorResults'}},
15774 'type': 'object'}},
15775 'type': 'object'}
15776
15777
15778 @ReturnMapping(ErrorResults)
15779 async def Claim(self, claims):
15780 '''
15781 claims : typing.Sequence[~SingularClaim]
15782 Returns -> typing.Sequence[~ErrorResult]
15783 '''
15784 # map input types to rpc msg
15785 params = dict()
15786 msg = dict(Type='Singular', Request='Claim', Version=1, Params=params)
15787 params['Claims'] = claims
15788 reply = await self.rpc(msg)
15789 return reply
15790
15791
15792
15793 @ReturnMapping(ErrorResults)
15794 async def Wait(self, entities):
15795 '''
15796 entities : typing.Sequence[~Entity]
15797 Returns -> typing.Sequence[~ErrorResult]
15798 '''
15799 # map input types to rpc msg
15800 params = dict()
15801 msg = dict(Type='Singular', Request='Wait', Version=1, Params=params)
15802 params['Entities'] = entities
15803 reply = await self.rpc(msg)
15804 return reply
15805
15806
15807 class Spaces(Type):
15808 name = 'Spaces'
15809 version = 2
15810 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15811 'properties': {'ProviderId': {'type': 'string'},
15812 'Public': {'type': 'boolean'},
15813 'SpaceTag': {'type': 'string'},
15814 'SubnetTags': {'items': {'type': 'string'},
15815 'type': 'array'}},
15816 'required': ['SubnetTags',
15817 'SpaceTag',
15818 'Public'],
15819 'type': 'object'},
15820 'CreateSpacesParams': {'additionalProperties': False,
15821 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15822 'type': 'array'}},
15823 'required': ['Spaces'],
15824 'type': 'object'},
15825 'Error': {'additionalProperties': False,
15826 'properties': {'Code': {'type': 'string'},
15827 'Info': {'$ref': '#/definitions/ErrorInfo'},
15828 'Message': {'type': 'string'}},
15829 'required': ['Message', 'Code'],
15830 'type': 'object'},
15831 'ErrorInfo': {'additionalProperties': False,
15832 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15833 'MacaroonPath': {'type': 'string'}},
15834 'type': 'object'},
15835 'ErrorResult': {'additionalProperties': False,
15836 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15837 'required': ['Error'],
15838 'type': 'object'},
15839 'ErrorResults': {'additionalProperties': False,
15840 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15841 'type': 'array'}},
15842 'required': ['Results'],
15843 'type': 'object'},
15844 'ListSpacesResults': {'additionalProperties': False,
15845 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
15846 'type': 'array'}},
15847 'required': ['Results'],
15848 'type': 'object'},
15849 'Macaroon': {'additionalProperties': False,
15850 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15851 'type': 'array'},
15852 'data': {'items': {'type': 'integer'},
15853 'type': 'array'},
15854 'id': {'$ref': '#/definitions/packet'},
15855 'location': {'$ref': '#/definitions/packet'},
15856 'sig': {'items': {'type': 'integer'},
15857 'type': 'array'}},
15858 'required': ['data',
15859 'location',
15860 'id',
15861 'caveats',
15862 'sig'],
15863 'type': 'object'},
15864 'Space': {'additionalProperties': False,
15865 'properties': {'Error': {'$ref': '#/definitions/Error'},
15866 'Name': {'type': 'string'},
15867 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
15868 'type': 'array'}},
15869 'required': ['Name', 'Subnets'],
15870 'type': 'object'},
15871 'Subnet': {'additionalProperties': False,
15872 'properties': {'CIDR': {'type': 'string'},
15873 'Life': {'type': 'string'},
15874 'ProviderId': {'type': 'string'},
15875 'SpaceTag': {'type': 'string'},
15876 'StaticRangeHighIP': {'items': {'type': 'integer'},
15877 'type': 'array'},
15878 'StaticRangeLowIP': {'items': {'type': 'integer'},
15879 'type': 'array'},
15880 'Status': {'type': 'string'},
15881 'VLANTag': {'type': 'integer'},
15882 'Zones': {'items': {'type': 'string'},
15883 'type': 'array'}},
15884 'required': ['CIDR',
15885 'VLANTag',
15886 'Life',
15887 'SpaceTag',
15888 'Zones'],
15889 'type': 'object'},
15890 'caveat': {'additionalProperties': False,
15891 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15892 'location': {'$ref': '#/definitions/packet'},
15893 'verificationId': {'$ref': '#/definitions/packet'}},
15894 'required': ['location',
15895 'caveatId',
15896 'verificationId'],
15897 'type': 'object'},
15898 'packet': {'additionalProperties': False,
15899 'properties': {'headerLen': {'type': 'integer'},
15900 'start': {'type': 'integer'},
15901 'totalLen': {'type': 'integer'}},
15902 'required': ['start', 'totalLen', 'headerLen'],
15903 'type': 'object'}},
15904 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
15905 'Result': {'$ref': '#/definitions/ErrorResults'}},
15906 'type': 'object'},
15907 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
15908 'type': 'object'}},
15909 'type': 'object'}
15910
15911
15912 @ReturnMapping(ErrorResults)
15913 async def CreateSpaces(self, spaces):
15914 '''
15915 spaces : typing.Sequence[~CreateSpaceParams]
15916 Returns -> typing.Sequence[~ErrorResult]
15917 '''
15918 # map input types to rpc msg
15919 params = dict()
15920 msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params)
15921 params['Spaces'] = spaces
15922 reply = await self.rpc(msg)
15923 return reply
15924
15925
15926
15927 @ReturnMapping(ListSpacesResults)
15928 async def ListSpaces(self):
15929 '''
15930
15931 Returns -> typing.Sequence[~Space]
15932 '''
15933 # map input types to rpc msg
15934 params = dict()
15935 msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params)
15936
15937 reply = await self.rpc(msg)
15938 return reply
15939
15940
15941 class StatusHistory(Type):
15942 name = 'StatusHistory'
15943 version = 2
15944 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
15945 'properties': {'MaxLogsPerEntity': {'type': 'integer'}},
15946 'required': ['MaxLogsPerEntity'],
15947 'type': 'object'}},
15948 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
15949 'type': 'object'}},
15950 'type': 'object'}
15951
15952
15953 @ReturnMapping(None)
15954 async def Prune(self, maxlogsperentity):
15955 '''
15956 maxlogsperentity : int
15957 Returns -> None
15958 '''
15959 # map input types to rpc msg
15960 params = dict()
15961 msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params)
15962 params['MaxLogsPerEntity'] = maxlogsperentity
15963 reply = await self.rpc(msg)
15964 return reply
15965
15966
15967 class Storage(Type):
15968 name = 'Storage'
15969 version = 2
15970 schema = {'definitions': {'Entities': {'additionalProperties': False,
15971 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15972 'type': 'array'}},
15973 'required': ['Entities'],
15974 'type': 'object'},
15975 'Entity': {'additionalProperties': False,
15976 'properties': {'Tag': {'type': 'string'}},
15977 'required': ['Tag'],
15978 'type': 'object'},
15979 'EntityStatus': {'additionalProperties': False,
15980 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15981 'type': 'object'}},
15982 'type': 'object'},
15983 'Info': {'type': 'string'},
15984 'Since': {'format': 'date-time',
15985 'type': 'string'},
15986 'Status': {'type': 'string'}},
15987 'required': ['Status',
15988 'Info',
15989 'Data',
15990 'Since'],
15991 'type': 'object'},
15992 'Error': {'additionalProperties': False,
15993 'properties': {'Code': {'type': 'string'},
15994 'Info': {'$ref': '#/definitions/ErrorInfo'},
15995 'Message': {'type': 'string'}},
15996 'required': ['Message', 'Code'],
15997 'type': 'object'},
15998 'ErrorInfo': {'additionalProperties': False,
15999 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16000 'MacaroonPath': {'type': 'string'}},
16001 'type': 'object'},
16002 'ErrorResult': {'additionalProperties': False,
16003 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16004 'required': ['Error'],
16005 'type': 'object'},
16006 'ErrorResults': {'additionalProperties': False,
16007 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16008 'type': 'array'}},
16009 'required': ['Results'],
16010 'type': 'object'},
16011 'FilesystemAttachmentInfo': {'additionalProperties': False,
16012 'properties': {'mountpoint': {'type': 'string'},
16013 'read-only': {'type': 'boolean'}},
16014 'type': 'object'},
16015 'FilesystemDetails': {'additionalProperties': False,
16016 'properties': {'filesystemtag': {'type': 'string'},
16017 'info': {'$ref': '#/definitions/FilesystemInfo'},
16018 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16019 'type': 'object'},
16020 'status': {'$ref': '#/definitions/EntityStatus'},
16021 'storage': {'$ref': '#/definitions/StorageDetails'},
16022 'volumetag': {'type': 'string'}},
16023 'required': ['filesystemtag',
16024 'info',
16025 'status'],
16026 'type': 'object'},
16027 'FilesystemDetailsListResult': {'additionalProperties': False,
16028 'properties': {'error': {'$ref': '#/definitions/Error'},
16029 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16030 'type': 'array'}},
16031 'type': 'object'},
16032 'FilesystemDetailsListResults': {'additionalProperties': False,
16033 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16034 'type': 'array'}},
16035 'type': 'object'},
16036 'FilesystemFilter': {'additionalProperties': False,
16037 'properties': {'machines': {'items': {'type': 'string'},
16038 'type': 'array'}},
16039 'type': 'object'},
16040 'FilesystemFilters': {'additionalProperties': False,
16041 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16042 'type': 'array'}},
16043 'type': 'object'},
16044 'FilesystemInfo': {'additionalProperties': False,
16045 'properties': {'filesystemid': {'type': 'string'},
16046 'size': {'type': 'integer'}},
16047 'required': ['filesystemid', 'size'],
16048 'type': 'object'},
16049 'Macaroon': {'additionalProperties': False,
16050 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16051 'type': 'array'},
16052 'data': {'items': {'type': 'integer'},
16053 'type': 'array'},
16054 'id': {'$ref': '#/definitions/packet'},
16055 'location': {'$ref': '#/definitions/packet'},
16056 'sig': {'items': {'type': 'integer'},
16057 'type': 'array'}},
16058 'required': ['data',
16059 'location',
16060 'id',
16061 'caveats',
16062 'sig'],
16063 'type': 'object'},
16064 'StorageAddParams': {'additionalProperties': False,
16065 'properties': {'StorageName': {'type': 'string'},
16066 'storage': {'$ref': '#/definitions/StorageConstraints'},
16067 'unit': {'type': 'string'}},
16068 'required': ['unit',
16069 'StorageName',
16070 'storage'],
16071 'type': 'object'},
16072 'StorageAttachmentDetails': {'additionalProperties': False,
16073 'properties': {'location': {'type': 'string'},
16074 'machinetag': {'type': 'string'},
16075 'storagetag': {'type': 'string'},
16076 'unittag': {'type': 'string'}},
16077 'required': ['storagetag',
16078 'unittag',
16079 'machinetag'],
16080 'type': 'object'},
16081 'StorageConstraints': {'additionalProperties': False,
16082 'properties': {'Count': {'type': 'integer'},
16083 'Pool': {'type': 'string'},
16084 'Size': {'type': 'integer'}},
16085 'required': ['Pool', 'Size', 'Count'],
16086 'type': 'object'},
16087 'StorageDetails': {'additionalProperties': False,
16088 'properties': {'Persistent': {'type': 'boolean'},
16089 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16090 'type': 'object'},
16091 'kind': {'type': 'integer'},
16092 'ownertag': {'type': 'string'},
16093 'status': {'$ref': '#/definitions/EntityStatus'},
16094 'storagetag': {'type': 'string'}},
16095 'required': ['storagetag',
16096 'ownertag',
16097 'kind',
16098 'status',
16099 'Persistent'],
16100 'type': 'object'},
16101 'StorageDetailsListResult': {'additionalProperties': False,
16102 'properties': {'error': {'$ref': '#/definitions/Error'},
16103 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16104 'type': 'array'}},
16105 'type': 'object'},
16106 'StorageDetailsListResults': {'additionalProperties': False,
16107 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16108 'type': 'array'}},
16109 'type': 'object'},
16110 'StorageDetailsResult': {'additionalProperties': False,
16111 'properties': {'error': {'$ref': '#/definitions/Error'},
16112 'result': {'$ref': '#/definitions/StorageDetails'}},
16113 'type': 'object'},
16114 'StorageDetailsResults': {'additionalProperties': False,
16115 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16116 'type': 'array'}},
16117 'type': 'object'},
16118 'StorageFilter': {'additionalProperties': False,
16119 'type': 'object'},
16120 'StorageFilters': {'additionalProperties': False,
16121 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16122 'type': 'array'}},
16123 'type': 'object'},
16124 'StoragePool': {'additionalProperties': False,
16125 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
16126 'type': 'object'}},
16127 'type': 'object'},
16128 'name': {'type': 'string'},
16129 'provider': {'type': 'string'}},
16130 'required': ['name', 'provider', 'attrs'],
16131 'type': 'object'},
16132 'StoragePoolFilter': {'additionalProperties': False,
16133 'properties': {'names': {'items': {'type': 'string'},
16134 'type': 'array'},
16135 'providers': {'items': {'type': 'string'},
16136 'type': 'array'}},
16137 'type': 'object'},
16138 'StoragePoolFilters': {'additionalProperties': False,
16139 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
16140 'type': 'array'}},
16141 'type': 'object'},
16142 'StoragePoolsResult': {'additionalProperties': False,
16143 'properties': {'error': {'$ref': '#/definitions/Error'},
16144 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
16145 'type': 'array'}},
16146 'type': 'object'},
16147 'StoragePoolsResults': {'additionalProperties': False,
16148 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
16149 'type': 'array'}},
16150 'type': 'object'},
16151 'StoragesAddParams': {'additionalProperties': False,
16152 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16153 'type': 'array'}},
16154 'required': ['storages'],
16155 'type': 'object'},
16156 'VolumeAttachmentInfo': {'additionalProperties': False,
16157 'properties': {'busaddress': {'type': 'string'},
16158 'devicelink': {'type': 'string'},
16159 'devicename': {'type': 'string'},
16160 'read-only': {'type': 'boolean'}},
16161 'type': 'object'},
16162 'VolumeDetails': {'additionalProperties': False,
16163 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16164 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16165 'type': 'object'},
16166 'status': {'$ref': '#/definitions/EntityStatus'},
16167 'storage': {'$ref': '#/definitions/StorageDetails'},
16168 'volumetag': {'type': 'string'}},
16169 'required': ['volumetag', 'info', 'status'],
16170 'type': 'object'},
16171 'VolumeDetailsListResult': {'additionalProperties': False,
16172 'properties': {'error': {'$ref': '#/definitions/Error'},
16173 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
16174 'type': 'array'}},
16175 'type': 'object'},
16176 'VolumeDetailsListResults': {'additionalProperties': False,
16177 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
16178 'type': 'array'}},
16179 'type': 'object'},
16180 'VolumeFilter': {'additionalProperties': False,
16181 'properties': {'machines': {'items': {'type': 'string'},
16182 'type': 'array'}},
16183 'type': 'object'},
16184 'VolumeFilters': {'additionalProperties': False,
16185 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
16186 'type': 'array'}},
16187 'type': 'object'},
16188 'VolumeInfo': {'additionalProperties': False,
16189 'properties': {'hardwareid': {'type': 'string'},
16190 'persistent': {'type': 'boolean'},
16191 'size': {'type': 'integer'},
16192 'volumeid': {'type': 'string'}},
16193 'required': ['volumeid', 'size', 'persistent'],
16194 'type': 'object'},
16195 'caveat': {'additionalProperties': False,
16196 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16197 'location': {'$ref': '#/definitions/packet'},
16198 'verificationId': {'$ref': '#/definitions/packet'}},
16199 'required': ['location',
16200 'caveatId',
16201 'verificationId'],
16202 'type': 'object'},
16203 'packet': {'additionalProperties': False,
16204 'properties': {'headerLen': {'type': 'integer'},
16205 'start': {'type': 'integer'},
16206 'totalLen': {'type': 'integer'}},
16207 'required': ['start', 'totalLen', 'headerLen'],
16208 'type': 'object'}},
16209 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
16210 'Result': {'$ref': '#/definitions/ErrorResults'}},
16211 'type': 'object'},
16212 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
16213 'type': 'object'},
16214 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
16215 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
16216 'type': 'object'},
16217 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
16218 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
16219 'type': 'object'},
16220 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
16221 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
16222 'type': 'object'},
16223 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
16224 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
16225 'type': 'object'},
16226 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16227 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
16228 'type': 'object'}},
16229 'type': 'object'}
16230
16231
16232 @ReturnMapping(ErrorResults)
16233 async def AddToUnit(self, storages):
16234 '''
16235 storages : typing.Sequence[~StorageAddParams]
16236 Returns -> typing.Sequence[~ErrorResult]
16237 '''
16238 # map input types to rpc msg
16239 params = dict()
16240 msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params)
16241 params['storages'] = storages
16242 reply = await self.rpc(msg)
16243 return reply
16244
16245
16246
16247 @ReturnMapping(None)
16248 async def CreatePool(self, attrs, name, provider):
16249 '''
16250 attrs : typing.Mapping[str, typing.Any]
16251 name : str
16252 provider : str
16253 Returns -> None
16254 '''
16255 # map input types to rpc msg
16256 params = dict()
16257 msg = dict(Type='Storage', Request='CreatePool', Version=2, Params=params)
16258 params['attrs'] = attrs
16259 params['name'] = name
16260 params['provider'] = provider
16261 reply = await self.rpc(msg)
16262 return reply
16263
16264
16265
16266 @ReturnMapping(FilesystemDetailsListResults)
16267 async def ListFilesystems(self, filters):
16268 '''
16269 filters : typing.Sequence[~FilesystemFilter]
16270 Returns -> typing.Sequence[~FilesystemDetailsListResult]
16271 '''
16272 # map input types to rpc msg
16273 params = dict()
16274 msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params)
16275 params['filters'] = filters
16276 reply = await self.rpc(msg)
16277 return reply
16278
16279
16280
16281 @ReturnMapping(StoragePoolsResults)
16282 async def ListPools(self, filters):
16283 '''
16284 filters : typing.Sequence[~StoragePoolFilter]
16285 Returns -> typing.Sequence[~StoragePoolsResult]
16286 '''
16287 # map input types to rpc msg
16288 params = dict()
16289 msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params)
16290 params['filters'] = filters
16291 reply = await self.rpc(msg)
16292 return reply
16293
16294
16295
16296 @ReturnMapping(StorageDetailsListResults)
16297 async def ListStorageDetails(self, filters):
16298 '''
16299 filters : typing.Sequence[~StorageFilter]
16300 Returns -> typing.Sequence[~StorageDetailsListResult]
16301 '''
16302 # map input types to rpc msg
16303 params = dict()
16304 msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params)
16305 params['filters'] = filters
16306 reply = await self.rpc(msg)
16307 return reply
16308
16309
16310
16311 @ReturnMapping(VolumeDetailsListResults)
16312 async def ListVolumes(self, filters):
16313 '''
16314 filters : typing.Sequence[~VolumeFilter]
16315 Returns -> typing.Sequence[~VolumeDetailsListResult]
16316 '''
16317 # map input types to rpc msg
16318 params = dict()
16319 msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params)
16320 params['filters'] = filters
16321 reply = await self.rpc(msg)
16322 return reply
16323
16324
16325
16326 @ReturnMapping(StorageDetailsResults)
16327 async def StorageDetails(self, entities):
16328 '''
16329 entities : typing.Sequence[~Entity]
16330 Returns -> typing.Sequence[~StorageDetailsResult]
16331 '''
16332 # map input types to rpc msg
16333 params = dict()
16334 msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params)
16335 params['Entities'] = entities
16336 reply = await self.rpc(msg)
16337 return reply
16338
16339
16340 class StorageProvisioner(Type):
16341 name = 'StorageProvisioner'
16342 version = 2
16343 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
16344 'properties': {'BusAddress': {'type': 'string'},
16345 'DeviceLinks': {'items': {'type': 'string'},
16346 'type': 'array'},
16347 'DeviceName': {'type': 'string'},
16348 'FilesystemType': {'type': 'string'},
16349 'HardwareId': {'type': 'string'},
16350 'InUse': {'type': 'boolean'},
16351 'Label': {'type': 'string'},
16352 'MountPoint': {'type': 'string'},
16353 'Size': {'type': 'integer'},
16354 'UUID': {'type': 'string'}},
16355 'required': ['DeviceName',
16356 'DeviceLinks',
16357 'Label',
16358 'UUID',
16359 'HardwareId',
16360 'BusAddress',
16361 'Size',
16362 'FilesystemType',
16363 'InUse',
16364 'MountPoint'],
16365 'type': 'object'},
16366 'BlockDeviceResult': {'additionalProperties': False,
16367 'properties': {'error': {'$ref': '#/definitions/Error'},
16368 'result': {'$ref': '#/definitions/BlockDevice'}},
16369 'required': ['result'],
16370 'type': 'object'},
16371 'BlockDeviceResults': {'additionalProperties': False,
16372 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
16373 'type': 'array'}},
16374 'type': 'object'},
16375 'Entities': {'additionalProperties': False,
16376 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16377 'type': 'array'}},
16378 'required': ['Entities'],
16379 'type': 'object'},
16380 'Entity': {'additionalProperties': False,
16381 'properties': {'Tag': {'type': 'string'}},
16382 'required': ['Tag'],
16383 'type': 'object'},
16384 'EntityStatusArgs': {'additionalProperties': False,
16385 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16386 'type': 'object'}},
16387 'type': 'object'},
16388 'Info': {'type': 'string'},
16389 'Status': {'type': 'string'},
16390 'Tag': {'type': 'string'}},
16391 'required': ['Tag',
16392 'Status',
16393 'Info',
16394 'Data'],
16395 'type': 'object'},
16396 'Error': {'additionalProperties': False,
16397 'properties': {'Code': {'type': 'string'},
16398 'Info': {'$ref': '#/definitions/ErrorInfo'},
16399 'Message': {'type': 'string'}},
16400 'required': ['Message', 'Code'],
16401 'type': 'object'},
16402 'ErrorInfo': {'additionalProperties': False,
16403 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16404 'MacaroonPath': {'type': 'string'}},
16405 'type': 'object'},
16406 'ErrorResult': {'additionalProperties': False,
16407 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16408 'required': ['Error'],
16409 'type': 'object'},
16410 'ErrorResults': {'additionalProperties': False,
16411 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16412 'type': 'array'}},
16413 'required': ['Results'],
16414 'type': 'object'},
16415 'Filesystem': {'additionalProperties': False,
16416 'properties': {'filesystemtag': {'type': 'string'},
16417 'info': {'$ref': '#/definitions/FilesystemInfo'},
16418 'volumetag': {'type': 'string'}},
16419 'required': ['filesystemtag', 'info'],
16420 'type': 'object'},
16421 'FilesystemAttachment': {'additionalProperties': False,
16422 'properties': {'filesystemtag': {'type': 'string'},
16423 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
16424 'machinetag': {'type': 'string'}},
16425 'required': ['filesystemtag',
16426 'machinetag',
16427 'info'],
16428 'type': 'object'},
16429 'FilesystemAttachmentInfo': {'additionalProperties': False,
16430 'properties': {'mountpoint': {'type': 'string'},
16431 'read-only': {'type': 'boolean'}},
16432 'type': 'object'},
16433 'FilesystemAttachmentParams': {'additionalProperties': False,
16434 'properties': {'filesystemid': {'type': 'string'},
16435 'filesystemtag': {'type': 'string'},
16436 'instanceid': {'type': 'string'},
16437 'machinetag': {'type': 'string'},
16438 'mountpoint': {'type': 'string'},
16439 'provider': {'type': 'string'},
16440 'read-only': {'type': 'boolean'}},
16441 'required': ['filesystemtag',
16442 'machinetag',
16443 'provider'],
16444 'type': 'object'},
16445 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
16446 'properties': {'error': {'$ref': '#/definitions/Error'},
16447 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
16448 'required': ['result'],
16449 'type': 'object'},
16450 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
16451 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
16452 'type': 'array'}},
16453 'type': 'object'},
16454 'FilesystemAttachmentResult': {'additionalProperties': False,
16455 'properties': {'error': {'$ref': '#/definitions/Error'},
16456 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
16457 'required': ['result'],
16458 'type': 'object'},
16459 'FilesystemAttachmentResults': {'additionalProperties': False,
16460 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
16461 'type': 'array'}},
16462 'type': 'object'},
16463 'FilesystemAttachments': {'additionalProperties': False,
16464 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
16465 'type': 'array'}},
16466 'required': ['filesystemattachments'],
16467 'type': 'object'},
16468 'FilesystemInfo': {'additionalProperties': False,
16469 'properties': {'filesystemid': {'type': 'string'},
16470 'size': {'type': 'integer'}},
16471 'required': ['filesystemid', 'size'],
16472 'type': 'object'},
16473 'FilesystemParams': {'additionalProperties': False,
16474 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
16475 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16476 'type': 'object'}},
16477 'type': 'object'},
16478 'filesystemtag': {'type': 'string'},
16479 'provider': {'type': 'string'},
16480 'size': {'type': 'integer'},
16481 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16482 'type': 'object'},
16483 'volumetag': {'type': 'string'}},
16484 'required': ['filesystemtag',
16485 'size',
16486 'provider'],
16487 'type': 'object'},
16488 'FilesystemParamsResult': {'additionalProperties': False,
16489 'properties': {'error': {'$ref': '#/definitions/Error'},
16490 'result': {'$ref': '#/definitions/FilesystemParams'}},
16491 'required': ['result'],
16492 'type': 'object'},
16493 'FilesystemParamsResults': {'additionalProperties': False,
16494 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
16495 'type': 'array'}},
16496 'type': 'object'},
16497 'FilesystemResult': {'additionalProperties': False,
16498 'properties': {'error': {'$ref': '#/definitions/Error'},
16499 'result': {'$ref': '#/definitions/Filesystem'}},
16500 'required': ['result'],
16501 'type': 'object'},
16502 'FilesystemResults': {'additionalProperties': False,
16503 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
16504 'type': 'array'}},
16505 'type': 'object'},
16506 'Filesystems': {'additionalProperties': False,
16507 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
16508 'type': 'array'}},
16509 'required': ['filesystems'],
16510 'type': 'object'},
16511 'LifeResult': {'additionalProperties': False,
16512 'properties': {'Error': {'$ref': '#/definitions/Error'},
16513 'Life': {'type': 'string'}},
16514 'required': ['Life', 'Error'],
16515 'type': 'object'},
16516 'LifeResults': {'additionalProperties': False,
16517 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
16518 'type': 'array'}},
16519 'required': ['Results'],
16520 'type': 'object'},
16521 'Macaroon': {'additionalProperties': False,
16522 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16523 'type': 'array'},
16524 'data': {'items': {'type': 'integer'},
16525 'type': 'array'},
16526 'id': {'$ref': '#/definitions/packet'},
16527 'location': {'$ref': '#/definitions/packet'},
16528 'sig': {'items': {'type': 'integer'},
16529 'type': 'array'}},
16530 'required': ['data',
16531 'location',
16532 'id',
16533 'caveats',
16534 'sig'],
16535 'type': 'object'},
16536 'MachineStorageId': {'additionalProperties': False,
16537 'properties': {'attachmenttag': {'type': 'string'},
16538 'machinetag': {'type': 'string'}},
16539 'required': ['machinetag',
16540 'attachmenttag'],
16541 'type': 'object'},
16542 'MachineStorageIds': {'additionalProperties': False,
16543 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
16544 'type': 'array'}},
16545 'required': ['ids'],
16546 'type': 'object'},
16547 'MachineStorageIdsWatchResult': {'additionalProperties': False,
16548 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
16549 'type': 'array'},
16550 'Error': {'$ref': '#/definitions/Error'},
16551 'MachineStorageIdsWatcherId': {'type': 'string'}},
16552 'required': ['MachineStorageIdsWatcherId',
16553 'Changes',
16554 'Error'],
16555 'type': 'object'},
16556 'MachineStorageIdsWatchResults': {'additionalProperties': False,
16557 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
16558 'type': 'array'}},
16559 'required': ['Results'],
16560 'type': 'object'},
16561 'ModelConfigResult': {'additionalProperties': False,
16562 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
16563 'type': 'object'}},
16564 'type': 'object'}},
16565 'required': ['Config'],
16566 'type': 'object'},
16567 'NotifyWatchResult': {'additionalProperties': False,
16568 'properties': {'Error': {'$ref': '#/definitions/Error'},
16569 'NotifyWatcherId': {'type': 'string'}},
16570 'required': ['NotifyWatcherId', 'Error'],
16571 'type': 'object'},
16572 'NotifyWatchResults': {'additionalProperties': False,
16573 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16574 'type': 'array'}},
16575 'required': ['Results'],
16576 'type': 'object'},
16577 'SetStatus': {'additionalProperties': False,
16578 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16579 'type': 'array'}},
16580 'required': ['Entities'],
16581 'type': 'object'},
16582 'StringResult': {'additionalProperties': False,
16583 'properties': {'Error': {'$ref': '#/definitions/Error'},
16584 'Result': {'type': 'string'}},
16585 'required': ['Error', 'Result'],
16586 'type': 'object'},
16587 'StringResults': {'additionalProperties': False,
16588 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16589 'type': 'array'}},
16590 'required': ['Results'],
16591 'type': 'object'},
16592 'StringsWatchResult': {'additionalProperties': False,
16593 'properties': {'Changes': {'items': {'type': 'string'},
16594 'type': 'array'},
16595 'Error': {'$ref': '#/definitions/Error'},
16596 'StringsWatcherId': {'type': 'string'}},
16597 'required': ['StringsWatcherId',
16598 'Changes',
16599 'Error'],
16600 'type': 'object'},
16601 'StringsWatchResults': {'additionalProperties': False,
16602 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16603 'type': 'array'}},
16604 'required': ['Results'],
16605 'type': 'object'},
16606 'Volume': {'additionalProperties': False,
16607 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16608 'volumetag': {'type': 'string'}},
16609 'required': ['volumetag', 'info'],
16610 'type': 'object'},
16611 'VolumeAttachment': {'additionalProperties': False,
16612 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16613 'machinetag': {'type': 'string'},
16614 'volumetag': {'type': 'string'}},
16615 'required': ['volumetag',
16616 'machinetag',
16617 'info'],
16618 'type': 'object'},
16619 'VolumeAttachmentInfo': {'additionalProperties': False,
16620 'properties': {'busaddress': {'type': 'string'},
16621 'devicelink': {'type': 'string'},
16622 'devicename': {'type': 'string'},
16623 'read-only': {'type': 'boolean'}},
16624 'type': 'object'},
16625 'VolumeAttachmentParams': {'additionalProperties': False,
16626 'properties': {'instanceid': {'type': 'string'},
16627 'machinetag': {'type': 'string'},
16628 'provider': {'type': 'string'},
16629 'read-only': {'type': 'boolean'},
16630 'volumeid': {'type': 'string'},
16631 'volumetag': {'type': 'string'}},
16632 'required': ['volumetag',
16633 'machinetag',
16634 'provider'],
16635 'type': 'object'},
16636 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16637 'properties': {'error': {'$ref': '#/definitions/Error'},
16638 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16639 'required': ['result'],
16640 'type': 'object'},
16641 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16642 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16643 'type': 'array'}},
16644 'type': 'object'},
16645 'VolumeAttachmentResult': {'additionalProperties': False,
16646 'properties': {'error': {'$ref': '#/definitions/Error'},
16647 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16648 'required': ['result'],
16649 'type': 'object'},
16650 'VolumeAttachmentResults': {'additionalProperties': False,
16651 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16652 'type': 'array'}},
16653 'type': 'object'},
16654 'VolumeAttachments': {'additionalProperties': False,
16655 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16656 'type': 'array'}},
16657 'required': ['volumeattachments'],
16658 'type': 'object'},
16659 'VolumeInfo': {'additionalProperties': False,
16660 'properties': {'hardwareid': {'type': 'string'},
16661 'persistent': {'type': 'boolean'},
16662 'size': {'type': 'integer'},
16663 'volumeid': {'type': 'string'}},
16664 'required': ['volumeid', 'size', 'persistent'],
16665 'type': 'object'},
16666 'VolumeParams': {'additionalProperties': False,
16667 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16668 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16669 'type': 'object'}},
16670 'type': 'object'},
16671 'provider': {'type': 'string'},
16672 'size': {'type': 'integer'},
16673 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16674 'type': 'object'},
16675 'volumetag': {'type': 'string'}},
16676 'required': ['volumetag', 'size', 'provider'],
16677 'type': 'object'},
16678 'VolumeParamsResult': {'additionalProperties': False,
16679 'properties': {'error': {'$ref': '#/definitions/Error'},
16680 'result': {'$ref': '#/definitions/VolumeParams'}},
16681 'required': ['result'],
16682 'type': 'object'},
16683 'VolumeParamsResults': {'additionalProperties': False,
16684 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16685 'type': 'array'}},
16686 'type': 'object'},
16687 'VolumeResult': {'additionalProperties': False,
16688 'properties': {'error': {'$ref': '#/definitions/Error'},
16689 'result': {'$ref': '#/definitions/Volume'}},
16690 'required': ['result'],
16691 'type': 'object'},
16692 'VolumeResults': {'additionalProperties': False,
16693 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16694 'type': 'array'}},
16695 'type': 'object'},
16696 'Volumes': {'additionalProperties': False,
16697 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16698 'type': 'array'}},
16699 'required': ['volumes'],
16700 'type': 'object'},
16701 'caveat': {'additionalProperties': False,
16702 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16703 'location': {'$ref': '#/definitions/packet'},
16704 'verificationId': {'$ref': '#/definitions/packet'}},
16705 'required': ['location',
16706 'caveatId',
16707 'verificationId'],
16708 'type': 'object'},
16709 'packet': {'additionalProperties': False,
16710 'properties': {'headerLen': {'type': 'integer'},
16711 'start': {'type': 'integer'},
16712 'totalLen': {'type': 'integer'}},
16713 'required': ['start', 'totalLen', 'headerLen'],
16714 'type': 'object'}},
16715 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16716 'Result': {'$ref': '#/definitions/LifeResults'}},
16717 'type': 'object'},
16718 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16719 'Result': {'$ref': '#/definitions/ErrorResults'}},
16720 'type': 'object'},
16721 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16722 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16723 'type': 'object'},
16724 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16725 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16726 'type': 'object'},
16727 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16728 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16729 'type': 'object'},
16730 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16731 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16732 'type': 'object'},
16733 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16734 'Result': {'$ref': '#/definitions/StringResults'}},
16735 'type': 'object'},
16736 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16737 'Result': {'$ref': '#/definitions/LifeResults'}},
16738 'type': 'object'},
16739 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16740 'type': 'object'},
16741 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16742 'Result': {'$ref': '#/definitions/ErrorResults'}},
16743 'type': 'object'},
16744 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16745 'Result': {'$ref': '#/definitions/ErrorResults'}},
16746 'type': 'object'},
16747 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16748 'Result': {'$ref': '#/definitions/ErrorResults'}},
16749 'type': 'object'},
16750 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16751 'Result': {'$ref': '#/definitions/ErrorResults'}},
16752 'type': 'object'},
16753 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16754 'Result': {'$ref': '#/definitions/ErrorResults'}},
16755 'type': 'object'},
16756 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16757 'Result': {'$ref': '#/definitions/ErrorResults'}},
16758 'type': 'object'},
16759 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16760 'Result': {'$ref': '#/definitions/ErrorResults'}},
16761 'type': 'object'},
16762 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16763 'Result': {'$ref': '#/definitions/ErrorResults'}},
16764 'type': 'object'},
16765 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16766 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16767 'type': 'object'},
16768 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16769 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16770 'type': 'object'},
16771 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16772 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16773 'type': 'object'},
16774 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16775 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16776 'type': 'object'},
16777 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16778 'Result': {'$ref': '#/definitions/VolumeResults'}},
16779 'type': 'object'},
16780 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16781 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16782 'type': 'object'},
16783 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16784 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16785 'type': 'object'},
16786 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16787 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16788 'type': 'object'},
16789 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16790 'type': 'object'},
16791 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16792 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16793 'type': 'object'},
16794 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16795 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16796 'type': 'object'},
16797 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16798 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16799 'type': 'object'}},
16800 'type': 'object'}
16801
16802
16803 @ReturnMapping(LifeResults)
16804 async def AttachmentLife(self, ids):
16805 '''
16806 ids : typing.Sequence[~MachineStorageId]
16807 Returns -> typing.Sequence[~LifeResult]
16808 '''
16809 # map input types to rpc msg
16810 params = dict()
16811 msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params)
16812 params['ids'] = ids
16813 reply = await self.rpc(msg)
16814 return reply
16815
16816
16817
16818 @ReturnMapping(ErrorResults)
16819 async def EnsureDead(self, entities):
16820 '''
16821 entities : typing.Sequence[~Entity]
16822 Returns -> typing.Sequence[~ErrorResult]
16823 '''
16824 # map input types to rpc msg
16825 params = dict()
16826 msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params)
16827 params['Entities'] = entities
16828 reply = await self.rpc(msg)
16829 return reply
16830
16831
16832
16833 @ReturnMapping(FilesystemAttachmentParamsResults)
16834 async def FilesystemAttachmentParams(self, ids):
16835 '''
16836 ids : typing.Sequence[~MachineStorageId]
16837 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16838 '''
16839 # map input types to rpc msg
16840 params = dict()
16841 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params)
16842 params['ids'] = ids
16843 reply = await self.rpc(msg)
16844 return reply
16845
16846
16847
16848 @ReturnMapping(FilesystemAttachmentResults)
16849 async def FilesystemAttachments(self, ids):
16850 '''
16851 ids : typing.Sequence[~MachineStorageId]
16852 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16853 '''
16854 # map input types to rpc msg
16855 params = dict()
16856 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params)
16857 params['ids'] = ids
16858 reply = await self.rpc(msg)
16859 return reply
16860
16861
16862
16863 @ReturnMapping(FilesystemParamsResults)
16864 async def FilesystemParams(self, entities):
16865 '''
16866 entities : typing.Sequence[~Entity]
16867 Returns -> typing.Sequence[~FilesystemParamsResult]
16868 '''
16869 # map input types to rpc msg
16870 params = dict()
16871 msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params)
16872 params['Entities'] = entities
16873 reply = await self.rpc(msg)
16874 return reply
16875
16876
16877
16878 @ReturnMapping(FilesystemResults)
16879 async def Filesystems(self, entities):
16880 '''
16881 entities : typing.Sequence[~Entity]
16882 Returns -> typing.Sequence[~FilesystemResult]
16883 '''
16884 # map input types to rpc msg
16885 params = dict()
16886 msg = dict(Type='StorageProvisioner', Request='Filesystems', Version=2, Params=params)
16887 params['Entities'] = entities
16888 reply = await self.rpc(msg)
16889 return reply
16890
16891
16892
16893 @ReturnMapping(StringResults)
16894 async def InstanceId(self, entities):
16895 '''
16896 entities : typing.Sequence[~Entity]
16897 Returns -> typing.Sequence[~StringResult]
16898 '''
16899 # map input types to rpc msg
16900 params = dict()
16901 msg = dict(Type='StorageProvisioner', Request='InstanceId', Version=2, Params=params)
16902 params['Entities'] = entities
16903 reply = await self.rpc(msg)
16904 return reply
16905
16906
16907
16908 @ReturnMapping(LifeResults)
16909 async def Life(self, entities):
16910 '''
16911 entities : typing.Sequence[~Entity]
16912 Returns -> typing.Sequence[~LifeResult]
16913 '''
16914 # map input types to rpc msg
16915 params = dict()
16916 msg = dict(Type='StorageProvisioner', Request='Life', Version=2, Params=params)
16917 params['Entities'] = entities
16918 reply = await self.rpc(msg)
16919 return reply
16920
16921
16922
16923 @ReturnMapping(ModelConfigResult)
16924 async def ModelConfig(self):
16925 '''
16926
16927 Returns -> typing.Mapping[str, typing.Any]
16928 '''
16929 # map input types to rpc msg
16930 params = dict()
16931 msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params)
16932
16933 reply = await self.rpc(msg)
16934 return reply
16935
16936
16937
16938 @ReturnMapping(ErrorResults)
16939 async def Remove(self, entities):
16940 '''
16941 entities : typing.Sequence[~Entity]
16942 Returns -> typing.Sequence[~ErrorResult]
16943 '''
16944 # map input types to rpc msg
16945 params = dict()
16946 msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params)
16947 params['Entities'] = entities
16948 reply = await self.rpc(msg)
16949 return reply
16950
16951
16952
16953 @ReturnMapping(ErrorResults)
16954 async def RemoveAttachment(self, ids):
16955 '''
16956 ids : typing.Sequence[~MachineStorageId]
16957 Returns -> typing.Sequence[~ErrorResult]
16958 '''
16959 # map input types to rpc msg
16960 params = dict()
16961 msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params)
16962 params['ids'] = ids
16963 reply = await self.rpc(msg)
16964 return reply
16965
16966
16967
16968 @ReturnMapping(ErrorResults)
16969 async def SetFilesystemAttachmentInfo(self, filesystemattachments):
16970 '''
16971 filesystemattachments : typing.Sequence[~FilesystemAttachment]
16972 Returns -> typing.Sequence[~ErrorResult]
16973 '''
16974 # map input types to rpc msg
16975 params = dict()
16976 msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params)
16977 params['filesystemattachments'] = filesystemattachments
16978 reply = await self.rpc(msg)
16979 return reply
16980
16981
16982
16983 @ReturnMapping(ErrorResults)
16984 async def SetFilesystemInfo(self, filesystems):
16985 '''
16986 filesystems : typing.Sequence[~Filesystem]
16987 Returns -> typing.Sequence[~ErrorResult]
16988 '''
16989 # map input types to rpc msg
16990 params = dict()
16991 msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params)
16992 params['filesystems'] = filesystems
16993 reply = await self.rpc(msg)
16994 return reply
16995
16996
16997
16998 @ReturnMapping(ErrorResults)
16999 async def SetStatus(self, entities):
17000 '''
17001 entities : typing.Sequence[~EntityStatusArgs]
17002 Returns -> typing.Sequence[~ErrorResult]
17003 '''
17004 # map input types to rpc msg
17005 params = dict()
17006 msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params)
17007 params['Entities'] = entities
17008 reply = await self.rpc(msg)
17009 return reply
17010
17011
17012
17013 @ReturnMapping(ErrorResults)
17014 async def SetVolumeAttachmentInfo(self, volumeattachments):
17015 '''
17016 volumeattachments : typing.Sequence[~VolumeAttachment]
17017 Returns -> typing.Sequence[~ErrorResult]
17018 '''
17019 # map input types to rpc msg
17020 params = dict()
17021 msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params)
17022 params['volumeattachments'] = volumeattachments
17023 reply = await self.rpc(msg)
17024 return reply
17025
17026
17027
17028 @ReturnMapping(ErrorResults)
17029 async def SetVolumeInfo(self, volumes):
17030 '''
17031 volumes : typing.Sequence[~Volume]
17032 Returns -> typing.Sequence[~ErrorResult]
17033 '''
17034 # map input types to rpc msg
17035 params = dict()
17036 msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params)
17037 params['volumes'] = volumes
17038 reply = await self.rpc(msg)
17039 return reply
17040
17041
17042
17043 @ReturnMapping(ErrorResults)
17044 async def UpdateStatus(self, entities):
17045 '''
17046 entities : typing.Sequence[~EntityStatusArgs]
17047 Returns -> typing.Sequence[~ErrorResult]
17048 '''
17049 # map input types to rpc msg
17050 params = dict()
17051 msg = dict(Type='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params)
17052 params['Entities'] = entities
17053 reply = await self.rpc(msg)
17054 return reply
17055
17056
17057
17058 @ReturnMapping(VolumeAttachmentParamsResults)
17059 async def VolumeAttachmentParams(self, ids):
17060 '''
17061 ids : typing.Sequence[~MachineStorageId]
17062 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
17063 '''
17064 # map input types to rpc msg
17065 params = dict()
17066 msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params)
17067 params['ids'] = ids
17068 reply = await self.rpc(msg)
17069 return reply
17070
17071
17072
17073 @ReturnMapping(VolumeAttachmentResults)
17074 async def VolumeAttachments(self, ids):
17075 '''
17076 ids : typing.Sequence[~MachineStorageId]
17077 Returns -> typing.Sequence[~VolumeAttachmentResult]
17078 '''
17079 # map input types to rpc msg
17080 params = dict()
17081 msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params)
17082 params['ids'] = ids
17083 reply = await self.rpc(msg)
17084 return reply
17085
17086
17087
17088 @ReturnMapping(BlockDeviceResults)
17089 async def VolumeBlockDevices(self, ids):
17090 '''
17091 ids : typing.Sequence[~MachineStorageId]
17092 Returns -> typing.Sequence[~BlockDeviceResult]
17093 '''
17094 # map input types to rpc msg
17095 params = dict()
17096 msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params)
17097 params['ids'] = ids
17098 reply = await self.rpc(msg)
17099 return reply
17100
17101
17102
17103 @ReturnMapping(VolumeParamsResults)
17104 async def VolumeParams(self, entities):
17105 '''
17106 entities : typing.Sequence[~Entity]
17107 Returns -> typing.Sequence[~VolumeParamsResult]
17108 '''
17109 # map input types to rpc msg
17110 params = dict()
17111 msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params)
17112 params['Entities'] = entities
17113 reply = await self.rpc(msg)
17114 return reply
17115
17116
17117
17118 @ReturnMapping(VolumeResults)
17119 async def Volumes(self, entities):
17120 '''
17121 entities : typing.Sequence[~Entity]
17122 Returns -> typing.Sequence[~VolumeResult]
17123 '''
17124 # map input types to rpc msg
17125 params = dict()
17126 msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params)
17127 params['Entities'] = entities
17128 reply = await self.rpc(msg)
17129 return reply
17130
17131
17132
17133 @ReturnMapping(NotifyWatchResults)
17134 async def WatchBlockDevices(self, entities):
17135 '''
17136 entities : typing.Sequence[~Entity]
17137 Returns -> typing.Sequence[~NotifyWatchResult]
17138 '''
17139 # map input types to rpc msg
17140 params = dict()
17141 msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params)
17142 params['Entities'] = entities
17143 reply = await self.rpc(msg)
17144 return reply
17145
17146
17147
17148 @ReturnMapping(MachineStorageIdsWatchResults)
17149 async def WatchFilesystemAttachments(self, entities):
17150 '''
17151 entities : typing.Sequence[~Entity]
17152 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17153 '''
17154 # map input types to rpc msg
17155 params = dict()
17156 msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params)
17157 params['Entities'] = entities
17158 reply = await self.rpc(msg)
17159 return reply
17160
17161
17162
17163 @ReturnMapping(StringsWatchResults)
17164 async def WatchFilesystems(self, entities):
17165 '''
17166 entities : typing.Sequence[~Entity]
17167 Returns -> typing.Sequence[~StringsWatchResult]
17168 '''
17169 # map input types to rpc msg
17170 params = dict()
17171 msg = dict(Type='StorageProvisioner', Request='WatchFilesystems', Version=2, Params=params)
17172 params['Entities'] = entities
17173 reply = await self.rpc(msg)
17174 return reply
17175
17176
17177
17178 @ReturnMapping(NotifyWatchResult)
17179 async def WatchForModelConfigChanges(self):
17180 '''
17181
17182 Returns -> typing.Union[_ForwardRef('Error'), str]
17183 '''
17184 # map input types to rpc msg
17185 params = dict()
17186 msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
17187
17188 reply = await self.rpc(msg)
17189 return reply
17190
17191
17192
17193 @ReturnMapping(NotifyWatchResults)
17194 async def WatchMachines(self, entities):
17195 '''
17196 entities : typing.Sequence[~Entity]
17197 Returns -> typing.Sequence[~NotifyWatchResult]
17198 '''
17199 # map input types to rpc msg
17200 params = dict()
17201 msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params)
17202 params['Entities'] = entities
17203 reply = await self.rpc(msg)
17204 return reply
17205
17206
17207
17208 @ReturnMapping(MachineStorageIdsWatchResults)
17209 async def WatchVolumeAttachments(self, entities):
17210 '''
17211 entities : typing.Sequence[~Entity]
17212 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17213 '''
17214 # map input types to rpc msg
17215 params = dict()
17216 msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params)
17217 params['Entities'] = entities
17218 reply = await self.rpc(msg)
17219 return reply
17220
17221
17222
17223 @ReturnMapping(StringsWatchResults)
17224 async def WatchVolumes(self, entities):
17225 '''
17226 entities : typing.Sequence[~Entity]
17227 Returns -> typing.Sequence[~StringsWatchResult]
17228 '''
17229 # map input types to rpc msg
17230 params = dict()
17231 msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params)
17232 params['Entities'] = entities
17233 reply = await self.rpc(msg)
17234 return reply
17235
17236
17237 class StringsWatcher(Type):
17238 name = 'StringsWatcher'
17239 version = 1
17240 schema = {'definitions': {'Error': {'additionalProperties': False,
17241 'properties': {'Code': {'type': 'string'},
17242 'Info': {'$ref': '#/definitions/ErrorInfo'},
17243 'Message': {'type': 'string'}},
17244 'required': ['Message', 'Code'],
17245 'type': 'object'},
17246 'ErrorInfo': {'additionalProperties': False,
17247 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17248 'MacaroonPath': {'type': 'string'}},
17249 'type': 'object'},
17250 'Macaroon': {'additionalProperties': False,
17251 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17252 'type': 'array'},
17253 'data': {'items': {'type': 'integer'},
17254 'type': 'array'},
17255 'id': {'$ref': '#/definitions/packet'},
17256 'location': {'$ref': '#/definitions/packet'},
17257 'sig': {'items': {'type': 'integer'},
17258 'type': 'array'}},
17259 'required': ['data',
17260 'location',
17261 'id',
17262 'caveats',
17263 'sig'],
17264 'type': 'object'},
17265 'StringsWatchResult': {'additionalProperties': False,
17266 'properties': {'Changes': {'items': {'type': 'string'},
17267 'type': 'array'},
17268 'Error': {'$ref': '#/definitions/Error'},
17269 'StringsWatcherId': {'type': 'string'}},
17270 'required': ['StringsWatcherId',
17271 'Changes',
17272 'Error'],
17273 'type': 'object'},
17274 'caveat': {'additionalProperties': False,
17275 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17276 'location': {'$ref': '#/definitions/packet'},
17277 'verificationId': {'$ref': '#/definitions/packet'}},
17278 'required': ['location',
17279 'caveatId',
17280 'verificationId'],
17281 'type': 'object'},
17282 'packet': {'additionalProperties': False,
17283 'properties': {'headerLen': {'type': 'integer'},
17284 'start': {'type': 'integer'},
17285 'totalLen': {'type': 'integer'}},
17286 'required': ['start', 'totalLen', 'headerLen'],
17287 'type': 'object'}},
17288 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17289 'type': 'object'},
17290 'Stop': {'type': 'object'}},
17291 'type': 'object'}
17292
17293
17294 @ReturnMapping(StringsWatchResult)
17295 async def Next(self):
17296 '''
17297
17298 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17299 '''
17300 # map input types to rpc msg
17301 params = dict()
17302 msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params)
17303
17304 reply = await self.rpc(msg)
17305 return reply
17306
17307
17308
17309 @ReturnMapping(None)
17310 async def Stop(self):
17311 '''
17312
17313 Returns -> None
17314 '''
17315 # map input types to rpc msg
17316 params = dict()
17317 msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params)
17318
17319 reply = await self.rpc(msg)
17320 return reply
17321
17322
17323 class Subnets(Type):
17324 name = 'Subnets'
17325 version = 2
17326 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
17327 'properties': {'SpaceTag': {'type': 'string'},
17328 'SubnetProviderId': {'type': 'string'},
17329 'SubnetTag': {'type': 'string'},
17330 'Zones': {'items': {'type': 'string'},
17331 'type': 'array'}},
17332 'required': ['SpaceTag'],
17333 'type': 'object'},
17334 'AddSubnetsParams': {'additionalProperties': False,
17335 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
17336 'type': 'array'}},
17337 'required': ['Subnets'],
17338 'type': 'object'},
17339 'Error': {'additionalProperties': False,
17340 'properties': {'Code': {'type': 'string'},
17341 'Info': {'$ref': '#/definitions/ErrorInfo'},
17342 'Message': {'type': 'string'}},
17343 'required': ['Message', 'Code'],
17344 'type': 'object'},
17345 'ErrorInfo': {'additionalProperties': False,
17346 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17347 'MacaroonPath': {'type': 'string'}},
17348 'type': 'object'},
17349 'ErrorResult': {'additionalProperties': False,
17350 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17351 'required': ['Error'],
17352 'type': 'object'},
17353 'ErrorResults': {'additionalProperties': False,
17354 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17355 'type': 'array'}},
17356 'required': ['Results'],
17357 'type': 'object'},
17358 'ListSubnetsResults': {'additionalProperties': False,
17359 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
17360 'type': 'array'}},
17361 'required': ['Results'],
17362 'type': 'object'},
17363 'Macaroon': {'additionalProperties': False,
17364 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17365 'type': 'array'},
17366 'data': {'items': {'type': 'integer'},
17367 'type': 'array'},
17368 'id': {'$ref': '#/definitions/packet'},
17369 'location': {'$ref': '#/definitions/packet'},
17370 'sig': {'items': {'type': 'integer'},
17371 'type': 'array'}},
17372 'required': ['data',
17373 'location',
17374 'id',
17375 'caveats',
17376 'sig'],
17377 'type': 'object'},
17378 'SpaceResult': {'additionalProperties': False,
17379 'properties': {'Error': {'$ref': '#/definitions/Error'},
17380 'Tag': {'type': 'string'}},
17381 'required': ['Error', 'Tag'],
17382 'type': 'object'},
17383 'SpaceResults': {'additionalProperties': False,
17384 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
17385 'type': 'array'}},
17386 'required': ['Results'],
17387 'type': 'object'},
17388 'Subnet': {'additionalProperties': False,
17389 'properties': {'CIDR': {'type': 'string'},
17390 'Life': {'type': 'string'},
17391 'ProviderId': {'type': 'string'},
17392 'SpaceTag': {'type': 'string'},
17393 'StaticRangeHighIP': {'items': {'type': 'integer'},
17394 'type': 'array'},
17395 'StaticRangeLowIP': {'items': {'type': 'integer'},
17396 'type': 'array'},
17397 'Status': {'type': 'string'},
17398 'VLANTag': {'type': 'integer'},
17399 'Zones': {'items': {'type': 'string'},
17400 'type': 'array'}},
17401 'required': ['CIDR',
17402 'VLANTag',
17403 'Life',
17404 'SpaceTag',
17405 'Zones'],
17406 'type': 'object'},
17407 'SubnetsFilters': {'additionalProperties': False,
17408 'properties': {'SpaceTag': {'type': 'string'},
17409 'Zone': {'type': 'string'}},
17410 'type': 'object'},
17411 'ZoneResult': {'additionalProperties': False,
17412 'properties': {'Available': {'type': 'boolean'},
17413 'Error': {'$ref': '#/definitions/Error'},
17414 'Name': {'type': 'string'}},
17415 'required': ['Error', 'Name', 'Available'],
17416 'type': 'object'},
17417 'ZoneResults': {'additionalProperties': False,
17418 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
17419 'type': 'array'}},
17420 'required': ['Results'],
17421 'type': 'object'},
17422 'caveat': {'additionalProperties': False,
17423 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17424 'location': {'$ref': '#/definitions/packet'},
17425 'verificationId': {'$ref': '#/definitions/packet'}},
17426 'required': ['location',
17427 'caveatId',
17428 'verificationId'],
17429 'type': 'object'},
17430 'packet': {'additionalProperties': False,
17431 'properties': {'headerLen': {'type': 'integer'},
17432 'start': {'type': 'integer'},
17433 'totalLen': {'type': 'integer'}},
17434 'required': ['start', 'totalLen', 'headerLen'],
17435 'type': 'object'}},
17436 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
17437 'Result': {'$ref': '#/definitions/ErrorResults'}},
17438 'type': 'object'},
17439 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
17440 'type': 'object'},
17441 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
17442 'type': 'object'},
17443 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
17444 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
17445 'type': 'object'}},
17446 'type': 'object'}
17447
17448
17449 @ReturnMapping(ErrorResults)
17450 async def AddSubnets(self, subnets):
17451 '''
17452 subnets : typing.Sequence[~AddSubnetParams]
17453 Returns -> typing.Sequence[~ErrorResult]
17454 '''
17455 # map input types to rpc msg
17456 params = dict()
17457 msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params)
17458 params['Subnets'] = subnets
17459 reply = await self.rpc(msg)
17460 return reply
17461
17462
17463
17464 @ReturnMapping(SpaceResults)
17465 async def AllSpaces(self):
17466 '''
17467
17468 Returns -> typing.Sequence[~SpaceResult]
17469 '''
17470 # map input types to rpc msg
17471 params = dict()
17472 msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params)
17473
17474 reply = await self.rpc(msg)
17475 return reply
17476
17477
17478
17479 @ReturnMapping(ZoneResults)
17480 async def AllZones(self):
17481 '''
17482
17483 Returns -> typing.Sequence[~ZoneResult]
17484 '''
17485 # map input types to rpc msg
17486 params = dict()
17487 msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params)
17488
17489 reply = await self.rpc(msg)
17490 return reply
17491
17492
17493
17494 @ReturnMapping(ListSubnetsResults)
17495 async def ListSubnets(self, spacetag, zone):
17496 '''
17497 spacetag : str
17498 zone : str
17499 Returns -> typing.Sequence[~Subnet]
17500 '''
17501 # map input types to rpc msg
17502 params = dict()
17503 msg = dict(Type='Subnets', Request='ListSubnets', Version=2, Params=params)
17504 params['SpaceTag'] = spacetag
17505 params['Zone'] = zone
17506 reply = await self.rpc(msg)
17507 return reply
17508
17509
17510 class Undertaker(Type):
17511 name = 'Undertaker'
17512 version = 1
17513 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
17514 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17515 'type': 'object'}},
17516 'type': 'object'},
17517 'Info': {'type': 'string'},
17518 'Status': {'type': 'string'},
17519 'Tag': {'type': 'string'}},
17520 'required': ['Tag',
17521 'Status',
17522 'Info',
17523 'Data'],
17524 'type': 'object'},
17525 'Error': {'additionalProperties': False,
17526 'properties': {'Code': {'type': 'string'},
17527 'Info': {'$ref': '#/definitions/ErrorInfo'},
17528 'Message': {'type': 'string'}},
17529 'required': ['Message', 'Code'],
17530 'type': 'object'},
17531 'ErrorInfo': {'additionalProperties': False,
17532 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17533 'MacaroonPath': {'type': 'string'}},
17534 'type': 'object'},
17535 'ErrorResult': {'additionalProperties': False,
17536 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17537 'required': ['Error'],
17538 'type': 'object'},
17539 'ErrorResults': {'additionalProperties': False,
17540 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17541 'type': 'array'}},
17542 'required': ['Results'],
17543 'type': 'object'},
17544 'Macaroon': {'additionalProperties': False,
17545 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17546 'type': 'array'},
17547 'data': {'items': {'type': 'integer'},
17548 'type': 'array'},
17549 'id': {'$ref': '#/definitions/packet'},
17550 'location': {'$ref': '#/definitions/packet'},
17551 'sig': {'items': {'type': 'integer'},
17552 'type': 'array'}},
17553 'required': ['data',
17554 'location',
17555 'id',
17556 'caveats',
17557 'sig'],
17558 'type': 'object'},
17559 'ModelConfigResult': {'additionalProperties': False,
17560 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
17561 'type': 'object'}},
17562 'type': 'object'}},
17563 'required': ['Config'],
17564 'type': 'object'},
17565 'NotifyWatchResult': {'additionalProperties': False,
17566 'properties': {'Error': {'$ref': '#/definitions/Error'},
17567 'NotifyWatcherId': {'type': 'string'}},
17568 'required': ['NotifyWatcherId', 'Error'],
17569 'type': 'object'},
17570 'NotifyWatchResults': {'additionalProperties': False,
17571 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17572 'type': 'array'}},
17573 'required': ['Results'],
17574 'type': 'object'},
17575 'SetStatus': {'additionalProperties': False,
17576 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17577 'type': 'array'}},
17578 'required': ['Entities'],
17579 'type': 'object'},
17580 'UndertakerModelInfo': {'additionalProperties': False,
17581 'properties': {'GlobalName': {'type': 'string'},
17582 'IsSystem': {'type': 'boolean'},
17583 'Life': {'type': 'string'},
17584 'Name': {'type': 'string'},
17585 'UUID': {'type': 'string'}},
17586 'required': ['UUID',
17587 'Name',
17588 'GlobalName',
17589 'IsSystem',
17590 'Life'],
17591 'type': 'object'},
17592 'UndertakerModelInfoResult': {'additionalProperties': False,
17593 'properties': {'Error': {'$ref': '#/definitions/Error'},
17594 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
17595 'required': ['Error', 'Result'],
17596 'type': 'object'},
17597 'caveat': {'additionalProperties': False,
17598 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17599 'location': {'$ref': '#/definitions/packet'},
17600 'verificationId': {'$ref': '#/definitions/packet'}},
17601 'required': ['location',
17602 'caveatId',
17603 'verificationId'],
17604 'type': 'object'},
17605 'packet': {'additionalProperties': False,
17606 'properties': {'headerLen': {'type': 'integer'},
17607 'start': {'type': 'integer'},
17608 'totalLen': {'type': 'integer'}},
17609 'required': ['start', 'totalLen', 'headerLen'],
17610 'type': 'object'}},
17611 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
17612 'type': 'object'},
17613 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
17614 'type': 'object'},
17615 'ProcessDyingModel': {'type': 'object'},
17616 'RemoveModel': {'type': 'object'},
17617 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17618 'Result': {'$ref': '#/definitions/ErrorResults'}},
17619 'type': 'object'},
17620 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17621 'Result': {'$ref': '#/definitions/ErrorResults'}},
17622 'type': 'object'},
17623 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17624 'type': 'object'}},
17625 'type': 'object'}
17626
17627
17628 @ReturnMapping(ModelConfigResult)
17629 async def ModelConfig(self):
17630 '''
17631
17632 Returns -> typing.Mapping[str, typing.Any]
17633 '''
17634 # map input types to rpc msg
17635 params = dict()
17636 msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params)
17637
17638 reply = await self.rpc(msg)
17639 return reply
17640
17641
17642
17643 @ReturnMapping(UndertakerModelInfoResult)
17644 async def ModelInfo(self):
17645 '''
17646
17647 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
17648 '''
17649 # map input types to rpc msg
17650 params = dict()
17651 msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params)
17652
17653 reply = await self.rpc(msg)
17654 return reply
17655
17656
17657
17658 @ReturnMapping(None)
17659 async def ProcessDyingModel(self):
17660 '''
17661
17662 Returns -> None
17663 '''
17664 # map input types to rpc msg
17665 params = dict()
17666 msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params)
17667
17668 reply = await self.rpc(msg)
17669 return reply
17670
17671
17672
17673 @ReturnMapping(None)
17674 async def RemoveModel(self):
17675 '''
17676
17677 Returns -> None
17678 '''
17679 # map input types to rpc msg
17680 params = dict()
17681 msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params)
17682
17683 reply = await self.rpc(msg)
17684 return reply
17685
17686
17687
17688 @ReturnMapping(ErrorResults)
17689 async def SetStatus(self, entities):
17690 '''
17691 entities : typing.Sequence[~EntityStatusArgs]
17692 Returns -> typing.Sequence[~ErrorResult]
17693 '''
17694 # map input types to rpc msg
17695 params = dict()
17696 msg = dict(Type='Undertaker', Request='SetStatus', Version=1, Params=params)
17697 params['Entities'] = entities
17698 reply = await self.rpc(msg)
17699 return reply
17700
17701
17702
17703 @ReturnMapping(ErrorResults)
17704 async def UpdateStatus(self, entities):
17705 '''
17706 entities : typing.Sequence[~EntityStatusArgs]
17707 Returns -> typing.Sequence[~ErrorResult]
17708 '''
17709 # map input types to rpc msg
17710 params = dict()
17711 msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params)
17712 params['Entities'] = entities
17713 reply = await self.rpc(msg)
17714 return reply
17715
17716
17717
17718 @ReturnMapping(NotifyWatchResults)
17719 async def WatchModelResources(self):
17720 '''
17721
17722 Returns -> typing.Sequence[~NotifyWatchResult]
17723 '''
17724 # map input types to rpc msg
17725 params = dict()
17726 msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params)
17727
17728 reply = await self.rpc(msg)
17729 return reply
17730
17731
17732 class UnitAssigner(Type):
17733 name = 'UnitAssigner'
17734 version = 1
17735 schema = {'definitions': {'Entities': {'additionalProperties': False,
17736 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17737 'type': 'array'}},
17738 'required': ['Entities'],
17739 'type': 'object'},
17740 'Entity': {'additionalProperties': False,
17741 'properties': {'Tag': {'type': 'string'}},
17742 'required': ['Tag'],
17743 'type': 'object'},
17744 'EntityStatusArgs': {'additionalProperties': False,
17745 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17746 'type': 'object'}},
17747 'type': 'object'},
17748 'Info': {'type': 'string'},
17749 'Status': {'type': 'string'},
17750 'Tag': {'type': 'string'}},
17751 'required': ['Tag',
17752 'Status',
17753 'Info',
17754 'Data'],
17755 'type': 'object'},
17756 'Error': {'additionalProperties': False,
17757 'properties': {'Code': {'type': 'string'},
17758 'Info': {'$ref': '#/definitions/ErrorInfo'},
17759 'Message': {'type': 'string'}},
17760 'required': ['Message', 'Code'],
17761 'type': 'object'},
17762 'ErrorInfo': {'additionalProperties': False,
17763 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17764 'MacaroonPath': {'type': 'string'}},
17765 'type': 'object'},
17766 'ErrorResult': {'additionalProperties': False,
17767 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17768 'required': ['Error'],
17769 'type': 'object'},
17770 'ErrorResults': {'additionalProperties': False,
17771 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17772 'type': 'array'}},
17773 'required': ['Results'],
17774 'type': 'object'},
17775 'Macaroon': {'additionalProperties': False,
17776 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17777 'type': 'array'},
17778 'data': {'items': {'type': 'integer'},
17779 'type': 'array'},
17780 'id': {'$ref': '#/definitions/packet'},
17781 'location': {'$ref': '#/definitions/packet'},
17782 'sig': {'items': {'type': 'integer'},
17783 'type': 'array'}},
17784 'required': ['data',
17785 'location',
17786 'id',
17787 'caveats',
17788 'sig'],
17789 'type': 'object'},
17790 'SetStatus': {'additionalProperties': False,
17791 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17792 'type': 'array'}},
17793 'required': ['Entities'],
17794 'type': 'object'},
17795 'StringsWatchResult': {'additionalProperties': False,
17796 'properties': {'Changes': {'items': {'type': 'string'},
17797 'type': 'array'},
17798 'Error': {'$ref': '#/definitions/Error'},
17799 'StringsWatcherId': {'type': 'string'}},
17800 'required': ['StringsWatcherId',
17801 'Changes',
17802 'Error'],
17803 'type': 'object'},
17804 'caveat': {'additionalProperties': False,
17805 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17806 'location': {'$ref': '#/definitions/packet'},
17807 'verificationId': {'$ref': '#/definitions/packet'}},
17808 'required': ['location',
17809 'caveatId',
17810 'verificationId'],
17811 'type': 'object'},
17812 'packet': {'additionalProperties': False,
17813 'properties': {'headerLen': {'type': 'integer'},
17814 'start': {'type': 'integer'},
17815 'totalLen': {'type': 'integer'}},
17816 'required': ['start', 'totalLen', 'headerLen'],
17817 'type': 'object'}},
17818 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17819 'Result': {'$ref': '#/definitions/ErrorResults'}},
17820 'type': 'object'},
17821 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17822 'Result': {'$ref': '#/definitions/ErrorResults'}},
17823 'type': 'object'},
17824 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17825 'type': 'object'}},
17826 'type': 'object'}
17827
17828
17829 @ReturnMapping(ErrorResults)
17830 async def AssignUnits(self, entities):
17831 '''
17832 entities : typing.Sequence[~Entity]
17833 Returns -> typing.Sequence[~ErrorResult]
17834 '''
17835 # map input types to rpc msg
17836 params = dict()
17837 msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params)
17838 params['Entities'] = entities
17839 reply = await self.rpc(msg)
17840 return reply
17841
17842
17843
17844 @ReturnMapping(ErrorResults)
17845 async def SetAgentStatus(self, entities):
17846 '''
17847 entities : typing.Sequence[~EntityStatusArgs]
17848 Returns -> typing.Sequence[~ErrorResult]
17849 '''
17850 # map input types to rpc msg
17851 params = dict()
17852 msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params)
17853 params['Entities'] = entities
17854 reply = await self.rpc(msg)
17855 return reply
17856
17857
17858
17859 @ReturnMapping(StringsWatchResult)
17860 async def WatchUnitAssignments(self):
17861 '''
17862
17863 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17864 '''
17865 # map input types to rpc msg
17866 params = dict()
17867 msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params)
17868
17869 reply = await self.rpc(msg)
17870 return reply
17871
17872
17873 class Uniter(Type):
17874 name = 'Uniter'
17875 version = 3
17876 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17877 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17878 'type': 'array'},
17879 'type': 'array'}},
17880 'required': ['Servers'],
17881 'type': 'object'},
17882 'Action': {'additionalProperties': False,
17883 'properties': {'name': {'type': 'string'},
17884 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17885 'type': 'object'}},
17886 'type': 'object'},
17887 'receiver': {'type': 'string'},
17888 'tag': {'type': 'string'}},
17889 'required': ['tag', 'receiver', 'name'],
17890 'type': 'object'},
17891 'ActionExecutionResult': {'additionalProperties': False,
17892 'properties': {'actiontag': {'type': 'string'},
17893 'message': {'type': 'string'},
17894 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17895 'type': 'object'}},
17896 'type': 'object'},
17897 'status': {'type': 'string'}},
17898 'required': ['actiontag', 'status'],
17899 'type': 'object'},
17900 'ActionExecutionResults': {'additionalProperties': False,
17901 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
17902 'type': 'array'}},
17903 'type': 'object'},
17904 'ActionResult': {'additionalProperties': False,
17905 'properties': {'action': {'$ref': '#/definitions/Action'},
17906 'completed': {'format': 'date-time',
17907 'type': 'string'},
17908 'enqueued': {'format': 'date-time',
17909 'type': 'string'},
17910 'error': {'$ref': '#/definitions/Error'},
17911 'message': {'type': 'string'},
17912 'output': {'patternProperties': {'.*': {'additionalProperties': True,
17913 'type': 'object'}},
17914 'type': 'object'},
17915 'started': {'format': 'date-time',
17916 'type': 'string'},
17917 'status': {'type': 'string'}},
17918 'type': 'object'},
17919 'ActionResults': {'additionalProperties': False,
17920 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
17921 'type': 'array'}},
17922 'type': 'object'},
17923 'Address': {'additionalProperties': False,
17924 'properties': {'Scope': {'type': 'string'},
17925 'SpaceName': {'type': 'string'},
17926 'Type': {'type': 'string'},
17927 'Value': {'type': 'string'}},
17928 'required': ['Value', 'Type', 'Scope'],
17929 'type': 'object'},
17930 'BoolResult': {'additionalProperties': False,
17931 'properties': {'Error': {'$ref': '#/definitions/Error'},
17932 'Result': {'type': 'boolean'}},
17933 'required': ['Error', 'Result'],
17934 'type': 'object'},
17935 'BoolResults': {'additionalProperties': False,
17936 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
17937 'type': 'array'}},
17938 'required': ['Results'],
17939 'type': 'object'},
17940 'BytesResult': {'additionalProperties': False,
17941 'properties': {'Result': {'items': {'type': 'integer'},
17942 'type': 'array'}},
17943 'required': ['Result'],
17944 'type': 'object'},
17945 'CharmURL': {'additionalProperties': False,
17946 'properties': {'URL': {'type': 'string'}},
17947 'required': ['URL'],
17948 'type': 'object'},
17949 'CharmURLs': {'additionalProperties': False,
17950 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
17951 'type': 'array'}},
17952 'required': ['URLs'],
17953 'type': 'object'},
17954 'ConfigSettingsResult': {'additionalProperties': False,
17955 'properties': {'Error': {'$ref': '#/definitions/Error'},
17956 'Settings': {'patternProperties': {'.*': {'additionalProperties': True,
17957 'type': 'object'}},
17958 'type': 'object'}},
17959 'required': ['Error', 'Settings'],
17960 'type': 'object'},
17961 'ConfigSettingsResults': {'additionalProperties': False,
17962 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
17963 'type': 'array'}},
17964 'required': ['Results'],
17965 'type': 'object'},
17966 'Endpoint': {'additionalProperties': False,
17967 'properties': {'Relation': {'$ref': '#/definitions/Relation'},
17968 'ServiceName': {'type': 'string'}},
17969 'required': ['ServiceName', 'Relation'],
17970 'type': 'object'},
17971 'Entities': {'additionalProperties': False,
17972 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17973 'type': 'array'}},
17974 'required': ['Entities'],
17975 'type': 'object'},
17976 'EntitiesCharmURL': {'additionalProperties': False,
17977 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
17978 'type': 'array'}},
17979 'required': ['Entities'],
17980 'type': 'object'},
17981 'EntitiesPortRanges': {'additionalProperties': False,
17982 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
17983 'type': 'array'}},
17984 'required': ['Entities'],
17985 'type': 'object'},
17986 'Entity': {'additionalProperties': False,
17987 'properties': {'Tag': {'type': 'string'}},
17988 'required': ['Tag'],
17989 'type': 'object'},
17990 'EntityCharmURL': {'additionalProperties': False,
17991 'properties': {'CharmURL': {'type': 'string'},
17992 'Tag': {'type': 'string'}},
17993 'required': ['Tag', 'CharmURL'],
17994 'type': 'object'},
17995 'EntityPortRange': {'additionalProperties': False,
17996 'properties': {'FromPort': {'type': 'integer'},
17997 'Protocol': {'type': 'string'},
17998 'Tag': {'type': 'string'},
17999 'ToPort': {'type': 'integer'}},
18000 'required': ['Tag',
18001 'Protocol',
18002 'FromPort',
18003 'ToPort'],
18004 'type': 'object'},
18005 'EntityStatusArgs': {'additionalProperties': False,
18006 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18007 'type': 'object'}},
18008 'type': 'object'},
18009 'Info': {'type': 'string'},
18010 'Status': {'type': 'string'},
18011 'Tag': {'type': 'string'}},
18012 'required': ['Tag',
18013 'Status',
18014 'Info',
18015 'Data'],
18016 'type': 'object'},
18017 'Error': {'additionalProperties': False,
18018 'properties': {'Code': {'type': 'string'},
18019 'Info': {'$ref': '#/definitions/ErrorInfo'},
18020 'Message': {'type': 'string'}},
18021 'required': ['Message', 'Code'],
18022 'type': 'object'},
18023 'ErrorInfo': {'additionalProperties': False,
18024 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
18025 'MacaroonPath': {'type': 'string'}},
18026 'type': 'object'},
18027 'ErrorResult': {'additionalProperties': False,
18028 'properties': {'Error': {'$ref': '#/definitions/Error'}},
18029 'required': ['Error'],
18030 'type': 'object'},
18031 'ErrorResults': {'additionalProperties': False,
18032 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
18033 'type': 'array'}},
18034 'required': ['Results'],
18035 'type': 'object'},
18036 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18037 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18038 'type': 'array'}},
18039 'required': ['Results'],
18040 'type': 'object'},
18041 'GetLeadershipSettingsResult': {'additionalProperties': False,
18042 'properties': {'Error': {'$ref': '#/definitions/Error'},
18043 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18044 'type': 'object'}},
18045 'required': ['Settings',
18046 'Error'],
18047 'type': 'object'},
18048 'HostPort': {'additionalProperties': False,
18049 'properties': {'Address': {'$ref': '#/definitions/Address'},
18050 'Port': {'type': 'integer'}},
18051 'required': ['Address', 'Port'],
18052 'type': 'object'},
18053 'IntResult': {'additionalProperties': False,
18054 'properties': {'Error': {'$ref': '#/definitions/Error'},
18055 'Result': {'type': 'integer'}},
18056 'required': ['Error', 'Result'],
18057 'type': 'object'},
18058 'IntResults': {'additionalProperties': False,
18059 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
18060 'type': 'array'}},
18061 'required': ['Results'],
18062 'type': 'object'},
18063 'LifeResult': {'additionalProperties': False,
18064 'properties': {'Error': {'$ref': '#/definitions/Error'},
18065 'Life': {'type': 'string'}},
18066 'required': ['Life', 'Error'],
18067 'type': 'object'},
18068 'LifeResults': {'additionalProperties': False,
18069 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
18070 'type': 'array'}},
18071 'required': ['Results'],
18072 'type': 'object'},
18073 'Macaroon': {'additionalProperties': False,
18074 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
18075 'type': 'array'},
18076 'data': {'items': {'type': 'integer'},
18077 'type': 'array'},
18078 'id': {'$ref': '#/definitions/packet'},
18079 'location': {'$ref': '#/definitions/packet'},
18080 'sig': {'items': {'type': 'integer'},
18081 'type': 'array'}},
18082 'required': ['data',
18083 'location',
18084 'id',
18085 'caveats',
18086 'sig'],
18087 'type': 'object'},
18088 'MachinePortRange': {'additionalProperties': False,
18089 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
18090 'RelationTag': {'type': 'string'},
18091 'UnitTag': {'type': 'string'}},
18092 'required': ['UnitTag',
18093 'RelationTag',
18094 'PortRange'],
18095 'type': 'object'},
18096 'MachinePortsResult': {'additionalProperties': False,
18097 'properties': {'Error': {'$ref': '#/definitions/Error'},
18098 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18099 'type': 'array'}},
18100 'required': ['Error', 'Ports'],
18101 'type': 'object'},
18102 'MachinePortsResults': {'additionalProperties': False,
18103 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18104 'type': 'array'}},
18105 'required': ['Results'],
18106 'type': 'object'},
18107 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18108 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18109 'type': 'array'}},
18110 'required': ['Params'],
18111 'type': 'object'},
18112 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18113 'properties': {'ServiceTag': {'type': 'string'},
18114 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18115 'type': 'object'}},
18116 'required': ['ServiceTag',
18117 'Settings'],
18118 'type': 'object'},
18119 'MeterStatusResult': {'additionalProperties': False,
18120 'properties': {'Code': {'type': 'string'},
18121 'Error': {'$ref': '#/definitions/Error'},
18122 'Info': {'type': 'string'}},
18123 'required': ['Code', 'Info', 'Error'],
18124 'type': 'object'},
18125 'MeterStatusResults': {'additionalProperties': False,
18126 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18127 'type': 'array'}},
18128 'required': ['Results'],
18129 'type': 'object'},
18130 'Metric': {'additionalProperties': False,
18131 'properties': {'Key': {'type': 'string'},
18132 'Time': {'format': 'date-time',
18133 'type': 'string'},
18134 'Value': {'type': 'string'}},
18135 'required': ['Key', 'Value', 'Time'],
18136 'type': 'object'},
18137 'MetricBatch': {'additionalProperties': False,
18138 'properties': {'CharmURL': {'type': 'string'},
18139 'Created': {'format': 'date-time',
18140 'type': 'string'},
18141 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
18142 'type': 'array'},
18143 'UUID': {'type': 'string'}},
18144 'required': ['UUID',
18145 'CharmURL',
18146 'Created',
18147 'Metrics'],
18148 'type': 'object'},
18149 'MetricBatchParam': {'additionalProperties': False,
18150 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
18151 'Tag': {'type': 'string'}},
18152 'required': ['Tag', 'Batch'],
18153 'type': 'object'},
18154 'MetricBatchParams': {'additionalProperties': False,
18155 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18156 'type': 'array'}},
18157 'required': ['Batches'],
18158 'type': 'object'},
18159 'ModelConfigResult': {'additionalProperties': False,
18160 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
18161 'type': 'object'}},
18162 'type': 'object'}},
18163 'required': ['Config'],
18164 'type': 'object'},
18165 'ModelResult': {'additionalProperties': False,
18166 'properties': {'Error': {'$ref': '#/definitions/Error'},
18167 'Name': {'type': 'string'},
18168 'UUID': {'type': 'string'}},
18169 'required': ['Error', 'Name', 'UUID'],
18170 'type': 'object'},
18171 'NetworkConfig': {'additionalProperties': False,
18172 'properties': {'Address': {'type': 'string'},
18173 'CIDR': {'type': 'string'},
18174 'ConfigType': {'type': 'string'},
18175 'DNSSearchDomains': {'items': {'type': 'string'},
18176 'type': 'array'},
18177 'DNSServers': {'items': {'type': 'string'},
18178 'type': 'array'},
18179 'DeviceIndex': {'type': 'integer'},
18180 'Disabled': {'type': 'boolean'},
18181 'GatewayAddress': {'type': 'string'},
18182 'InterfaceName': {'type': 'string'},
18183 'InterfaceType': {'type': 'string'},
18184 'MACAddress': {'type': 'string'},
18185 'MTU': {'type': 'integer'},
18186 'NoAutoStart': {'type': 'boolean'},
18187 'ParentInterfaceName': {'type': 'string'},
18188 'ProviderAddressId': {'type': 'string'},
18189 'ProviderId': {'type': 'string'},
18190 'ProviderSpaceId': {'type': 'string'},
18191 'ProviderSubnetId': {'type': 'string'},
18192 'ProviderVLANId': {'type': 'string'},
18193 'VLANTag': {'type': 'integer'}},
18194 'required': ['DeviceIndex',
18195 'MACAddress',
18196 'CIDR',
18197 'MTU',
18198 'ProviderId',
18199 'ProviderSubnetId',
18200 'ProviderSpaceId',
18201 'ProviderAddressId',
18202 'ProviderVLANId',
18203 'VLANTag',
18204 'InterfaceName',
18205 'ParentInterfaceName',
18206 'InterfaceType',
18207 'Disabled'],
18208 'type': 'object'},
18209 'NotifyWatchResult': {'additionalProperties': False,
18210 'properties': {'Error': {'$ref': '#/definitions/Error'},
18211 'NotifyWatcherId': {'type': 'string'}},
18212 'required': ['NotifyWatcherId', 'Error'],
18213 'type': 'object'},
18214 'NotifyWatchResults': {'additionalProperties': False,
18215 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18216 'type': 'array'}},
18217 'required': ['Results'],
18218 'type': 'object'},
18219 'PortRange': {'additionalProperties': False,
18220 'properties': {'FromPort': {'type': 'integer'},
18221 'Protocol': {'type': 'string'},
18222 'ToPort': {'type': 'integer'}},
18223 'required': ['FromPort', 'ToPort', 'Protocol'],
18224 'type': 'object'},
18225 'Relation': {'additionalProperties': False,
18226 'properties': {'Interface': {'type': 'string'},
18227 'Limit': {'type': 'integer'},
18228 'Name': {'type': 'string'},
18229 'Optional': {'type': 'boolean'},
18230 'Role': {'type': 'string'},
18231 'Scope': {'type': 'string'}},
18232 'required': ['Name',
18233 'Role',
18234 'Interface',
18235 'Optional',
18236 'Limit',
18237 'Scope'],
18238 'type': 'object'},
18239 'RelationIds': {'additionalProperties': False,
18240 'properties': {'RelationIds': {'items': {'type': 'integer'},
18241 'type': 'array'}},
18242 'required': ['RelationIds'],
18243 'type': 'object'},
18244 'RelationResult': {'additionalProperties': False,
18245 'properties': {'Endpoint': {'$ref': '#/definitions/Endpoint'},
18246 'Error': {'$ref': '#/definitions/Error'},
18247 'Id': {'type': 'integer'},
18248 'Key': {'type': 'string'},
18249 'Life': {'type': 'string'}},
18250 'required': ['Error',
18251 'Life',
18252 'Id',
18253 'Key',
18254 'Endpoint'],
18255 'type': 'object'},
18256 'RelationResults': {'additionalProperties': False,
18257 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
18258 'type': 'array'}},
18259 'required': ['Results'],
18260 'type': 'object'},
18261 'RelationUnit': {'additionalProperties': False,
18262 'properties': {'Relation': {'type': 'string'},
18263 'Unit': {'type': 'string'}},
18264 'required': ['Relation', 'Unit'],
18265 'type': 'object'},
18266 'RelationUnitPair': {'additionalProperties': False,
18267 'properties': {'LocalUnit': {'type': 'string'},
18268 'Relation': {'type': 'string'},
18269 'RemoteUnit': {'type': 'string'}},
18270 'required': ['Relation',
18271 'LocalUnit',
18272 'RemoteUnit'],
18273 'type': 'object'},
18274 'RelationUnitPairs': {'additionalProperties': False,
18275 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18276 'type': 'array'}},
18277 'required': ['RelationUnitPairs'],
18278 'type': 'object'},
18279 'RelationUnitSettings': {'additionalProperties': False,
18280 'properties': {'Relation': {'type': 'string'},
18281 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18282 'type': 'object'},
18283 'Unit': {'type': 'string'}},
18284 'required': ['Relation',
18285 'Unit',
18286 'Settings'],
18287 'type': 'object'},
18288 'RelationUnits': {'additionalProperties': False,
18289 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
18290 'type': 'array'}},
18291 'required': ['RelationUnits'],
18292 'type': 'object'},
18293 'RelationUnitsChange': {'additionalProperties': False,
18294 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18295 'type': 'object'},
18296 'Departed': {'items': {'type': 'string'},
18297 'type': 'array'}},
18298 'required': ['Changed', 'Departed'],
18299 'type': 'object'},
18300 'RelationUnitsSettings': {'additionalProperties': False,
18301 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18302 'type': 'array'}},
18303 'required': ['RelationUnits'],
18304 'type': 'object'},
18305 'RelationUnitsWatchResult': {'additionalProperties': False,
18306 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
18307 'Error': {'$ref': '#/definitions/Error'},
18308 'RelationUnitsWatcherId': {'type': 'string'}},
18309 'required': ['RelationUnitsWatcherId',
18310 'Changes',
18311 'Error'],
18312 'type': 'object'},
18313 'RelationUnitsWatchResults': {'additionalProperties': False,
18314 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18315 'type': 'array'}},
18316 'required': ['Results'],
18317 'type': 'object'},
18318 'ResolvedModeResult': {'additionalProperties': False,
18319 'properties': {'Error': {'$ref': '#/definitions/Error'},
18320 'Mode': {'type': 'string'}},
18321 'required': ['Error', 'Mode'],
18322 'type': 'object'},
18323 'ResolvedModeResults': {'additionalProperties': False,
18324 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
18325 'type': 'array'}},
18326 'required': ['Results'],
18327 'type': 'object'},
18328 'ServiceStatusResult': {'additionalProperties': False,
18329 'properties': {'Error': {'$ref': '#/definitions/Error'},
18330 'Service': {'$ref': '#/definitions/StatusResult'},
18331 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
18332 'type': 'object'}},
18333 'required': ['Service',
18334 'Units',
18335 'Error'],
18336 'type': 'object'},
18337 'ServiceStatusResults': {'additionalProperties': False,
18338 'properties': {'Results': {'items': {'$ref': '#/definitions/ServiceStatusResult'},
18339 'type': 'array'}},
18340 'required': ['Results'],
18341 'type': 'object'},
18342 'SetStatus': {'additionalProperties': False,
18343 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18344 'type': 'array'}},
18345 'required': ['Entities'],
18346 'type': 'object'},
18347 'SettingsResult': {'additionalProperties': False,
18348 'properties': {'Error': {'$ref': '#/definitions/Error'},
18349 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18350 'type': 'object'}},
18351 'required': ['Error', 'Settings'],
18352 'type': 'object'},
18353 'SettingsResults': {'additionalProperties': False,
18354 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
18355 'type': 'array'}},
18356 'required': ['Results'],
18357 'type': 'object'},
18358 'StatusResult': {'additionalProperties': False,
18359 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18360 'type': 'object'}},
18361 'type': 'object'},
18362 'Error': {'$ref': '#/definitions/Error'},
18363 'Id': {'type': 'string'},
18364 'Info': {'type': 'string'},
18365 'Life': {'type': 'string'},
18366 'Since': {'format': 'date-time',
18367 'type': 'string'},
18368 'Status': {'type': 'string'}},
18369 'required': ['Error',
18370 'Id',
18371 'Life',
18372 'Status',
18373 'Info',
18374 'Data',
18375 'Since'],
18376 'type': 'object'},
18377 'StatusResults': {'additionalProperties': False,
18378 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
18379 'type': 'array'}},
18380 'required': ['Results'],
18381 'type': 'object'},
18382 'StorageAddParams': {'additionalProperties': False,
18383 'properties': {'StorageName': {'type': 'string'},
18384 'storage': {'$ref': '#/definitions/StorageConstraints'},
18385 'unit': {'type': 'string'}},
18386 'required': ['unit',
18387 'StorageName',
18388 'storage'],
18389 'type': 'object'},
18390 'StorageAttachment': {'additionalProperties': False,
18391 'properties': {'Kind': {'type': 'integer'},
18392 'Life': {'type': 'string'},
18393 'Location': {'type': 'string'},
18394 'OwnerTag': {'type': 'string'},
18395 'StorageTag': {'type': 'string'},
18396 'UnitTag': {'type': 'string'}},
18397 'required': ['StorageTag',
18398 'OwnerTag',
18399 'UnitTag',
18400 'Kind',
18401 'Location',
18402 'Life'],
18403 'type': 'object'},
18404 'StorageAttachmentId': {'additionalProperties': False,
18405 'properties': {'storagetag': {'type': 'string'},
18406 'unittag': {'type': 'string'}},
18407 'required': ['storagetag', 'unittag'],
18408 'type': 'object'},
18409 'StorageAttachmentIds': {'additionalProperties': False,
18410 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
18411 'type': 'array'}},
18412 'required': ['ids'],
18413 'type': 'object'},
18414 'StorageAttachmentIdsResult': {'additionalProperties': False,
18415 'properties': {'error': {'$ref': '#/definitions/Error'},
18416 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
18417 'required': ['result'],
18418 'type': 'object'},
18419 'StorageAttachmentIdsResults': {'additionalProperties': False,
18420 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
18421 'type': 'array'}},
18422 'type': 'object'},
18423 'StorageAttachmentResult': {'additionalProperties': False,
18424 'properties': {'error': {'$ref': '#/definitions/Error'},
18425 'result': {'$ref': '#/definitions/StorageAttachment'}},
18426 'required': ['result'],
18427 'type': 'object'},
18428 'StorageAttachmentResults': {'additionalProperties': False,
18429 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
18430 'type': 'array'}},
18431 'type': 'object'},
18432 'StorageConstraints': {'additionalProperties': False,
18433 'properties': {'Count': {'type': 'integer'},
18434 'Pool': {'type': 'string'},
18435 'Size': {'type': 'integer'}},
18436 'required': ['Pool', 'Size', 'Count'],
18437 'type': 'object'},
18438 'StoragesAddParams': {'additionalProperties': False,
18439 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
18440 'type': 'array'}},
18441 'required': ['storages'],
18442 'type': 'object'},
18443 'StringBoolResult': {'additionalProperties': False,
18444 'properties': {'Error': {'$ref': '#/definitions/Error'},
18445 'Ok': {'type': 'boolean'},
18446 'Result': {'type': 'string'}},
18447 'required': ['Error', 'Result', 'Ok'],
18448 'type': 'object'},
18449 'StringBoolResults': {'additionalProperties': False,
18450 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
18451 'type': 'array'}},
18452 'required': ['Results'],
18453 'type': 'object'},
18454 'StringResult': {'additionalProperties': False,
18455 'properties': {'Error': {'$ref': '#/definitions/Error'},
18456 'Result': {'type': 'string'}},
18457 'required': ['Error', 'Result'],
18458 'type': 'object'},
18459 'StringResults': {'additionalProperties': False,
18460 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
18461 'type': 'array'}},
18462 'required': ['Results'],
18463 'type': 'object'},
18464 'StringsResult': {'additionalProperties': False,
18465 'properties': {'Error': {'$ref': '#/definitions/Error'},
18466 'Result': {'items': {'type': 'string'},
18467 'type': 'array'}},
18468 'required': ['Error', 'Result'],
18469 'type': 'object'},
18470 'StringsResults': {'additionalProperties': False,
18471 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
18472 'type': 'array'}},
18473 'required': ['Results'],
18474 'type': 'object'},
18475 'StringsWatchResult': {'additionalProperties': False,
18476 'properties': {'Changes': {'items': {'type': 'string'},
18477 'type': 'array'},
18478 'Error': {'$ref': '#/definitions/Error'},
18479 'StringsWatcherId': {'type': 'string'}},
18480 'required': ['StringsWatcherId',
18481 'Changes',
18482 'Error'],
18483 'type': 'object'},
18484 'StringsWatchResults': {'additionalProperties': False,
18485 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
18486 'type': 'array'}},
18487 'required': ['Results'],
18488 'type': 'object'},
18489 'UnitNetworkConfig': {'additionalProperties': False,
18490 'properties': {'BindingName': {'type': 'string'},
18491 'UnitTag': {'type': 'string'}},
18492 'required': ['UnitTag', 'BindingName'],
18493 'type': 'object'},
18494 'UnitNetworkConfigResult': {'additionalProperties': False,
18495 'properties': {'Error': {'$ref': '#/definitions/Error'},
18496 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
18497 'type': 'array'}},
18498 'required': ['Error', 'Info'],
18499 'type': 'object'},
18500 'UnitNetworkConfigResults': {'additionalProperties': False,
18501 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
18502 'type': 'array'}},
18503 'required': ['Results'],
18504 'type': 'object'},
18505 'UnitSettings': {'additionalProperties': False,
18506 'properties': {'Version': {'type': 'integer'}},
18507 'required': ['Version'],
18508 'type': 'object'},
18509 'UnitsNetworkConfig': {'additionalProperties': False,
18510 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
18511 'type': 'array'}},
18512 'required': ['Args'],
18513 'type': 'object'},
18514 'caveat': {'additionalProperties': False,
18515 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
18516 'location': {'$ref': '#/definitions/packet'},
18517 'verificationId': {'$ref': '#/definitions/packet'}},
18518 'required': ['location',
18519 'caveatId',
18520 'verificationId'],
18521 'type': 'object'},
18522 'packet': {'additionalProperties': False,
18523 'properties': {'headerLen': {'type': 'integer'},
18524 'start': {'type': 'integer'},
18525 'totalLen': {'type': 'integer'}},
18526 'required': ['start', 'totalLen', 'headerLen'],
18527 'type': 'object'}},
18528 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
18529 'type': 'object'},
18530 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
18531 'type': 'object'},
18532 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18533 'Result': {'$ref': '#/definitions/ActionResults'}},
18534 'type': 'object'},
18535 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
18536 'Result': {'$ref': '#/definitions/ErrorResults'}},
18537 'type': 'object'},
18538 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
18539 'Result': {'$ref': '#/definitions/ErrorResults'}},
18540 'type': 'object'},
18541 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18542 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
18543 'type': 'object'},
18544 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18545 'Result': {'$ref': '#/definitions/StringResults'}},
18546 'type': 'object'},
18547 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18548 'Result': {'$ref': '#/definitions/StringResults'}},
18549 'type': 'object'},
18550 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18551 'Result': {'$ref': '#/definitions/ErrorResults'}},
18552 'type': 'object'},
18553 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
18554 'type': 'object'},
18555 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
18556 'Result': {'$ref': '#/definitions/StringResults'}},
18557 'type': 'object'},
18558 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18559 'Result': {'$ref': '#/definitions/IntResults'}},
18560 'type': 'object'},
18561 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18562 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18563 'type': 'object'},
18564 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18565 'Result': {'$ref': '#/definitions/ErrorResults'}},
18566 'type': 'object'},
18567 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18568 'Result': {'$ref': '#/definitions/ErrorResults'}},
18569 'type': 'object'},
18570 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18571 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
18572 'type': 'object'},
18573 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
18574 'type': 'object'},
18575 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18576 'Result': {'$ref': '#/definitions/ErrorResults'}},
18577 'type': 'object'},
18578 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18579 'Result': {'$ref': '#/definitions/ErrorResults'}},
18580 'type': 'object'},
18581 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18582 'Result': {'$ref': '#/definitions/ErrorResults'}},
18583 'type': 'object'},
18584 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18585 'Result': {'$ref': '#/definitions/ErrorResults'}},
18586 'type': 'object'},
18587 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18588 'Result': {'$ref': '#/definitions/ErrorResults'}},
18589 'type': 'object'},
18590 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
18591 'Result': {'$ref': '#/definitions/ErrorResults'}},
18592 'type': 'object'},
18593 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18594 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
18595 'type': 'object'},
18596 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18597 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18598 'type': 'object'},
18599 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18600 'Result': {'$ref': '#/definitions/BoolResults'}},
18601 'type': 'object'},
18602 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18603 'Result': {'$ref': '#/definitions/StringsResults'}},
18604 'type': 'object'},
18605 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18606 'Result': {'$ref': '#/definitions/ErrorResults'}},
18607 'type': 'object'},
18608 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18609 'Result': {'$ref': '#/definitions/LifeResults'}},
18610 'type': 'object'},
18611 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
18612 'Result': {'$ref': '#/definitions/ErrorResults'}},
18613 'type': 'object'},
18614 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18615 'type': 'object'},
18616 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18617 'type': 'object'},
18618 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
18619 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
18620 'type': 'object'},
18621 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18622 'Result': {'$ref': '#/definitions/ErrorResults'}},
18623 'type': 'object'},
18624 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18625 'Result': {'$ref': '#/definitions/StringResults'}},
18626 'type': 'object'},
18627 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18628 'type': 'object'},
18629 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18630 'Result': {'$ref': '#/definitions/StringResults'}},
18631 'type': 'object'},
18632 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18633 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
18634 'type': 'object'},
18635 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
18636 'Result': {'$ref': '#/definitions/SettingsResults'}},
18637 'type': 'object'},
18638 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18639 'Result': {'$ref': '#/definitions/SettingsResults'}},
18640 'type': 'object'},
18641 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18642 'Result': {'$ref': '#/definitions/RelationResults'}},
18643 'type': 'object'},
18644 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
18645 'Result': {'$ref': '#/definitions/RelationResults'}},
18646 'type': 'object'},
18647 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18648 'Result': {'$ref': '#/definitions/ErrorResults'}},
18649 'type': 'object'},
18650 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18651 'Result': {'$ref': '#/definitions/ErrorResults'}},
18652 'type': 'object'},
18653 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18654 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
18655 'type': 'object'},
18656 'ServiceOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18657 'Result': {'$ref': '#/definitions/StringResults'}},
18658 'type': 'object'},
18659 'ServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18660 'Result': {'$ref': '#/definitions/ServiceStatusResults'}},
18661 'type': 'object'},
18662 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18663 'Result': {'$ref': '#/definitions/ErrorResults'}},
18664 'type': 'object'},
18665 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
18666 'Result': {'$ref': '#/definitions/ErrorResults'}},
18667 'type': 'object'},
18668 'SetServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18669 'Result': {'$ref': '#/definitions/ErrorResults'}},
18670 'type': 'object'},
18671 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18672 'Result': {'$ref': '#/definitions/ErrorResults'}},
18673 'type': 'object'},
18674 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18675 'Result': {'$ref': '#/definitions/ErrorResults'}},
18676 'type': 'object'},
18677 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18678 'Result': {'$ref': '#/definitions/LifeResults'}},
18679 'type': 'object'},
18680 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18681 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
18682 'type': 'object'},
18683 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18684 'Result': {'$ref': '#/definitions/StatusResults'}},
18685 'type': 'object'},
18686 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18687 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
18688 'type': 'object'},
18689 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
18690 'Result': {'$ref': '#/definitions/ErrorResults'}},
18691 'type': 'object'},
18692 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18693 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18694 'type': 'object'},
18695 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18696 'type': 'object'},
18697 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18698 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18699 'type': 'object'},
18700 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18701 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18702 'type': 'object'},
18703 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18704 'type': 'object'},
18705 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18706 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18707 'type': 'object'},
18708 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18709 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18710 'type': 'object'},
18711 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18712 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
18713 'type': 'object'},
18714 'WatchServiceRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18715 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18716 'type': 'object'},
18717 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18718 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18719 'type': 'object'},
18720 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18721 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18722 'type': 'object'},
18723 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18724 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18725 'type': 'object'}},
18726 'type': 'object'}
18727
18728
18729 @ReturnMapping(StringsResult)
18730 async def APIAddresses(self):
18731 '''
18732
18733 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
18734 '''
18735 # map input types to rpc msg
18736 params = dict()
18737 msg = dict(Type='Uniter', Request='APIAddresses', Version=3, Params=params)
18738
18739 reply = await self.rpc(msg)
18740 return reply
18741
18742
18743
18744 @ReturnMapping(APIHostPortsResult)
18745 async def APIHostPorts(self):
18746 '''
18747
18748 Returns -> typing.Sequence[~HostPort]
18749 '''
18750 # map input types to rpc msg
18751 params = dict()
18752 msg = dict(Type='Uniter', Request='APIHostPorts', Version=3, Params=params)
18753
18754 reply = await self.rpc(msg)
18755 return reply
18756
18757
18758
18759 @ReturnMapping(ActionResults)
18760 async def Actions(self, entities):
18761 '''
18762 entities : typing.Sequence[~Entity]
18763 Returns -> typing.Sequence[~ActionResult]
18764 '''
18765 # map input types to rpc msg
18766 params = dict()
18767 msg = dict(Type='Uniter', Request='Actions', Version=3, Params=params)
18768 params['Entities'] = entities
18769 reply = await self.rpc(msg)
18770 return reply
18771
18772
18773
18774 @ReturnMapping(ErrorResults)
18775 async def AddMetricBatches(self, batches):
18776 '''
18777 batches : typing.Sequence[~MetricBatchParam]
18778 Returns -> typing.Sequence[~ErrorResult]
18779 '''
18780 # map input types to rpc msg
18781 params = dict()
18782 msg = dict(Type='Uniter', Request='AddMetricBatches', Version=3, Params=params)
18783 params['Batches'] = batches
18784 reply = await self.rpc(msg)
18785 return reply
18786
18787
18788
18789 @ReturnMapping(ErrorResults)
18790 async def AddUnitStorage(self, storages):
18791 '''
18792 storages : typing.Sequence[~StorageAddParams]
18793 Returns -> typing.Sequence[~ErrorResult]
18794 '''
18795 # map input types to rpc msg
18796 params = dict()
18797 msg = dict(Type='Uniter', Request='AddUnitStorage', Version=3, Params=params)
18798 params['storages'] = storages
18799 reply = await self.rpc(msg)
18800 return reply
18801
18802
18803
18804 @ReturnMapping(MachinePortsResults)
18805 async def AllMachinePorts(self, entities):
18806 '''
18807 entities : typing.Sequence[~Entity]
18808 Returns -> typing.Sequence[~MachinePortsResult]
18809 '''
18810 # map input types to rpc msg
18811 params = dict()
18812 msg = dict(Type='Uniter', Request='AllMachinePorts', Version=3, Params=params)
18813 params['Entities'] = entities
18814 reply = await self.rpc(msg)
18815 return reply
18816
18817
18818
18819 @ReturnMapping(StringResults)
18820 async def AssignedMachine(self, entities):
18821 '''
18822 entities : typing.Sequence[~Entity]
18823 Returns -> typing.Sequence[~StringResult]
18824 '''
18825 # map input types to rpc msg
18826 params = dict()
18827 msg = dict(Type='Uniter', Request='AssignedMachine', Version=3, Params=params)
18828 params['Entities'] = entities
18829 reply = await self.rpc(msg)
18830 return reply
18831
18832
18833
18834 @ReturnMapping(StringResults)
18835 async def AvailabilityZone(self, entities):
18836 '''
18837 entities : typing.Sequence[~Entity]
18838 Returns -> typing.Sequence[~StringResult]
18839 '''
18840 # map input types to rpc msg
18841 params = dict()
18842 msg = dict(Type='Uniter', Request='AvailabilityZone', Version=3, Params=params)
18843 params['Entities'] = entities
18844 reply = await self.rpc(msg)
18845 return reply
18846
18847
18848
18849 @ReturnMapping(ErrorResults)
18850 async def BeginActions(self, entities):
18851 '''
18852 entities : typing.Sequence[~Entity]
18853 Returns -> typing.Sequence[~ErrorResult]
18854 '''
18855 # map input types to rpc msg
18856 params = dict()
18857 msg = dict(Type='Uniter', Request='BeginActions', Version=3, Params=params)
18858 params['Entities'] = entities
18859 reply = await self.rpc(msg)
18860 return reply
18861
18862
18863
18864 @ReturnMapping(BytesResult)
18865 async def CACert(self):
18866 '''
18867
18868 Returns -> typing.Sequence[int]
18869 '''
18870 # map input types to rpc msg
18871 params = dict()
18872 msg = dict(Type='Uniter', Request='CACert', Version=3, Params=params)
18873
18874 reply = await self.rpc(msg)
18875 return reply
18876
18877
18878
18879 @ReturnMapping(StringResults)
18880 async def CharmArchiveSha256(self, urls):
18881 '''
18882 urls : typing.Sequence[~CharmURL]
18883 Returns -> typing.Sequence[~StringResult]
18884 '''
18885 # map input types to rpc msg
18886 params = dict()
18887 msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=3, Params=params)
18888 params['URLs'] = urls
18889 reply = await self.rpc(msg)
18890 return reply
18891
18892
18893
18894 @ReturnMapping(IntResults)
18895 async def CharmModifiedVersion(self, entities):
18896 '''
18897 entities : typing.Sequence[~Entity]
18898 Returns -> typing.Sequence[~IntResult]
18899 '''
18900 # map input types to rpc msg
18901 params = dict()
18902 msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=3, Params=params)
18903 params['Entities'] = entities
18904 reply = await self.rpc(msg)
18905 return reply
18906
18907
18908
18909 @ReturnMapping(StringBoolResults)
18910 async def CharmURL(self, entities):
18911 '''
18912 entities : typing.Sequence[~Entity]
18913 Returns -> typing.Sequence[~StringBoolResult]
18914 '''
18915 # map input types to rpc msg
18916 params = dict()
18917 msg = dict(Type='Uniter', Request='CharmURL', Version=3, Params=params)
18918 params['Entities'] = entities
18919 reply = await self.rpc(msg)
18920 return reply
18921
18922
18923
18924 @ReturnMapping(ErrorResults)
18925 async def ClearResolved(self, entities):
18926 '''
18927 entities : typing.Sequence[~Entity]
18928 Returns -> typing.Sequence[~ErrorResult]
18929 '''
18930 # map input types to rpc msg
18931 params = dict()
18932 msg = dict(Type='Uniter', Request='ClearResolved', Version=3, Params=params)
18933 params['Entities'] = entities
18934 reply = await self.rpc(msg)
18935 return reply
18936
18937
18938
18939 @ReturnMapping(ErrorResults)
18940 async def ClosePorts(self, entities):
18941 '''
18942 entities : typing.Sequence[~EntityPortRange]
18943 Returns -> typing.Sequence[~ErrorResult]
18944 '''
18945 # map input types to rpc msg
18946 params = dict()
18947 msg = dict(Type='Uniter', Request='ClosePorts', Version=3, Params=params)
18948 params['Entities'] = entities
18949 reply = await self.rpc(msg)
18950 return reply
18951
18952
18953
18954 @ReturnMapping(ConfigSettingsResults)
18955 async def ConfigSettings(self, entities):
18956 '''
18957 entities : typing.Sequence[~Entity]
18958 Returns -> typing.Sequence[~ConfigSettingsResult]
18959 '''
18960 # map input types to rpc msg
18961 params = dict()
18962 msg = dict(Type='Uniter', Request='ConfigSettings', Version=3, Params=params)
18963 params['Entities'] = entities
18964 reply = await self.rpc(msg)
18965 return reply
18966
18967
18968
18969 @ReturnMapping(ModelResult)
18970 async def CurrentModel(self):
18971 '''
18972
18973 Returns -> typing.Union[_ForwardRef('Error'), str]
18974 '''
18975 # map input types to rpc msg
18976 params = dict()
18977 msg = dict(Type='Uniter', Request='CurrentModel', Version=3, Params=params)
18978
18979 reply = await self.rpc(msg)
18980 return reply
18981
18982
18983
18984 @ReturnMapping(ErrorResults)
18985 async def Destroy(self, entities):
18986 '''
18987 entities : typing.Sequence[~Entity]
18988 Returns -> typing.Sequence[~ErrorResult]
18989 '''
18990 # map input types to rpc msg
18991 params = dict()
18992 msg = dict(Type='Uniter', Request='Destroy', Version=3, Params=params)
18993 params['Entities'] = entities
18994 reply = await self.rpc(msg)
18995 return reply
18996
18997
18998
18999 @ReturnMapping(ErrorResults)
19000 async def DestroyAllSubordinates(self, entities):
19001 '''
19002 entities : typing.Sequence[~Entity]
19003 Returns -> typing.Sequence[~ErrorResult]
19004 '''
19005 # map input types to rpc msg
19006 params = dict()
19007 msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=3, Params=params)
19008 params['Entities'] = entities
19009 reply = await self.rpc(msg)
19010 return reply
19011
19012
19013
19014 @ReturnMapping(ErrorResults)
19015 async def DestroyUnitStorageAttachments(self, entities):
19016 '''
19017 entities : typing.Sequence[~Entity]
19018 Returns -> typing.Sequence[~ErrorResult]
19019 '''
19020 # map input types to rpc msg
19021 params = dict()
19022 msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=3, Params=params)
19023 params['Entities'] = entities
19024 reply = await self.rpc(msg)
19025 return reply
19026
19027
19028
19029 @ReturnMapping(ErrorResults)
19030 async def EnsureDead(self, entities):
19031 '''
19032 entities : typing.Sequence[~Entity]
19033 Returns -> typing.Sequence[~ErrorResult]
19034 '''
19035 # map input types to rpc msg
19036 params = dict()
19037 msg = dict(Type='Uniter', Request='EnsureDead', Version=3, Params=params)
19038 params['Entities'] = entities
19039 reply = await self.rpc(msg)
19040 return reply
19041
19042
19043
19044 @ReturnMapping(ErrorResults)
19045 async def EnterScope(self, relationunits):
19046 '''
19047 relationunits : typing.Sequence[~RelationUnit]
19048 Returns -> typing.Sequence[~ErrorResult]
19049 '''
19050 # map input types to rpc msg
19051 params = dict()
19052 msg = dict(Type='Uniter', Request='EnterScope', Version=3, Params=params)
19053 params['RelationUnits'] = relationunits
19054 reply = await self.rpc(msg)
19055 return reply
19056
19057
19058
19059 @ReturnMapping(ErrorResults)
19060 async def FinishActions(self, results):
19061 '''
19062 results : typing.Sequence[~ActionExecutionResult]
19063 Returns -> typing.Sequence[~ErrorResult]
19064 '''
19065 # map input types to rpc msg
19066 params = dict()
19067 msg = dict(Type='Uniter', Request='FinishActions', Version=3, Params=params)
19068 params['results'] = results
19069 reply = await self.rpc(msg)
19070 return reply
19071
19072
19073
19074 @ReturnMapping(MeterStatusResults)
19075 async def GetMeterStatus(self, entities):
19076 '''
19077 entities : typing.Sequence[~Entity]
19078 Returns -> typing.Sequence[~MeterStatusResult]
19079 '''
19080 # map input types to rpc msg
19081 params = dict()
19082 msg = dict(Type='Uniter', Request='GetMeterStatus', Version=3, Params=params)
19083 params['Entities'] = entities
19084 reply = await self.rpc(msg)
19085 return reply
19086
19087
19088
19089 @ReturnMapping(StringBoolResults)
19090 async def GetPrincipal(self, entities):
19091 '''
19092 entities : typing.Sequence[~Entity]
19093 Returns -> typing.Sequence[~StringBoolResult]
19094 '''
19095 # map input types to rpc msg
19096 params = dict()
19097 msg = dict(Type='Uniter', Request='GetPrincipal', Version=3, Params=params)
19098 params['Entities'] = entities
19099 reply = await self.rpc(msg)
19100 return reply
19101
19102
19103
19104 @ReturnMapping(BoolResults)
19105 async def HasSubordinates(self, entities):
19106 '''
19107 entities : typing.Sequence[~Entity]
19108 Returns -> typing.Sequence[~BoolResult]
19109 '''
19110 # map input types to rpc msg
19111 params = dict()
19112 msg = dict(Type='Uniter', Request='HasSubordinates', Version=3, Params=params)
19113 params['Entities'] = entities
19114 reply = await self.rpc(msg)
19115 return reply
19116
19117
19118
19119 @ReturnMapping(StringsResults)
19120 async def JoinedRelations(self, entities):
19121 '''
19122 entities : typing.Sequence[~Entity]
19123 Returns -> typing.Sequence[~StringsResult]
19124 '''
19125 # map input types to rpc msg
19126 params = dict()
19127 msg = dict(Type='Uniter', Request='JoinedRelations', Version=3, Params=params)
19128 params['Entities'] = entities
19129 reply = await self.rpc(msg)
19130 return reply
19131
19132
19133
19134 @ReturnMapping(ErrorResults)
19135 async def LeaveScope(self, relationunits):
19136 '''
19137 relationunits : typing.Sequence[~RelationUnit]
19138 Returns -> typing.Sequence[~ErrorResult]
19139 '''
19140 # map input types to rpc msg
19141 params = dict()
19142 msg = dict(Type='Uniter', Request='LeaveScope', Version=3, Params=params)
19143 params['RelationUnits'] = relationunits
19144 reply = await self.rpc(msg)
19145 return reply
19146
19147
19148
19149 @ReturnMapping(LifeResults)
19150 async def Life(self, entities):
19151 '''
19152 entities : typing.Sequence[~Entity]
19153 Returns -> typing.Sequence[~LifeResult]
19154 '''
19155 # map input types to rpc msg
19156 params = dict()
19157 msg = dict(Type='Uniter', Request='Life', Version=3, Params=params)
19158 params['Entities'] = entities
19159 reply = await self.rpc(msg)
19160 return reply
19161
19162
19163
19164 @ReturnMapping(ErrorResults)
19165 async def Merge(self, params):
19166 '''
19167 params : typing.Sequence[~MergeLeadershipSettingsParam]
19168 Returns -> typing.Sequence[~ErrorResult]
19169 '''
19170 # map input types to rpc msg
19171 params = dict()
19172 msg = dict(Type='Uniter', Request='Merge', Version=3, Params=params)
19173 params['Params'] = params
19174 reply = await self.rpc(msg)
19175 return reply
19176
19177
19178
19179 @ReturnMapping(ModelConfigResult)
19180 async def ModelConfig(self):
19181 '''
19182
19183 Returns -> typing.Mapping[str, typing.Any]
19184 '''
19185 # map input types to rpc msg
19186 params = dict()
19187 msg = dict(Type='Uniter', Request='ModelConfig', Version=3, Params=params)
19188
19189 reply = await self.rpc(msg)
19190 return reply
19191
19192
19193
19194 @ReturnMapping(StringResult)
19195 async def ModelUUID(self):
19196 '''
19197
19198 Returns -> typing.Union[_ForwardRef('Error'), str]
19199 '''
19200 # map input types to rpc msg
19201 params = dict()
19202 msg = dict(Type='Uniter', Request='ModelUUID', Version=3, Params=params)
19203
19204 reply = await self.rpc(msg)
19205 return reply
19206
19207
19208
19209 @ReturnMapping(UnitNetworkConfigResults)
19210 async def NetworkConfig(self, args):
19211 '''
19212 args : typing.Sequence[~UnitNetworkConfig]
19213 Returns -> typing.Sequence[~UnitNetworkConfigResult]
19214 '''
19215 # map input types to rpc msg
19216 params = dict()
19217 msg = dict(Type='Uniter', Request='NetworkConfig', Version=3, Params=params)
19218 params['Args'] = args
19219 reply = await self.rpc(msg)
19220 return reply
19221
19222
19223
19224 @ReturnMapping(ErrorResults)
19225 async def OpenPorts(self, entities):
19226 '''
19227 entities : typing.Sequence[~EntityPortRange]
19228 Returns -> typing.Sequence[~ErrorResult]
19229 '''
19230 # map input types to rpc msg
19231 params = dict()
19232 msg = dict(Type='Uniter', Request='OpenPorts', Version=3, Params=params)
19233 params['Entities'] = entities
19234 reply = await self.rpc(msg)
19235 return reply
19236
19237
19238
19239 @ReturnMapping(StringResults)
19240 async def PrivateAddress(self, entities):
19241 '''
19242 entities : typing.Sequence[~Entity]
19243 Returns -> typing.Sequence[~StringResult]
19244 '''
19245 # map input types to rpc msg
19246 params = dict()
19247 msg = dict(Type='Uniter', Request='PrivateAddress', Version=3, Params=params)
19248 params['Entities'] = entities
19249 reply = await self.rpc(msg)
19250 return reply
19251
19252
19253
19254 @ReturnMapping(StringResult)
19255 async def ProviderType(self):
19256 '''
19257
19258 Returns -> typing.Union[_ForwardRef('Error'), str]
19259 '''
19260 # map input types to rpc msg
19261 params = dict()
19262 msg = dict(Type='Uniter', Request='ProviderType', Version=3, Params=params)
19263
19264 reply = await self.rpc(msg)
19265 return reply
19266
19267
19268
19269 @ReturnMapping(StringResults)
19270 async def PublicAddress(self, entities):
19271 '''
19272 entities : typing.Sequence[~Entity]
19273 Returns -> typing.Sequence[~StringResult]
19274 '''
19275 # map input types to rpc msg
19276 params = dict()
19277 msg = dict(Type='Uniter', Request='PublicAddress', Version=3, Params=params)
19278 params['Entities'] = entities
19279 reply = await self.rpc(msg)
19280 return reply
19281
19282
19283
19284 @ReturnMapping(GetLeadershipSettingsBulkResults)
19285 async def Read(self, entities):
19286 '''
19287 entities : typing.Sequence[~Entity]
19288 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
19289 '''
19290 # map input types to rpc msg
19291 params = dict()
19292 msg = dict(Type='Uniter', Request='Read', Version=3, Params=params)
19293 params['Entities'] = entities
19294 reply = await self.rpc(msg)
19295 return reply
19296
19297
19298
19299 @ReturnMapping(SettingsResults)
19300 async def ReadRemoteSettings(self, relationunitpairs):
19301 '''
19302 relationunitpairs : typing.Sequence[~RelationUnitPair]
19303 Returns -> typing.Sequence[~SettingsResult]
19304 '''
19305 # map input types to rpc msg
19306 params = dict()
19307 msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=3, Params=params)
19308 params['RelationUnitPairs'] = relationunitpairs
19309 reply = await self.rpc(msg)
19310 return reply
19311
19312
19313
19314 @ReturnMapping(SettingsResults)
19315 async def ReadSettings(self, relationunits):
19316 '''
19317 relationunits : typing.Sequence[~RelationUnit]
19318 Returns -> typing.Sequence[~SettingsResult]
19319 '''
19320 # map input types to rpc msg
19321 params = dict()
19322 msg = dict(Type='Uniter', Request='ReadSettings', Version=3, Params=params)
19323 params['RelationUnits'] = relationunits
19324 reply = await self.rpc(msg)
19325 return reply
19326
19327
19328
19329 @ReturnMapping(RelationResults)
19330 async def Relation(self, relationunits):
19331 '''
19332 relationunits : typing.Sequence[~RelationUnit]
19333 Returns -> typing.Sequence[~RelationResult]
19334 '''
19335 # map input types to rpc msg
19336 params = dict()
19337 msg = dict(Type='Uniter', Request='Relation', Version=3, Params=params)
19338 params['RelationUnits'] = relationunits
19339 reply = await self.rpc(msg)
19340 return reply
19341
19342
19343
19344 @ReturnMapping(RelationResults)
19345 async def RelationById(self, relationids):
19346 '''
19347 relationids : typing.Sequence[int]
19348 Returns -> typing.Sequence[~RelationResult]
19349 '''
19350 # map input types to rpc msg
19351 params = dict()
19352 msg = dict(Type='Uniter', Request='RelationById', Version=3, Params=params)
19353 params['RelationIds'] = relationids
19354 reply = await self.rpc(msg)
19355 return reply
19356
19357
19358
19359 @ReturnMapping(ErrorResults)
19360 async def RemoveStorageAttachments(self, ids):
19361 '''
19362 ids : typing.Sequence[~StorageAttachmentId]
19363 Returns -> typing.Sequence[~ErrorResult]
19364 '''
19365 # map input types to rpc msg
19366 params = dict()
19367 msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=3, Params=params)
19368 params['ids'] = ids
19369 reply = await self.rpc(msg)
19370 return reply
19371
19372
19373
19374 @ReturnMapping(ErrorResults)
19375 async def RequestReboot(self, entities):
19376 '''
19377 entities : typing.Sequence[~Entity]
19378 Returns -> typing.Sequence[~ErrorResult]
19379 '''
19380 # map input types to rpc msg
19381 params = dict()
19382 msg = dict(Type='Uniter', Request='RequestReboot', Version=3, Params=params)
19383 params['Entities'] = entities
19384 reply = await self.rpc(msg)
19385 return reply
19386
19387
19388
19389 @ReturnMapping(ResolvedModeResults)
19390 async def Resolved(self, entities):
19391 '''
19392 entities : typing.Sequence[~Entity]
19393 Returns -> typing.Sequence[~ResolvedModeResult]
19394 '''
19395 # map input types to rpc msg
19396 params = dict()
19397 msg = dict(Type='Uniter', Request='Resolved', Version=3, Params=params)
19398 params['Entities'] = entities
19399 reply = await self.rpc(msg)
19400 return reply
19401
19402
19403
19404 @ReturnMapping(StringResults)
19405 async def ServiceOwner(self, entities):
19406 '''
19407 entities : typing.Sequence[~Entity]
19408 Returns -> typing.Sequence[~StringResult]
19409 '''
19410 # map input types to rpc msg
19411 params = dict()
19412 msg = dict(Type='Uniter', Request='ServiceOwner', Version=3, Params=params)
19413 params['Entities'] = entities
19414 reply = await self.rpc(msg)
19415 return reply
19416
19417
19418
19419 @ReturnMapping(ServiceStatusResults)
19420 async def ServiceStatus(self, entities):
19421 '''
19422 entities : typing.Sequence[~Entity]
19423 Returns -> typing.Sequence[~ServiceStatusResult]
19424 '''
19425 # map input types to rpc msg
19426 params = dict()
19427 msg = dict(Type='Uniter', Request='ServiceStatus', Version=3, Params=params)
19428 params['Entities'] = entities
19429 reply = await self.rpc(msg)
19430 return reply
19431
19432
19433
19434 @ReturnMapping(ErrorResults)
19435 async def SetAgentStatus(self, entities):
19436 '''
19437 entities : typing.Sequence[~EntityStatusArgs]
19438 Returns -> typing.Sequence[~ErrorResult]
19439 '''
19440 # map input types to rpc msg
19441 params = dict()
19442 msg = dict(Type='Uniter', Request='SetAgentStatus', Version=3, Params=params)
19443 params['Entities'] = entities
19444 reply = await self.rpc(msg)
19445 return reply
19446
19447
19448
19449 @ReturnMapping(ErrorResults)
19450 async def SetCharmURL(self, entities):
19451 '''
19452 entities : typing.Sequence[~EntityCharmURL]
19453 Returns -> typing.Sequence[~ErrorResult]
19454 '''
19455 # map input types to rpc msg
19456 params = dict()
19457 msg = dict(Type='Uniter', Request='SetCharmURL', Version=3, Params=params)
19458 params['Entities'] = entities
19459 reply = await self.rpc(msg)
19460 return reply
19461
19462
19463
19464 @ReturnMapping(ErrorResults)
19465 async def SetServiceStatus(self, entities):
19466 '''
19467 entities : typing.Sequence[~EntityStatusArgs]
19468 Returns -> typing.Sequence[~ErrorResult]
19469 '''
19470 # map input types to rpc msg
19471 params = dict()
19472 msg = dict(Type='Uniter', Request='SetServiceStatus', Version=3, Params=params)
19473 params['Entities'] = entities
19474 reply = await self.rpc(msg)
19475 return reply
19476
19477
19478
19479 @ReturnMapping(ErrorResults)
19480 async def SetStatus(self, entities):
19481 '''
19482 entities : typing.Sequence[~EntityStatusArgs]
19483 Returns -> typing.Sequence[~ErrorResult]
19484 '''
19485 # map input types to rpc msg
19486 params = dict()
19487 msg = dict(Type='Uniter', Request='SetStatus', Version=3, Params=params)
19488 params['Entities'] = entities
19489 reply = await self.rpc(msg)
19490 return reply
19491
19492
19493
19494 @ReturnMapping(ErrorResults)
19495 async def SetUnitStatus(self, entities):
19496 '''
19497 entities : typing.Sequence[~EntityStatusArgs]
19498 Returns -> typing.Sequence[~ErrorResult]
19499 '''
19500 # map input types to rpc msg
19501 params = dict()
19502 msg = dict(Type='Uniter', Request='SetUnitStatus', Version=3, Params=params)
19503 params['Entities'] = entities
19504 reply = await self.rpc(msg)
19505 return reply
19506
19507
19508
19509 @ReturnMapping(LifeResults)
19510 async def StorageAttachmentLife(self, ids):
19511 '''
19512 ids : typing.Sequence[~StorageAttachmentId]
19513 Returns -> typing.Sequence[~LifeResult]
19514 '''
19515 # map input types to rpc msg
19516 params = dict()
19517 msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=3, Params=params)
19518 params['ids'] = ids
19519 reply = await self.rpc(msg)
19520 return reply
19521
19522
19523
19524 @ReturnMapping(StorageAttachmentResults)
19525 async def StorageAttachments(self, ids):
19526 '''
19527 ids : typing.Sequence[~StorageAttachmentId]
19528 Returns -> typing.Sequence[~StorageAttachmentResult]
19529 '''
19530 # map input types to rpc msg
19531 params = dict()
19532 msg = dict(Type='Uniter', Request='StorageAttachments', Version=3, Params=params)
19533 params['ids'] = ids
19534 reply = await self.rpc(msg)
19535 return reply
19536
19537
19538
19539 @ReturnMapping(StatusResults)
19540 async def UnitStatus(self, entities):
19541 '''
19542 entities : typing.Sequence[~Entity]
19543 Returns -> typing.Sequence[~StatusResult]
19544 '''
19545 # map input types to rpc msg
19546 params = dict()
19547 msg = dict(Type='Uniter', Request='UnitStatus', Version=3, Params=params)
19548 params['Entities'] = entities
19549 reply = await self.rpc(msg)
19550 return reply
19551
19552
19553
19554 @ReturnMapping(StorageAttachmentIdsResults)
19555 async def UnitStorageAttachments(self, entities):
19556 '''
19557 entities : typing.Sequence[~Entity]
19558 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
19559 '''
19560 # map input types to rpc msg
19561 params = dict()
19562 msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=3, Params=params)
19563 params['Entities'] = entities
19564 reply = await self.rpc(msg)
19565 return reply
19566
19567
19568
19569 @ReturnMapping(ErrorResults)
19570 async def UpdateSettings(self, relationunits):
19571 '''
19572 relationunits : typing.Sequence[~RelationUnitSettings]
19573 Returns -> typing.Sequence[~ErrorResult]
19574 '''
19575 # map input types to rpc msg
19576 params = dict()
19577 msg = dict(Type='Uniter', Request='UpdateSettings', Version=3, Params=params)
19578 params['RelationUnits'] = relationunits
19579 reply = await self.rpc(msg)
19580 return reply
19581
19582
19583
19584 @ReturnMapping(NotifyWatchResults)
19585 async def Watch(self, entities):
19586 '''
19587 entities : typing.Sequence[~Entity]
19588 Returns -> typing.Sequence[~NotifyWatchResult]
19589 '''
19590 # map input types to rpc msg
19591 params = dict()
19592 msg = dict(Type='Uniter', Request='Watch', Version=3, Params=params)
19593 params['Entities'] = entities
19594 reply = await self.rpc(msg)
19595 return reply
19596
19597
19598
19599 @ReturnMapping(NotifyWatchResult)
19600 async def WatchAPIHostPorts(self):
19601 '''
19602
19603 Returns -> typing.Union[_ForwardRef('Error'), str]
19604 '''
19605 # map input types to rpc msg
19606 params = dict()
19607 msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=3, Params=params)
19608
19609 reply = await self.rpc(msg)
19610 return reply
19611
19612
19613
19614 @ReturnMapping(StringsWatchResults)
19615 async def WatchActionNotifications(self, entities):
19616 '''
19617 entities : typing.Sequence[~Entity]
19618 Returns -> typing.Sequence[~StringsWatchResult]
19619 '''
19620 # map input types to rpc msg
19621 params = dict()
19622 msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=3, Params=params)
19623 params['Entities'] = entities
19624 reply = await self.rpc(msg)
19625 return reply
19626
19627
19628
19629 @ReturnMapping(NotifyWatchResults)
19630 async def WatchConfigSettings(self, entities):
19631 '''
19632 entities : typing.Sequence[~Entity]
19633 Returns -> typing.Sequence[~NotifyWatchResult]
19634 '''
19635 # map input types to rpc msg
19636 params = dict()
19637 msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=3, Params=params)
19638 params['Entities'] = entities
19639 reply = await self.rpc(msg)
19640 return reply
19641
19642
19643
19644 @ReturnMapping(NotifyWatchResult)
19645 async def WatchForModelConfigChanges(self):
19646 '''
19647
19648 Returns -> typing.Union[_ForwardRef('Error'), str]
19649 '''
19650 # map input types to rpc msg
19651 params = dict()
19652 msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=3, Params=params)
19653
19654 reply = await self.rpc(msg)
19655 return reply
19656
19657
19658
19659 @ReturnMapping(NotifyWatchResults)
19660 async def WatchLeadershipSettings(self, entities):
19661 '''
19662 entities : typing.Sequence[~Entity]
19663 Returns -> typing.Sequence[~NotifyWatchResult]
19664 '''
19665 # map input types to rpc msg
19666 params = dict()
19667 msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=3, Params=params)
19668 params['Entities'] = entities
19669 reply = await self.rpc(msg)
19670 return reply
19671
19672
19673
19674 @ReturnMapping(NotifyWatchResults)
19675 async def WatchMeterStatus(self, entities):
19676 '''
19677 entities : typing.Sequence[~Entity]
19678 Returns -> typing.Sequence[~NotifyWatchResult]
19679 '''
19680 # map input types to rpc msg
19681 params = dict()
19682 msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=3, Params=params)
19683 params['Entities'] = entities
19684 reply = await self.rpc(msg)
19685 return reply
19686
19687
19688
19689 @ReturnMapping(RelationUnitsWatchResults)
19690 async def WatchRelationUnits(self, relationunits):
19691 '''
19692 relationunits : typing.Sequence[~RelationUnit]
19693 Returns -> typing.Sequence[~RelationUnitsWatchResult]
19694 '''
19695 # map input types to rpc msg
19696 params = dict()
19697 msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=3, Params=params)
19698 params['RelationUnits'] = relationunits
19699 reply = await self.rpc(msg)
19700 return reply
19701
19702
19703
19704 @ReturnMapping(StringsWatchResults)
19705 async def WatchServiceRelations(self, entities):
19706 '''
19707 entities : typing.Sequence[~Entity]
19708 Returns -> typing.Sequence[~StringsWatchResult]
19709 '''
19710 # map input types to rpc msg
19711 params = dict()
19712 msg = dict(Type='Uniter', Request='WatchServiceRelations', Version=3, Params=params)
19713 params['Entities'] = entities
19714 reply = await self.rpc(msg)
19715 return reply
19716
19717
19718
19719 @ReturnMapping(NotifyWatchResults)
19720 async def WatchStorageAttachments(self, ids):
19721 '''
19722 ids : typing.Sequence[~StorageAttachmentId]
19723 Returns -> typing.Sequence[~NotifyWatchResult]
19724 '''
19725 # map input types to rpc msg
19726 params = dict()
19727 msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=3, Params=params)
19728 params['ids'] = ids
19729 reply = await self.rpc(msg)
19730 return reply
19731
19732
19733
19734 @ReturnMapping(NotifyWatchResults)
19735 async def WatchUnitAddresses(self, entities):
19736 '''
19737 entities : typing.Sequence[~Entity]
19738 Returns -> typing.Sequence[~NotifyWatchResult]
19739 '''
19740 # map input types to rpc msg
19741 params = dict()
19742 msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=3, Params=params)
19743 params['Entities'] = entities
19744 reply = await self.rpc(msg)
19745 return reply
19746
19747
19748
19749 @ReturnMapping(StringsWatchResults)
19750 async def WatchUnitStorageAttachments(self, entities):
19751 '''
19752 entities : typing.Sequence[~Entity]
19753 Returns -> typing.Sequence[~StringsWatchResult]
19754 '''
19755 # map input types to rpc msg
19756 params = dict()
19757 msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=3, Params=params)
19758 params['Entities'] = entities
19759 reply = await self.rpc(msg)
19760 return reply
19761
19762
19763 class Upgrader(Type):
19764 name = 'Upgrader'
19765 version = 1
19766 schema = {'definitions': {'Binary': {'additionalProperties': False,
19767 'properties': {'Arch': {'type': 'string'},
19768 'Number': {'$ref': '#/definitions/Number'},
19769 'Series': {'type': 'string'}},
19770 'required': ['Number', 'Series', 'Arch'],
19771 'type': 'object'},
19772 'Entities': {'additionalProperties': False,
19773 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
19774 'type': 'array'}},
19775 'required': ['Entities'],
19776 'type': 'object'},
19777 'EntitiesVersion': {'additionalProperties': False,
19778 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
19779 'type': 'array'}},
19780 'required': ['AgentTools'],
19781 'type': 'object'},
19782 'Entity': {'additionalProperties': False,
19783 'properties': {'Tag': {'type': 'string'}},
19784 'required': ['Tag'],
19785 'type': 'object'},
19786 'EntityVersion': {'additionalProperties': False,
19787 'properties': {'Tag': {'type': 'string'},
19788 'Tools': {'$ref': '#/definitions/Version'}},
19789 'required': ['Tag', 'Tools'],
19790 'type': 'object'},
19791 'Error': {'additionalProperties': False,
19792 'properties': {'Code': {'type': 'string'},
19793 'Info': {'$ref': '#/definitions/ErrorInfo'},
19794 'Message': {'type': 'string'}},
19795 'required': ['Message', 'Code'],
19796 'type': 'object'},
19797 'ErrorInfo': {'additionalProperties': False,
19798 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
19799 'MacaroonPath': {'type': 'string'}},
19800 'type': 'object'},
19801 'ErrorResult': {'additionalProperties': False,
19802 'properties': {'Error': {'$ref': '#/definitions/Error'}},
19803 'required': ['Error'],
19804 'type': 'object'},
19805 'ErrorResults': {'additionalProperties': False,
19806 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
19807 'type': 'array'}},
19808 'required': ['Results'],
19809 'type': 'object'},
19810 'Macaroon': {'additionalProperties': False,
19811 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
19812 'type': 'array'},
19813 'data': {'items': {'type': 'integer'},
19814 'type': 'array'},
19815 'id': {'$ref': '#/definitions/packet'},
19816 'location': {'$ref': '#/definitions/packet'},
19817 'sig': {'items': {'type': 'integer'},
19818 'type': 'array'}},
19819 'required': ['data',
19820 'location',
19821 'id',
19822 'caveats',
19823 'sig'],
19824 'type': 'object'},
19825 'NotifyWatchResult': {'additionalProperties': False,
19826 'properties': {'Error': {'$ref': '#/definitions/Error'},
19827 'NotifyWatcherId': {'type': 'string'}},
19828 'required': ['NotifyWatcherId', 'Error'],
19829 'type': 'object'},
19830 'NotifyWatchResults': {'additionalProperties': False,
19831 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19832 'type': 'array'}},
19833 'required': ['Results'],
19834 'type': 'object'},
19835 'Number': {'additionalProperties': False,
19836 'properties': {'Build': {'type': 'integer'},
19837 'Major': {'type': 'integer'},
19838 'Minor': {'type': 'integer'},
19839 'Patch': {'type': 'integer'},
19840 'Tag': {'type': 'string'}},
19841 'required': ['Major',
19842 'Minor',
19843 'Tag',
19844 'Patch',
19845 'Build'],
19846 'type': 'object'},
19847 'Tools': {'additionalProperties': False,
19848 'properties': {'sha256': {'type': 'string'},
19849 'size': {'type': 'integer'},
19850 'url': {'type': 'string'},
19851 'version': {'$ref': '#/definitions/Binary'}},
19852 'required': ['version', 'url', 'size'],
19853 'type': 'object'},
19854 'ToolsResult': {'additionalProperties': False,
19855 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
19856 'Error': {'$ref': '#/definitions/Error'},
19857 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
19858 'type': 'array'}},
19859 'required': ['ToolsList',
19860 'DisableSSLHostnameVerification',
19861 'Error'],
19862 'type': 'object'},
19863 'ToolsResults': {'additionalProperties': False,
19864 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
19865 'type': 'array'}},
19866 'required': ['Results'],
19867 'type': 'object'},
19868 'Version': {'additionalProperties': False,
19869 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
19870 'required': ['Version'],
19871 'type': 'object'},
19872 'VersionResult': {'additionalProperties': False,
19873 'properties': {'Error': {'$ref': '#/definitions/Error'},
19874 'Version': {'$ref': '#/definitions/Number'}},
19875 'required': ['Version', 'Error'],
19876 'type': 'object'},
19877 'VersionResults': {'additionalProperties': False,
19878 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
19879 'type': 'array'}},
19880 'required': ['Results'],
19881 'type': 'object'},
19882 'caveat': {'additionalProperties': False,
19883 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
19884 'location': {'$ref': '#/definitions/packet'},
19885 'verificationId': {'$ref': '#/definitions/packet'}},
19886 'required': ['location',
19887 'caveatId',
19888 'verificationId'],
19889 'type': 'object'},
19890 'packet': {'additionalProperties': False,
19891 'properties': {'headerLen': {'type': 'integer'},
19892 'start': {'type': 'integer'},
19893 'totalLen': {'type': 'integer'}},
19894 'required': ['start', 'totalLen', 'headerLen'],
19895 'type': 'object'}},
19896 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19897 'Result': {'$ref': '#/definitions/VersionResults'}},
19898 'type': 'object'},
19899 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19900 'Result': {'$ref': '#/definitions/ErrorResults'}},
19901 'type': 'object'},
19902 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19903 'Result': {'$ref': '#/definitions/ToolsResults'}},
19904 'type': 'object'},
19905 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19906 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19907 'type': 'object'}},
19908 'type': 'object'}
19909
19910
19911 @ReturnMapping(VersionResults)
19912 async def DesiredVersion(self, entities):
19913 '''
19914 entities : typing.Sequence[~Entity]
19915 Returns -> typing.Sequence[~VersionResult]
19916 '''
19917 # map input types to rpc msg
19918 params = dict()
19919 msg = dict(Type='Upgrader', Request='DesiredVersion', Version=1, Params=params)
19920 params['Entities'] = entities
19921 reply = await self.rpc(msg)
19922 return reply
19923
19924
19925
19926 @ReturnMapping(ErrorResults)
19927 async def SetTools(self, agenttools):
19928 '''
19929 agenttools : typing.Sequence[~EntityVersion]
19930 Returns -> typing.Sequence[~ErrorResult]
19931 '''
19932 # map input types to rpc msg
19933 params = dict()
19934 msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params)
19935 params['AgentTools'] = agenttools
19936 reply = await self.rpc(msg)
19937 return reply
19938
19939
19940
19941 @ReturnMapping(ToolsResults)
19942 async def Tools(self, entities):
19943 '''
19944 entities : typing.Sequence[~Entity]
19945 Returns -> typing.Sequence[~ToolsResult]
19946 '''
19947 # map input types to rpc msg
19948 params = dict()
19949 msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params)
19950 params['Entities'] = entities
19951 reply = await self.rpc(msg)
19952 return reply
19953
19954
19955
19956 @ReturnMapping(NotifyWatchResults)
19957 async def WatchAPIVersion(self, entities):
19958 '''
19959 entities : typing.Sequence[~Entity]
19960 Returns -> typing.Sequence[~NotifyWatchResult]
19961 '''
19962 # map input types to rpc msg
19963 params = dict()
19964 msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params)
19965 params['Entities'] = entities
19966 reply = await self.rpc(msg)
19967 return reply
19968
19969
19970 class UserManager(Type):
19971 name = 'UserManager'
19972 version = 1
19973 schema = {'definitions': {'AddUser': {'additionalProperties': False,
19974 'properties': {'display-name': {'type': 'string'},
19975 'model-access-permission': {'type': 'string'},
19976 'password': {'type': 'string'},
19977 'shared-model-tags': {'items': {'type': 'string'},
19978 'type': 'array'},
19979 'username': {'type': 'string'}},
19980 'required': ['username',
19981 'display-name',
19982 'shared-model-tags'],
19983 'type': 'object'},
19984 'AddUserResult': {'additionalProperties': False,
19985 'properties': {'error': {'$ref': '#/definitions/Error'},
19986 'secret-key': {'items': {'type': 'integer'},
19987 'type': 'array'},
19988 'tag': {'type': 'string'}},
19989 'type': 'object'},
19990 'AddUserResults': {'additionalProperties': False,
19991 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
19992 'type': 'array'}},
19993 'required': ['results'],
19994 'type': 'object'},
19995 'AddUsers': {'additionalProperties': False,
19996 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
19997 'type': 'array'}},
19998 'required': ['users'],
19999 'type': 'object'},
20000 'Entities': {'additionalProperties': False,
20001 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
20002 'type': 'array'}},
20003 'required': ['Entities'],
20004 'type': 'object'},
20005 'Entity': {'additionalProperties': False,
20006 'properties': {'Tag': {'type': 'string'}},
20007 'required': ['Tag'],
20008 'type': 'object'},
20009 'EntityPassword': {'additionalProperties': False,
20010 'properties': {'Password': {'type': 'string'},
20011 'Tag': {'type': 'string'}},
20012 'required': ['Tag', 'Password'],
20013 'type': 'object'},
20014 'EntityPasswords': {'additionalProperties': False,
20015 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20016 'type': 'array'}},
20017 'required': ['Changes'],
20018 'type': 'object'},
20019 'Error': {'additionalProperties': False,
20020 'properties': {'Code': {'type': 'string'},
20021 'Info': {'$ref': '#/definitions/ErrorInfo'},
20022 'Message': {'type': 'string'}},
20023 'required': ['Message', 'Code'],
20024 'type': 'object'},
20025 'ErrorInfo': {'additionalProperties': False,
20026 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20027 'MacaroonPath': {'type': 'string'}},
20028 'type': 'object'},
20029 'ErrorResult': {'additionalProperties': False,
20030 'properties': {'Error': {'$ref': '#/definitions/Error'}},
20031 'required': ['Error'],
20032 'type': 'object'},
20033 'ErrorResults': {'additionalProperties': False,
20034 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
20035 'type': 'array'}},
20036 'required': ['Results'],
20037 'type': 'object'},
20038 'Macaroon': {'additionalProperties': False,
20039 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20040 'type': 'array'},
20041 'data': {'items': {'type': 'integer'},
20042 'type': 'array'},
20043 'id': {'$ref': '#/definitions/packet'},
20044 'location': {'$ref': '#/definitions/packet'},
20045 'sig': {'items': {'type': 'integer'},
20046 'type': 'array'}},
20047 'required': ['data',
20048 'location',
20049 'id',
20050 'caveats',
20051 'sig'],
20052 'type': 'object'},
20053 'MacaroonResult': {'additionalProperties': False,
20054 'properties': {'error': {'$ref': '#/definitions/Error'},
20055 'result': {'$ref': '#/definitions/Macaroon'}},
20056 'type': 'object'},
20057 'MacaroonResults': {'additionalProperties': False,
20058 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20059 'type': 'array'}},
20060 'required': ['results'],
20061 'type': 'object'},
20062 'UserInfo': {'additionalProperties': False,
20063 'properties': {'created-by': {'type': 'string'},
20064 'date-created': {'format': 'date-time',
20065 'type': 'string'},
20066 'disabled': {'type': 'boolean'},
20067 'display-name': {'type': 'string'},
20068 'last-connection': {'format': 'date-time',
20069 'type': 'string'},
20070 'username': {'type': 'string'}},
20071 'required': ['username',
20072 'display-name',
20073 'created-by',
20074 'date-created',
20075 'disabled'],
20076 'type': 'object'},
20077 'UserInfoRequest': {'additionalProperties': False,
20078 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20079 'type': 'array'},
20080 'include-disabled': {'type': 'boolean'}},
20081 'required': ['entities',
20082 'include-disabled'],
20083 'type': 'object'},
20084 'UserInfoResult': {'additionalProperties': False,
20085 'properties': {'error': {'$ref': '#/definitions/Error'},
20086 'result': {'$ref': '#/definitions/UserInfo'}},
20087 'type': 'object'},
20088 'UserInfoResults': {'additionalProperties': False,
20089 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20090 'type': 'array'}},
20091 'required': ['results'],
20092 'type': 'object'},
20093 'caveat': {'additionalProperties': False,
20094 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20095 'location': {'$ref': '#/definitions/packet'},
20096 'verificationId': {'$ref': '#/definitions/packet'}},
20097 'required': ['location',
20098 'caveatId',
20099 'verificationId'],
20100 'type': 'object'},
20101 'packet': {'additionalProperties': False,
20102 'properties': {'headerLen': {'type': 'integer'},
20103 'start': {'type': 'integer'},
20104 'totalLen': {'type': 'integer'}},
20105 'required': ['start', 'totalLen', 'headerLen'],
20106 'type': 'object'}},
20107 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
20108 'Result': {'$ref': '#/definitions/AddUserResults'}},
20109 'type': 'object'},
20110 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20111 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20112 'type': 'object'},
20113 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20114 'Result': {'$ref': '#/definitions/ErrorResults'}},
20115 'type': 'object'},
20116 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20117 'Result': {'$ref': '#/definitions/ErrorResults'}},
20118 'type': 'object'},
20119 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20120 'Result': {'$ref': '#/definitions/ErrorResults'}},
20121 'type': 'object'},
20122 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20123 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20124 'type': 'object'}},
20125 'type': 'object'}
20126
20127
20128 @ReturnMapping(AddUserResults)
20129 async def AddUser(self, users):
20130 '''
20131 users : typing.Sequence[~AddUser]
20132 Returns -> typing.Sequence[~AddUserResult]
20133 '''
20134 # map input types to rpc msg
20135 params = dict()
20136 msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params)
20137 params['users'] = users
20138 reply = await self.rpc(msg)
20139 return reply
20140
20141
20142
20143 @ReturnMapping(MacaroonResults)
20144 async def CreateLocalLoginMacaroon(self, entities):
20145 '''
20146 entities : typing.Sequence[~Entity]
20147 Returns -> typing.Sequence[~MacaroonResult]
20148 '''
20149 # map input types to rpc msg
20150 params = dict()
20151 msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params)
20152 params['Entities'] = entities
20153 reply = await self.rpc(msg)
20154 return reply
20155
20156
20157
20158 @ReturnMapping(ErrorResults)
20159 async def DisableUser(self, entities):
20160 '''
20161 entities : typing.Sequence[~Entity]
20162 Returns -> typing.Sequence[~ErrorResult]
20163 '''
20164 # map input types to rpc msg
20165 params = dict()
20166 msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params)
20167 params['Entities'] = entities
20168 reply = await self.rpc(msg)
20169 return reply
20170
20171
20172
20173 @ReturnMapping(ErrorResults)
20174 async def EnableUser(self, entities):
20175 '''
20176 entities : typing.Sequence[~Entity]
20177 Returns -> typing.Sequence[~ErrorResult]
20178 '''
20179 # map input types to rpc msg
20180 params = dict()
20181 msg = dict(Type='UserManager', Request='EnableUser', Version=1, Params=params)
20182 params['Entities'] = entities
20183 reply = await self.rpc(msg)
20184 return reply
20185
20186
20187
20188 @ReturnMapping(ErrorResults)
20189 async def SetPassword(self, changes):
20190 '''
20191 changes : typing.Sequence[~EntityPassword]
20192 Returns -> typing.Sequence[~ErrorResult]
20193 '''
20194 # map input types to rpc msg
20195 params = dict()
20196 msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params)
20197 params['Changes'] = changes
20198 reply = await self.rpc(msg)
20199 return reply
20200
20201
20202
20203 @ReturnMapping(UserInfoResults)
20204 async def UserInfo(self, entities, include_disabled):
20205 '''
20206 entities : typing.Sequence[~Entity]
20207 include_disabled : bool
20208 Returns -> typing.Sequence[~UserInfoResult]
20209 '''
20210 # map input types to rpc msg
20211 params = dict()
20212 msg = dict(Type='UserManager', Request='UserInfo', Version=1, Params=params)
20213 params['entities'] = entities
20214 params['include-disabled'] = include_disabled
20215 reply = await self.rpc(msg)
20216 return reply
20217
20218
20219 class VolumeAttachmentsWatcher(Type):
20220 name = 'VolumeAttachmentsWatcher'
20221 version = 2
20222 schema = {'definitions': {'Error': {'additionalProperties': False,
20223 'properties': {'Code': {'type': 'string'},
20224 'Info': {'$ref': '#/definitions/ErrorInfo'},
20225 'Message': {'type': 'string'}},
20226 'required': ['Message', 'Code'],
20227 'type': 'object'},
20228 'ErrorInfo': {'additionalProperties': False,
20229 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20230 'MacaroonPath': {'type': 'string'}},
20231 'type': 'object'},
20232 'Macaroon': {'additionalProperties': False,
20233 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20234 'type': 'array'},
20235 'data': {'items': {'type': 'integer'},
20236 'type': 'array'},
20237 'id': {'$ref': '#/definitions/packet'},
20238 'location': {'$ref': '#/definitions/packet'},
20239 'sig': {'items': {'type': 'integer'},
20240 'type': 'array'}},
20241 'required': ['data',
20242 'location',
20243 'id',
20244 'caveats',
20245 'sig'],
20246 'type': 'object'},
20247 'MachineStorageId': {'additionalProperties': False,
20248 'properties': {'attachmenttag': {'type': 'string'},
20249 'machinetag': {'type': 'string'}},
20250 'required': ['machinetag',
20251 'attachmenttag'],
20252 'type': 'object'},
20253 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20254 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20255 'type': 'array'},
20256 'Error': {'$ref': '#/definitions/Error'},
20257 'MachineStorageIdsWatcherId': {'type': 'string'}},
20258 'required': ['MachineStorageIdsWatcherId',
20259 'Changes',
20260 'Error'],
20261 'type': 'object'},
20262 'caveat': {'additionalProperties': False,
20263 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20264 'location': {'$ref': '#/definitions/packet'},
20265 'verificationId': {'$ref': '#/definitions/packet'}},
20266 'required': ['location',
20267 'caveatId',
20268 'verificationId'],
20269 'type': 'object'},
20270 'packet': {'additionalProperties': False,
20271 'properties': {'headerLen': {'type': 'integer'},
20272 'start': {'type': 'integer'},
20273 'totalLen': {'type': 'integer'}},
20274 'required': ['start', 'totalLen', 'headerLen'],
20275 'type': 'object'}},
20276 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
20277 'type': 'object'},
20278 'Stop': {'type': 'object'}},
20279 'type': 'object'}
20280
20281
20282 @ReturnMapping(MachineStorageIdsWatchResult)
20283 async def Next(self):
20284 '''
20285
20286 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
20287 '''
20288 # map input types to rpc msg
20289 params = dict()
20290 msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params)
20291
20292 reply = await self.rpc(msg)
20293 return reply
20294
20295
20296
20297 @ReturnMapping(None)
20298 async def Stop(self):
20299 '''
20300
20301 Returns -> None
20302 '''
20303 # map input types to rpc msg
20304 params = dict()
20305 msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params)
20306
20307 reply = await self.rpc(msg)
20308 return reply
20309
20310