Deserialize api results back to Types
[osm/N2VC.git] / juju / client / client.py
1
2 from juju.client.facade import Type, ReturnMapping
3
4 class Action(Type):
5 _toSchema = {'receiver': 'receiver', 'name': 'name', 'tag': 'tag', 'parameters': 'parameters'}
6 _toPy = {'receiver': 'receiver', 'name': 'name', 'tag': 'tag', 'parameters': 'parameters'}
7 def __init__(self, name=None, parameters=None, receiver=None, tag=None):
8 '''
9 name : str
10 parameters : typing.Mapping[str, typing.Any]
11 receiver : str
12 tag : str
13 '''
14 self.name = name
15 self.parameters = parameters
16 self.receiver = receiver
17 self.tag = tag
18
19
20 class ActionResult(Type):
21 _toSchema = {'message': 'message', 'enqueued': 'enqueued', 'action': 'action', 'started': 'started', 'output': 'output', 'completed': 'completed', 'error': 'error', 'status': 'status'}
22 _toPy = {'message': 'message', 'enqueued': 'enqueued', 'action': 'action', 'started': 'started', 'output': 'output', 'completed': 'completed', 'error': 'error', 'status': 'status'}
23 def __init__(self, action=None, completed=None, enqueued=None, error=None, message=None, output=None, started=None, status=None):
24 '''
25 action : Action
26 completed : str
27 enqueued : str
28 error : Error
29 message : str
30 output : typing.Mapping[str, typing.Any]
31 started : str
32 status : str
33 '''
34 self.action = Action.from_json(action)
35 self.completed = completed
36 self.enqueued = enqueued
37 self.error = Error.from_json(error)
38 self.message = message
39 self.output = output
40 self.started = started
41 self.status = status
42
43
44 class ActionResults(Type):
45 _toSchema = {'results': 'results'}
46 _toPy = {'results': 'results'}
47 def __init__(self, results=None):
48 '''
49 results : typing.Sequence[~ActionResult]
50 '''
51 self.results = [ActionResult.from_json(o) for o in results or []]
52
53
54 class Actions(Type):
55 _toSchema = {'actions': 'actions'}
56 _toPy = {'actions': 'actions'}
57 def __init__(self, actions=None):
58 '''
59 actions : typing.Sequence[~Action]
60 '''
61 self.actions = [Action.from_json(o) for o in actions or []]
62
63
64 class ActionsByName(Type):
65 _toSchema = {'actions': 'actions', 'error': 'error', 'name': 'name'}
66 _toPy = {'actions': 'actions', 'error': 'error', 'name': 'name'}
67 def __init__(self, actions=None, error=None, name=None):
68 '''
69 actions : typing.Sequence[~ActionResult]
70 error : Error
71 name : str
72 '''
73 self.actions = [ActionResult.from_json(o) for o in actions or []]
74 self.error = Error.from_json(error)
75 self.name = name
76
77
78 class ActionsByNames(Type):
79 _toSchema = {'actions': 'actions'}
80 _toPy = {'actions': 'actions'}
81 def __init__(self, actions=None):
82 '''
83 actions : typing.Sequence[~ActionsByName]
84 '''
85 self.actions = [ActionsByName.from_json(o) for o in actions or []]
86
87
88 class ActionsByReceiver(Type):
89 _toSchema = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'}
90 _toPy = {'actions': 'actions', 'error': 'error', 'receiver': 'receiver'}
91 def __init__(self, actions=None, error=None, receiver=None):
92 '''
93 actions : typing.Sequence[~ActionResult]
94 error : Error
95 receiver : str
96 '''
97 self.actions = [ActionResult.from_json(o) for o in actions or []]
98 self.error = Error.from_json(error)
99 self.receiver = receiver
100
101
102 class ActionsByReceivers(Type):
103 _toSchema = {'actions': 'actions'}
104 _toPy = {'actions': 'actions'}
105 def __init__(self, actions=None):
106 '''
107 actions : typing.Sequence[~ActionsByReceiver]
108 '''
109 self.actions = [ActionsByReceiver.from_json(o) for o in actions or []]
110
111
112 class Entities(Type):
113 _toSchema = {'entities': 'Entities'}
114 _toPy = {'Entities': 'entities'}
115 def __init__(self, entities=None):
116 '''
117 entities : typing.Sequence[~Entity]
118 '''
119 self.entities = [Entity.from_json(o) for o in entities or []]
120
121
122 class Entity(Type):
123 _toSchema = {'tag': 'Tag'}
124 _toPy = {'Tag': 'tag'}
125 def __init__(self, tag=None):
126 '''
127 tag : str
128 '''
129 self.tag = tag
130
131
132 class Error(Type):
133 _toSchema = {'info': 'Info', 'code': 'Code', 'message': 'Message'}
134 _toPy = {'Code': 'code', 'Info': 'info', 'Message': 'message'}
135 def __init__(self, code=None, info=None, message=None):
136 '''
137 code : str
138 info : ErrorInfo
139 message : str
140 '''
141 self.code = code
142 self.info = ErrorInfo.from_json(info)
143 self.message = message
144
145
146 class ErrorInfo(Type):
147 _toSchema = {'macaroon': 'Macaroon', 'macaroonpath': 'MacaroonPath'}
148 _toPy = {'MacaroonPath': 'macaroonpath', 'Macaroon': 'macaroon'}
149 def __init__(self, macaroon=None, macaroonpath=None):
150 '''
151 macaroon : Macaroon
152 macaroonpath : str
153 '''
154 self.macaroon = Macaroon.from_json(macaroon)
155 self.macaroonpath = macaroonpath
156
157
158 class FindActionsByNames(Type):
159 _toSchema = {'names': 'names'}
160 _toPy = {'names': 'names'}
161 def __init__(self, names=None):
162 '''
163 names : typing.Sequence[str]
164 '''
165 self.names = names
166
167
168 class FindTags(Type):
169 _toSchema = {'prefixes': 'prefixes'}
170 _toPy = {'prefixes': 'prefixes'}
171 def __init__(self, prefixes=None):
172 '''
173 prefixes : typing.Sequence[str]
174 '''
175 self.prefixes = prefixes
176
177
178 class FindTagsResults(Type):
179 _toSchema = {'matches': 'matches'}
180 _toPy = {'matches': 'matches'}
181 def __init__(self, matches=None):
182 '''
183 matches : typing.Sequence[~Entity]
184 '''
185 self.matches = [Entity.from_json(o) for o in matches or []]
186
187
188 class Macaroon(Type):
189 _toSchema = {'id_': 'id', 'data': 'data', 'location': 'location', 'caveats': 'caveats', 'sig': 'sig'}
190 _toPy = {'id': 'id_', 'data': 'data', 'location': 'location', 'caveats': 'caveats', 'sig': 'sig'}
191 def __init__(self, caveats=None, data=None, id_=None, location=None, sig=None):
192 '''
193 caveats : typing.Sequence[~caveat]
194 data : typing.Sequence[int]
195 id_ : packet
196 location : packet
197 sig : typing.Sequence[int]
198 '''
199 self.caveats = [caveat.from_json(o) for o in caveats or []]
200 self.data = data
201 self.id_ = packet.from_json(id_)
202 self.location = packet.from_json(location)
203 self.sig = sig
204
205
206 class RunParams(Type):
207 _toSchema = {'services': 'Services', 'commands': 'Commands', 'machines': 'Machines', 'units': 'Units', 'timeout': 'Timeout'}
208 _toPy = {'Services': 'services', 'Commands': 'commands', 'Units': 'units', 'Timeout': 'timeout', 'Machines': 'machines'}
209 def __init__(self, commands=None, machines=None, services=None, timeout=None, units=None):
210 '''
211 commands : str
212 machines : typing.Sequence[str]
213 services : typing.Sequence[str]
214 timeout : int
215 units : typing.Sequence[str]
216 '''
217 self.commands = commands
218 self.machines = machines
219 self.services = services
220 self.timeout = timeout
221 self.units = units
222
223
224 class ServiceCharmActionsResult(Type):
225 _toSchema = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'}
226 _toPy = {'actions': 'actions', 'error': 'error', 'servicetag': 'servicetag'}
227 def __init__(self, actions=None, error=None, servicetag=None):
228 '''
229 actions : Actions
230 error : Error
231 servicetag : str
232 '''
233 self.actions = Actions.from_json(actions)
234 self.error = Error.from_json(error)
235 self.servicetag = servicetag
236
237
238 class ServicesCharmActionsResults(Type):
239 _toSchema = {'results': 'results'}
240 _toPy = {'results': 'results'}
241 def __init__(self, results=None):
242 '''
243 results : typing.Sequence[~ServiceCharmActionsResult]
244 '''
245 self.results = [ServiceCharmActionsResult.from_json(o) for o in results or []]
246
247
248 class caveat(Type):
249 _toSchema = {'verificationid': 'verificationId', 'location': 'location', 'caveatid': 'caveatId'}
250 _toPy = {'verificationId': 'verificationid', 'location': 'location', 'caveatId': 'caveatid'}
251 def __init__(self, caveatid=None, location=None, verificationid=None):
252 '''
253 caveatid : packet
254 location : packet
255 verificationid : packet
256 '''
257 self.caveatid = packet.from_json(caveatid)
258 self.location = packet.from_json(location)
259 self.verificationid = packet.from_json(verificationid)
260
261
262 class packet(Type):
263 _toSchema = {'start': 'start', 'totallen': 'totalLen', 'headerlen': 'headerLen'}
264 _toPy = {'start': 'start', 'headerLen': 'headerlen', 'totalLen': 'totallen'}
265 def __init__(self, headerlen=None, start=None, totallen=None):
266 '''
267 headerlen : int
268 start : int
269 totallen : int
270 '''
271 self.headerlen = headerlen
272 self.start = start
273 self.totallen = totallen
274
275
276 class BoolResult(Type):
277 _toSchema = {'error': 'Error', 'result': 'Result'}
278 _toPy = {'Error': 'error', 'Result': 'result'}
279 def __init__(self, error=None, result=None):
280 '''
281 error : Error
282 result : bool
283 '''
284 self.error = Error.from_json(error)
285 self.result = result
286
287
288 class EntitiesWatchResult(Type):
289 _toSchema = {'entitywatcherid': 'EntityWatcherId', 'changes': 'Changes', 'error': 'Error'}
290 _toPy = {'Error': 'error', 'EntityWatcherId': 'entitywatcherid', 'Changes': 'changes'}
291 def __init__(self, changes=None, entitywatcherid=None, error=None):
292 '''
293 changes : typing.Sequence[str]
294 entitywatcherid : str
295 error : Error
296 '''
297 self.changes = changes
298 self.entitywatcherid = entitywatcherid
299 self.error = Error.from_json(error)
300
301
302 class ErrorResult(Type):
303 _toSchema = {'info': 'Info', 'code': 'Code', 'message': 'Message'}
304 _toPy = {'Code': 'code', 'Info': 'info', 'Message': 'message'}
305 def __init__(self, code=None, info=None, message=None):
306 '''
307 code : str
308 info : ErrorInfo
309 message : str
310 '''
311 self.code = code
312 self.info = ErrorInfo.from_json(info)
313 self.message = message
314
315
316 class AgentGetEntitiesResult(Type):
317 _toSchema = {'containertype': 'ContainerType', 'jobs': 'Jobs', 'life': 'Life', 'error': 'Error'}
318 _toPy = {'Life': 'life', 'Error': 'error', 'ContainerType': 'containertype', 'Jobs': 'jobs'}
319 def __init__(self, containertype=None, error=None, jobs=None, life=None):
320 '''
321 containertype : str
322 error : Error
323 jobs : typing.Sequence[str]
324 life : str
325 '''
326 self.containertype = containertype
327 self.error = Error.from_json(error)
328 self.jobs = jobs
329 self.life = life
330
331
332 class AgentGetEntitiesResults(Type):
333 _toSchema = {'entities': 'Entities'}
334 _toPy = {'Entities': 'entities'}
335 def __init__(self, entities=None):
336 '''
337 entities : typing.Sequence[~AgentGetEntitiesResult]
338 '''
339 self.entities = [AgentGetEntitiesResult.from_json(o) for o in entities or []]
340
341
342 class EntityPassword(Type):
343 _toSchema = {'tag': 'Tag', 'password': 'Password'}
344 _toPy = {'Password': 'password', 'Tag': 'tag'}
345 def __init__(self, password=None, tag=None):
346 '''
347 password : str
348 tag : str
349 '''
350 self.password = password
351 self.tag = tag
352
353
354 class EntityPasswords(Type):
355 _toSchema = {'changes': 'Changes'}
356 _toPy = {'Changes': 'changes'}
357 def __init__(self, changes=None):
358 '''
359 changes : typing.Sequence[~EntityPassword]
360 '''
361 self.changes = [EntityPassword.from_json(o) for o in changes or []]
362
363
364 class ErrorResults(Type):
365 _toSchema = {'results': 'Results'}
366 _toPy = {'Results': 'results'}
367 def __init__(self, results=None):
368 '''
369 results : typing.Sequence[~ErrorResult]
370 '''
371 self.results = [ErrorResult.from_json(o) for o in results or []]
372
373
374 class IsMasterResult(Type):
375 _toSchema = {'master': 'Master'}
376 _toPy = {'Master': 'master'}
377 def __init__(self, master=None):
378 '''
379 master : bool
380 '''
381 self.master = master
382
383
384 class ModelConfigResult(Type):
385 _toSchema = {'config': 'Config'}
386 _toPy = {'Config': 'config'}
387 def __init__(self, config=None):
388 '''
389 config : typing.Mapping[str, typing.Any]
390 '''
391 self.config = config
392
393
394 class NotifyWatchResult(Type):
395 _toSchema = {'notifywatcherid': 'NotifyWatcherId', 'error': 'Error'}
396 _toPy = {'Error': 'error', 'NotifyWatcherId': 'notifywatcherid'}
397 def __init__(self, error=None, notifywatcherid=None):
398 '''
399 error : Error
400 notifywatcherid : str
401 '''
402 self.error = Error.from_json(error)
403 self.notifywatcherid = notifywatcherid
404
405
406 class StateServingInfo(Type):
407 _toSchema = {'systemidentity': 'SystemIdentity', 'caprivatekey': 'CAPrivateKey', 'sharedsecret': 'SharedSecret', 'privatekey': 'PrivateKey', 'stateport': 'StatePort', 'cert': 'Cert', 'apiport': 'APIPort'}
408 _toPy = {'StatePort': 'stateport', 'APIPort': 'apiport', 'CAPrivateKey': 'caprivatekey', 'Cert': 'cert', 'SharedSecret': 'sharedsecret', 'SystemIdentity': 'systemidentity', 'PrivateKey': 'privatekey'}
409 def __init__(self, apiport=None, caprivatekey=None, cert=None, privatekey=None, sharedsecret=None, stateport=None, systemidentity=None):
410 '''
411 apiport : int
412 caprivatekey : str
413 cert : str
414 privatekey : str
415 sharedsecret : str
416 stateport : int
417 systemidentity : str
418 '''
419 self.apiport = apiport
420 self.caprivatekey = caprivatekey
421 self.cert = cert
422 self.privatekey = privatekey
423 self.sharedsecret = sharedsecret
424 self.stateport = stateport
425 self.systemidentity = systemidentity
426
427
428 class AllWatcherNextResults(Type):
429 _toSchema = {'deltas': 'Deltas'}
430 _toPy = {'Deltas': 'deltas'}
431 def __init__(self, deltas=None):
432 '''
433 deltas : typing.Sequence[~Delta]
434 '''
435 self.deltas = [Delta.from_json(o) for o in deltas or []]
436
437
438 class Delta(Type):
439 _toSchema = {'removed': 'Removed'}
440 _toPy = {'Removed': 'removed'}
441 def __init__(self, removed=None):
442 '''
443 removed : bool
444 '''
445 self.removed = removed
446
447
448 class AnnotationsGetResult(Type):
449 _toSchema = {'annotations': 'Annotations', 'entitytag': 'EntityTag', 'error': 'Error'}
450 _toPy = {'Error': 'error', 'Annotations': 'annotations', 'EntityTag': 'entitytag'}
451 def __init__(self, annotations=None, entitytag=None, error=None):
452 '''
453 annotations : typing.Mapping[str, str]
454 entitytag : str
455 error : ErrorResult
456 '''
457 self.annotations = annotations
458 self.entitytag = entitytag
459 self.error = ErrorResult.from_json(error)
460
461
462 class AnnotationsGetResults(Type):
463 _toSchema = {'results': 'Results'}
464 _toPy = {'Results': 'results'}
465 def __init__(self, results=None):
466 '''
467 results : typing.Sequence[~AnnotationsGetResult]
468 '''
469 self.results = [AnnotationsGetResult.from_json(o) for o in results or []]
470
471
472 class AnnotationsSet(Type):
473 _toSchema = {'annotations': 'Annotations'}
474 _toPy = {'Annotations': 'annotations'}
475 def __init__(self, annotations=None):
476 '''
477 annotations : typing.Sequence[~EntityAnnotations]
478 '''
479 self.annotations = [EntityAnnotations.from_json(o) for o in annotations or []]
480
481
482 class EntityAnnotations(Type):
483 _toSchema = {'annotations': 'Annotations', 'entitytag': 'EntityTag'}
484 _toPy = {'Annotations': 'annotations', 'EntityTag': 'entitytag'}
485 def __init__(self, annotations=None, entitytag=None):
486 '''
487 annotations : typing.Mapping[str, str]
488 entitytag : str
489 '''
490 self.annotations = annotations
491 self.entitytag = entitytag
492
493
494 class BackupsCreateArgs(Type):
495 _toSchema = {'notes': 'Notes'}
496 _toPy = {'Notes': 'notes'}
497 def __init__(self, notes=None):
498 '''
499 notes : str
500 '''
501 self.notes = notes
502
503
504 class BackupsInfoArgs(Type):
505 _toSchema = {'id_': 'ID'}
506 _toPy = {'ID': 'id_'}
507 def __init__(self, id_=None):
508 '''
509 id_ : str
510 '''
511 self.id_ = id_
512
513
514 class BackupsListArgs(Type):
515 _toSchema = {}
516 _toPy = {}
517 def __init__(self):
518 '''
519
520 '''
521 pass
522
523
524 class BackupsListResult(Type):
525 _toSchema = {'list_': 'List'}
526 _toPy = {'List': 'list_'}
527 def __init__(self, list_=None):
528 '''
529 list_ : typing.Sequence[~BackupsMetadataResult]
530 '''
531 self.list_ = [BackupsMetadataResult.from_json(o) for o in list_ or []]
532
533
534 class BackupsMetadataResult(Type):
535 _toSchema = {'finished': 'Finished', 'caprivatekey': 'CAPrivateKey', 'hostname': 'Hostname', 'size': 'Size', 'notes': 'Notes', 'model': 'Model', 'stored': 'Stored', 'checksum': 'Checksum', 'id_': 'ID', 'checksumformat': 'ChecksumFormat', 'started': 'Started', 'version': 'Version', 'cacert': 'CACert', 'machine': 'Machine'}
536 _toPy = {'ID': 'id_', 'Started': 'started', 'Version': 'version', 'Model': 'model', 'Stored': 'stored', 'Checksum': 'checksum', 'Machine': 'machine', 'Hostname': 'hostname', 'CAPrivateKey': 'caprivatekey', 'Finished': 'finished', 'ChecksumFormat': 'checksumformat', 'CACert': 'cacert', 'Size': 'size', 'Notes': 'notes'}
537 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):
538 '''
539 cacert : str
540 caprivatekey : str
541 checksum : str
542 checksumformat : str
543 finished : str
544 hostname : str
545 id_ : str
546 machine : str
547 model : str
548 notes : str
549 size : int
550 started : str
551 stored : str
552 version : Number
553 '''
554 self.cacert = cacert
555 self.caprivatekey = caprivatekey
556 self.checksum = checksum
557 self.checksumformat = checksumformat
558 self.finished = finished
559 self.hostname = hostname
560 self.id_ = id_
561 self.machine = machine
562 self.model = model
563 self.notes = notes
564 self.size = size
565 self.started = started
566 self.stored = stored
567 self.version = Number.from_json(version)
568
569
570 class BackupsRemoveArgs(Type):
571 _toSchema = {'id_': 'ID'}
572 _toPy = {'ID': 'id_'}
573 def __init__(self, id_=None):
574 '''
575 id_ : str
576 '''
577 self.id_ = id_
578
579
580 class Number(Type):
581 _toSchema = {'tag': 'Tag', 'patch': 'Patch', 'major': 'Major', 'minor': 'Minor', 'build': 'Build'}
582 _toPy = {'Patch': 'patch', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build', 'Major': 'major'}
583 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
584 '''
585 build : int
586 major : int
587 minor : int
588 patch : int
589 tag : str
590 '''
591 self.build = build
592 self.major = major
593 self.minor = minor
594 self.patch = patch
595 self.tag = tag
596
597
598 class RestoreArgs(Type):
599 _toSchema = {'backupid': 'BackupId'}
600 _toPy = {'BackupId': 'backupid'}
601 def __init__(self, backupid=None):
602 '''
603 backupid : str
604 '''
605 self.backupid = backupid
606
607
608 class Block(Type):
609 _toSchema = {'message': 'message', 'id_': 'id', 'type_': 'type', 'tag': 'tag'}
610 _toPy = {'message': 'message', 'id': 'id_', 'type': 'type_', 'tag': 'tag'}
611 def __init__(self, id_=None, message=None, tag=None, type_=None):
612 '''
613 id_ : str
614 message : str
615 tag : str
616 type_ : str
617 '''
618 self.id_ = id_
619 self.message = message
620 self.tag = tag
621 self.type_ = type_
622
623
624 class BlockResult(Type):
625 _toSchema = {'error': 'error', 'result': 'result'}
626 _toPy = {'error': 'error', 'result': 'result'}
627 def __init__(self, error=None, result=None):
628 '''
629 error : Error
630 result : Block
631 '''
632 self.error = Error.from_json(error)
633 self.result = Block.from_json(result)
634
635
636 class BlockResults(Type):
637 _toSchema = {'results': 'results'}
638 _toPy = {'results': 'results'}
639 def __init__(self, results=None):
640 '''
641 results : typing.Sequence[~BlockResult]
642 '''
643 self.results = [BlockResult.from_json(o) for o in results or []]
644
645
646 class BlockSwitchParams(Type):
647 _toSchema = {'message': 'message', 'type_': 'type'}
648 _toPy = {'message': 'message', 'type': 'type_'}
649 def __init__(self, message=None, type_=None):
650 '''
651 message : str
652 type_ : str
653 '''
654 self.message = message
655 self.type_ = type_
656
657
658 class CharmInfo(Type):
659 _toSchema = {'charmurl': 'CharmURL'}
660 _toPy = {'CharmURL': 'charmurl'}
661 def __init__(self, charmurl=None):
662 '''
663 charmurl : str
664 '''
665 self.charmurl = charmurl
666
667
668 class CharmsList(Type):
669 _toSchema = {'names': 'Names'}
670 _toPy = {'Names': 'names'}
671 def __init__(self, names=None):
672 '''
673 names : typing.Sequence[str]
674 '''
675 self.names = names
676
677
678 class CharmsListResult(Type):
679 _toSchema = {'charmurls': 'CharmURLs'}
680 _toPy = {'CharmURLs': 'charmurls'}
681 def __init__(self, charmurls=None):
682 '''
683 charmurls : typing.Sequence[str]
684 '''
685 self.charmurls = charmurls
686
687
688 class IsMeteredResult(Type):
689 _toSchema = {'metered': 'Metered'}
690 _toPy = {'Metered': 'metered'}
691 def __init__(self, metered=None):
692 '''
693 metered : bool
694 '''
695 self.metered = metered
696
697
698 class APIHostPortsResult(Type):
699 _toSchema = {'servers': 'Servers'}
700 _toPy = {'Servers': 'servers'}
701 def __init__(self, servers=None):
702 '''
703 servers : typing.Sequence[~HostPort]
704 '''
705 self.servers = [HostPort.from_json(o) for o in servers or []]
706
707
708 class AddCharm(Type):
709 _toSchema = {'url': 'URL', 'channel': 'Channel'}
710 _toPy = {'Channel': 'channel', 'URL': 'url'}
711 def __init__(self, channel=None, url=None):
712 '''
713 channel : str
714 url : str
715 '''
716 self.channel = channel
717 self.url = url
718
719
720 class AddCharmWithAuthorization(Type):
721 _toSchema = {'url': 'URL', 'charmstoremacaroon': 'CharmStoreMacaroon', 'channel': 'Channel'}
722 _toPy = {'CharmStoreMacaroon': 'charmstoremacaroon', 'Channel': 'channel', 'URL': 'url'}
723 def __init__(self, channel=None, charmstoremacaroon=None, url=None):
724 '''
725 channel : str
726 charmstoremacaroon : Macaroon
727 url : str
728 '''
729 self.channel = channel
730 self.charmstoremacaroon = Macaroon.from_json(charmstoremacaroon)
731 self.url = url
732
733
734 class AddMachineParams(Type):
735 _toSchema = {'containertype': 'ContainerType', 'disks': 'Disks', 'placement': 'Placement', 'series': 'Series', 'instanceid': 'InstanceId', 'hardwarecharacteristics': 'HardwareCharacteristics', 'parentid': 'ParentId', 'constraints': 'Constraints', 'jobs': 'Jobs', 'addrs': 'Addrs', 'nonce': 'Nonce'}
736 _toPy = {'Constraints': 'constraints', 'ParentId': 'parentid', 'Addrs': 'addrs', 'Jobs': 'jobs', 'Disks': 'disks', 'HardwareCharacteristics': 'hardwarecharacteristics', 'Placement': 'placement', 'InstanceId': 'instanceid', 'ContainerType': 'containertype', 'Nonce': 'nonce', 'Series': 'series'}
737 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):
738 '''
739 addrs : typing.Sequence[~Address]
740 constraints : Value
741 containertype : str
742 disks : typing.Sequence[~Constraints]
743 hardwarecharacteristics : HardwareCharacteristics
744 instanceid : str
745 jobs : typing.Sequence[str]
746 nonce : str
747 parentid : str
748 placement : Placement
749 series : str
750 '''
751 self.addrs = [Address.from_json(o) for o in addrs or []]
752 self.constraints = Value.from_json(constraints)
753 self.containertype = containertype
754 self.disks = [Constraints.from_json(o) for o in disks or []]
755 self.hardwarecharacteristics = HardwareCharacteristics.from_json(hardwarecharacteristics)
756 self.instanceid = instanceid
757 self.jobs = jobs
758 self.nonce = nonce
759 self.parentid = parentid
760 self.placement = Placement.from_json(placement)
761 self.series = series
762
763
764 class AddMachines(Type):
765 _toSchema = {'machineparams': 'MachineParams'}
766 _toPy = {'MachineParams': 'machineparams'}
767 def __init__(self, machineparams=None):
768 '''
769 machineparams : typing.Sequence[~AddMachineParams]
770 '''
771 self.machineparams = [AddMachineParams.from_json(o) for o in machineparams or []]
772
773
774 class AddMachinesResult(Type):
775 _toSchema = {'error': 'Error', 'machine': 'Machine'}
776 _toPy = {'Machine': 'machine', 'Error': 'error'}
777 def __init__(self, error=None, machine=None):
778 '''
779 error : Error
780 machine : str
781 '''
782 self.error = Error.from_json(error)
783 self.machine = machine
784
785
786 class AddMachinesResults(Type):
787 _toSchema = {'machines': 'Machines'}
788 _toPy = {'Machines': 'machines'}
789 def __init__(self, machines=None):
790 '''
791 machines : typing.Sequence[~AddMachinesResult]
792 '''
793 self.machines = [AddMachinesResult.from_json(o) for o in machines or []]
794
795
796 class Address(Type):
797 _toSchema = {'scope': 'Scope', 'spacename': 'SpaceName', 'type_': 'Type', 'value': 'Value'}
798 _toPy = {'Scope': 'scope', 'Value': 'value', 'Type': 'type_', 'SpaceName': 'spacename'}
799 def __init__(self, scope=None, spacename=None, type_=None, value=None):
800 '''
801 scope : str
802 spacename : str
803 type_ : str
804 value : str
805 '''
806 self.scope = scope
807 self.spacename = spacename
808 self.type_ = type_
809 self.value = value
810
811
812 class AgentVersionResult(Type):
813 _toSchema = {'tag': 'Tag', 'patch': 'Patch', 'major': 'Major', 'minor': 'Minor', 'build': 'Build'}
814 _toPy = {'Patch': 'patch', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build', 'Major': 'major'}
815 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
816 '''
817 build : int
818 major : int
819 minor : int
820 patch : int
821 tag : str
822 '''
823 self.build = build
824 self.major = major
825 self.minor = minor
826 self.patch = patch
827 self.tag = tag
828
829
830 class AllWatcherId(Type):
831 _toSchema = {'allwatcherid': 'AllWatcherId'}
832 _toPy = {'AllWatcherId': 'allwatcherid'}
833 def __init__(self, allwatcherid=None):
834 '''
835 allwatcherid : str
836 '''
837 self.allwatcherid = allwatcherid
838
839
840 class Binary(Type):
841 _toSchema = {'series': 'Series', 'number': 'Number', 'arch': 'Arch'}
842 _toPy = {'Number': 'number', 'Arch': 'arch', 'Series': 'series'}
843 def __init__(self, arch=None, number=None, series=None):
844 '''
845 arch : str
846 number : Number
847 series : str
848 '''
849 self.arch = arch
850 self.number = Number.from_json(number)
851 self.series = series
852
853
854 class BundleChangesChange(Type):
855 _toSchema = {'id_': 'id', 'requires': 'requires', 'method': 'method', 'args': 'args'}
856 _toPy = {'id': 'id_', 'requires': 'requires', 'method': 'method', 'args': 'args'}
857 def __init__(self, args=None, id_=None, method=None, requires=None):
858 '''
859 args : typing.Sequence[typing.Any]
860 id_ : str
861 method : str
862 requires : typing.Sequence[str]
863 '''
864 self.args = args
865 self.id_ = id_
866 self.method = method
867 self.requires = requires
868
869
870 class Constraints(Type):
871 _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'}
872 _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'}
873 def __init__(self, count=None, pool=None, size=None):
874 '''
875 count : int
876 pool : str
877 size : int
878 '''
879 self.count = count
880 self.pool = pool
881 self.size = size
882
883
884 class DestroyMachines(Type):
885 _toSchema = {'force': 'Force', 'machinenames': 'MachineNames'}
886 _toPy = {'Force': 'force', 'MachineNames': 'machinenames'}
887 def __init__(self, force=None, machinenames=None):
888 '''
889 force : bool
890 machinenames : typing.Sequence[str]
891 '''
892 self.force = force
893 self.machinenames = machinenames
894
895
896 class DetailedStatus(Type):
897 _toSchema = {'info': 'Info', 'since': 'Since', 'kind': 'Kind', 'life': 'Life', 'version': 'Version', 'data': 'Data', 'status': 'Status'}
898 _toPy = {'Version': 'version', 'Data': 'data', 'Kind': 'kind', 'Status': 'status', 'Since': 'since', 'Life': 'life', 'Info': 'info'}
899 def __init__(self, data=None, info=None, kind=None, life=None, since=None, status=None, version=None):
900 '''
901 data : typing.Mapping[str, typing.Any]
902 info : str
903 kind : str
904 life : str
905 since : str
906 status : str
907 version : str
908 '''
909 self.data = data
910 self.info = info
911 self.kind = kind
912 self.life = life
913 self.since = since
914 self.status = status
915 self.version = version
916
917
918 class EndpointStatus(Type):
919 _toSchema = {'role': 'Role', 'servicename': 'ServiceName', 'subordinate': 'Subordinate', 'name': 'Name'}
920 _toPy = {'Name': 'name', 'ServiceName': 'servicename', 'Role': 'role', 'Subordinate': 'subordinate'}
921 def __init__(self, name=None, role=None, servicename=None, subordinate=None):
922 '''
923 name : str
924 role : str
925 servicename : str
926 subordinate : bool
927 '''
928 self.name = name
929 self.role = role
930 self.servicename = servicename
931 self.subordinate = subordinate
932
933
934 class EntityStatus(Type):
935 _toSchema = {'info': 'Info', 'since': 'Since', 'data': 'Data', 'status': 'Status'}
936 _toPy = {'Status': 'status', 'Since': 'since', 'Data': 'data', 'Info': 'info'}
937 def __init__(self, data=None, info=None, since=None, status=None):
938 '''
939 data : typing.Mapping[str, typing.Any]
940 info : str
941 since : str
942 status : str
943 '''
944 self.data = data
945 self.info = info
946 self.since = since
947 self.status = status
948
949
950 class FindToolsParams(Type):
951 _toSchema = {'series': 'Series', 'minorversion': 'MinorVersion', 'number': 'Number', 'majorversion': 'MajorVersion', 'arch': 'Arch'}
952 _toPy = {'MinorVersion': 'minorversion', 'MajorVersion': 'majorversion', 'Series': 'series', 'Arch': 'arch', 'Number': 'number'}
953 def __init__(self, arch=None, majorversion=None, minorversion=None, number=None, series=None):
954 '''
955 arch : str
956 majorversion : int
957 minorversion : int
958 number : Number
959 series : str
960 '''
961 self.arch = arch
962 self.majorversion = majorversion
963 self.minorversion = minorversion
964 self.number = Number.from_json(number)
965 self.series = series
966
967
968 class FindToolsResult(Type):
969 _toSchema = {'list_': 'List', 'error': 'Error'}
970 _toPy = {'List': 'list_', 'Error': 'error'}
971 def __init__(self, error=None, list_=None):
972 '''
973 error : Error
974 list_ : typing.Sequence[~Tools]
975 '''
976 self.error = Error.from_json(error)
977 self.list_ = [Tools.from_json(o) for o in list_ or []]
978
979
980 class FullStatus(Type):
981 _toSchema = {'modelname': 'ModelName', 'availableversion': 'AvailableVersion', 'relations': 'Relations', 'machines': 'Machines', 'services': 'Services'}
982 _toPy = {'ModelName': 'modelname', 'Relations': 'relations', 'AvailableVersion': 'availableversion', 'Machines': 'machines', 'Services': 'services'}
983 def __init__(self, availableversion=None, machines=None, modelname=None, relations=None, services=None):
984 '''
985 availableversion : str
986 machines : typing.Mapping[str, ~MachineStatus]
987 modelname : str
988 relations : typing.Sequence[~RelationStatus]
989 services : typing.Mapping[str, ~ServiceStatus]
990 '''
991 self.availableversion = availableversion
992 self.machines = {k: MachineStatus.from_json(v) for k, v in (machines or dict()).items()}
993 self.modelname = modelname
994 self.relations = [RelationStatus.from_json(o) for o in relations or []]
995 self.services = {k: ServiceStatus.from_json(v) for k, v in (services or dict()).items()}
996
997
998 class GetBundleChangesParams(Type):
999 _toSchema = {'yaml': 'yaml'}
1000 _toPy = {'yaml': 'yaml'}
1001 def __init__(self, yaml=None):
1002 '''
1003 yaml : str
1004 '''
1005 self.yaml = yaml
1006
1007
1008 class GetBundleChangesResults(Type):
1009 _toSchema = {'changes': 'changes', 'errors': 'errors'}
1010 _toPy = {'changes': 'changes', 'errors': 'errors'}
1011 def __init__(self, changes=None, errors=None):
1012 '''
1013 changes : typing.Sequence[~BundleChangesChange]
1014 errors : typing.Sequence[str]
1015 '''
1016 self.changes = [BundleChangesChange.from_json(o) for o in changes or []]
1017 self.errors = errors
1018
1019
1020 class GetConstraintsResults(Type):
1021 _toSchema = {'tags': 'tags', 'root_disk': 'root-disk', 'spaces': 'spaces', 'virt_type': 'virt-type', 'container': 'container', 'mem': 'mem', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'instance_type': 'instance-type'}
1022 _toPy = {'spaces': 'spaces', 'instance-type': 'instance_type', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'arch': 'arch'}
1023 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):
1024 '''
1025 arch : str
1026 container : str
1027 cpu_cores : int
1028 cpu_power : int
1029 instance_type : str
1030 mem : int
1031 root_disk : int
1032 spaces : typing.Sequence[str]
1033 tags : typing.Sequence[str]
1034 virt_type : str
1035 '''
1036 self.arch = arch
1037 self.container = container
1038 self.cpu_cores = cpu_cores
1039 self.cpu_power = cpu_power
1040 self.instance_type = instance_type
1041 self.mem = mem
1042 self.root_disk = root_disk
1043 self.spaces = spaces
1044 self.tags = tags
1045 self.virt_type = virt_type
1046
1047
1048 class HardwareCharacteristics(Type):
1049 _toSchema = {'cpucores': 'CpuCores', 'cpupower': 'CpuPower', 'rootdisk': 'RootDisk', 'availabilityzone': 'AvailabilityZone', 'mem': 'Mem', 'tags': 'Tags', 'arch': 'Arch'}
1050 _toPy = {'Tags': 'tags', 'Mem': 'mem', 'AvailabilityZone': 'availabilityzone', 'RootDisk': 'rootdisk', 'CpuCores': 'cpucores', 'CpuPower': 'cpupower', 'Arch': 'arch'}
1051 def __init__(self, arch=None, availabilityzone=None, cpucores=None, cpupower=None, mem=None, rootdisk=None, tags=None):
1052 '''
1053 arch : str
1054 availabilityzone : str
1055 cpucores : int
1056 cpupower : int
1057 mem : int
1058 rootdisk : int
1059 tags : typing.Sequence[str]
1060 '''
1061 self.arch = arch
1062 self.availabilityzone = availabilityzone
1063 self.cpucores = cpucores
1064 self.cpupower = cpupower
1065 self.mem = mem
1066 self.rootdisk = rootdisk
1067 self.tags = tags
1068
1069
1070 class HostPort(Type):
1071 _toSchema = {'port': 'Port', 'address': 'Address'}
1072 _toPy = {'Address': 'address', 'Port': 'port'}
1073 def __init__(self, address=None, port=None):
1074 '''
1075 address : Address
1076 port : int
1077 '''
1078 self.address = Address.from_json(address)
1079 self.port = port
1080
1081
1082 class MachineStatus(Type):
1083 _toSchema = {'containers': 'Containers', 'hasvote': 'HasVote', 'agentstatus': 'AgentStatus', 'id_': 'Id', 'hardware': 'Hardware', 'series': 'Series', 'instanceid': 'InstanceId', 'instancestatus': 'InstanceStatus', 'dnsname': 'DNSName', 'wantsvote': 'WantsVote', 'jobs': 'Jobs'}
1084 _toPy = {'Id': 'id_', 'HasVote': 'hasvote', 'Jobs': 'jobs', 'DNSName': 'dnsname', 'WantsVote': 'wantsvote', 'Containers': 'containers', 'Hardware': 'hardware', 'AgentStatus': 'agentstatus', 'Series': 'series', 'InstanceId': 'instanceid', 'InstanceStatus': 'instancestatus'}
1085 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):
1086 '''
1087 agentstatus : DetailedStatus
1088 containers : typing.Mapping[str, ~MachineStatus]
1089 dnsname : str
1090 hardware : str
1091 hasvote : bool
1092 id_ : str
1093 instanceid : str
1094 instancestatus : DetailedStatus
1095 jobs : typing.Sequence[str]
1096 series : str
1097 wantsvote : bool
1098 '''
1099 self.agentstatus = DetailedStatus.from_json(agentstatus)
1100 self.containers = {k: MachineStatus.from_json(v) for k, v in (containers or dict()).items()}
1101 self.dnsname = dnsname
1102 self.hardware = hardware
1103 self.hasvote = hasvote
1104 self.id_ = id_
1105 self.instanceid = instanceid
1106 self.instancestatus = DetailedStatus.from_json(instancestatus)
1107 self.jobs = jobs
1108 self.series = series
1109 self.wantsvote = wantsvote
1110
1111
1112 class MeterStatus(Type):
1113 _toSchema = {'message': 'Message', 'color': 'Color'}
1114 _toPy = {'Color': 'color', 'Message': 'message'}
1115 def __init__(self, color=None, message=None):
1116 '''
1117 color : str
1118 message : str
1119 '''
1120 self.color = color
1121 self.message = message
1122
1123
1124 class ModelConfigResults(Type):
1125 _toSchema = {'config': 'Config'}
1126 _toPy = {'Config': 'config'}
1127 def __init__(self, config=None):
1128 '''
1129 config : typing.Mapping[str, typing.Any]
1130 '''
1131 self.config = config
1132
1133
1134 class ModelInfo(Type):
1135 _toSchema = {'providertype': 'ProviderType', 'life': 'Life', 'name': 'Name', 'uuid': 'UUID', 'defaultseries': 'DefaultSeries', 'serveruuid': 'ServerUUID', 'users': 'Users', 'ownertag': 'OwnerTag', 'status': 'Status'}
1136 _toPy = {'Name': 'name', 'UUID': 'uuid', 'ProviderType': 'providertype', 'Status': 'status', 'Life': 'life', 'Users': 'users', 'OwnerTag': 'ownertag', 'DefaultSeries': 'defaultseries', 'ServerUUID': 'serveruuid'}
1137 def __init__(self, defaultseries=None, life=None, name=None, ownertag=None, providertype=None, serveruuid=None, status=None, uuid=None, users=None):
1138 '''
1139 defaultseries : str
1140 life : str
1141 name : str
1142 ownertag : str
1143 providertype : str
1144 serveruuid : str
1145 status : EntityStatus
1146 uuid : str
1147 users : typing.Sequence[~ModelUserInfo]
1148 '''
1149 self.defaultseries = defaultseries
1150 self.life = life
1151 self.name = name
1152 self.ownertag = ownertag
1153 self.providertype = providertype
1154 self.serveruuid = serveruuid
1155 self.status = EntityStatus.from_json(status)
1156 self.uuid = uuid
1157 self.users = [ModelUserInfo.from_json(o) for o in users or []]
1158
1159
1160 class ModelSet(Type):
1161 _toSchema = {'config': 'Config'}
1162 _toPy = {'Config': 'config'}
1163 def __init__(self, config=None):
1164 '''
1165 config : typing.Mapping[str, typing.Any]
1166 '''
1167 self.config = config
1168
1169
1170 class ModelUnset(Type):
1171 _toSchema = {'keys': 'Keys'}
1172 _toPy = {'Keys': 'keys'}
1173 def __init__(self, keys=None):
1174 '''
1175 keys : typing.Sequence[str]
1176 '''
1177 self.keys = keys
1178
1179
1180 class ModelUserInfo(Type):
1181 _toSchema = {'access': 'access', 'displayname': 'displayname', 'user': 'user', 'lastconnection': 'lastconnection'}
1182 _toPy = {'access': 'access', 'displayname': 'displayname', 'user': 'user', 'lastconnection': 'lastconnection'}
1183 def __init__(self, access=None, displayname=None, lastconnection=None, user=None):
1184 '''
1185 access : str
1186 displayname : str
1187 lastconnection : str
1188 user : str
1189 '''
1190 self.access = access
1191 self.displayname = displayname
1192 self.lastconnection = lastconnection
1193 self.user = user
1194
1195
1196 class ModelUserInfoResult(Type):
1197 _toSchema = {'error': 'error', 'result': 'result'}
1198 _toPy = {'error': 'error', 'result': 'result'}
1199 def __init__(self, error=None, result=None):
1200 '''
1201 error : Error
1202 result : ModelUserInfo
1203 '''
1204 self.error = Error.from_json(error)
1205 self.result = ModelUserInfo.from_json(result)
1206
1207
1208 class ModelUserInfoResults(Type):
1209 _toSchema = {'results': 'results'}
1210 _toPy = {'results': 'results'}
1211 def __init__(self, results=None):
1212 '''
1213 results : typing.Sequence[~ModelUserInfoResult]
1214 '''
1215 self.results = [ModelUserInfoResult.from_json(o) for o in results or []]
1216
1217
1218 class Placement(Type):
1219 _toSchema = {'scope': 'Scope', 'directive': 'Directive'}
1220 _toPy = {'Scope': 'scope', 'Directive': 'directive'}
1221 def __init__(self, directive=None, scope=None):
1222 '''
1223 directive : str
1224 scope : str
1225 '''
1226 self.directive = directive
1227 self.scope = scope
1228
1229
1230 class PrivateAddress(Type):
1231 _toSchema = {'target': 'Target'}
1232 _toPy = {'Target': 'target'}
1233 def __init__(self, target=None):
1234 '''
1235 target : str
1236 '''
1237 self.target = target
1238
1239
1240 class PrivateAddressResults(Type):
1241 _toSchema = {'privateaddress': 'PrivateAddress'}
1242 _toPy = {'PrivateAddress': 'privateaddress'}
1243 def __init__(self, privateaddress=None):
1244 '''
1245 privateaddress : str
1246 '''
1247 self.privateaddress = privateaddress
1248
1249
1250 class ProvisioningScriptParams(Type):
1251 _toSchema = {'nonce': 'Nonce', 'machineid': 'MachineId', 'datadir': 'DataDir', 'disablepackagecommands': 'DisablePackageCommands'}
1252 _toPy = {'MachineId': 'machineid', 'DisablePackageCommands': 'disablepackagecommands', 'Nonce': 'nonce', 'DataDir': 'datadir'}
1253 def __init__(self, datadir=None, disablepackagecommands=None, machineid=None, nonce=None):
1254 '''
1255 datadir : str
1256 disablepackagecommands : bool
1257 machineid : str
1258 nonce : str
1259 '''
1260 self.datadir = datadir
1261 self.disablepackagecommands = disablepackagecommands
1262 self.machineid = machineid
1263 self.nonce = nonce
1264
1265
1266 class ProvisioningScriptResult(Type):
1267 _toSchema = {'script': 'Script'}
1268 _toPy = {'Script': 'script'}
1269 def __init__(self, script=None):
1270 '''
1271 script : str
1272 '''
1273 self.script = script
1274
1275
1276 class PublicAddress(Type):
1277 _toSchema = {'target': 'Target'}
1278 _toPy = {'Target': 'target'}
1279 def __init__(self, target=None):
1280 '''
1281 target : str
1282 '''
1283 self.target = target
1284
1285
1286 class PublicAddressResults(Type):
1287 _toSchema = {'publicaddress': 'PublicAddress'}
1288 _toPy = {'PublicAddress': 'publicaddress'}
1289 def __init__(self, publicaddress=None):
1290 '''
1291 publicaddress : str
1292 '''
1293 self.publicaddress = publicaddress
1294
1295
1296 class RelationStatus(Type):
1297 _toSchema = {'scope': 'Scope', 'interface': 'Interface', 'id_': 'Id', 'key': 'Key', 'endpoints': 'Endpoints'}
1298 _toPy = {'Id': 'id_', 'Interface': 'interface', 'Scope': 'scope', 'Endpoints': 'endpoints', 'Key': 'key'}
1299 def __init__(self, endpoints=None, id_=None, interface=None, key=None, scope=None):
1300 '''
1301 endpoints : typing.Sequence[~EndpointStatus]
1302 id_ : int
1303 interface : str
1304 key : str
1305 scope : str
1306 '''
1307 self.endpoints = [EndpointStatus.from_json(o) for o in endpoints or []]
1308 self.id_ = id_
1309 self.interface = interface
1310 self.key = key
1311 self.scope = scope
1312
1313
1314 class ResolveCharmResult(Type):
1315 _toSchema = {'url': 'URL', 'error': 'Error'}
1316 _toPy = {'Error': 'error', 'URL': 'url'}
1317 def __init__(self, error=None, url=None):
1318 '''
1319 error : str
1320 url : URL
1321 '''
1322 self.error = error
1323 self.url = URL.from_json(url)
1324
1325
1326 class ResolveCharmResults(Type):
1327 _toSchema = {'urls': 'URLs'}
1328 _toPy = {'URLs': 'urls'}
1329 def __init__(self, urls=None):
1330 '''
1331 urls : typing.Sequence[~ResolveCharmResult]
1332 '''
1333 self.urls = [ResolveCharmResult.from_json(o) for o in urls or []]
1334
1335
1336 class ResolveCharms(Type):
1337 _toSchema = {'references': 'References'}
1338 _toPy = {'References': 'references'}
1339 def __init__(self, references=None):
1340 '''
1341 references : typing.Sequence[~URL]
1342 '''
1343 self.references = [URL.from_json(o) for o in references or []]
1344
1345
1346 class Resolved(Type):
1347 _toSchema = {'unitname': 'UnitName', 'retry': 'Retry'}
1348 _toPy = {'Retry': 'retry', 'UnitName': 'unitname'}
1349 def __init__(self, retry=None, unitname=None):
1350 '''
1351 retry : bool
1352 unitname : str
1353 '''
1354 self.retry = retry
1355 self.unitname = unitname
1356
1357
1358 class ServiceStatus(Type):
1359 _toSchema = {'canupgradeto': 'CanUpgradeTo', 'meterstatuses': 'MeterStatuses', 'exposed': 'Exposed', 'life': 'Life', 'units': 'Units', 'charm': 'Charm', 'relations': 'Relations', 'subordinateto': 'SubordinateTo', 'status': 'Status'}
1360 _toPy = {'CanUpgradeTo': 'canupgradeto', 'Relations': 'relations', 'MeterStatuses': 'meterstatuses', 'SubordinateTo': 'subordinateto', 'Status': 'status', 'Charm': 'charm', 'Exposed': 'exposed', 'Units': 'units', 'Life': 'life'}
1361 def __init__(self, canupgradeto=None, charm=None, exposed=None, life=None, meterstatuses=None, relations=None, status=None, subordinateto=None, units=None):
1362 '''
1363 canupgradeto : str
1364 charm : str
1365 exposed : bool
1366 life : str
1367 meterstatuses : typing.Mapping[str, ~MeterStatus]
1368 relations : typing.Sequence[str]
1369 status : DetailedStatus
1370 subordinateto : typing.Sequence[str]
1371 units : typing.Mapping[str, ~UnitStatus]
1372 '''
1373 self.canupgradeto = canupgradeto
1374 self.charm = charm
1375 self.exposed = exposed
1376 self.life = life
1377 self.meterstatuses = {k: MeterStatus.from_json(v) for k, v in (meterstatuses or dict()).items()}
1378 self.relations = relations
1379 self.status = DetailedStatus.from_json(status)
1380 self.subordinateto = subordinateto
1381 self.units = {k: UnitStatus.from_json(v) for k, v in (units or dict()).items()}
1382
1383
1384 class SetConstraints(Type):
1385 _toSchema = {'servicename': 'ServiceName', 'constraints': 'Constraints'}
1386 _toPy = {'Constraints': 'constraints', 'ServiceName': 'servicename'}
1387 def __init__(self, constraints=None, servicename=None):
1388 '''
1389 constraints : Value
1390 servicename : str
1391 '''
1392 self.constraints = Value.from_json(constraints)
1393 self.servicename = servicename
1394
1395
1396 class SetModelAgentVersion(Type):
1397 _toSchema = {'tag': 'Tag', 'patch': 'Patch', 'major': 'Major', 'minor': 'Minor', 'build': 'Build'}
1398 _toPy = {'Patch': 'patch', 'Tag': 'tag', 'Minor': 'minor', 'Build': 'build', 'Major': 'major'}
1399 def __init__(self, build=None, major=None, minor=None, patch=None, tag=None):
1400 '''
1401 build : int
1402 major : int
1403 minor : int
1404 patch : int
1405 tag : str
1406 '''
1407 self.build = build
1408 self.major = major
1409 self.minor = minor
1410 self.patch = patch
1411 self.tag = tag
1412
1413
1414 class StatusHistoryArgs(Type):
1415 _toSchema = {'kind': 'Kind', 'name': 'Name', 'size': 'Size'}
1416 _toPy = {'Name': 'name', 'Size': 'size', 'Kind': 'kind'}
1417 def __init__(self, kind=None, name=None, size=None):
1418 '''
1419 kind : str
1420 name : str
1421 size : int
1422 '''
1423 self.kind = kind
1424 self.name = name
1425 self.size = size
1426
1427
1428 class StatusHistoryResults(Type):
1429 _toSchema = {'statuses': 'Statuses'}
1430 _toPy = {'Statuses': 'statuses'}
1431 def __init__(self, statuses=None):
1432 '''
1433 statuses : typing.Sequence[~DetailedStatus]
1434 '''
1435 self.statuses = [DetailedStatus.from_json(o) for o in statuses or []]
1436
1437
1438 class StatusParams(Type):
1439 _toSchema = {'patterns': 'Patterns'}
1440 _toPy = {'Patterns': 'patterns'}
1441 def __init__(self, patterns=None):
1442 '''
1443 patterns : typing.Sequence[str]
1444 '''
1445 self.patterns = patterns
1446
1447
1448 class Tools(Type):
1449 _toSchema = {'url': 'url', 'size': 'size', 'sha256': 'sha256', 'version': 'version'}
1450 _toPy = {'url': 'url', 'size': 'size', 'sha256': 'sha256', 'version': 'version'}
1451 def __init__(self, sha256=None, size=None, url=None, version=None):
1452 '''
1453 sha256 : str
1454 size : int
1455 url : str
1456 version : Binary
1457 '''
1458 self.sha256 = sha256
1459 self.size = size
1460 self.url = url
1461 self.version = Binary.from_json(version)
1462
1463
1464 class URL(Type):
1465 _toSchema = {'series': 'Series', 'name': 'Name', 'channel': 'Channel', 'revision': 'Revision', 'schema': 'Schema', 'user': 'User'}
1466 _toPy = {'Name': 'name', 'Revision': 'revision', 'Channel': 'channel', 'Schema': 'schema', 'User': 'user', 'Series': 'series'}
1467 def __init__(self, channel=None, name=None, revision=None, schema=None, series=None, user=None):
1468 '''
1469 channel : str
1470 name : str
1471 revision : int
1472 schema : str
1473 series : str
1474 user : str
1475 '''
1476 self.channel = channel
1477 self.name = name
1478 self.revision = revision
1479 self.schema = schema
1480 self.series = series
1481 self.user = user
1482
1483
1484 class UnitStatus(Type):
1485 _toSchema = {'agentstatus': 'AgentStatus', 'subordinates': 'Subordinates', 'charm': 'Charm', 'openedports': 'OpenedPorts', 'workloadstatus': 'WorkloadStatus', 'publicaddress': 'PublicAddress', 'machine': 'Machine'}
1486 _toPy = {'WorkloadStatus': 'workloadstatus', 'Machine': 'machine', 'PublicAddress': 'publicaddress', 'OpenedPorts': 'openedports', 'Subordinates': 'subordinates', 'AgentStatus': 'agentstatus', 'Charm': 'charm'}
1487 def __init__(self, agentstatus=None, charm=None, machine=None, openedports=None, publicaddress=None, subordinates=None, workloadstatus=None):
1488 '''
1489 agentstatus : DetailedStatus
1490 charm : str
1491 machine : str
1492 openedports : typing.Sequence[str]
1493 publicaddress : str
1494 subordinates : typing.Mapping[str, ~UnitStatus]
1495 workloadstatus : DetailedStatus
1496 '''
1497 self.agentstatus = DetailedStatus.from_json(agentstatus)
1498 self.charm = charm
1499 self.machine = machine
1500 self.openedports = openedports
1501 self.publicaddress = publicaddress
1502 self.subordinates = {k: UnitStatus.from_json(v) for k, v in (subordinates or dict()).items()}
1503 self.workloadstatus = DetailedStatus.from_json(workloadstatus)
1504
1505
1506 class Value(Type):
1507 _toSchema = {'tags': 'tags', 'root_disk': 'root-disk', 'spaces': 'spaces', 'virt_type': 'virt-type', 'container': 'container', 'mem': 'mem', 'arch': 'arch', 'cpu_power': 'cpu-power', 'cpu_cores': 'cpu-cores', 'instance_type': 'instance-type'}
1508 _toPy = {'spaces': 'spaces', 'instance-type': 'instance_type', 'virt-type': 'virt_type', 'container': 'container', 'cpu-cores': 'cpu_cores', 'tags': 'tags', 'cpu-power': 'cpu_power', 'mem': 'mem', 'root-disk': 'root_disk', 'arch': 'arch'}
1509 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):
1510 '''
1511 arch : str
1512 container : str
1513 cpu_cores : int
1514 cpu_power : int
1515 instance_type : str
1516 mem : int
1517 root_disk : int
1518 spaces : typing.Sequence[str]
1519 tags : typing.Sequence[str]
1520 virt_type : str
1521 '''
1522 self.arch = arch
1523 self.container = container
1524 self.cpu_cores = cpu_cores
1525 self.cpu_power = cpu_power
1526 self.instance_type = instance_type
1527 self.mem = mem
1528 self.root_disk = root_disk
1529 self.spaces = spaces
1530 self.tags = tags
1531 self.virt_type = virt_type
1532
1533
1534 class DestroyControllerArgs(Type):
1535 _toSchema = {'destroy_models': 'destroy-models'}
1536 _toPy = {'destroy-models': 'destroy_models'}
1537 def __init__(self, destroy_models=None):
1538 '''
1539 destroy_models : bool
1540 '''
1541 self.destroy_models = destroy_models
1542
1543
1544 class InitiateModelMigrationArgs(Type):
1545 _toSchema = {'specs': 'specs'}
1546 _toPy = {'specs': 'specs'}
1547 def __init__(self, specs=None):
1548 '''
1549 specs : typing.Sequence[~ModelMigrationSpec]
1550 '''
1551 self.specs = [ModelMigrationSpec.from_json(o) for o in specs or []]
1552
1553
1554 class InitiateModelMigrationResult(Type):
1555 _toSchema = {'model_tag': 'model-tag', 'id_': 'id', 'error': 'error'}
1556 _toPy = {'model-tag': 'model_tag', 'id': 'id_', 'error': 'error'}
1557 def __init__(self, error=None, id_=None, model_tag=None):
1558 '''
1559 error : Error
1560 id_ : str
1561 model_tag : str
1562 '''
1563 self.error = Error.from_json(error)
1564 self.id_ = id_
1565 self.model_tag = model_tag
1566
1567
1568 class InitiateModelMigrationResults(Type):
1569 _toSchema = {'results': 'results'}
1570 _toPy = {'results': 'results'}
1571 def __init__(self, results=None):
1572 '''
1573 results : typing.Sequence[~InitiateModelMigrationResult]
1574 '''
1575 self.results = [InitiateModelMigrationResult.from_json(o) for o in results or []]
1576
1577
1578 class Model(Type):
1579 _toSchema = {'uuid': 'UUID', 'name': 'Name', 'ownertag': 'OwnerTag'}
1580 _toPy = {'Name': 'name', 'OwnerTag': 'ownertag', 'UUID': 'uuid'}
1581 def __init__(self, name=None, ownertag=None, uuid=None):
1582 '''
1583 name : str
1584 ownertag : str
1585 uuid : str
1586 '''
1587 self.name = name
1588 self.ownertag = ownertag
1589 self.uuid = uuid
1590
1591
1592 class ModelBlockInfo(Type):
1593 _toSchema = {'blocks': 'blocks', 'owner_tag': 'owner-tag', 'name': 'name', 'model_uuid': 'model-uuid'}
1594 _toPy = {'blocks': 'blocks', 'owner-tag': 'owner_tag', 'name': 'name', 'model-uuid': 'model_uuid'}
1595 def __init__(self, blocks=None, model_uuid=None, name=None, owner_tag=None):
1596 '''
1597 blocks : typing.Sequence[str]
1598 model_uuid : str
1599 name : str
1600 owner_tag : str
1601 '''
1602 self.blocks = blocks
1603 self.model_uuid = model_uuid
1604 self.name = name
1605 self.owner_tag = owner_tag
1606
1607
1608 class ModelBlockInfoList(Type):
1609 _toSchema = {'models': 'models'}
1610 _toPy = {'models': 'models'}
1611 def __init__(self, models=None):
1612 '''
1613 models : typing.Sequence[~ModelBlockInfo]
1614 '''
1615 self.models = [ModelBlockInfo.from_json(o) for o in models or []]
1616
1617
1618 class ModelMigrationSpec(Type):
1619 _toSchema = {'model_tag': 'model-tag', 'target_info': 'target-info'}
1620 _toPy = {'model-tag': 'model_tag', 'target-info': 'target_info'}
1621 def __init__(self, model_tag=None, target_info=None):
1622 '''
1623 model_tag : str
1624 target_info : ModelMigrationTargetInfo
1625 '''
1626 self.model_tag = model_tag
1627 self.target_info = ModelMigrationTargetInfo.from_json(target_info)
1628
1629
1630 class ModelMigrationTargetInfo(Type):
1631 _toSchema = {'ca_cert': 'ca-cert', 'controller_tag': 'controller-tag', 'auth_tag': 'auth-tag', 'addrs': 'addrs', 'password': 'password'}
1632 _toPy = {'auth-tag': 'auth_tag', 'password': 'password', 'ca-cert': 'ca_cert', 'addrs': 'addrs', 'controller-tag': 'controller_tag'}
1633 def __init__(self, addrs=None, auth_tag=None, ca_cert=None, controller_tag=None, password=None):
1634 '''
1635 addrs : typing.Sequence[str]
1636 auth_tag : str
1637 ca_cert : str
1638 controller_tag : str
1639 password : str
1640 '''
1641 self.addrs = addrs
1642 self.auth_tag = auth_tag
1643 self.ca_cert = ca_cert
1644 self.controller_tag = controller_tag
1645 self.password = password
1646
1647
1648 class ModelStatus(Type):
1649 _toSchema = {'hosted_machine_count': 'hosted-machine-count', 'model_tag': 'model-tag', 'service_count': 'service-count', 'life': 'life', 'owner_tag': 'owner-tag'}
1650 _toPy = {'life': 'life', 'model-tag': 'model_tag', 'owner-tag': 'owner_tag', 'hosted-machine-count': 'hosted_machine_count', 'service-count': 'service_count'}
1651 def __init__(self, hosted_machine_count=None, life=None, model_tag=None, owner_tag=None, service_count=None):
1652 '''
1653 hosted_machine_count : int
1654 life : str
1655 model_tag : str
1656 owner_tag : str
1657 service_count : int
1658 '''
1659 self.hosted_machine_count = hosted_machine_count
1660 self.life = life
1661 self.model_tag = model_tag
1662 self.owner_tag = owner_tag
1663 self.service_count = service_count
1664
1665
1666 class ModelStatusResults(Type):
1667 _toSchema = {'models': 'models'}
1668 _toPy = {'models': 'models'}
1669 def __init__(self, models=None):
1670 '''
1671 models : typing.Sequence[~ModelStatus]
1672 '''
1673 self.models = [ModelStatus.from_json(o) for o in models or []]
1674
1675
1676 class RemoveBlocksArgs(Type):
1677 _toSchema = {'all_': 'all'}
1678 _toPy = {'all': 'all_'}
1679 def __init__(self, all_=None):
1680 '''
1681 all_ : bool
1682 '''
1683 self.all_ = all_
1684
1685
1686 class UserModel(Type):
1687 _toSchema = {'lastconnection': 'LastConnection', 'model': 'Model'}
1688 _toPy = {'Model': 'model', 'LastConnection': 'lastconnection'}
1689 def __init__(self, lastconnection=None, model=None):
1690 '''
1691 lastconnection : str
1692 model : Model
1693 '''
1694 self.lastconnection = lastconnection
1695 self.model = Model.from_json(model)
1696
1697
1698 class UserModelList(Type):
1699 _toSchema = {'usermodels': 'UserModels'}
1700 _toPy = {'UserModels': 'usermodels'}
1701 def __init__(self, usermodels=None):
1702 '''
1703 usermodels : typing.Sequence[~UserModel]
1704 '''
1705 self.usermodels = [UserModel.from_json(o) for o in usermodels or []]
1706
1707
1708 class BytesResult(Type):
1709 _toSchema = {'result': 'Result'}
1710 _toPy = {'Result': 'result'}
1711 def __init__(self, result=None):
1712 '''
1713 result : typing.Sequence[int]
1714 '''
1715 self.result = result
1716
1717
1718 class DeployerConnectionValues(Type):
1719 _toSchema = {'apiaddresses': 'APIAddresses', 'stateaddresses': 'StateAddresses'}
1720 _toPy = {'APIAddresses': 'apiaddresses', 'StateAddresses': 'stateaddresses'}
1721 def __init__(self, apiaddresses=None, stateaddresses=None):
1722 '''
1723 apiaddresses : typing.Sequence[str]
1724 stateaddresses : typing.Sequence[str]
1725 '''
1726 self.apiaddresses = apiaddresses
1727 self.stateaddresses = stateaddresses
1728
1729
1730 class LifeResult(Type):
1731 _toSchema = {'life': 'Life', 'error': 'Error'}
1732 _toPy = {'Life': 'life', 'Error': 'error'}
1733 def __init__(self, error=None, life=None):
1734 '''
1735 error : Error
1736 life : str
1737 '''
1738 self.error = Error.from_json(error)
1739 self.life = life
1740
1741
1742 class LifeResults(Type):
1743 _toSchema = {'results': 'Results'}
1744 _toPy = {'Results': 'results'}
1745 def __init__(self, results=None):
1746 '''
1747 results : typing.Sequence[~LifeResult]
1748 '''
1749 self.results = [LifeResult.from_json(o) for o in results or []]
1750
1751
1752 class StringResult(Type):
1753 _toSchema = {'error': 'Error', 'result': 'Result'}
1754 _toPy = {'Error': 'error', 'Result': 'result'}
1755 def __init__(self, error=None, result=None):
1756 '''
1757 error : Error
1758 result : str
1759 '''
1760 self.error = Error.from_json(error)
1761 self.result = result
1762
1763
1764 class StringsResult(Type):
1765 _toSchema = {'error': 'Error', 'result': 'Result'}
1766 _toPy = {'Error': 'error', 'Result': 'result'}
1767 def __init__(self, error=None, result=None):
1768 '''
1769 error : Error
1770 result : typing.Sequence[str]
1771 '''
1772 self.error = Error.from_json(error)
1773 self.result = result
1774
1775
1776 class StringsWatchResult(Type):
1777 _toSchema = {'changes': 'Changes', 'error': 'Error', 'stringswatcherid': 'StringsWatcherId'}
1778 _toPy = {'Error': 'error', 'StringsWatcherId': 'stringswatcherid', 'Changes': 'changes'}
1779 def __init__(self, changes=None, error=None, stringswatcherid=None):
1780 '''
1781 changes : typing.Sequence[str]
1782 error : Error
1783 stringswatcherid : str
1784 '''
1785 self.changes = changes
1786 self.error = Error.from_json(error)
1787 self.stringswatcherid = stringswatcherid
1788
1789
1790 class StringsWatchResults(Type):
1791 _toSchema = {'results': 'Results'}
1792 _toPy = {'Results': 'results'}
1793 def __init__(self, results=None):
1794 '''
1795 results : typing.Sequence[~StringsWatchResult]
1796 '''
1797 self.results = [StringsWatchResult.from_json(o) for o in results or []]
1798
1799
1800 class AddSubnetParams(Type):
1801 _toSchema = {'subnetproviderid': 'SubnetProviderId', 'zones': 'Zones', 'subnettag': 'SubnetTag', 'spacetag': 'SpaceTag'}
1802 _toPy = {'SubnetProviderId': 'subnetproviderid', 'SubnetTag': 'subnettag', 'SpaceTag': 'spacetag', 'Zones': 'zones'}
1803 def __init__(self, spacetag=None, subnetproviderid=None, subnettag=None, zones=None):
1804 '''
1805 spacetag : str
1806 subnetproviderid : str
1807 subnettag : str
1808 zones : typing.Sequence[str]
1809 '''
1810 self.spacetag = spacetag
1811 self.subnetproviderid = subnetproviderid
1812 self.subnettag = subnettag
1813 self.zones = zones
1814
1815
1816 class AddSubnetsParams(Type):
1817 _toSchema = {'subnets': 'Subnets'}
1818 _toPy = {'Subnets': 'subnets'}
1819 def __init__(self, subnets=None):
1820 '''
1821 subnets : typing.Sequence[~AddSubnetParams]
1822 '''
1823 self.subnets = [AddSubnetParams.from_json(o) for o in subnets or []]
1824
1825
1826 class CreateSpaceParams(Type):
1827 _toSchema = {'public': 'Public', 'providerid': 'ProviderId', 'spacetag': 'SpaceTag', 'subnettags': 'SubnetTags'}
1828 _toPy = {'Public': 'public', 'SubnetTags': 'subnettags', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag'}
1829 def __init__(self, providerid=None, public=None, spacetag=None, subnettags=None):
1830 '''
1831 providerid : str
1832 public : bool
1833 spacetag : str
1834 subnettags : typing.Sequence[str]
1835 '''
1836 self.providerid = providerid
1837 self.public = public
1838 self.spacetag = spacetag
1839 self.subnettags = subnettags
1840
1841
1842 class CreateSpacesParams(Type):
1843 _toSchema = {'spaces': 'Spaces'}
1844 _toPy = {'Spaces': 'spaces'}
1845 def __init__(self, spaces=None):
1846 '''
1847 spaces : typing.Sequence[~CreateSpaceParams]
1848 '''
1849 self.spaces = [CreateSpaceParams.from_json(o) for o in spaces or []]
1850
1851
1852 class DiscoverSpacesResults(Type):
1853 _toSchema = {'results': 'Results'}
1854 _toPy = {'Results': 'results'}
1855 def __init__(self, results=None):
1856 '''
1857 results : typing.Sequence[~ProviderSpace]
1858 '''
1859 self.results = [ProviderSpace.from_json(o) for o in results or []]
1860
1861
1862 class ListSubnetsResults(Type):
1863 _toSchema = {'results': 'Results'}
1864 _toPy = {'Results': 'results'}
1865 def __init__(self, results=None):
1866 '''
1867 results : typing.Sequence[~Subnet]
1868 '''
1869 self.results = [Subnet.from_json(o) for o in results or []]
1870
1871
1872 class ProviderSpace(Type):
1873 _toSchema = {'providerid': 'ProviderId', 'name': 'Name', 'error': 'Error', 'subnets': 'Subnets'}
1874 _toPy = {'Name': 'name', 'Subnets': 'subnets', 'Error': 'error', 'ProviderId': 'providerid'}
1875 def __init__(self, error=None, name=None, providerid=None, subnets=None):
1876 '''
1877 error : Error
1878 name : str
1879 providerid : str
1880 subnets : typing.Sequence[~Subnet]
1881 '''
1882 self.error = Error.from_json(error)
1883 self.name = name
1884 self.providerid = providerid
1885 self.subnets = [Subnet.from_json(o) for o in subnets or []]
1886
1887
1888 class Subnet(Type):
1889 _toSchema = {'providerid': 'ProviderId', 'cidr': 'CIDR', 'life': 'Life', 'staticrangehighip': 'StaticRangeHighIP', 'zones': 'Zones', 'vlantag': 'VLANTag', 'staticrangelowip': 'StaticRangeLowIP', 'spacetag': 'SpaceTag', 'status': 'Status'}
1890 _toPy = {'StaticRangeHighIP': 'staticrangehighip', 'Zones': 'zones', 'StaticRangeLowIP': 'staticrangelowip', 'CIDR': 'cidr', 'VLANTag': 'vlantag', 'Status': 'status', 'Life': 'life', 'ProviderId': 'providerid', 'SpaceTag': 'spacetag'}
1891 def __init__(self, cidr=None, life=None, providerid=None, spacetag=None, staticrangehighip=None, staticrangelowip=None, status=None, vlantag=None, zones=None):
1892 '''
1893 cidr : str
1894 life : str
1895 providerid : str
1896 spacetag : str
1897 staticrangehighip : typing.Sequence[int]
1898 staticrangelowip : typing.Sequence[int]
1899 status : str
1900 vlantag : int
1901 zones : typing.Sequence[str]
1902 '''
1903 self.cidr = cidr
1904 self.life = life
1905 self.providerid = providerid
1906 self.spacetag = spacetag
1907 self.staticrangehighip = staticrangehighip
1908 self.staticrangelowip = staticrangelowip
1909 self.status = status
1910 self.vlantag = vlantag
1911 self.zones = zones
1912
1913
1914 class SubnetsFilters(Type):
1915 _toSchema = {'spacetag': 'SpaceTag', 'zone': 'Zone'}
1916 _toPy = {'Zone': 'zone', 'SpaceTag': 'spacetag'}
1917 def __init__(self, spacetag=None, zone=None):
1918 '''
1919 spacetag : str
1920 zone : str
1921 '''
1922 self.spacetag = spacetag
1923 self.zone = zone
1924
1925
1926 class BlockDevice(Type):
1927 _toSchema = {'hardwareid': 'HardwareId', 'inuse': 'InUse', 'size': 'Size', 'uuid': 'UUID', 'filesystemtype': 'FilesystemType', 'mountpoint': 'MountPoint', 'label': 'Label', 'busaddress': 'BusAddress', 'devicename': 'DeviceName', 'devicelinks': 'DeviceLinks'}
1928 _toPy = {'FilesystemType': 'filesystemtype', 'DeviceLinks': 'devicelinks', 'Label': 'label', 'InUse': 'inuse', 'MountPoint': 'mountpoint', 'DeviceName': 'devicename', 'UUID': 'uuid', 'Size': 'size', 'HardwareId': 'hardwareid', 'BusAddress': 'busaddress'}
1929 def __init__(self, busaddress=None, devicelinks=None, devicename=None, filesystemtype=None, hardwareid=None, inuse=None, label=None, mountpoint=None, size=None, uuid=None):
1930 '''
1931 busaddress : str
1932 devicelinks : typing.Sequence[str]
1933 devicename : str
1934 filesystemtype : str
1935 hardwareid : str
1936 inuse : bool
1937 label : str
1938 mountpoint : str
1939 size : int
1940 uuid : str
1941 '''
1942 self.busaddress = busaddress
1943 self.devicelinks = devicelinks
1944 self.devicename = devicename
1945 self.filesystemtype = filesystemtype
1946 self.hardwareid = hardwareid
1947 self.inuse = inuse
1948 self.label = label
1949 self.mountpoint = mountpoint
1950 self.size = size
1951 self.uuid = uuid
1952
1953
1954 class MachineBlockDevices(Type):
1955 _toSchema = {'blockdevices': 'blockdevices', 'machine': 'machine'}
1956 _toPy = {'blockdevices': 'blockdevices', 'machine': 'machine'}
1957 def __init__(self, blockdevices=None, machine=None):
1958 '''
1959 blockdevices : typing.Sequence[~BlockDevice]
1960 machine : str
1961 '''
1962 self.blockdevices = [BlockDevice.from_json(o) for o in blockdevices or []]
1963 self.machine = machine
1964
1965
1966 class SetMachineBlockDevices(Type):
1967 _toSchema = {'machineblockdevices': 'machineblockdevices'}
1968 _toPy = {'machineblockdevices': 'machineblockdevices'}
1969 def __init__(self, machineblockdevices=None):
1970 '''
1971 machineblockdevices : typing.Sequence[~MachineBlockDevices]
1972 '''
1973 self.machineblockdevices = [MachineBlockDevices.from_json(o) for o in machineblockdevices or []]
1974
1975
1976 class MachineStorageId(Type):
1977 _toSchema = {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
1978 _toPy = {'attachmenttag': 'attachmenttag', 'machinetag': 'machinetag'}
1979 def __init__(self, attachmenttag=None, machinetag=None):
1980 '''
1981 attachmenttag : str
1982 machinetag : str
1983 '''
1984 self.attachmenttag = attachmenttag
1985 self.machinetag = machinetag
1986
1987
1988 class MachineStorageIdsWatchResult(Type):
1989 _toSchema = {'machinestorageidswatcherid': 'MachineStorageIdsWatcherId', 'changes': 'Changes', 'error': 'Error'}
1990 _toPy = {'Error': 'error', 'Changes': 'changes', 'MachineStorageIdsWatcherId': 'machinestorageidswatcherid'}
1991 def __init__(self, changes=None, error=None, machinestorageidswatcherid=None):
1992 '''
1993 changes : typing.Sequence[~MachineStorageId]
1994 error : Error
1995 machinestorageidswatcherid : str
1996 '''
1997 self.changes = [MachineStorageId.from_json(o) for o in changes or []]
1998 self.error = Error.from_json(error)
1999 self.machinestorageidswatcherid = machinestorageidswatcherid
2000
2001
2002 class BoolResults(Type):
2003 _toSchema = {'results': 'Results'}
2004 _toPy = {'Results': 'results'}
2005 def __init__(self, results=None):
2006 '''
2007 results : typing.Sequence[~BoolResult]
2008 '''
2009 self.results = [BoolResult.from_json(o) for o in results or []]
2010
2011
2012 class MachinePortRange(Type):
2013 _toSchema = {'relationtag': 'RelationTag', 'portrange': 'PortRange', 'unittag': 'UnitTag'}
2014 _toPy = {'UnitTag': 'unittag', 'PortRange': 'portrange', 'RelationTag': 'relationtag'}
2015 def __init__(self, portrange=None, relationtag=None, unittag=None):
2016 '''
2017 portrange : PortRange
2018 relationtag : str
2019 unittag : str
2020 '''
2021 self.portrange = PortRange.from_json(portrange)
2022 self.relationtag = relationtag
2023 self.unittag = unittag
2024
2025
2026 class MachinePorts(Type):
2027 _toSchema = {'machinetag': 'MachineTag', 'subnettag': 'SubnetTag'}
2028 _toPy = {'MachineTag': 'machinetag', 'SubnetTag': 'subnettag'}
2029 def __init__(self, machinetag=None, subnettag=None):
2030 '''
2031 machinetag : str
2032 subnettag : str
2033 '''
2034 self.machinetag = machinetag
2035 self.subnettag = subnettag
2036
2037
2038 class MachinePortsParams(Type):
2039 _toSchema = {'params': 'Params'}
2040 _toPy = {'Params': 'params'}
2041 def __init__(self, params=None):
2042 '''
2043 params : typing.Sequence[~MachinePorts]
2044 '''
2045 self.params = [MachinePorts.from_json(o) for o in params or []]
2046
2047
2048 class MachinePortsResult(Type):
2049 _toSchema = {'error': 'Error', 'ports': 'Ports'}
2050 _toPy = {'Error': 'error', 'Ports': 'ports'}
2051 def __init__(self, error=None, ports=None):
2052 '''
2053 error : Error
2054 ports : typing.Sequence[~MachinePortRange]
2055 '''
2056 self.error = Error.from_json(error)
2057 self.ports = [MachinePortRange.from_json(o) for o in ports or []]
2058
2059
2060 class MachinePortsResults(Type):
2061 _toSchema = {'results': 'Results'}
2062 _toPy = {'Results': 'results'}
2063 def __init__(self, results=None):
2064 '''
2065 results : typing.Sequence[~MachinePortsResult]
2066 '''
2067 self.results = [MachinePortsResult.from_json(o) for o in results or []]
2068
2069
2070 class NotifyWatchResults(Type):
2071 _toSchema = {'results': 'Results'}
2072 _toPy = {'Results': 'results'}
2073 def __init__(self, results=None):
2074 '''
2075 results : typing.Sequence[~NotifyWatchResult]
2076 '''
2077 self.results = [NotifyWatchResult.from_json(o) for o in results or []]
2078
2079
2080 class PortRange(Type):
2081 _toSchema = {'protocol': 'Protocol', 'toport': 'ToPort', 'fromport': 'FromPort'}
2082 _toPy = {'FromPort': 'fromport', 'Protocol': 'protocol', 'ToPort': 'toport'}
2083 def __init__(self, fromport=None, protocol=None, toport=None):
2084 '''
2085 fromport : int
2086 protocol : str
2087 toport : int
2088 '''
2089 self.fromport = fromport
2090 self.protocol = protocol
2091 self.toport = toport
2092
2093
2094 class StringResults(Type):
2095 _toSchema = {'results': 'Results'}
2096 _toPy = {'Results': 'results'}
2097 def __init__(self, results=None):
2098 '''
2099 results : typing.Sequence[~StringResult]
2100 '''
2101 self.results = [StringResult.from_json(o) for o in results or []]
2102
2103
2104 class StringsResults(Type):
2105 _toSchema = {'results': 'Results'}
2106 _toPy = {'Results': 'results'}
2107 def __init__(self, results=None):
2108 '''
2109 results : typing.Sequence[~StringsResult]
2110 '''
2111 self.results = [StringsResult.from_json(o) for o in results or []]
2112
2113
2114 class ControllersChangeResult(Type):
2115 _toSchema = {'error': 'Error', 'result': 'Result'}
2116 _toPy = {'Error': 'error', 'Result': 'result'}
2117 def __init__(self, error=None, result=None):
2118 '''
2119 error : Error
2120 result : ControllersChanges
2121 '''
2122 self.error = Error.from_json(error)
2123 self.result = ControllersChanges.from_json(result)
2124
2125
2126 class ControllersChangeResults(Type):
2127 _toSchema = {'results': 'Results'}
2128 _toPy = {'Results': 'results'}
2129 def __init__(self, results=None):
2130 '''
2131 results : typing.Sequence[~ControllersChangeResult]
2132 '''
2133 self.results = [ControllersChangeResult.from_json(o) for o in results or []]
2134
2135
2136 class ControllersChanges(Type):
2137 _toSchema = {'added': 'added', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'maintained': 'maintained', 'converted': 'converted'}
2138 _toPy = {'added': 'added', 'promoted': 'promoted', 'removed': 'removed', 'demoted': 'demoted', 'maintained': 'maintained', 'converted': 'converted'}
2139 def __init__(self, added=None, converted=None, demoted=None, maintained=None, promoted=None, removed=None):
2140 '''
2141 added : typing.Sequence[str]
2142 converted : typing.Sequence[str]
2143 demoted : typing.Sequence[str]
2144 maintained : typing.Sequence[str]
2145 promoted : typing.Sequence[str]
2146 removed : typing.Sequence[str]
2147 '''
2148 self.added = added
2149 self.converted = converted
2150 self.demoted = demoted
2151 self.maintained = maintained
2152 self.promoted = promoted
2153 self.removed = removed
2154
2155
2156 class ControllersSpec(Type):
2157 _toSchema = {'modeltag': 'ModelTag', 'num_controllers': 'num-controllers', 'constraints': 'constraints', 'placement': 'placement', 'series': 'series'}
2158 _toPy = {'placement': 'placement', 'constraints': 'constraints', 'series': 'series', 'num-controllers': 'num_controllers', 'ModelTag': 'modeltag'}
2159 def __init__(self, modeltag=None, constraints=None, num_controllers=None, placement=None, series=None):
2160 '''
2161 modeltag : str
2162 constraints : Value
2163 num_controllers : int
2164 placement : typing.Sequence[str]
2165 series : str
2166 '''
2167 self.modeltag = modeltag
2168 self.constraints = Value.from_json(constraints)
2169 self.num_controllers = num_controllers
2170 self.placement = placement
2171 self.series = series
2172
2173
2174 class ControllersSpecs(Type):
2175 _toSchema = {'specs': 'Specs'}
2176 _toPy = {'Specs': 'specs'}
2177 def __init__(self, specs=None):
2178 '''
2179 specs : typing.Sequence[~ControllersSpec]
2180 '''
2181 self.specs = [ControllersSpec.from_json(o) for o in specs or []]
2182
2183
2184 class HAMember(Type):
2185 _toSchema = {'publicaddress': 'PublicAddress', 'series': 'Series', 'tag': 'Tag'}
2186 _toPy = {'Tag': 'tag', 'PublicAddress': 'publicaddress', 'Series': 'series'}
2187 def __init__(self, publicaddress=None, series=None, tag=None):
2188 '''
2189 publicaddress : Address
2190 series : str
2191 tag : str
2192 '''
2193 self.publicaddress = Address.from_json(publicaddress)
2194 self.series = series
2195 self.tag = tag
2196
2197
2198 class Member(Type):
2199 _toSchema = {'slavedelay': 'SlaveDelay', 'id_': 'Id', 'priority': 'Priority', 'hidden': 'Hidden', 'address': 'Address', 'buildindexes': 'BuildIndexes', 'arbiter': 'Arbiter', 'votes': 'Votes', 'tags': 'Tags'}
2200 _toPy = {'SlaveDelay': 'slavedelay', 'Id': 'id_', 'Hidden': 'hidden', 'Arbiter': 'arbiter', 'Priority': 'priority', 'Address': 'address', 'Votes': 'votes', 'Tags': 'tags', 'BuildIndexes': 'buildindexes'}
2201 def __init__(self, address=None, arbiter=None, buildindexes=None, hidden=None, id_=None, priority=None, slavedelay=None, tags=None, votes=None):
2202 '''
2203 address : str
2204 arbiter : bool
2205 buildindexes : bool
2206 hidden : bool
2207 id_ : int
2208 priority : float
2209 slavedelay : int
2210 tags : typing.Mapping[str, str]
2211 votes : int
2212 '''
2213 self.address = address
2214 self.arbiter = arbiter
2215 self.buildindexes = buildindexes
2216 self.hidden = hidden
2217 self.id_ = id_
2218 self.priority = priority
2219 self.slavedelay = slavedelay
2220 self.tags = tags
2221 self.votes = votes
2222
2223
2224 class MongoUpgradeResults(Type):
2225 _toSchema = {'members': 'Members', 'master': 'Master', 'rsmembers': 'RsMembers'}
2226 _toPy = {'Members': 'members', 'RsMembers': 'rsmembers', 'Master': 'master'}
2227 def __init__(self, master=None, members=None, rsmembers=None):
2228 '''
2229 master : HAMember
2230 members : typing.Sequence[~HAMember]
2231 rsmembers : typing.Sequence[~Member]
2232 '''
2233 self.master = HAMember.from_json(master)
2234 self.members = [HAMember.from_json(o) for o in members or []]
2235 self.rsmembers = [Member.from_json(o) for o in rsmembers or []]
2236
2237
2238 class ResumeReplicationParams(Type):
2239 _toSchema = {'members': 'Members'}
2240 _toPy = {'Members': 'members'}
2241 def __init__(self, members=None):
2242 '''
2243 members : typing.Sequence[~Member]
2244 '''
2245 self.members = [Member.from_json(o) for o in members or []]
2246
2247
2248 class UpgradeMongoParams(Type):
2249 _toSchema = {'patch': 'Patch', 'major': 'Major', 'storageengine': 'StorageEngine', 'minor': 'Minor'}
2250 _toPy = {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2251 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2252 '''
2253 major : int
2254 minor : int
2255 patch : str
2256 storageengine : str
2257 '''
2258 self.major = major
2259 self.minor = minor
2260 self.patch = patch
2261 self.storageengine = storageengine
2262
2263
2264 class Version(Type):
2265 _toSchema = {'patch': 'Patch', 'major': 'Major', 'storageengine': 'StorageEngine', 'minor': 'Minor'}
2266 _toPy = {'Patch': 'patch', 'StorageEngine': 'storageengine', 'Major': 'major', 'Minor': 'minor'}
2267 def __init__(self, major=None, minor=None, patch=None, storageengine=None):
2268 '''
2269 major : int
2270 minor : int
2271 patch : str
2272 storageengine : str
2273 '''
2274 self.major = major
2275 self.minor = minor
2276 self.patch = patch
2277 self.storageengine = storageengine
2278
2279
2280 class SSHHostKeySet(Type):
2281 _toSchema = {'entity_keys': 'entity-keys'}
2282 _toPy = {'entity-keys': 'entity_keys'}
2283 def __init__(self, entity_keys=None):
2284 '''
2285 entity_keys : typing.Sequence[~SSHHostKeys]
2286 '''
2287 self.entity_keys = [SSHHostKeys.from_json(o) for o in entity_keys or []]
2288
2289
2290 class SSHHostKeys(Type):
2291 _toSchema = {'tag': 'tag', 'public_keys': 'public-keys'}
2292 _toPy = {'public-keys': 'public_keys', 'tag': 'tag'}
2293 def __init__(self, public_keys=None, tag=None):
2294 '''
2295 public_keys : typing.Sequence[str]
2296 tag : str
2297 '''
2298 self.public_keys = public_keys
2299 self.tag = tag
2300
2301
2302 class ImageFilterParams(Type):
2303 _toSchema = {'images': 'images'}
2304 _toPy = {'images': 'images'}
2305 def __init__(self, images=None):
2306 '''
2307 images : typing.Sequence[~ImageSpec]
2308 '''
2309 self.images = [ImageSpec.from_json(o) for o in images or []]
2310
2311
2312 class ImageMetadata(Type):
2313 _toSchema = {'url': 'url', 'created': 'created', 'kind': 'kind', 'series': 'series', 'arch': 'arch'}
2314 _toPy = {'url': 'url', 'created': 'created', 'kind': 'kind', 'series': 'series', 'arch': 'arch'}
2315 def __init__(self, arch=None, created=None, kind=None, series=None, url=None):
2316 '''
2317 arch : str
2318 created : str
2319 kind : str
2320 series : str
2321 url : str
2322 '''
2323 self.arch = arch
2324 self.created = created
2325 self.kind = kind
2326 self.series = series
2327 self.url = url
2328
2329
2330 class ImageSpec(Type):
2331 _toSchema = {'kind': 'kind', 'series': 'series', 'arch': 'arch'}
2332 _toPy = {'kind': 'kind', 'series': 'series', 'arch': 'arch'}
2333 def __init__(self, arch=None, kind=None, series=None):
2334 '''
2335 arch : str
2336 kind : str
2337 series : str
2338 '''
2339 self.arch = arch
2340 self.kind = kind
2341 self.series = series
2342
2343
2344 class ListImageResult(Type):
2345 _toSchema = {'result': 'result'}
2346 _toPy = {'result': 'result'}
2347 def __init__(self, result=None):
2348 '''
2349 result : typing.Sequence[~ImageMetadata]
2350 '''
2351 self.result = [ImageMetadata.from_json(o) for o in result or []]
2352
2353
2354 class CloudImageMetadata(Type):
2355 _toSchema = {'source': 'source', 'root_storage_size': 'root_storage_size', 'series': 'series', 'version': 'version', 'priority': 'priority', 'image_id': 'image_id', 'virt_type': 'virt_type', 'stream': 'stream', 'root_storage_type': 'root_storage_type', 'region': 'region', 'arch': 'arch'}
2356 _toPy = {'source': 'source', 'root_storage_size': 'root_storage_size', 'series': 'series', 'version': 'version', 'priority': 'priority', 'image_id': 'image_id', 'virt_type': 'virt_type', 'stream': 'stream', 'root_storage_type': 'root_storage_type', 'region': 'region', 'arch': 'arch'}
2357 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):
2358 '''
2359 arch : str
2360 image_id : str
2361 priority : int
2362 region : str
2363 root_storage_size : int
2364 root_storage_type : str
2365 series : str
2366 source : str
2367 stream : str
2368 version : str
2369 virt_type : str
2370 '''
2371 self.arch = arch
2372 self.image_id = image_id
2373 self.priority = priority
2374 self.region = region
2375 self.root_storage_size = root_storage_size
2376 self.root_storage_type = root_storage_type
2377 self.series = series
2378 self.source = source
2379 self.stream = stream
2380 self.version = version
2381 self.virt_type = virt_type
2382
2383
2384 class CloudImageMetadataList(Type):
2385 _toSchema = {'metadata': 'metadata'}
2386 _toPy = {'metadata': 'metadata'}
2387 def __init__(self, metadata=None):
2388 '''
2389 metadata : typing.Sequence[~CloudImageMetadata]
2390 '''
2391 self.metadata = [CloudImageMetadata.from_json(o) for o in metadata or []]
2392
2393
2394 class ImageMetadataFilter(Type):
2395 _toSchema = {'series': 'series', 'virt_type': 'virt_type', 'stream': 'stream', 'arches': 'arches', 'region': 'region', 'root_storage_type': 'root-storage-type'}
2396 _toPy = {'series': 'series', 'root-storage-type': 'root_storage_type', 'virt_type': 'virt_type', 'stream': 'stream', 'arches': 'arches', 'region': 'region'}
2397 def __init__(self, arches=None, region=None, root_storage_type=None, series=None, stream=None, virt_type=None):
2398 '''
2399 arches : typing.Sequence[str]
2400 region : str
2401 root_storage_type : str
2402 series : typing.Sequence[str]
2403 stream : str
2404 virt_type : str
2405 '''
2406 self.arches = arches
2407 self.region = region
2408 self.root_storage_type = root_storage_type
2409 self.series = series
2410 self.stream = stream
2411 self.virt_type = virt_type
2412
2413
2414 class ListCloudImageMetadataResult(Type):
2415 _toSchema = {'result': 'result'}
2416 _toPy = {'result': 'result'}
2417 def __init__(self, result=None):
2418 '''
2419 result : typing.Sequence[~CloudImageMetadata]
2420 '''
2421 self.result = [CloudImageMetadata.from_json(o) for o in result or []]
2422
2423
2424 class MetadataImageIds(Type):
2425 _toSchema = {'image_ids': 'image_ids'}
2426 _toPy = {'image_ids': 'image_ids'}
2427 def __init__(self, image_ids=None):
2428 '''
2429 image_ids : typing.Sequence[str]
2430 '''
2431 self.image_ids = image_ids
2432
2433
2434 class MetadataSaveParams(Type):
2435 _toSchema = {'metadata': 'metadata'}
2436 _toPy = {'metadata': 'metadata'}
2437 def __init__(self, metadata=None):
2438 '''
2439 metadata : typing.Sequence[~CloudImageMetadataList]
2440 '''
2441 self.metadata = [CloudImageMetadataList.from_json(o) for o in metadata or []]
2442
2443
2444 class EntityStatusArgs(Type):
2445 _toSchema = {'info': 'Info', 'data': 'Data', 'tag': 'Tag', 'status': 'Status'}
2446 _toPy = {'Status': 'status', 'Tag': 'tag', 'Data': 'data', 'Info': 'info'}
2447 def __init__(self, data=None, info=None, status=None, tag=None):
2448 '''
2449 data : typing.Mapping[str, typing.Any]
2450 info : str
2451 status : str
2452 tag : str
2453 '''
2454 self.data = data
2455 self.info = info
2456 self.status = status
2457 self.tag = tag
2458
2459
2460 class MachineAddresses(Type):
2461 _toSchema = {'addresses': 'Addresses', 'tag': 'Tag'}
2462 _toPy = {'Addresses': 'addresses', 'Tag': 'tag'}
2463 def __init__(self, addresses=None, tag=None):
2464 '''
2465 addresses : typing.Sequence[~Address]
2466 tag : str
2467 '''
2468 self.addresses = [Address.from_json(o) for o in addresses or []]
2469 self.tag = tag
2470
2471
2472 class MachineAddressesResult(Type):
2473 _toSchema = {'addresses': 'Addresses', 'error': 'Error'}
2474 _toPy = {'Error': 'error', 'Addresses': 'addresses'}
2475 def __init__(self, addresses=None, error=None):
2476 '''
2477 addresses : typing.Sequence[~Address]
2478 error : Error
2479 '''
2480 self.addresses = [Address.from_json(o) for o in addresses or []]
2481 self.error = Error.from_json(error)
2482
2483
2484 class MachineAddressesResults(Type):
2485 _toSchema = {'results': 'Results'}
2486 _toPy = {'Results': 'results'}
2487 def __init__(self, results=None):
2488 '''
2489 results : typing.Sequence[~MachineAddressesResult]
2490 '''
2491 self.results = [MachineAddressesResult.from_json(o) for o in results or []]
2492
2493
2494 class SetMachinesAddresses(Type):
2495 _toSchema = {'machineaddresses': 'MachineAddresses'}
2496 _toPy = {'MachineAddresses': 'machineaddresses'}
2497 def __init__(self, machineaddresses=None):
2498 '''
2499 machineaddresses : typing.Sequence[~MachineAddresses]
2500 '''
2501 self.machineaddresses = [MachineAddresses.from_json(o) for o in machineaddresses or []]
2502
2503
2504 class SetStatus(Type):
2505 _toSchema = {'entities': 'Entities'}
2506 _toPy = {'Entities': 'entities'}
2507 def __init__(self, entities=None):
2508 '''
2509 entities : typing.Sequence[~EntityStatusArgs]
2510 '''
2511 self.entities = [EntityStatusArgs.from_json(o) for o in entities or []]
2512
2513
2514 class StatusResult(Type):
2515 _toSchema = {'info': 'Info', 'since': 'Since', 'id_': 'Id', 'life': 'Life', 'data': 'Data', 'error': 'Error', 'status': 'Status'}
2516 _toPy = {'Since': 'since', 'Data': 'data', 'Id': 'id_', 'Status': 'status', 'Life': 'life', 'Error': 'error', 'Info': 'info'}
2517 def __init__(self, data=None, error=None, id_=None, info=None, life=None, since=None, status=None):
2518 '''
2519 data : typing.Mapping[str, typing.Any]
2520 error : Error
2521 id_ : str
2522 info : str
2523 life : str
2524 since : str
2525 status : str
2526 '''
2527 self.data = data
2528 self.error = Error.from_json(error)
2529 self.id_ = id_
2530 self.info = info
2531 self.life = life
2532 self.since = since
2533 self.status = status
2534
2535
2536 class StatusResults(Type):
2537 _toSchema = {'results': 'Results'}
2538 _toPy = {'Results': 'results'}
2539 def __init__(self, results=None):
2540 '''
2541 results : typing.Sequence[~StatusResult]
2542 '''
2543 self.results = [StatusResult.from_json(o) for o in results or []]
2544
2545
2546 class ListSSHKeys(Type):
2547 _toSchema = {'mode': 'Mode', 'entities': 'Entities'}
2548 _toPy = {'Mode': 'mode', 'Entities': 'entities'}
2549 def __init__(self, entities=None, mode=None):
2550 '''
2551 entities : Entities
2552 mode : bool
2553 '''
2554 self.entities = Entities.from_json(entities)
2555 self.mode = mode
2556
2557
2558 class ModifyUserSSHKeys(Type):
2559 _toSchema = {'keys': 'Keys', 'user': 'User'}
2560 _toPy = {'Keys': 'keys', 'User': 'user'}
2561 def __init__(self, keys=None, user=None):
2562 '''
2563 keys : typing.Sequence[str]
2564 user : str
2565 '''
2566 self.keys = keys
2567 self.user = user
2568
2569
2570 class ClaimLeadershipBulkParams(Type):
2571 _toSchema = {'params': 'Params'}
2572 _toPy = {'Params': 'params'}
2573 def __init__(self, params=None):
2574 '''
2575 params : typing.Sequence[~ClaimLeadershipParams]
2576 '''
2577 self.params = [ClaimLeadershipParams.from_json(o) for o in params or []]
2578
2579
2580 class ClaimLeadershipBulkResults(Type):
2581 _toSchema = {'results': 'Results'}
2582 _toPy = {'Results': 'results'}
2583 def __init__(self, results=None):
2584 '''
2585 results : typing.Sequence[~ErrorResult]
2586 '''
2587 self.results = [ErrorResult.from_json(o) for o in results or []]
2588
2589
2590 class ClaimLeadershipParams(Type):
2591 _toSchema = {'durationseconds': 'DurationSeconds', 'unittag': 'UnitTag', 'servicetag': 'ServiceTag'}
2592 _toPy = {'ServiceTag': 'servicetag', 'UnitTag': 'unittag', 'DurationSeconds': 'durationseconds'}
2593 def __init__(self, durationseconds=None, servicetag=None, unittag=None):
2594 '''
2595 durationseconds : float
2596 servicetag : str
2597 unittag : str
2598 '''
2599 self.durationseconds = durationseconds
2600 self.servicetag = servicetag
2601 self.unittag = unittag
2602
2603
2604 class ServiceTag(Type):
2605 _toSchema = {'name': 'Name'}
2606 _toPy = {'Name': 'name'}
2607 def __init__(self, name=None):
2608 '''
2609 name : str
2610 '''
2611 self.name = name
2612
2613
2614 class ActionExecutionResult(Type):
2615 _toSchema = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'}
2616 _toPy = {'message': 'message', 'results': 'results', 'status': 'status', 'actiontag': 'actiontag'}
2617 def __init__(self, actiontag=None, message=None, results=None, status=None):
2618 '''
2619 actiontag : str
2620 message : str
2621 results : typing.Mapping[str, typing.Any]
2622 status : str
2623 '''
2624 self.actiontag = actiontag
2625 self.message = message
2626 self.results = results
2627 self.status = status
2628
2629
2630 class ActionExecutionResults(Type):
2631 _toSchema = {'results': 'results'}
2632 _toPy = {'results': 'results'}
2633 def __init__(self, results=None):
2634 '''
2635 results : typing.Sequence[~ActionExecutionResult]
2636 '''
2637 self.results = [ActionExecutionResult.from_json(o) for o in results or []]
2638
2639
2640 class JobsResult(Type):
2641 _toSchema = {'jobs': 'Jobs', 'error': 'Error'}
2642 _toPy = {'Error': 'error', 'Jobs': 'jobs'}
2643 def __init__(self, error=None, jobs=None):
2644 '''
2645 error : Error
2646 jobs : typing.Sequence[str]
2647 '''
2648 self.error = Error.from_json(error)
2649 self.jobs = jobs
2650
2651
2652 class JobsResults(Type):
2653 _toSchema = {'results': 'Results'}
2654 _toPy = {'Results': 'results'}
2655 def __init__(self, results=None):
2656 '''
2657 results : typing.Sequence[~JobsResult]
2658 '''
2659 self.results = [JobsResult.from_json(o) for o in results or []]
2660
2661
2662 class NetworkConfig(Type):
2663 _toSchema = {'parentinterfacename': 'ParentInterfaceName', 'macaddress': 'MACAddress', 'cidr': 'CIDR', 'dnsservers': 'DNSServers', 'noautostart': 'NoAutoStart', 'address': 'Address', 'providersubnetid': 'ProviderSubnetId', 'providerspaceid': 'ProviderSpaceId', 'gatewayaddress': 'GatewayAddress', 'provideraddressid': 'ProviderAddressId', 'providerid': 'ProviderId', 'disabled': 'Disabled', 'dnssearchdomains': 'DNSSearchDomains', 'deviceindex': 'DeviceIndex', 'configtype': 'ConfigType', 'vlantag': 'VLANTag', 'interfacetype': 'InterfaceType', 'interfacename': 'InterfaceName', 'mtu': 'MTU', 'providervlanid': 'ProviderVLANId'}
2664 _toPy = {'ParentInterfaceName': 'parentinterfacename', 'VLANTag': 'vlantag', 'MTU': 'mtu', 'CIDR': 'cidr', 'ProviderAddressId': 'provideraddressid', 'ConfigType': 'configtype', 'ProviderSpaceId': 'providerspaceid', 'GatewayAddress': 'gatewayaddress', 'ProviderId': 'providerid', 'InterfaceName': 'interfacename', 'InterfaceType': 'interfacetype', 'NoAutoStart': 'noautostart', 'DNSServers': 'dnsservers', 'DNSSearchDomains': 'dnssearchdomains', 'ProviderSubnetId': 'providersubnetid', 'MACAddress': 'macaddress', 'Address': 'address', 'Disabled': 'disabled', 'DeviceIndex': 'deviceindex', 'ProviderVLANId': 'providervlanid'}
2665 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):
2666 '''
2667 address : str
2668 cidr : str
2669 configtype : str
2670 dnssearchdomains : typing.Sequence[str]
2671 dnsservers : typing.Sequence[str]
2672 deviceindex : int
2673 disabled : bool
2674 gatewayaddress : str
2675 interfacename : str
2676 interfacetype : str
2677 macaddress : str
2678 mtu : int
2679 noautostart : bool
2680 parentinterfacename : str
2681 provideraddressid : str
2682 providerid : str
2683 providerspaceid : str
2684 providersubnetid : str
2685 providervlanid : str
2686 vlantag : int
2687 '''
2688 self.address = address
2689 self.cidr = cidr
2690 self.configtype = configtype
2691 self.dnssearchdomains = dnssearchdomains
2692 self.dnsservers = dnsservers
2693 self.deviceindex = deviceindex
2694 self.disabled = disabled
2695 self.gatewayaddress = gatewayaddress
2696 self.interfacename = interfacename
2697 self.interfacetype = interfacetype
2698 self.macaddress = macaddress
2699 self.mtu = mtu
2700 self.noautostart = noautostart
2701 self.parentinterfacename = parentinterfacename
2702 self.provideraddressid = provideraddressid
2703 self.providerid = providerid
2704 self.providerspaceid = providerspaceid
2705 self.providersubnetid = providersubnetid
2706 self.providervlanid = providervlanid
2707 self.vlantag = vlantag
2708
2709
2710 class SetMachineNetworkConfig(Type):
2711 _toSchema = {'config': 'Config', 'tag': 'Tag'}
2712 _toPy = {'Tag': 'tag', 'Config': 'config'}
2713 def __init__(self, config=None, tag=None):
2714 '''
2715 config : typing.Sequence[~NetworkConfig]
2716 tag : str
2717 '''
2718 self.config = [NetworkConfig.from_json(o) for o in config or []]
2719 self.tag = tag
2720
2721
2722 class MeterStatusResult(Type):
2723 _toSchema = {'info': 'Info', 'code': 'Code', 'error': 'Error'}
2724 _toPy = {'Error': 'error', 'Code': 'code', 'Info': 'info'}
2725 def __init__(self, code=None, error=None, info=None):
2726 '''
2727 code : str
2728 error : Error
2729 info : str
2730 '''
2731 self.code = code
2732 self.error = Error.from_json(error)
2733 self.info = info
2734
2735
2736 class MeterStatusResults(Type):
2737 _toSchema = {'results': 'Results'}
2738 _toPy = {'Results': 'results'}
2739 def __init__(self, results=None):
2740 '''
2741 results : typing.Sequence[~MeterStatusResult]
2742 '''
2743 self.results = [MeterStatusResult.from_json(o) for o in results or []]
2744
2745
2746 class Metric(Type):
2747 _toSchema = {'key': 'Key', 'time': 'Time', 'value': 'Value'}
2748 _toPy = {'Key': 'key', 'Value': 'value', 'Time': 'time'}
2749 def __init__(self, key=None, time=None, value=None):
2750 '''
2751 key : str
2752 time : str
2753 value : str
2754 '''
2755 self.key = key
2756 self.time = time
2757 self.value = value
2758
2759
2760 class MetricBatch(Type):
2761 _toSchema = {'created': 'Created', 'metrics': 'Metrics', 'uuid': 'UUID', 'charmurl': 'CharmURL'}
2762 _toPy = {'Metrics': 'metrics', 'UUID': 'uuid', 'CharmURL': 'charmurl', 'Created': 'created'}
2763 def __init__(self, charmurl=None, created=None, metrics=None, uuid=None):
2764 '''
2765 charmurl : str
2766 created : str
2767 metrics : typing.Sequence[~Metric]
2768 uuid : str
2769 '''
2770 self.charmurl = charmurl
2771 self.created = created
2772 self.metrics = [Metric.from_json(o) for o in metrics or []]
2773 self.uuid = uuid
2774
2775
2776 class MetricBatchParam(Type):
2777 _toSchema = {'batch': 'Batch', 'tag': 'Tag'}
2778 _toPy = {'Tag': 'tag', 'Batch': 'batch'}
2779 def __init__(self, batch=None, tag=None):
2780 '''
2781 batch : MetricBatch
2782 tag : str
2783 '''
2784 self.batch = MetricBatch.from_json(batch)
2785 self.tag = tag
2786
2787
2788 class MetricBatchParams(Type):
2789 _toSchema = {'batches': 'Batches'}
2790 _toPy = {'Batches': 'batches'}
2791 def __init__(self, batches=None):
2792 '''
2793 batches : typing.Sequence[~MetricBatchParam]
2794 '''
2795 self.batches = [MetricBatchParam.from_json(o) for o in batches or []]
2796
2797
2798 class EntityMetrics(Type):
2799 _toSchema = {'metrics': 'metrics', 'error': 'error'}
2800 _toPy = {'metrics': 'metrics', 'error': 'error'}
2801 def __init__(self, error=None, metrics=None):
2802 '''
2803 error : Error
2804 metrics : typing.Sequence[~MetricResult]
2805 '''
2806 self.error = Error.from_json(error)
2807 self.metrics = [MetricResult.from_json(o) for o in metrics or []]
2808
2809
2810 class MeterStatusParam(Type):
2811 _toSchema = {'info': 'info', 'code': 'code', 'tag': 'tag'}
2812 _toPy = {'info': 'info', 'code': 'code', 'tag': 'tag'}
2813 def __init__(self, code=None, info=None, tag=None):
2814 '''
2815 code : str
2816 info : str
2817 tag : str
2818 '''
2819 self.code = code
2820 self.info = info
2821 self.tag = tag
2822
2823
2824 class MeterStatusParams(Type):
2825 _toSchema = {'statues': 'statues'}
2826 _toPy = {'statues': 'statues'}
2827 def __init__(self, statues=None):
2828 '''
2829 statues : typing.Sequence[~MeterStatusParam]
2830 '''
2831 self.statues = [MeterStatusParam.from_json(o) for o in statues or []]
2832
2833
2834 class MetricResult(Type):
2835 _toSchema = {'key': 'key', 'time': 'time', 'value': 'value'}
2836 _toPy = {'key': 'key', 'time': 'time', 'value': 'value'}
2837 def __init__(self, key=None, time=None, value=None):
2838 '''
2839 key : str
2840 time : str
2841 value : str
2842 '''
2843 self.key = key
2844 self.time = time
2845 self.value = value
2846
2847
2848 class MetricResults(Type):
2849 _toSchema = {'results': 'results'}
2850 _toPy = {'results': 'results'}
2851 def __init__(self, results=None):
2852 '''
2853 results : typing.Sequence[~EntityMetrics]
2854 '''
2855 self.results = [EntityMetrics.from_json(o) for o in results or []]
2856
2857
2858 class PhaseResult(Type):
2859 _toSchema = {'phase': 'phase', 'error': 'Error'}
2860 _toPy = {'phase': 'phase', 'Error': 'error'}
2861 def __init__(self, error=None, phase=None):
2862 '''
2863 error : Error
2864 phase : str
2865 '''
2866 self.error = Error.from_json(error)
2867 self.phase = phase
2868
2869
2870 class PhaseResults(Type):
2871 _toSchema = {'results': 'Results'}
2872 _toPy = {'Results': 'results'}
2873 def __init__(self, results=None):
2874 '''
2875 results : typing.Sequence[~PhaseResult]
2876 '''
2877 self.results = [PhaseResult.from_json(o) for o in results or []]
2878
2879
2880 class FullMigrationStatus(Type):
2881 _toSchema = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'}
2882 _toPy = {'attempt': 'attempt', 'phase': 'phase', 'spec': 'spec'}
2883 def __init__(self, attempt=None, phase=None, spec=None):
2884 '''
2885 attempt : int
2886 phase : str
2887 spec : ModelMigrationSpec
2888 '''
2889 self.attempt = attempt
2890 self.phase = phase
2891 self.spec = ModelMigrationSpec.from_json(spec)
2892
2893
2894 class SerializedModel(Type):
2895 _toSchema = {'bytes_': 'bytes'}
2896 _toPy = {'bytes': 'bytes_'}
2897 def __init__(self, bytes_=None):
2898 '''
2899 bytes_ : typing.Sequence[int]
2900 '''
2901 self.bytes_ = bytes_
2902
2903
2904 class SetMigrationPhaseArgs(Type):
2905 _toSchema = {'phase': 'phase'}
2906 _toPy = {'phase': 'phase'}
2907 def __init__(self, phase=None):
2908 '''
2909 phase : str
2910 '''
2911 self.phase = phase
2912
2913
2914 class MigrationStatus(Type):
2915 _toSchema = {'source_ca_cert': 'source-ca-cert', 'attempt': 'attempt', 'target_api_addrs': 'target-api-addrs', 'source_api_addrs': 'source-api-addrs', 'target_ca_cert': 'target-ca-cert', 'phase': 'phase'}
2916 _toPy = {'attempt': 'attempt', 'target-ca-cert': 'target_ca_cert', 'source-ca-cert': 'source_ca_cert', 'target-api-addrs': 'target_api_addrs', 'phase': 'phase', 'source-api-addrs': 'source_api_addrs'}
2917 def __init__(self, attempt=None, phase=None, source_api_addrs=None, source_ca_cert=None, target_api_addrs=None, target_ca_cert=None):
2918 '''
2919 attempt : int
2920 phase : str
2921 source_api_addrs : typing.Sequence[str]
2922 source_ca_cert : str
2923 target_api_addrs : typing.Sequence[str]
2924 target_ca_cert : str
2925 '''
2926 self.attempt = attempt
2927 self.phase = phase
2928 self.source_api_addrs = source_api_addrs
2929 self.source_ca_cert = source_ca_cert
2930 self.target_api_addrs = target_api_addrs
2931 self.target_ca_cert = target_ca_cert
2932
2933
2934 class ModelArgs(Type):
2935 _toSchema = {'model_tag': 'model-tag'}
2936 _toPy = {'model-tag': 'model_tag'}
2937 def __init__(self, model_tag=None):
2938 '''
2939 model_tag : str
2940 '''
2941 self.model_tag = model_tag
2942
2943
2944 class ModelCreateArgs(Type):
2945 _toSchema = {'config': 'Config', 'ownertag': 'OwnerTag', 'account': 'Account'}
2946 _toPy = {'OwnerTag': 'ownertag', 'Config': 'config', 'Account': 'account'}
2947 def __init__(self, account=None, config=None, ownertag=None):
2948 '''
2949 account : typing.Mapping[str, typing.Any]
2950 config : typing.Mapping[str, typing.Any]
2951 ownertag : str
2952 '''
2953 self.account = account
2954 self.config = config
2955 self.ownertag = ownertag
2956
2957
2958 class ModelInfoResult(Type):
2959 _toSchema = {'error': 'error', 'result': 'result'}
2960 _toPy = {'error': 'error', 'result': 'result'}
2961 def __init__(self, error=None, result=None):
2962 '''
2963 error : Error
2964 result : ModelInfo
2965 '''
2966 self.error = Error.from_json(error)
2967 self.result = ModelInfo.from_json(result)
2968
2969
2970 class ModelInfoResults(Type):
2971 _toSchema = {'results': 'results'}
2972 _toPy = {'results': 'results'}
2973 def __init__(self, results=None):
2974 '''
2975 results : typing.Sequence[~ModelInfoResult]
2976 '''
2977 self.results = [ModelInfoResult.from_json(o) for o in results or []]
2978
2979
2980 class ModelSkeletonConfigArgs(Type):
2981 _toSchema = {'provider': 'Provider', 'region': 'Region'}
2982 _toPy = {'Provider': 'provider', 'Region': 'region'}
2983 def __init__(self, provider=None, region=None):
2984 '''
2985 provider : str
2986 region : str
2987 '''
2988 self.provider = provider
2989 self.region = region
2990
2991
2992 class ModifyModelAccess(Type):
2993 _toSchema = {'access': 'access', 'model_tag': 'model-tag', 'action': 'action', 'user_tag': 'user-tag'}
2994 _toPy = {'access': 'access', 'model-tag': 'model_tag', 'action': 'action', 'user-tag': 'user_tag'}
2995 def __init__(self, access=None, action=None, model_tag=None, user_tag=None):
2996 '''
2997 access : str
2998 action : str
2999 model_tag : str
3000 user_tag : str
3001 '''
3002 self.access = access
3003 self.action = action
3004 self.model_tag = model_tag
3005 self.user_tag = user_tag
3006
3007
3008 class ModifyModelAccessRequest(Type):
3009 _toSchema = {'changes': 'changes'}
3010 _toPy = {'changes': 'changes'}
3011 def __init__(self, changes=None):
3012 '''
3013 changes : typing.Sequence[~ModifyModelAccess]
3014 '''
3015 self.changes = [ModifyModelAccess.from_json(o) for o in changes or []]
3016
3017
3018 class ConstraintsResult(Type):
3019 _toSchema = {'constraints': 'Constraints', 'error': 'Error'}
3020 _toPy = {'Constraints': 'constraints', 'Error': 'error'}
3021 def __init__(self, constraints=None, error=None):
3022 '''
3023 constraints : Value
3024 error : Error
3025 '''
3026 self.constraints = Value.from_json(constraints)
3027 self.error = Error.from_json(error)
3028
3029
3030 class ConstraintsResults(Type):
3031 _toSchema = {'results': 'Results'}
3032 _toPy = {'Results': 'results'}
3033 def __init__(self, results=None):
3034 '''
3035 results : typing.Sequence[~ConstraintsResult]
3036 '''
3037 self.results = [ConstraintsResult.from_json(o) for o in results or []]
3038
3039
3040 class ContainerConfig(Type):
3041 _toSchema = {'preferipv6': 'PreferIPv6', 'allowlxcloopmounts': 'AllowLXCLoopMounts', 'providertype': 'ProviderType', 'aptproxy': 'AptProxy', 'authorizedkeys': 'AuthorizedKeys', 'proxy': 'Proxy', 'aptmirror': 'AptMirror', 'updatebehavior': 'UpdateBehavior', 'sslhostnameverification': 'SSLHostnameVerification'}
3042 _toPy = {'AptProxy': 'aptproxy', 'AllowLXCLoopMounts': 'allowlxcloopmounts', 'AptMirror': 'aptmirror', 'AuthorizedKeys': 'authorizedkeys', 'ProviderType': 'providertype', 'PreferIPv6': 'preferipv6', 'Proxy': 'proxy', 'SSLHostnameVerification': 'sslhostnameverification', 'UpdateBehavior': 'updatebehavior'}
3043 def __init__(self, allowlxcloopmounts=None, aptmirror=None, aptproxy=None, authorizedkeys=None, preferipv6=None, providertype=None, proxy=None, sslhostnameverification=None, updatebehavior=None):
3044 '''
3045 allowlxcloopmounts : bool
3046 aptmirror : str
3047 aptproxy : Settings
3048 authorizedkeys : str
3049 preferipv6 : bool
3050 providertype : str
3051 proxy : Settings
3052 sslhostnameverification : bool
3053 updatebehavior : UpdateBehavior
3054 '''
3055 self.allowlxcloopmounts = allowlxcloopmounts
3056 self.aptmirror = aptmirror
3057 self.aptproxy = Settings.from_json(aptproxy)
3058 self.authorizedkeys = authorizedkeys
3059 self.preferipv6 = preferipv6
3060 self.providertype = providertype
3061 self.proxy = Settings.from_json(proxy)
3062 self.sslhostnameverification = sslhostnameverification
3063 self.updatebehavior = UpdateBehavior.from_json(updatebehavior)
3064
3065
3066 class ContainerManagerConfig(Type):
3067 _toSchema = {'managerconfig': 'ManagerConfig'}
3068 _toPy = {'ManagerConfig': 'managerconfig'}
3069 def __init__(self, managerconfig=None):
3070 '''
3071 managerconfig : typing.Mapping[str, str]
3072 '''
3073 self.managerconfig = managerconfig
3074
3075
3076 class ContainerManagerConfigParams(Type):
3077 _toSchema = {'type_': 'Type'}
3078 _toPy = {'Type': 'type_'}
3079 def __init__(self, type_=None):
3080 '''
3081 type_ : str
3082 '''
3083 self.type_ = type_
3084
3085
3086 class DistributionGroupResult(Type):
3087 _toSchema = {'error': 'Error', 'result': 'Result'}
3088 _toPy = {'Error': 'error', 'Result': 'result'}
3089 def __init__(self, error=None, result=None):
3090 '''
3091 error : Error
3092 result : typing.Sequence[str]
3093 '''
3094 self.error = Error.from_json(error)
3095 self.result = result
3096
3097
3098 class DistributionGroupResults(Type):
3099 _toSchema = {'results': 'Results'}
3100 _toPy = {'Results': 'results'}
3101 def __init__(self, results=None):
3102 '''
3103 results : typing.Sequence[~DistributionGroupResult]
3104 '''
3105 self.results = [DistributionGroupResult.from_json(o) for o in results or []]
3106
3107
3108 class InstanceInfo(Type):
3109 _toSchema = {'nonce': 'Nonce', 'volumes': 'Volumes', 'volumeattachments': 'VolumeAttachments', 'tag': 'Tag', 'instanceid': 'InstanceId', 'characteristics': 'Characteristics', 'networkconfig': 'NetworkConfig'}
3110 _toPy = {'NetworkConfig': 'networkconfig', 'Tag': 'tag', 'Characteristics': 'characteristics', 'VolumeAttachments': 'volumeattachments', 'InstanceId': 'instanceid', 'Volumes': 'volumes', 'Nonce': 'nonce'}
3111 def __init__(self, characteristics=None, instanceid=None, networkconfig=None, nonce=None, tag=None, volumeattachments=None, volumes=None):
3112 '''
3113 characteristics : HardwareCharacteristics
3114 instanceid : str
3115 networkconfig : typing.Sequence[~NetworkConfig]
3116 nonce : str
3117 tag : str
3118 volumeattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
3119 volumes : typing.Sequence[~Volume]
3120 '''
3121 self.characteristics = HardwareCharacteristics.from_json(characteristics)
3122 self.instanceid = instanceid
3123 self.networkconfig = [NetworkConfig.from_json(o) for o in networkconfig or []]
3124 self.nonce = nonce
3125 self.tag = tag
3126 self.volumeattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (volumeattachments or dict()).items()}
3127 self.volumes = [Volume.from_json(o) for o in volumes or []]
3128
3129
3130 class InstancesInfo(Type):
3131 _toSchema = {'machines': 'Machines'}
3132 _toPy = {'Machines': 'machines'}
3133 def __init__(self, machines=None):
3134 '''
3135 machines : typing.Sequence[~InstanceInfo]
3136 '''
3137 self.machines = [InstanceInfo.from_json(o) for o in machines or []]
3138
3139
3140 class MachineContainers(Type):
3141 _toSchema = {'containertypes': 'ContainerTypes', 'machinetag': 'MachineTag'}
3142 _toPy = {'MachineTag': 'machinetag', 'ContainerTypes': 'containertypes'}
3143 def __init__(self, containertypes=None, machinetag=None):
3144 '''
3145 containertypes : typing.Sequence[str]
3146 machinetag : str
3147 '''
3148 self.containertypes = containertypes
3149 self.machinetag = machinetag
3150
3151
3152 class MachineContainersParams(Type):
3153 _toSchema = {'params': 'Params'}
3154 _toPy = {'Params': 'params'}
3155 def __init__(self, params=None):
3156 '''
3157 params : typing.Sequence[~MachineContainers]
3158 '''
3159 self.params = [MachineContainers.from_json(o) for o in params or []]
3160
3161
3162 class MachineNetworkConfigResult(Type):
3163 _toSchema = {'info': 'Info', 'error': 'Error'}
3164 _toPy = {'Error': 'error', 'Info': 'info'}
3165 def __init__(self, error=None, info=None):
3166 '''
3167 error : Error
3168 info : typing.Sequence[~NetworkConfig]
3169 '''
3170 self.error = Error.from_json(error)
3171 self.info = [NetworkConfig.from_json(o) for o in info or []]
3172
3173
3174 class MachineNetworkConfigResults(Type):
3175 _toSchema = {'results': 'Results'}
3176 _toPy = {'Results': 'results'}
3177 def __init__(self, results=None):
3178 '''
3179 results : typing.Sequence[~MachineNetworkConfigResult]
3180 '''
3181 self.results = [MachineNetworkConfigResult.from_json(o) for o in results or []]
3182
3183
3184 class ProvisioningInfo(Type):
3185 _toSchema = {'jobs': 'Jobs', 'placement': 'Placement', 'series': 'Series', 'endpointbindings': 'EndpointBindings', 'subnetstozones': 'SubnetsToZones', 'imagemetadata': 'ImageMetadata', 'volumes': 'Volumes', 'constraints': 'Constraints', 'tags': 'Tags'}
3186 _toPy = {'SubnetsToZones': 'subnetstozones', 'Constraints': 'constraints', 'Tags': 'tags', 'Jobs': 'jobs', 'Placement': 'placement', 'Volumes': 'volumes', 'ImageMetadata': 'imagemetadata', 'EndpointBindings': 'endpointbindings', 'Series': 'series'}
3187 def __init__(self, constraints=None, endpointbindings=None, imagemetadata=None, jobs=None, placement=None, series=None, subnetstozones=None, tags=None, volumes=None):
3188 '''
3189 constraints : Value
3190 endpointbindings : typing.Mapping[str, str]
3191 imagemetadata : typing.Sequence[~CloudImageMetadata]
3192 jobs : typing.Sequence[str]
3193 placement : str
3194 series : str
3195 subnetstozones : typing.Sequence[str]
3196 tags : typing.Mapping[str, str]
3197 volumes : typing.Sequence[~VolumeParams]
3198 '''
3199 self.constraints = Value.from_json(constraints)
3200 self.endpointbindings = endpointbindings
3201 self.imagemetadata = [CloudImageMetadata.from_json(o) for o in imagemetadata or []]
3202 self.jobs = jobs
3203 self.placement = placement
3204 self.series = series
3205 self.subnetstozones = subnetstozones
3206 self.tags = tags
3207 self.volumes = [VolumeParams.from_json(o) for o in volumes or []]
3208
3209
3210 class ProvisioningInfoResult(Type):
3211 _toSchema = {'error': 'Error', 'result': 'Result'}
3212 _toPy = {'Error': 'error', 'Result': 'result'}
3213 def __init__(self, error=None, result=None):
3214 '''
3215 error : Error
3216 result : ProvisioningInfo
3217 '''
3218 self.error = Error.from_json(error)
3219 self.result = ProvisioningInfo.from_json(result)
3220
3221
3222 class ProvisioningInfoResults(Type):
3223 _toSchema = {'results': 'Results'}
3224 _toPy = {'Results': 'results'}
3225 def __init__(self, results=None):
3226 '''
3227 results : typing.Sequence[~ProvisioningInfoResult]
3228 '''
3229 self.results = [ProvisioningInfoResult.from_json(o) for o in results or []]
3230
3231
3232 class Settings(Type):
3233 _toSchema = {'http': 'Http', 'ftp': 'Ftp', 'noproxy': 'NoProxy', 'https': 'Https'}
3234 _toPy = {'Ftp': 'ftp', 'Https': 'https', 'Http': 'http', 'NoProxy': 'noproxy'}
3235 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3236 '''
3237 ftp : str
3238 http : str
3239 https : str
3240 noproxy : str
3241 '''
3242 self.ftp = ftp
3243 self.http = http
3244 self.https = https
3245 self.noproxy = noproxy
3246
3247
3248 class ToolsResult(Type):
3249 _toSchema = {'toolslist': 'ToolsList', 'error': 'Error', 'disablesslhostnameverification': 'DisableSSLHostnameVerification'}
3250 _toPy = {'DisableSSLHostnameVerification': 'disablesslhostnameverification', 'ToolsList': 'toolslist', 'Error': 'error'}
3251 def __init__(self, disablesslhostnameverification=None, error=None, toolslist=None):
3252 '''
3253 disablesslhostnameverification : bool
3254 error : Error
3255 toolslist : typing.Sequence[~Tools]
3256 '''
3257 self.disablesslhostnameverification = disablesslhostnameverification
3258 self.error = Error.from_json(error)
3259 self.toolslist = [Tools.from_json(o) for o in toolslist or []]
3260
3261
3262 class ToolsResults(Type):
3263 _toSchema = {'results': 'Results'}
3264 _toPy = {'Results': 'results'}
3265 def __init__(self, results=None):
3266 '''
3267 results : typing.Sequence[~ToolsResult]
3268 '''
3269 self.results = [ToolsResult.from_json(o) for o in results or []]
3270
3271
3272 class UpdateBehavior(Type):
3273 _toSchema = {'enableosrefreshupdate': 'EnableOSRefreshUpdate', 'enableosupgrade': 'EnableOSUpgrade'}
3274 _toPy = {'EnableOSRefreshUpdate': 'enableosrefreshupdate', 'EnableOSUpgrade': 'enableosupgrade'}
3275 def __init__(self, enableosrefreshupdate=None, enableosupgrade=None):
3276 '''
3277 enableosrefreshupdate : bool
3278 enableosupgrade : bool
3279 '''
3280 self.enableosrefreshupdate = enableosrefreshupdate
3281 self.enableosupgrade = enableosupgrade
3282
3283
3284 class Volume(Type):
3285 _toSchema = {'info': 'info', 'volumetag': 'volumetag'}
3286 _toPy = {'info': 'info', 'volumetag': 'volumetag'}
3287 def __init__(self, info=None, volumetag=None):
3288 '''
3289 info : VolumeInfo
3290 volumetag : str
3291 '''
3292 self.info = VolumeInfo.from_json(info)
3293 self.volumetag = volumetag
3294
3295
3296 class VolumeAttachmentInfo(Type):
3297 _toSchema = {'read_only': 'read-only', 'busaddress': 'busaddress', 'devicename': 'devicename', 'devicelink': 'devicelink'}
3298 _toPy = {'busaddress': 'busaddress', 'devicename': 'devicename', 'devicelink': 'devicelink', 'read-only': 'read_only'}
3299 def __init__(self, busaddress=None, devicelink=None, devicename=None, read_only=None):
3300 '''
3301 busaddress : str
3302 devicelink : str
3303 devicename : str
3304 read_only : bool
3305 '''
3306 self.busaddress = busaddress
3307 self.devicelink = devicelink
3308 self.devicename = devicename
3309 self.read_only = read_only
3310
3311
3312 class VolumeAttachmentParams(Type):
3313 _toSchema = {'read_only': 'read-only', 'machinetag': 'machinetag', 'instanceid': 'instanceid', 'provider': 'provider', 'volumetag': 'volumetag', 'volumeid': 'volumeid'}
3314 _toPy = {'volumetag': 'volumetag', 'machinetag': 'machinetag', 'instanceid': 'instanceid', 'volumeid': 'volumeid', 'read-only': 'read_only', 'provider': 'provider'}
3315 def __init__(self, instanceid=None, machinetag=None, provider=None, read_only=None, volumeid=None, volumetag=None):
3316 '''
3317 instanceid : str
3318 machinetag : str
3319 provider : str
3320 read_only : bool
3321 volumeid : str
3322 volumetag : str
3323 '''
3324 self.instanceid = instanceid
3325 self.machinetag = machinetag
3326 self.provider = provider
3327 self.read_only = read_only
3328 self.volumeid = volumeid
3329 self.volumetag = volumetag
3330
3331
3332 class VolumeInfo(Type):
3333 _toSchema = {'hardwareid': 'hardwareid', 'persistent': 'persistent', 'volumeid': 'volumeid', 'size': 'size'}
3334 _toPy = {'hardwareid': 'hardwareid', 'persistent': 'persistent', 'volumeid': 'volumeid', 'size': 'size'}
3335 def __init__(self, hardwareid=None, persistent=None, size=None, volumeid=None):
3336 '''
3337 hardwareid : str
3338 persistent : bool
3339 size : int
3340 volumeid : str
3341 '''
3342 self.hardwareid = hardwareid
3343 self.persistent = persistent
3344 self.size = size
3345 self.volumeid = volumeid
3346
3347
3348 class VolumeParams(Type):
3349 _toSchema = {'volumetag': 'volumetag', 'attachment': 'attachment', 'size': 'size', 'attributes': 'attributes', 'provider': 'provider', 'tags': 'tags'}
3350 _toPy = {'volumetag': 'volumetag', 'attachment': 'attachment', 'size': 'size', 'attributes': 'attributes', 'provider': 'provider', 'tags': 'tags'}
3351 def __init__(self, attachment=None, attributes=None, provider=None, size=None, tags=None, volumetag=None):
3352 '''
3353 attachment : VolumeAttachmentParams
3354 attributes : typing.Mapping[str, typing.Any]
3355 provider : str
3356 size : int
3357 tags : typing.Mapping[str, str]
3358 volumetag : str
3359 '''
3360 self.attachment = VolumeAttachmentParams.from_json(attachment)
3361 self.attributes = attributes
3362 self.provider = provider
3363 self.size = size
3364 self.tags = tags
3365 self.volumetag = volumetag
3366
3367
3368 class WatchContainer(Type):
3369 _toSchema = {'containertype': 'ContainerType', 'machinetag': 'MachineTag'}
3370 _toPy = {'MachineTag': 'machinetag', 'ContainerType': 'containertype'}
3371 def __init__(self, containertype=None, machinetag=None):
3372 '''
3373 containertype : str
3374 machinetag : str
3375 '''
3376 self.containertype = containertype
3377 self.machinetag = machinetag
3378
3379
3380 class WatchContainers(Type):
3381 _toSchema = {'params': 'Params'}
3382 _toPy = {'Params': 'params'}
3383 def __init__(self, params=None):
3384 '''
3385 params : typing.Sequence[~WatchContainer]
3386 '''
3387 self.params = [WatchContainer.from_json(o) for o in params or []]
3388
3389
3390 class ProxyConfig(Type):
3391 _toSchema = {'http': 'HTTP', 'ftp': 'FTP', 'noproxy': 'NoProxy', 'https': 'HTTPS'}
3392 _toPy = {'HTTP': 'http', 'FTP': 'ftp', 'HTTPS': 'https', 'NoProxy': 'noproxy'}
3393 def __init__(self, ftp=None, http=None, https=None, noproxy=None):
3394 '''
3395 ftp : str
3396 http : str
3397 https : str
3398 noproxy : str
3399 '''
3400 self.ftp = ftp
3401 self.http = http
3402 self.https = https
3403 self.noproxy = noproxy
3404
3405
3406 class ProxyConfigResult(Type):
3407 _toSchema = {'proxysettings': 'ProxySettings', 'error': 'Error', 'aptproxysettings': 'APTProxySettings'}
3408 _toPy = {'Error': 'error', 'ProxySettings': 'proxysettings', 'APTProxySettings': 'aptproxysettings'}
3409 def __init__(self, aptproxysettings=None, error=None, proxysettings=None):
3410 '''
3411 aptproxysettings : ProxyConfig
3412 error : Error
3413 proxysettings : ProxyConfig
3414 '''
3415 self.aptproxysettings = ProxyConfig.from_json(aptproxysettings)
3416 self.error = Error.from_json(error)
3417 self.proxysettings = ProxyConfig.from_json(proxysettings)
3418
3419
3420 class ProxyConfigResults(Type):
3421 _toSchema = {'results': 'Results'}
3422 _toPy = {'Results': 'results'}
3423 def __init__(self, results=None):
3424 '''
3425 results : typing.Sequence[~ProxyConfigResult]
3426 '''
3427 self.results = [ProxyConfigResult.from_json(o) for o in results or []]
3428
3429
3430 class RebootActionResult(Type):
3431 _toSchema = {'error': 'error', 'result': 'result'}
3432 _toPy = {'error': 'error', 'result': 'result'}
3433 def __init__(self, error=None, result=None):
3434 '''
3435 error : Error
3436 result : str
3437 '''
3438 self.error = Error.from_json(error)
3439 self.result = result
3440
3441
3442 class RebootActionResults(Type):
3443 _toSchema = {'results': 'results'}
3444 _toPy = {'results': 'results'}
3445 def __init__(self, results=None):
3446 '''
3447 results : typing.Sequence[~RebootActionResult]
3448 '''
3449 self.results = [RebootActionResult.from_json(o) for o in results or []]
3450
3451
3452 class RelationUnitsChange(Type):
3453 _toSchema = {'changed': 'Changed', 'departed': 'Departed'}
3454 _toPy = {'Changed': 'changed', 'Departed': 'departed'}
3455 def __init__(self, changed=None, departed=None):
3456 '''
3457 changed : typing.Mapping[str, ~UnitSettings]
3458 departed : typing.Sequence[str]
3459 '''
3460 self.changed = {k: UnitSettings.from_json(v) for k, v in (changed or dict()).items()}
3461 self.departed = departed
3462
3463
3464 class RelationUnitsWatchResult(Type):
3465 _toSchema = {'changes': 'Changes', 'relationunitswatcherid': 'RelationUnitsWatcherId', 'error': 'Error'}
3466 _toPy = {'RelationUnitsWatcherId': 'relationunitswatcherid', 'Error': 'error', 'Changes': 'changes'}
3467 def __init__(self, changes=None, error=None, relationunitswatcherid=None):
3468 '''
3469 changes : RelationUnitsChange
3470 error : Error
3471 relationunitswatcherid : str
3472 '''
3473 self.changes = RelationUnitsChange.from_json(changes)
3474 self.error = Error.from_json(error)
3475 self.relationunitswatcherid = relationunitswatcherid
3476
3477
3478 class UnitSettings(Type):
3479 _toSchema = {'version': 'Version'}
3480 _toPy = {'Version': 'version'}
3481 def __init__(self, version=None):
3482 '''
3483 version : int
3484 '''
3485 self.version = version
3486
3487
3488 class RetryStrategy(Type):
3489 _toSchema = {'jitterretrytime': 'JitterRetryTime', 'shouldretry': 'ShouldRetry', 'retrytimefactor': 'RetryTimeFactor', 'minretrytime': 'MinRetryTime', 'maxretrytime': 'MaxRetryTime'}
3490 _toPy = {'MaxRetryTime': 'maxretrytime', 'JitterRetryTime': 'jitterretrytime', 'MinRetryTime': 'minretrytime', 'ShouldRetry': 'shouldretry', 'RetryTimeFactor': 'retrytimefactor'}
3491 def __init__(self, jitterretrytime=None, maxretrytime=None, minretrytime=None, retrytimefactor=None, shouldretry=None):
3492 '''
3493 jitterretrytime : bool
3494 maxretrytime : int
3495 minretrytime : int
3496 retrytimefactor : int
3497 shouldretry : bool
3498 '''
3499 self.jitterretrytime = jitterretrytime
3500 self.maxretrytime = maxretrytime
3501 self.minretrytime = minretrytime
3502 self.retrytimefactor = retrytimefactor
3503 self.shouldretry = shouldretry
3504
3505
3506 class RetryStrategyResult(Type):
3507 _toSchema = {'error': 'Error', 'result': 'Result'}
3508 _toPy = {'Error': 'error', 'Result': 'result'}
3509 def __init__(self, error=None, result=None):
3510 '''
3511 error : Error
3512 result : RetryStrategy
3513 '''
3514 self.error = Error.from_json(error)
3515 self.result = RetryStrategy.from_json(result)
3516
3517
3518 class RetryStrategyResults(Type):
3519 _toSchema = {'results': 'Results'}
3520 _toPy = {'Results': 'results'}
3521 def __init__(self, results=None):
3522 '''
3523 results : typing.Sequence[~RetryStrategyResult]
3524 '''
3525 self.results = [RetryStrategyResult.from_json(o) for o in results or []]
3526
3527
3528 class SSHAddressResult(Type):
3529 _toSchema = {'error': 'error', 'address': 'address'}
3530 _toPy = {'error': 'error', 'address': 'address'}
3531 def __init__(self, address=None, error=None):
3532 '''
3533 address : str
3534 error : Error
3535 '''
3536 self.address = address
3537 self.error = Error.from_json(error)
3538
3539
3540 class SSHAddressResults(Type):
3541 _toSchema = {'results': 'results'}
3542 _toPy = {'results': 'results'}
3543 def __init__(self, results=None):
3544 '''
3545 results : typing.Sequence[~SSHAddressResult]
3546 '''
3547 self.results = [SSHAddressResult.from_json(o) for o in results or []]
3548
3549
3550 class SSHProxyResult(Type):
3551 _toSchema = {'use_proxy': 'use-proxy'}
3552 _toPy = {'use-proxy': 'use_proxy'}
3553 def __init__(self, use_proxy=None):
3554 '''
3555 use_proxy : bool
3556 '''
3557 self.use_proxy = use_proxy
3558
3559
3560 class SSHPublicKeysResult(Type):
3561 _toSchema = {'error': 'error', 'public_keys': 'public-keys'}
3562 _toPy = {'public-keys': 'public_keys', 'error': 'error'}
3563 def __init__(self, error=None, public_keys=None):
3564 '''
3565 error : Error
3566 public_keys : typing.Sequence[str]
3567 '''
3568 self.error = Error.from_json(error)
3569 self.public_keys = public_keys
3570
3571
3572 class SSHPublicKeysResults(Type):
3573 _toSchema = {'results': 'results'}
3574 _toPy = {'results': 'results'}
3575 def __init__(self, results=None):
3576 '''
3577 results : typing.Sequence[~SSHPublicKeysResult]
3578 '''
3579 self.results = [SSHPublicKeysResult.from_json(o) for o in results or []]
3580
3581
3582 class AddRelation(Type):
3583 _toSchema = {'endpoints': 'Endpoints'}
3584 _toPy = {'Endpoints': 'endpoints'}
3585 def __init__(self, endpoints=None):
3586 '''
3587 endpoints : typing.Sequence[str]
3588 '''
3589 self.endpoints = endpoints
3590
3591
3592 class AddRelationResults(Type):
3593 _toSchema = {'endpoints': 'Endpoints'}
3594 _toPy = {'Endpoints': 'endpoints'}
3595 def __init__(self, endpoints=None):
3596 '''
3597 endpoints : typing.Mapping[str, ~Relation]
3598 '''
3599 self.endpoints = {k: Relation.from_json(v) for k, v in (endpoints or dict()).items()}
3600
3601
3602 class AddServiceUnits(Type):
3603 _toSchema = {'servicename': 'ServiceName', 'placement': 'Placement', 'numunits': 'NumUnits'}
3604 _toPy = {'NumUnits': 'numunits', 'Placement': 'placement', 'ServiceName': 'servicename'}
3605 def __init__(self, numunits=None, placement=None, servicename=None):
3606 '''
3607 numunits : int
3608 placement : typing.Sequence[~Placement]
3609 servicename : str
3610 '''
3611 self.numunits = numunits
3612 self.placement = [Placement.from_json(o) for o in placement or []]
3613 self.servicename = servicename
3614
3615
3616 class AddServiceUnitsResults(Type):
3617 _toSchema = {'units': 'Units'}
3618 _toPy = {'Units': 'units'}
3619 def __init__(self, units=None):
3620 '''
3621 units : typing.Sequence[str]
3622 '''
3623 self.units = units
3624
3625
3626 class DestroyRelation(Type):
3627 _toSchema = {'endpoints': 'Endpoints'}
3628 _toPy = {'Endpoints': 'endpoints'}
3629 def __init__(self, endpoints=None):
3630 '''
3631 endpoints : typing.Sequence[str]
3632 '''
3633 self.endpoints = endpoints
3634
3635
3636 class DestroyServiceUnits(Type):
3637 _toSchema = {'unitnames': 'UnitNames'}
3638 _toPy = {'UnitNames': 'unitnames'}
3639 def __init__(self, unitnames=None):
3640 '''
3641 unitnames : typing.Sequence[str]
3642 '''
3643 self.unitnames = unitnames
3644
3645
3646 class GetServiceConstraints(Type):
3647 _toSchema = {'servicename': 'ServiceName'}
3648 _toPy = {'ServiceName': 'servicename'}
3649 def __init__(self, servicename=None):
3650 '''
3651 servicename : str
3652 '''
3653 self.servicename = servicename
3654
3655
3656 class Relation(Type):
3657 _toSchema = {'scope': 'Scope', 'name': 'Name', 'optional': 'Optional', 'role': 'Role', 'interface': 'Interface', 'limit': 'Limit'}
3658 _toPy = {'Interface': 'interface', 'Scope': 'scope', 'Role': 'role', 'Name': 'name', 'Limit': 'limit', 'Optional': 'optional'}
3659 def __init__(self, interface=None, limit=None, name=None, optional=None, role=None, scope=None):
3660 '''
3661 interface : str
3662 limit : int
3663 name : str
3664 optional : bool
3665 role : str
3666 scope : str
3667 '''
3668 self.interface = interface
3669 self.limit = limit
3670 self.name = name
3671 self.optional = optional
3672 self.role = role
3673 self.scope = scope
3674
3675
3676 class ServiceCharmRelations(Type):
3677 _toSchema = {'servicename': 'ServiceName'}
3678 _toPy = {'ServiceName': 'servicename'}
3679 def __init__(self, servicename=None):
3680 '''
3681 servicename : str
3682 '''
3683 self.servicename = servicename
3684
3685
3686 class ServiceCharmRelationsResults(Type):
3687 _toSchema = {'charmrelations': 'CharmRelations'}
3688 _toPy = {'CharmRelations': 'charmrelations'}
3689 def __init__(self, charmrelations=None):
3690 '''
3691 charmrelations : typing.Sequence[str]
3692 '''
3693 self.charmrelations = charmrelations
3694
3695
3696 class ServiceDeploy(Type):
3697 _toSchema = {'placement': 'Placement', 'numunits': 'NumUnits', 'endpointbindings': 'EndpointBindings', 'servicename': 'ServiceName', 'storage': 'Storage', 'resources': 'Resources', 'charmurl': 'CharmUrl', 'configyaml': 'ConfigYAML', 'series': 'Series', 'channel': 'Channel', 'config': 'Config', 'constraints': 'Constraints'}
3698 _toPy = {'Constraints': 'constraints', 'Channel': 'channel', 'Config': 'config', 'Placement': 'placement', 'Resources': 'resources', 'Storage': 'storage', 'CharmUrl': 'charmurl', 'ConfigYAML': 'configyaml', 'NumUnits': 'numunits', 'ServiceName': 'servicename', 'EndpointBindings': 'endpointbindings', 'Series': 'series'}
3699 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):
3700 '''
3701 channel : str
3702 charmurl : str
3703 config : typing.Mapping[str, str]
3704 configyaml : str
3705 constraints : Value
3706 endpointbindings : typing.Mapping[str, str]
3707 numunits : int
3708 placement : typing.Sequence[~Placement]
3709 resources : typing.Mapping[str, str]
3710 series : str
3711 servicename : str
3712 storage : typing.Mapping[str, ~Constraints]
3713 '''
3714 self.channel = channel
3715 self.charmurl = charmurl
3716 self.config = config
3717 self.configyaml = configyaml
3718 self.constraints = Value.from_json(constraints)
3719 self.endpointbindings = endpointbindings
3720 self.numunits = numunits
3721 self.placement = [Placement.from_json(o) for o in placement or []]
3722 self.resources = resources
3723 self.series = series
3724 self.servicename = servicename
3725 self.storage = {k: Constraints.from_json(v) for k, v in (storage or dict()).items()}
3726
3727
3728 class ServiceDestroy(Type):
3729 _toSchema = {'servicename': 'ServiceName'}
3730 _toPy = {'ServiceName': 'servicename'}
3731 def __init__(self, servicename=None):
3732 '''
3733 servicename : str
3734 '''
3735 self.servicename = servicename
3736
3737
3738 class ServiceExpose(Type):
3739 _toSchema = {'servicename': 'ServiceName'}
3740 _toPy = {'ServiceName': 'servicename'}
3741 def __init__(self, servicename=None):
3742 '''
3743 servicename : str
3744 '''
3745 self.servicename = servicename
3746
3747
3748 class ServiceGet(Type):
3749 _toSchema = {'servicename': 'ServiceName'}
3750 _toPy = {'ServiceName': 'servicename'}
3751 def __init__(self, servicename=None):
3752 '''
3753 servicename : str
3754 '''
3755 self.servicename = servicename
3756
3757
3758 class ServiceGetResults(Type):
3759 _toSchema = {'service': 'Service', 'charm': 'Charm', 'constraints': 'Constraints', 'config': 'Config'}
3760 _toPy = {'Constraints': 'constraints', 'Charm': 'charm', 'Service': 'service', 'Config': 'config'}
3761 def __init__(self, charm=None, config=None, constraints=None, service=None):
3762 '''
3763 charm : str
3764 config : typing.Mapping[str, typing.Any]
3765 constraints : Value
3766 service : str
3767 '''
3768 self.charm = charm
3769 self.config = config
3770 self.constraints = Value.from_json(constraints)
3771 self.service = service
3772
3773
3774 class ServiceMetricCredential(Type):
3775 _toSchema = {'servicename': 'ServiceName', 'metriccredentials': 'MetricCredentials'}
3776 _toPy = {'ServiceName': 'servicename', 'MetricCredentials': 'metriccredentials'}
3777 def __init__(self, metriccredentials=None, servicename=None):
3778 '''
3779 metriccredentials : typing.Sequence[int]
3780 servicename : str
3781 '''
3782 self.metriccredentials = metriccredentials
3783 self.servicename = servicename
3784
3785
3786 class ServiceMetricCredentials(Type):
3787 _toSchema = {'creds': 'Creds'}
3788 _toPy = {'Creds': 'creds'}
3789 def __init__(self, creds=None):
3790 '''
3791 creds : typing.Sequence[~ServiceMetricCredential]
3792 '''
3793 self.creds = [ServiceMetricCredential.from_json(o) for o in creds or []]
3794
3795
3796 class ServiceSet(Type):
3797 _toSchema = {'servicename': 'ServiceName', 'options': 'Options'}
3798 _toPy = {'Options': 'options', 'ServiceName': 'servicename'}
3799 def __init__(self, options=None, servicename=None):
3800 '''
3801 options : typing.Mapping[str, str]
3802 servicename : str
3803 '''
3804 self.options = options
3805 self.servicename = servicename
3806
3807
3808 class ServiceSetCharm(Type):
3809 _toSchema = {'forceunits': 'forceunits', 'servicename': 'servicename', 'resourceids': 'resourceids', 'cs_channel': 'cs-channel', 'charmurl': 'charmurl', 'forceseries': 'forceseries'}
3810 _toPy = {'cs-channel': 'cs_channel', 'forceunits': 'forceunits', 'servicename': 'servicename', 'resourceids': 'resourceids', 'charmurl': 'charmurl', 'forceseries': 'forceseries'}
3811 def __init__(self, charmurl=None, cs_channel=None, forceseries=None, forceunits=None, resourceids=None, servicename=None):
3812 '''
3813 charmurl : str
3814 cs_channel : str
3815 forceseries : bool
3816 forceunits : bool
3817 resourceids : typing.Mapping[str, str]
3818 servicename : str
3819 '''
3820 self.charmurl = charmurl
3821 self.cs_channel = cs_channel
3822 self.forceseries = forceseries
3823 self.forceunits = forceunits
3824 self.resourceids = resourceids
3825 self.servicename = servicename
3826
3827
3828 class ServiceUnexpose(Type):
3829 _toSchema = {'servicename': 'ServiceName'}
3830 _toPy = {'ServiceName': 'servicename'}
3831 def __init__(self, servicename=None):
3832 '''
3833 servicename : str
3834 '''
3835 self.servicename = servicename
3836
3837
3838 class ServiceUnset(Type):
3839 _toSchema = {'servicename': 'ServiceName', 'options': 'Options'}
3840 _toPy = {'Options': 'options', 'ServiceName': 'servicename'}
3841 def __init__(self, options=None, servicename=None):
3842 '''
3843 options : typing.Sequence[str]
3844 servicename : str
3845 '''
3846 self.options = options
3847 self.servicename = servicename
3848
3849
3850 class ServiceUpdate(Type):
3851 _toSchema = {'minunits': 'MinUnits', 'settingsyaml': 'SettingsYAML', 'servicename': 'ServiceName', 'settingsstrings': 'SettingsStrings', 'forcecharmurl': 'ForceCharmUrl', 'constraints': 'Constraints', 'charmurl': 'CharmUrl', 'forceseries': 'ForceSeries'}
3852 _toPy = {'Constraints': 'constraints', 'CharmUrl': 'charmurl', 'ForceSeries': 'forceseries', 'ForceCharmUrl': 'forcecharmurl', 'MinUnits': 'minunits', 'ServiceName': 'servicename', 'SettingsStrings': 'settingsstrings', 'SettingsYAML': 'settingsyaml'}
3853 def __init__(self, charmurl=None, constraints=None, forcecharmurl=None, forceseries=None, minunits=None, servicename=None, settingsstrings=None, settingsyaml=None):
3854 '''
3855 charmurl : str
3856 constraints : Value
3857 forcecharmurl : bool
3858 forceseries : bool
3859 minunits : int
3860 servicename : str
3861 settingsstrings : typing.Mapping[str, str]
3862 settingsyaml : str
3863 '''
3864 self.charmurl = charmurl
3865 self.constraints = Value.from_json(constraints)
3866 self.forcecharmurl = forcecharmurl
3867 self.forceseries = forceseries
3868 self.minunits = minunits
3869 self.servicename = servicename
3870 self.settingsstrings = settingsstrings
3871 self.settingsyaml = settingsyaml
3872
3873
3874 class ServicesDeploy(Type):
3875 _toSchema = {'services': 'Services'}
3876 _toPy = {'Services': 'services'}
3877 def __init__(self, services=None):
3878 '''
3879 services : typing.Sequence[~ServiceDeploy]
3880 '''
3881 self.services = [ServiceDeploy.from_json(o) for o in services or []]
3882
3883
3884 class SingularClaim(Type):
3885 _toSchema = {'modeltag': 'ModelTag', 'controllertag': 'ControllerTag', 'duration': 'Duration'}
3886 _toPy = {'Duration': 'duration', 'ControllerTag': 'controllertag', 'ModelTag': 'modeltag'}
3887 def __init__(self, controllertag=None, duration=None, modeltag=None):
3888 '''
3889 controllertag : str
3890 duration : int
3891 modeltag : str
3892 '''
3893 self.controllertag = controllertag
3894 self.duration = duration
3895 self.modeltag = modeltag
3896
3897
3898 class SingularClaims(Type):
3899 _toSchema = {'claims': 'Claims'}
3900 _toPy = {'Claims': 'claims'}
3901 def __init__(self, claims=None):
3902 '''
3903 claims : typing.Sequence[~SingularClaim]
3904 '''
3905 self.claims = [SingularClaim.from_json(o) for o in claims or []]
3906
3907
3908 class ListSpacesResults(Type):
3909 _toSchema = {'results': 'Results'}
3910 _toPy = {'Results': 'results'}
3911 def __init__(self, results=None):
3912 '''
3913 results : typing.Sequence[~Space]
3914 '''
3915 self.results = [Space.from_json(o) for o in results or []]
3916
3917
3918 class Space(Type):
3919 _toSchema = {'name': 'Name', 'error': 'Error', 'subnets': 'Subnets'}
3920 _toPy = {'Name': 'name', 'Subnets': 'subnets', 'Error': 'error'}
3921 def __init__(self, error=None, name=None, subnets=None):
3922 '''
3923 error : Error
3924 name : str
3925 subnets : typing.Sequence[~Subnet]
3926 '''
3927 self.error = Error.from_json(error)
3928 self.name = name
3929 self.subnets = [Subnet.from_json(o) for o in subnets or []]
3930
3931
3932 class StatusHistoryPruneArgs(Type):
3933 _toSchema = {'maxlogsperentity': 'MaxLogsPerEntity'}
3934 _toPy = {'MaxLogsPerEntity': 'maxlogsperentity'}
3935 def __init__(self, maxlogsperentity=None):
3936 '''
3937 maxlogsperentity : int
3938 '''
3939 self.maxlogsperentity = maxlogsperentity
3940
3941
3942 class FilesystemAttachmentInfo(Type):
3943 _toSchema = {'read_only': 'read-only', 'mountpoint': 'mountpoint'}
3944 _toPy = {'read-only': 'read_only', 'mountpoint': 'mountpoint'}
3945 def __init__(self, mountpoint=None, read_only=None):
3946 '''
3947 mountpoint : str
3948 read_only : bool
3949 '''
3950 self.mountpoint = mountpoint
3951 self.read_only = read_only
3952
3953
3954 class FilesystemDetails(Type):
3955 _toSchema = {'info': 'info', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'status': 'status'}
3956 _toPy = {'info': 'info', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'storage': 'storage', 'filesystemtag': 'filesystemtag', 'status': 'status'}
3957 def __init__(self, filesystemtag=None, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
3958 '''
3959 filesystemtag : str
3960 info : FilesystemInfo
3961 machineattachments : typing.Mapping[str, ~FilesystemAttachmentInfo]
3962 status : EntityStatus
3963 storage : StorageDetails
3964 volumetag : str
3965 '''
3966 self.filesystemtag = filesystemtag
3967 self.info = FilesystemInfo.from_json(info)
3968 self.machineattachments = {k: FilesystemAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
3969 self.status = EntityStatus.from_json(status)
3970 self.storage = StorageDetails.from_json(storage)
3971 self.volumetag = volumetag
3972
3973
3974 class FilesystemDetailsListResult(Type):
3975 _toSchema = {'error': 'error', 'result': 'result'}
3976 _toPy = {'error': 'error', 'result': 'result'}
3977 def __init__(self, error=None, result=None):
3978 '''
3979 error : Error
3980 result : typing.Sequence[~FilesystemDetails]
3981 '''
3982 self.error = Error.from_json(error)
3983 self.result = [FilesystemDetails.from_json(o) for o in result or []]
3984
3985
3986 class FilesystemDetailsListResults(Type):
3987 _toSchema = {'results': 'results'}
3988 _toPy = {'results': 'results'}
3989 def __init__(self, results=None):
3990 '''
3991 results : typing.Sequence[~FilesystemDetailsListResult]
3992 '''
3993 self.results = [FilesystemDetailsListResult.from_json(o) for o in results or []]
3994
3995
3996 class FilesystemFilter(Type):
3997 _toSchema = {'machines': 'machines'}
3998 _toPy = {'machines': 'machines'}
3999 def __init__(self, machines=None):
4000 '''
4001 machines : typing.Sequence[str]
4002 '''
4003 self.machines = machines
4004
4005
4006 class FilesystemFilters(Type):
4007 _toSchema = {'filters': 'filters'}
4008 _toPy = {'filters': 'filters'}
4009 def __init__(self, filters=None):
4010 '''
4011 filters : typing.Sequence[~FilesystemFilter]
4012 '''
4013 self.filters = [FilesystemFilter.from_json(o) for o in filters or []]
4014
4015
4016 class FilesystemInfo(Type):
4017 _toSchema = {'size': 'size', 'filesystemid': 'filesystemid'}
4018 _toPy = {'size': 'size', 'filesystemid': 'filesystemid'}
4019 def __init__(self, filesystemid=None, size=None):
4020 '''
4021 filesystemid : str
4022 size : int
4023 '''
4024 self.filesystemid = filesystemid
4025 self.size = size
4026
4027
4028 class StorageAddParams(Type):
4029 _toSchema = {'storagename': 'StorageName', 'storage': 'storage', 'unit': 'unit'}
4030 _toPy = {'StorageName': 'storagename', 'storage': 'storage', 'unit': 'unit'}
4031 def __init__(self, storagename=None, storage=None, unit=None):
4032 '''
4033 storagename : str
4034 storage : StorageConstraints
4035 unit : str
4036 '''
4037 self.storagename = storagename
4038 self.storage = StorageConstraints.from_json(storage)
4039 self.unit = unit
4040
4041
4042 class StorageAttachmentDetails(Type):
4043 _toSchema = {'storagetag': 'storagetag', 'machinetag': 'machinetag', 'location': 'location', 'unittag': 'unittag'}
4044 _toPy = {'storagetag': 'storagetag', 'machinetag': 'machinetag', 'location': 'location', 'unittag': 'unittag'}
4045 def __init__(self, location=None, machinetag=None, storagetag=None, unittag=None):
4046 '''
4047 location : str
4048 machinetag : str
4049 storagetag : str
4050 unittag : str
4051 '''
4052 self.location = location
4053 self.machinetag = machinetag
4054 self.storagetag = storagetag
4055 self.unittag = unittag
4056
4057
4058 class StorageConstraints(Type):
4059 _toSchema = {'pool': 'Pool', 'count': 'Count', 'size': 'Size'}
4060 _toPy = {'Pool': 'pool', 'Count': 'count', 'Size': 'size'}
4061 def __init__(self, count=None, pool=None, size=None):
4062 '''
4063 count : int
4064 pool : str
4065 size : int
4066 '''
4067 self.count = count
4068 self.pool = pool
4069 self.size = size
4070
4071
4072 class StorageDetails(Type):
4073 _toSchema = {'kind': 'kind', 'persistent': 'Persistent', 'attachments': 'attachments', 'storagetag': 'storagetag', 'ownertag': 'ownertag', 'status': 'status'}
4074 _toPy = {'kind': 'kind', 'attachments': 'attachments', 'storagetag': 'storagetag', 'Persistent': 'persistent', 'ownertag': 'ownertag', 'status': 'status'}
4075 def __init__(self, persistent=None, attachments=None, kind=None, ownertag=None, status=None, storagetag=None):
4076 '''
4077 persistent : bool
4078 attachments : typing.Mapping[str, ~StorageAttachmentDetails]
4079 kind : int
4080 ownertag : str
4081 status : EntityStatus
4082 storagetag : str
4083 '''
4084 self.persistent = persistent
4085 self.attachments = {k: StorageAttachmentDetails.from_json(v) for k, v in (attachments or dict()).items()}
4086 self.kind = kind
4087 self.ownertag = ownertag
4088 self.status = EntityStatus.from_json(status)
4089 self.storagetag = storagetag
4090
4091
4092 class StorageDetailsListResult(Type):
4093 _toSchema = {'error': 'error', 'result': 'result'}
4094 _toPy = {'error': 'error', 'result': 'result'}
4095 def __init__(self, error=None, result=None):
4096 '''
4097 error : Error
4098 result : typing.Sequence[~StorageDetails]
4099 '''
4100 self.error = Error.from_json(error)
4101 self.result = [StorageDetails.from_json(o) for o in result or []]
4102
4103
4104 class StorageDetailsListResults(Type):
4105 _toSchema = {'results': 'results'}
4106 _toPy = {'results': 'results'}
4107 def __init__(self, results=None):
4108 '''
4109 results : typing.Sequence[~StorageDetailsListResult]
4110 '''
4111 self.results = [StorageDetailsListResult.from_json(o) for o in results or []]
4112
4113
4114 class StorageDetailsResult(Type):
4115 _toSchema = {'error': 'error', 'result': 'result'}
4116 _toPy = {'error': 'error', 'result': 'result'}
4117 def __init__(self, error=None, result=None):
4118 '''
4119 error : Error
4120 result : StorageDetails
4121 '''
4122 self.error = Error.from_json(error)
4123 self.result = StorageDetails.from_json(result)
4124
4125
4126 class StorageDetailsResults(Type):
4127 _toSchema = {'results': 'results'}
4128 _toPy = {'results': 'results'}
4129 def __init__(self, results=None):
4130 '''
4131 results : typing.Sequence[~StorageDetailsResult]
4132 '''
4133 self.results = [StorageDetailsResult.from_json(o) for o in results or []]
4134
4135
4136 class StorageFilter(Type):
4137 _toSchema = {}
4138 _toPy = {}
4139 def __init__(self):
4140 '''
4141
4142 '''
4143 pass
4144
4145
4146 class StorageFilters(Type):
4147 _toSchema = {'filters': 'filters'}
4148 _toPy = {'filters': 'filters'}
4149 def __init__(self, filters=None):
4150 '''
4151 filters : typing.Sequence[~StorageFilter]
4152 '''
4153 self.filters = [StorageFilter.from_json(o) for o in filters or []]
4154
4155
4156 class StoragePool(Type):
4157 _toSchema = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
4158 _toPy = {'attrs': 'attrs', 'name': 'name', 'provider': 'provider'}
4159 def __init__(self, attrs=None, name=None, provider=None):
4160 '''
4161 attrs : typing.Mapping[str, typing.Any]
4162 name : str
4163 provider : str
4164 '''
4165 self.attrs = attrs
4166 self.name = name
4167 self.provider = provider
4168
4169
4170 class StoragePoolFilter(Type):
4171 _toSchema = {'names': 'names', 'providers': 'providers'}
4172 _toPy = {'names': 'names', 'providers': 'providers'}
4173 def __init__(self, names=None, providers=None):
4174 '''
4175 names : typing.Sequence[str]
4176 providers : typing.Sequence[str]
4177 '''
4178 self.names = names
4179 self.providers = providers
4180
4181
4182 class StoragePoolFilters(Type):
4183 _toSchema = {'filters': 'filters'}
4184 _toPy = {'filters': 'filters'}
4185 def __init__(self, filters=None):
4186 '''
4187 filters : typing.Sequence[~StoragePoolFilter]
4188 '''
4189 self.filters = [StoragePoolFilter.from_json(o) for o in filters or []]
4190
4191
4192 class StoragePoolsResult(Type):
4193 _toSchema = {'storagepools': 'storagepools', 'error': 'error'}
4194 _toPy = {'storagepools': 'storagepools', 'error': 'error'}
4195 def __init__(self, error=None, storagepools=None):
4196 '''
4197 error : Error
4198 storagepools : typing.Sequence[~StoragePool]
4199 '''
4200 self.error = Error.from_json(error)
4201 self.storagepools = [StoragePool.from_json(o) for o in storagepools or []]
4202
4203
4204 class StoragePoolsResults(Type):
4205 _toSchema = {'results': 'results'}
4206 _toPy = {'results': 'results'}
4207 def __init__(self, results=None):
4208 '''
4209 results : typing.Sequence[~StoragePoolsResult]
4210 '''
4211 self.results = [StoragePoolsResult.from_json(o) for o in results or []]
4212
4213
4214 class StoragesAddParams(Type):
4215 _toSchema = {'storages': 'storages'}
4216 _toPy = {'storages': 'storages'}
4217 def __init__(self, storages=None):
4218 '''
4219 storages : typing.Sequence[~StorageAddParams]
4220 '''
4221 self.storages = [StorageAddParams.from_json(o) for o in storages or []]
4222
4223
4224 class VolumeDetails(Type):
4225 _toSchema = {'info': 'info', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'storage': 'storage', 'status': 'status'}
4226 _toPy = {'info': 'info', 'volumetag': 'volumetag', 'machineattachments': 'machineattachments', 'storage': 'storage', 'status': 'status'}
4227 def __init__(self, info=None, machineattachments=None, status=None, storage=None, volumetag=None):
4228 '''
4229 info : VolumeInfo
4230 machineattachments : typing.Mapping[str, ~VolumeAttachmentInfo]
4231 status : EntityStatus
4232 storage : StorageDetails
4233 volumetag : str
4234 '''
4235 self.info = VolumeInfo.from_json(info)
4236 self.machineattachments = {k: VolumeAttachmentInfo.from_json(v) for k, v in (machineattachments or dict()).items()}
4237 self.status = EntityStatus.from_json(status)
4238 self.storage = StorageDetails.from_json(storage)
4239 self.volumetag = volumetag
4240
4241
4242 class VolumeDetailsListResult(Type):
4243 _toSchema = {'error': 'error', 'result': 'result'}
4244 _toPy = {'error': 'error', 'result': 'result'}
4245 def __init__(self, error=None, result=None):
4246 '''
4247 error : Error
4248 result : typing.Sequence[~VolumeDetails]
4249 '''
4250 self.error = Error.from_json(error)
4251 self.result = [VolumeDetails.from_json(o) for o in result or []]
4252
4253
4254 class VolumeDetailsListResults(Type):
4255 _toSchema = {'results': 'results'}
4256 _toPy = {'results': 'results'}
4257 def __init__(self, results=None):
4258 '''
4259 results : typing.Sequence[~VolumeDetailsListResult]
4260 '''
4261 self.results = [VolumeDetailsListResult.from_json(o) for o in results or []]
4262
4263
4264 class VolumeFilter(Type):
4265 _toSchema = {'machines': 'machines'}
4266 _toPy = {'machines': 'machines'}
4267 def __init__(self, machines=None):
4268 '''
4269 machines : typing.Sequence[str]
4270 '''
4271 self.machines = machines
4272
4273
4274 class VolumeFilters(Type):
4275 _toSchema = {'filters': 'filters'}
4276 _toPy = {'filters': 'filters'}
4277 def __init__(self, filters=None):
4278 '''
4279 filters : typing.Sequence[~VolumeFilter]
4280 '''
4281 self.filters = [VolumeFilter.from_json(o) for o in filters or []]
4282
4283
4284 class BlockDeviceResult(Type):
4285 _toSchema = {'error': 'error', 'result': 'result'}
4286 _toPy = {'error': 'error', 'result': 'result'}
4287 def __init__(self, error=None, result=None):
4288 '''
4289 error : Error
4290 result : BlockDevice
4291 '''
4292 self.error = Error.from_json(error)
4293 self.result = BlockDevice.from_json(result)
4294
4295
4296 class BlockDeviceResults(Type):
4297 _toSchema = {'results': 'results'}
4298 _toPy = {'results': 'results'}
4299 def __init__(self, results=None):
4300 '''
4301 results : typing.Sequence[~BlockDeviceResult]
4302 '''
4303 self.results = [BlockDeviceResult.from_json(o) for o in results or []]
4304
4305
4306 class Filesystem(Type):
4307 _toSchema = {'info': 'info', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
4308 _toPy = {'info': 'info', 'volumetag': 'volumetag', 'filesystemtag': 'filesystemtag'}
4309 def __init__(self, filesystemtag=None, info=None, volumetag=None):
4310 '''
4311 filesystemtag : str
4312 info : FilesystemInfo
4313 volumetag : str
4314 '''
4315 self.filesystemtag = filesystemtag
4316 self.info = FilesystemInfo.from_json(info)
4317 self.volumetag = volumetag
4318
4319
4320 class FilesystemAttachment(Type):
4321 _toSchema = {'info': 'info', 'filesystemtag': 'filesystemtag', 'machinetag': 'machinetag'}
4322 _toPy = {'info': 'info', 'filesystemtag': 'filesystemtag', 'machinetag': 'machinetag'}
4323 def __init__(self, filesystemtag=None, info=None, machinetag=None):
4324 '''
4325 filesystemtag : str
4326 info : FilesystemAttachmentInfo
4327 machinetag : str
4328 '''
4329 self.filesystemtag = filesystemtag
4330 self.info = FilesystemAttachmentInfo.from_json(info)
4331 self.machinetag = machinetag
4332
4333
4334 class FilesystemAttachmentParams(Type):
4335 _toSchema = {'read_only': 'read-only', 'machinetag': 'machinetag', 'mountpoint': 'mountpoint', 'instanceid': 'instanceid', 'filesystemtag': 'filesystemtag', 'provider': 'provider', 'filesystemid': 'filesystemid'}
4336 _toPy = {'read-only': 'read_only', 'machinetag': 'machinetag', 'mountpoint': 'mountpoint', 'instanceid': 'instanceid', 'filesystemtag': 'filesystemtag', 'provider': 'provider', 'filesystemid': 'filesystemid'}
4337 def __init__(self, filesystemid=None, filesystemtag=None, instanceid=None, machinetag=None, mountpoint=None, provider=None, read_only=None):
4338 '''
4339 filesystemid : str
4340 filesystemtag : str
4341 instanceid : str
4342 machinetag : str
4343 mountpoint : str
4344 provider : str
4345 read_only : bool
4346 '''
4347 self.filesystemid = filesystemid
4348 self.filesystemtag = filesystemtag
4349 self.instanceid = instanceid
4350 self.machinetag = machinetag
4351 self.mountpoint = mountpoint
4352 self.provider = provider
4353 self.read_only = read_only
4354
4355
4356 class FilesystemAttachmentParamsResult(Type):
4357 _toSchema = {'error': 'error', 'result': 'result'}
4358 _toPy = {'error': 'error', 'result': 'result'}
4359 def __init__(self, error=None, result=None):
4360 '''
4361 error : Error
4362 result : FilesystemAttachmentParams
4363 '''
4364 self.error = Error.from_json(error)
4365 self.result = FilesystemAttachmentParams.from_json(result)
4366
4367
4368 class FilesystemAttachmentParamsResults(Type):
4369 _toSchema = {'results': 'results'}
4370 _toPy = {'results': 'results'}
4371 def __init__(self, results=None):
4372 '''
4373 results : typing.Sequence[~FilesystemAttachmentParamsResult]
4374 '''
4375 self.results = [FilesystemAttachmentParamsResult.from_json(o) for o in results or []]
4376
4377
4378 class FilesystemAttachmentResult(Type):
4379 _toSchema = {'error': 'error', 'result': 'result'}
4380 _toPy = {'error': 'error', 'result': 'result'}
4381 def __init__(self, error=None, result=None):
4382 '''
4383 error : Error
4384 result : FilesystemAttachment
4385 '''
4386 self.error = Error.from_json(error)
4387 self.result = FilesystemAttachment.from_json(result)
4388
4389
4390 class FilesystemAttachmentResults(Type):
4391 _toSchema = {'results': 'results'}
4392 _toPy = {'results': 'results'}
4393 def __init__(self, results=None):
4394 '''
4395 results : typing.Sequence[~FilesystemAttachmentResult]
4396 '''
4397 self.results = [FilesystemAttachmentResult.from_json(o) for o in results or []]
4398
4399
4400 class FilesystemAttachments(Type):
4401 _toSchema = {'filesystemattachments': 'filesystemattachments'}
4402 _toPy = {'filesystemattachments': 'filesystemattachments'}
4403 def __init__(self, filesystemattachments=None):
4404 '''
4405 filesystemattachments : typing.Sequence[~FilesystemAttachment]
4406 '''
4407 self.filesystemattachments = [FilesystemAttachment.from_json(o) for o in filesystemattachments or []]
4408
4409
4410 class FilesystemParams(Type):
4411 _toSchema = {'volumetag': 'volumetag', 'attachment': 'attachment', 'size': 'size', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'provider': 'provider', 'tags': 'tags'}
4412 _toPy = {'volumetag': 'volumetag', 'attachment': 'attachment', 'size': 'size', 'attributes': 'attributes', 'filesystemtag': 'filesystemtag', 'provider': 'provider', 'tags': 'tags'}
4413 def __init__(self, attachment=None, attributes=None, filesystemtag=None, provider=None, size=None, tags=None, volumetag=None):
4414 '''
4415 attachment : FilesystemAttachmentParams
4416 attributes : typing.Mapping[str, typing.Any]
4417 filesystemtag : str
4418 provider : str
4419 size : int
4420 tags : typing.Mapping[str, str]
4421 volumetag : str
4422 '''
4423 self.attachment = FilesystemAttachmentParams.from_json(attachment)
4424 self.attributes = attributes
4425 self.filesystemtag = filesystemtag
4426 self.provider = provider
4427 self.size = size
4428 self.tags = tags
4429 self.volumetag = volumetag
4430
4431
4432 class FilesystemParamsResult(Type):
4433 _toSchema = {'error': 'error', 'result': 'result'}
4434 _toPy = {'error': 'error', 'result': 'result'}
4435 def __init__(self, error=None, result=None):
4436 '''
4437 error : Error
4438 result : FilesystemParams
4439 '''
4440 self.error = Error.from_json(error)
4441 self.result = FilesystemParams.from_json(result)
4442
4443
4444 class FilesystemParamsResults(Type):
4445 _toSchema = {'results': 'results'}
4446 _toPy = {'results': 'results'}
4447 def __init__(self, results=None):
4448 '''
4449 results : typing.Sequence[~FilesystemParamsResult]
4450 '''
4451 self.results = [FilesystemParamsResult.from_json(o) for o in results or []]
4452
4453
4454 class FilesystemResult(Type):
4455 _toSchema = {'error': 'error', 'result': 'result'}
4456 _toPy = {'error': 'error', 'result': 'result'}
4457 def __init__(self, error=None, result=None):
4458 '''
4459 error : Error
4460 result : Filesystem
4461 '''
4462 self.error = Error.from_json(error)
4463 self.result = Filesystem.from_json(result)
4464
4465
4466 class FilesystemResults(Type):
4467 _toSchema = {'results': 'results'}
4468 _toPy = {'results': 'results'}
4469 def __init__(self, results=None):
4470 '''
4471 results : typing.Sequence[~FilesystemResult]
4472 '''
4473 self.results = [FilesystemResult.from_json(o) for o in results or []]
4474
4475
4476 class Filesystems(Type):
4477 _toSchema = {'filesystems': 'filesystems'}
4478 _toPy = {'filesystems': 'filesystems'}
4479 def __init__(self, filesystems=None):
4480 '''
4481 filesystems : typing.Sequence[~Filesystem]
4482 '''
4483 self.filesystems = [Filesystem.from_json(o) for o in filesystems or []]
4484
4485
4486 class MachineStorageIds(Type):
4487 _toSchema = {'ids': 'ids'}
4488 _toPy = {'ids': 'ids'}
4489 def __init__(self, ids=None):
4490 '''
4491 ids : typing.Sequence[~MachineStorageId]
4492 '''
4493 self.ids = [MachineStorageId.from_json(o) for o in ids or []]
4494
4495
4496 class MachineStorageIdsWatchResults(Type):
4497 _toSchema = {'results': 'Results'}
4498 _toPy = {'Results': 'results'}
4499 def __init__(self, results=None):
4500 '''
4501 results : typing.Sequence[~MachineStorageIdsWatchResult]
4502 '''
4503 self.results = [MachineStorageIdsWatchResult.from_json(o) for o in results or []]
4504
4505
4506 class VolumeAttachment(Type):
4507 _toSchema = {'info': 'info', 'volumetag': 'volumetag', 'machinetag': 'machinetag'}
4508 _toPy = {'info': 'info', 'volumetag': 'volumetag', 'machinetag': 'machinetag'}
4509 def __init__(self, info=None, machinetag=None, volumetag=None):
4510 '''
4511 info : VolumeAttachmentInfo
4512 machinetag : str
4513 volumetag : str
4514 '''
4515 self.info = VolumeAttachmentInfo.from_json(info)
4516 self.machinetag = machinetag
4517 self.volumetag = volumetag
4518
4519
4520 class VolumeAttachmentParamsResult(Type):
4521 _toSchema = {'error': 'error', 'result': 'result'}
4522 _toPy = {'error': 'error', 'result': 'result'}
4523 def __init__(self, error=None, result=None):
4524 '''
4525 error : Error
4526 result : VolumeAttachmentParams
4527 '''
4528 self.error = Error.from_json(error)
4529 self.result = VolumeAttachmentParams.from_json(result)
4530
4531
4532 class VolumeAttachmentParamsResults(Type):
4533 _toSchema = {'results': 'results'}
4534 _toPy = {'results': 'results'}
4535 def __init__(self, results=None):
4536 '''
4537 results : typing.Sequence[~VolumeAttachmentParamsResult]
4538 '''
4539 self.results = [VolumeAttachmentParamsResult.from_json(o) for o in results or []]
4540
4541
4542 class VolumeAttachmentResult(Type):
4543 _toSchema = {'error': 'error', 'result': 'result'}
4544 _toPy = {'error': 'error', 'result': 'result'}
4545 def __init__(self, error=None, result=None):
4546 '''
4547 error : Error
4548 result : VolumeAttachment
4549 '''
4550 self.error = Error.from_json(error)
4551 self.result = VolumeAttachment.from_json(result)
4552
4553
4554 class VolumeAttachmentResults(Type):
4555 _toSchema = {'results': 'results'}
4556 _toPy = {'results': 'results'}
4557 def __init__(self, results=None):
4558 '''
4559 results : typing.Sequence[~VolumeAttachmentResult]
4560 '''
4561 self.results = [VolumeAttachmentResult.from_json(o) for o in results or []]
4562
4563
4564 class VolumeAttachments(Type):
4565 _toSchema = {'volumeattachments': 'volumeattachments'}
4566 _toPy = {'volumeattachments': 'volumeattachments'}
4567 def __init__(self, volumeattachments=None):
4568 '''
4569 volumeattachments : typing.Sequence[~VolumeAttachment]
4570 '''
4571 self.volumeattachments = [VolumeAttachment.from_json(o) for o in volumeattachments or []]
4572
4573
4574 class VolumeParamsResult(Type):
4575 _toSchema = {'error': 'error', 'result': 'result'}
4576 _toPy = {'error': 'error', 'result': 'result'}
4577 def __init__(self, error=None, result=None):
4578 '''
4579 error : Error
4580 result : VolumeParams
4581 '''
4582 self.error = Error.from_json(error)
4583 self.result = VolumeParams.from_json(result)
4584
4585
4586 class VolumeParamsResults(Type):
4587 _toSchema = {'results': 'results'}
4588 _toPy = {'results': 'results'}
4589 def __init__(self, results=None):
4590 '''
4591 results : typing.Sequence[~VolumeParamsResult]
4592 '''
4593 self.results = [VolumeParamsResult.from_json(o) for o in results or []]
4594
4595
4596 class VolumeResult(Type):
4597 _toSchema = {'error': 'error', 'result': 'result'}
4598 _toPy = {'error': 'error', 'result': 'result'}
4599 def __init__(self, error=None, result=None):
4600 '''
4601 error : Error
4602 result : Volume
4603 '''
4604 self.error = Error.from_json(error)
4605 self.result = Volume.from_json(result)
4606
4607
4608 class VolumeResults(Type):
4609 _toSchema = {'results': 'results'}
4610 _toPy = {'results': 'results'}
4611 def __init__(self, results=None):
4612 '''
4613 results : typing.Sequence[~VolumeResult]
4614 '''
4615 self.results = [VolumeResult.from_json(o) for o in results or []]
4616
4617
4618 class Volumes(Type):
4619 _toSchema = {'volumes': 'volumes'}
4620 _toPy = {'volumes': 'volumes'}
4621 def __init__(self, volumes=None):
4622 '''
4623 volumes : typing.Sequence[~Volume]
4624 '''
4625 self.volumes = [Volume.from_json(o) for o in volumes or []]
4626
4627
4628 class SpaceResult(Type):
4629 _toSchema = {'tag': 'Tag', 'error': 'Error'}
4630 _toPy = {'Error': 'error', 'Tag': 'tag'}
4631 def __init__(self, error=None, tag=None):
4632 '''
4633 error : Error
4634 tag : str
4635 '''
4636 self.error = Error.from_json(error)
4637 self.tag = tag
4638
4639
4640 class SpaceResults(Type):
4641 _toSchema = {'results': 'Results'}
4642 _toPy = {'Results': 'results'}
4643 def __init__(self, results=None):
4644 '''
4645 results : typing.Sequence[~SpaceResult]
4646 '''
4647 self.results = [SpaceResult.from_json(o) for o in results or []]
4648
4649
4650 class ZoneResult(Type):
4651 _toSchema = {'available': 'Available', 'name': 'Name', 'error': 'Error'}
4652 _toPy = {'Error': 'error', 'Name': 'name', 'Available': 'available'}
4653 def __init__(self, available=None, error=None, name=None):
4654 '''
4655 available : bool
4656 error : Error
4657 name : str
4658 '''
4659 self.available = available
4660 self.error = Error.from_json(error)
4661 self.name = name
4662
4663
4664 class ZoneResults(Type):
4665 _toSchema = {'results': 'Results'}
4666 _toPy = {'Results': 'results'}
4667 def __init__(self, results=None):
4668 '''
4669 results : typing.Sequence[~ZoneResult]
4670 '''
4671 self.results = [ZoneResult.from_json(o) for o in results or []]
4672
4673
4674 class UndertakerModelInfo(Type):
4675 _toSchema = {'globalname': 'GlobalName', 'life': 'Life', 'issystem': 'IsSystem', 'name': 'Name', 'uuid': 'UUID'}
4676 _toPy = {'Name': 'name', 'Life': 'life', 'GlobalName': 'globalname', 'IsSystem': 'issystem', 'UUID': 'uuid'}
4677 def __init__(self, globalname=None, issystem=None, life=None, name=None, uuid=None):
4678 '''
4679 globalname : str
4680 issystem : bool
4681 life : str
4682 name : str
4683 uuid : str
4684 '''
4685 self.globalname = globalname
4686 self.issystem = issystem
4687 self.life = life
4688 self.name = name
4689 self.uuid = uuid
4690
4691
4692 class UndertakerModelInfoResult(Type):
4693 _toSchema = {'error': 'Error', 'result': 'Result'}
4694 _toPy = {'Error': 'error', 'Result': 'result'}
4695 def __init__(self, error=None, result=None):
4696 '''
4697 error : Error
4698 result : UndertakerModelInfo
4699 '''
4700 self.error = Error.from_json(error)
4701 self.result = UndertakerModelInfo.from_json(result)
4702
4703
4704 class CharmURL(Type):
4705 _toSchema = {'url': 'URL'}
4706 _toPy = {'URL': 'url'}
4707 def __init__(self, url=None):
4708 '''
4709 url : str
4710 '''
4711 self.url = url
4712
4713
4714 class CharmURLs(Type):
4715 _toSchema = {'urls': 'URLs'}
4716 _toPy = {'URLs': 'urls'}
4717 def __init__(self, urls=None):
4718 '''
4719 urls : typing.Sequence[~CharmURL]
4720 '''
4721 self.urls = [CharmURL.from_json(o) for o in urls or []]
4722
4723
4724 class ConfigSettingsResult(Type):
4725 _toSchema = {'settings': 'Settings', 'error': 'Error'}
4726 _toPy = {'Error': 'error', 'Settings': 'settings'}
4727 def __init__(self, error=None, settings=None):
4728 '''
4729 error : Error
4730 settings : typing.Mapping[str, typing.Any]
4731 '''
4732 self.error = Error.from_json(error)
4733 self.settings = settings
4734
4735
4736 class ConfigSettingsResults(Type):
4737 _toSchema = {'results': 'Results'}
4738 _toPy = {'Results': 'results'}
4739 def __init__(self, results=None):
4740 '''
4741 results : typing.Sequence[~ConfigSettingsResult]
4742 '''
4743 self.results = [ConfigSettingsResult.from_json(o) for o in results or []]
4744
4745
4746 class Endpoint(Type):
4747 _toSchema = {'relation': 'Relation', 'servicename': 'ServiceName'}
4748 _toPy = {'Relation': 'relation', 'ServiceName': 'servicename'}
4749 def __init__(self, relation=None, servicename=None):
4750 '''
4751 relation : Relation
4752 servicename : str
4753 '''
4754 self.relation = Relation.from_json(relation)
4755 self.servicename = servicename
4756
4757
4758 class EntitiesCharmURL(Type):
4759 _toSchema = {'entities': 'Entities'}
4760 _toPy = {'Entities': 'entities'}
4761 def __init__(self, entities=None):
4762 '''
4763 entities : typing.Sequence[~EntityCharmURL]
4764 '''
4765 self.entities = [EntityCharmURL.from_json(o) for o in entities or []]
4766
4767
4768 class EntitiesPortRanges(Type):
4769 _toSchema = {'entities': 'Entities'}
4770 _toPy = {'Entities': 'entities'}
4771 def __init__(self, entities=None):
4772 '''
4773 entities : typing.Sequence[~EntityPortRange]
4774 '''
4775 self.entities = [EntityPortRange.from_json(o) for o in entities or []]
4776
4777
4778 class EntityCharmURL(Type):
4779 _toSchema = {'tag': 'Tag', 'charmurl': 'CharmURL'}
4780 _toPy = {'Tag': 'tag', 'CharmURL': 'charmurl'}
4781 def __init__(self, charmurl=None, tag=None):
4782 '''
4783 charmurl : str
4784 tag : str
4785 '''
4786 self.charmurl = charmurl
4787 self.tag = tag
4788
4789
4790 class EntityPortRange(Type):
4791 _toSchema = {'protocol': 'Protocol', 'toport': 'ToPort', 'tag': 'Tag', 'fromport': 'FromPort'}
4792 _toPy = {'FromPort': 'fromport', 'Protocol': 'protocol', 'Tag': 'tag', 'ToPort': 'toport'}
4793 def __init__(self, fromport=None, protocol=None, tag=None, toport=None):
4794 '''
4795 fromport : int
4796 protocol : str
4797 tag : str
4798 toport : int
4799 '''
4800 self.fromport = fromport
4801 self.protocol = protocol
4802 self.tag = tag
4803 self.toport = toport
4804
4805
4806 class GetLeadershipSettingsBulkResults(Type):
4807 _toSchema = {'results': 'Results'}
4808 _toPy = {'Results': 'results'}
4809 def __init__(self, results=None):
4810 '''
4811 results : typing.Sequence[~GetLeadershipSettingsResult]
4812 '''
4813 self.results = [GetLeadershipSettingsResult.from_json(o) for o in results or []]
4814
4815
4816 class GetLeadershipSettingsResult(Type):
4817 _toSchema = {'settings': 'Settings', 'error': 'Error'}
4818 _toPy = {'Error': 'error', 'Settings': 'settings'}
4819 def __init__(self, error=None, settings=None):
4820 '''
4821 error : Error
4822 settings : typing.Mapping[str, str]
4823 '''
4824 self.error = Error.from_json(error)
4825 self.settings = settings
4826
4827
4828 class IntResult(Type):
4829 _toSchema = {'error': 'Error', 'result': 'Result'}
4830 _toPy = {'Error': 'error', 'Result': 'result'}
4831 def __init__(self, error=None, result=None):
4832 '''
4833 error : Error
4834 result : int
4835 '''
4836 self.error = Error.from_json(error)
4837 self.result = result
4838
4839
4840 class IntResults(Type):
4841 _toSchema = {'results': 'Results'}
4842 _toPy = {'Results': 'results'}
4843 def __init__(self, results=None):
4844 '''
4845 results : typing.Sequence[~IntResult]
4846 '''
4847 self.results = [IntResult.from_json(o) for o in results or []]
4848
4849
4850 class MergeLeadershipSettingsBulkParams(Type):
4851 _toSchema = {'params': 'Params'}
4852 _toPy = {'Params': 'params'}
4853 def __init__(self, params=None):
4854 '''
4855 params : typing.Sequence[~MergeLeadershipSettingsParam]
4856 '''
4857 self.params = [MergeLeadershipSettingsParam.from_json(o) for o in params or []]
4858
4859
4860 class MergeLeadershipSettingsParam(Type):
4861 _toSchema = {'settings': 'Settings', 'servicetag': 'ServiceTag'}
4862 _toPy = {'ServiceTag': 'servicetag', 'Settings': 'settings'}
4863 def __init__(self, servicetag=None, settings=None):
4864 '''
4865 servicetag : str
4866 settings : typing.Mapping[str, str]
4867 '''
4868 self.servicetag = servicetag
4869 self.settings = settings
4870
4871
4872 class ModelResult(Type):
4873 _toSchema = {'uuid': 'UUID', 'name': 'Name', 'error': 'Error'}
4874 _toPy = {'Name': 'name', 'UUID': 'uuid', 'Error': 'error'}
4875 def __init__(self, error=None, name=None, uuid=None):
4876 '''
4877 error : Error
4878 name : str
4879 uuid : str
4880 '''
4881 self.error = Error.from_json(error)
4882 self.name = name
4883 self.uuid = uuid
4884
4885
4886 class RelationIds(Type):
4887 _toSchema = {'relationids': 'RelationIds'}
4888 _toPy = {'RelationIds': 'relationids'}
4889 def __init__(self, relationids=None):
4890 '''
4891 relationids : typing.Sequence[int]
4892 '''
4893 self.relationids = relationids
4894
4895
4896 class RelationResult(Type):
4897 _toSchema = {'life': 'Life', 'endpoint': 'Endpoint', 'id_': 'Id', 'key': 'Key', 'error': 'Error'}
4898 _toPy = {'Error': 'error', 'Id': 'id_', 'Life': 'life', 'Endpoint': 'endpoint', 'Key': 'key'}
4899 def __init__(self, endpoint=None, error=None, id_=None, key=None, life=None):
4900 '''
4901 endpoint : Endpoint
4902 error : Error
4903 id_ : int
4904 key : str
4905 life : str
4906 '''
4907 self.endpoint = Endpoint.from_json(endpoint)
4908 self.error = Error.from_json(error)
4909 self.id_ = id_
4910 self.key = key
4911 self.life = life
4912
4913
4914 class RelationResults(Type):
4915 _toSchema = {'results': 'Results'}
4916 _toPy = {'Results': 'results'}
4917 def __init__(self, results=None):
4918 '''
4919 results : typing.Sequence[~RelationResult]
4920 '''
4921 self.results = [RelationResult.from_json(o) for o in results or []]
4922
4923
4924 class RelationUnit(Type):
4925 _toSchema = {'relation': 'Relation', 'unit': 'Unit'}
4926 _toPy = {'Relation': 'relation', 'Unit': 'unit'}
4927 def __init__(self, relation=None, unit=None):
4928 '''
4929 relation : str
4930 unit : str
4931 '''
4932 self.relation = relation
4933 self.unit = unit
4934
4935
4936 class RelationUnitPair(Type):
4937 _toSchema = {'relation': 'Relation', 'remoteunit': 'RemoteUnit', 'localunit': 'LocalUnit'}
4938 _toPy = {'Relation': 'relation', 'LocalUnit': 'localunit', 'RemoteUnit': 'remoteunit'}
4939 def __init__(self, localunit=None, relation=None, remoteunit=None):
4940 '''
4941 localunit : str
4942 relation : str
4943 remoteunit : str
4944 '''
4945 self.localunit = localunit
4946 self.relation = relation
4947 self.remoteunit = remoteunit
4948
4949
4950 class RelationUnitPairs(Type):
4951 _toSchema = {'relationunitpairs': 'RelationUnitPairs'}
4952 _toPy = {'RelationUnitPairs': 'relationunitpairs'}
4953 def __init__(self, relationunitpairs=None):
4954 '''
4955 relationunitpairs : typing.Sequence[~RelationUnitPair]
4956 '''
4957 self.relationunitpairs = [RelationUnitPair.from_json(o) for o in relationunitpairs or []]
4958
4959
4960 class RelationUnitSettings(Type):
4961 _toSchema = {'relation': 'Relation', 'settings': 'Settings', 'unit': 'Unit'}
4962 _toPy = {'Relation': 'relation', 'Settings': 'settings', 'Unit': 'unit'}
4963 def __init__(self, relation=None, settings=None, unit=None):
4964 '''
4965 relation : str
4966 settings : typing.Mapping[str, str]
4967 unit : str
4968 '''
4969 self.relation = relation
4970 self.settings = settings
4971 self.unit = unit
4972
4973
4974 class RelationUnits(Type):
4975 _toSchema = {'relationunits': 'RelationUnits'}
4976 _toPy = {'RelationUnits': 'relationunits'}
4977 def __init__(self, relationunits=None):
4978 '''
4979 relationunits : typing.Sequence[~RelationUnit]
4980 '''
4981 self.relationunits = [RelationUnit.from_json(o) for o in relationunits or []]
4982
4983
4984 class RelationUnitsSettings(Type):
4985 _toSchema = {'relationunits': 'RelationUnits'}
4986 _toPy = {'RelationUnits': 'relationunits'}
4987 def __init__(self, relationunits=None):
4988 '''
4989 relationunits : typing.Sequence[~RelationUnitSettings]
4990 '''
4991 self.relationunits = [RelationUnitSettings.from_json(o) for o in relationunits or []]
4992
4993
4994 class RelationUnitsWatchResults(Type):
4995 _toSchema = {'results': 'Results'}
4996 _toPy = {'Results': 'results'}
4997 def __init__(self, results=None):
4998 '''
4999 results : typing.Sequence[~RelationUnitsWatchResult]
5000 '''
5001 self.results = [RelationUnitsWatchResult.from_json(o) for o in results or []]
5002
5003
5004 class ResolvedModeResult(Type):
5005 _toSchema = {'mode': 'Mode', 'error': 'Error'}
5006 _toPy = {'Error': 'error', 'Mode': 'mode'}
5007 def __init__(self, error=None, mode=None):
5008 '''
5009 error : Error
5010 mode : str
5011 '''
5012 self.error = Error.from_json(error)
5013 self.mode = mode
5014
5015
5016 class ResolvedModeResults(Type):
5017 _toSchema = {'results': 'Results'}
5018 _toPy = {'Results': 'results'}
5019 def __init__(self, results=None):
5020 '''
5021 results : typing.Sequence[~ResolvedModeResult]
5022 '''
5023 self.results = [ResolvedModeResult.from_json(o) for o in results or []]
5024
5025
5026 class ServiceStatusResult(Type):
5027 _toSchema = {'service': 'Service', 'units': 'Units', 'error': 'Error'}
5028 _toPy = {'Error': 'error', 'Units': 'units', 'Service': 'service'}
5029 def __init__(self, error=None, service=None, units=None):
5030 '''
5031 error : Error
5032 service : StatusResult
5033 units : typing.Mapping[str, ~StatusResult]
5034 '''
5035 self.error = Error.from_json(error)
5036 self.service = StatusResult.from_json(service)
5037 self.units = {k: StatusResult.from_json(v) for k, v in (units or dict()).items()}
5038
5039
5040 class ServiceStatusResults(Type):
5041 _toSchema = {'results': 'Results'}
5042 _toPy = {'Results': 'results'}
5043 def __init__(self, results=None):
5044 '''
5045 results : typing.Sequence[~ServiceStatusResult]
5046 '''
5047 self.results = [ServiceStatusResult.from_json(o) for o in results or []]
5048
5049
5050 class SettingsResult(Type):
5051 _toSchema = {'settings': 'Settings', 'error': 'Error'}
5052 _toPy = {'Error': 'error', 'Settings': 'settings'}
5053 def __init__(self, error=None, settings=None):
5054 '''
5055 error : Error
5056 settings : typing.Mapping[str, str]
5057 '''
5058 self.error = Error.from_json(error)
5059 self.settings = settings
5060
5061
5062 class SettingsResults(Type):
5063 _toSchema = {'results': 'Results'}
5064 _toPy = {'Results': 'results'}
5065 def __init__(self, results=None):
5066 '''
5067 results : typing.Sequence[~SettingsResult]
5068 '''
5069 self.results = [SettingsResult.from_json(o) for o in results or []]
5070
5071
5072 class StorageAttachment(Type):
5073 _toSchema = {'kind': 'Kind', 'life': 'Life', 'location': 'Location', 'storagetag': 'StorageTag', 'unittag': 'UnitTag', 'ownertag': 'OwnerTag'}
5074 _toPy = {'StorageTag': 'storagetag', 'UnitTag': 'unittag', 'Location': 'location', 'Kind': 'kind', 'Life': 'life', 'OwnerTag': 'ownertag'}
5075 def __init__(self, kind=None, life=None, location=None, ownertag=None, storagetag=None, unittag=None):
5076 '''
5077 kind : int
5078 life : str
5079 location : str
5080 ownertag : str
5081 storagetag : str
5082 unittag : str
5083 '''
5084 self.kind = kind
5085 self.life = life
5086 self.location = location
5087 self.ownertag = ownertag
5088 self.storagetag = storagetag
5089 self.unittag = unittag
5090
5091
5092 class StorageAttachmentId(Type):
5093 _toSchema = {'storagetag': 'storagetag', 'unittag': 'unittag'}
5094 _toPy = {'storagetag': 'storagetag', 'unittag': 'unittag'}
5095 def __init__(self, storagetag=None, unittag=None):
5096 '''
5097 storagetag : str
5098 unittag : str
5099 '''
5100 self.storagetag = storagetag
5101 self.unittag = unittag
5102
5103
5104 class StorageAttachmentIds(Type):
5105 _toSchema = {'ids': 'ids'}
5106 _toPy = {'ids': 'ids'}
5107 def __init__(self, ids=None):
5108 '''
5109 ids : typing.Sequence[~StorageAttachmentId]
5110 '''
5111 self.ids = [StorageAttachmentId.from_json(o) for o in ids or []]
5112
5113
5114 class StorageAttachmentIdsResult(Type):
5115 _toSchema = {'error': 'error', 'result': 'result'}
5116 _toPy = {'error': 'error', 'result': 'result'}
5117 def __init__(self, error=None, result=None):
5118 '''
5119 error : Error
5120 result : StorageAttachmentIds
5121 '''
5122 self.error = Error.from_json(error)
5123 self.result = StorageAttachmentIds.from_json(result)
5124
5125
5126 class StorageAttachmentIdsResults(Type):
5127 _toSchema = {'results': 'results'}
5128 _toPy = {'results': 'results'}
5129 def __init__(self, results=None):
5130 '''
5131 results : typing.Sequence[~StorageAttachmentIdsResult]
5132 '''
5133 self.results = [StorageAttachmentIdsResult.from_json(o) for o in results or []]
5134
5135
5136 class StorageAttachmentResult(Type):
5137 _toSchema = {'error': 'error', 'result': 'result'}
5138 _toPy = {'error': 'error', 'result': 'result'}
5139 def __init__(self, error=None, result=None):
5140 '''
5141 error : Error
5142 result : StorageAttachment
5143 '''
5144 self.error = Error.from_json(error)
5145 self.result = StorageAttachment.from_json(result)
5146
5147
5148 class StorageAttachmentResults(Type):
5149 _toSchema = {'results': 'results'}
5150 _toPy = {'results': 'results'}
5151 def __init__(self, results=None):
5152 '''
5153 results : typing.Sequence[~StorageAttachmentResult]
5154 '''
5155 self.results = [StorageAttachmentResult.from_json(o) for o in results or []]
5156
5157
5158 class StringBoolResult(Type):
5159 _toSchema = {'ok': 'Ok', 'error': 'Error', 'result': 'Result'}
5160 _toPy = {'Ok': 'ok', 'Error': 'error', 'Result': 'result'}
5161 def __init__(self, error=None, ok=None, result=None):
5162 '''
5163 error : Error
5164 ok : bool
5165 result : str
5166 '''
5167 self.error = Error.from_json(error)
5168 self.ok = ok
5169 self.result = result
5170
5171
5172 class StringBoolResults(Type):
5173 _toSchema = {'results': 'Results'}
5174 _toPy = {'Results': 'results'}
5175 def __init__(self, results=None):
5176 '''
5177 results : typing.Sequence[~StringBoolResult]
5178 '''
5179 self.results = [StringBoolResult.from_json(o) for o in results or []]
5180
5181
5182 class UnitNetworkConfig(Type):
5183 _toSchema = {'unittag': 'UnitTag', 'bindingname': 'BindingName'}
5184 _toPy = {'BindingName': 'bindingname', 'UnitTag': 'unittag'}
5185 def __init__(self, bindingname=None, unittag=None):
5186 '''
5187 bindingname : str
5188 unittag : str
5189 '''
5190 self.bindingname = bindingname
5191 self.unittag = unittag
5192
5193
5194 class UnitNetworkConfigResult(Type):
5195 _toSchema = {'info': 'Info', 'error': 'Error'}
5196 _toPy = {'Error': 'error', 'Info': 'info'}
5197 def __init__(self, error=None, info=None):
5198 '''
5199 error : Error
5200 info : typing.Sequence[~NetworkConfig]
5201 '''
5202 self.error = Error.from_json(error)
5203 self.info = [NetworkConfig.from_json(o) for o in info or []]
5204
5205
5206 class UnitNetworkConfigResults(Type):
5207 _toSchema = {'results': 'Results'}
5208 _toPy = {'Results': 'results'}
5209 def __init__(self, results=None):
5210 '''
5211 results : typing.Sequence[~UnitNetworkConfigResult]
5212 '''
5213 self.results = [UnitNetworkConfigResult.from_json(o) for o in results or []]
5214
5215
5216 class UnitsNetworkConfig(Type):
5217 _toSchema = {'args': 'Args'}
5218 _toPy = {'Args': 'args'}
5219 def __init__(self, args=None):
5220 '''
5221 args : typing.Sequence[~UnitNetworkConfig]
5222 '''
5223 self.args = [UnitNetworkConfig.from_json(o) for o in args or []]
5224
5225
5226 class EntitiesVersion(Type):
5227 _toSchema = {'agenttools': 'AgentTools'}
5228 _toPy = {'AgentTools': 'agenttools'}
5229 def __init__(self, agenttools=None):
5230 '''
5231 agenttools : typing.Sequence[~EntityVersion]
5232 '''
5233 self.agenttools = [EntityVersion.from_json(o) for o in agenttools or []]
5234
5235
5236 class EntityVersion(Type):
5237 _toSchema = {'tools': 'Tools', 'tag': 'Tag'}
5238 _toPy = {'Tools': 'tools', 'Tag': 'tag'}
5239 def __init__(self, tag=None, tools=None):
5240 '''
5241 tag : str
5242 tools : Version
5243 '''
5244 self.tag = tag
5245 self.tools = Version.from_json(tools)
5246
5247
5248 class VersionResult(Type):
5249 _toSchema = {'error': 'Error', 'version': 'Version'}
5250 _toPy = {'Version': 'version', 'Error': 'error'}
5251 def __init__(self, error=None, version=None):
5252 '''
5253 error : Error
5254 version : Number
5255 '''
5256 self.error = Error.from_json(error)
5257 self.version = Number.from_json(version)
5258
5259
5260 class VersionResults(Type):
5261 _toSchema = {'results': 'Results'}
5262 _toPy = {'Results': 'results'}
5263 def __init__(self, results=None):
5264 '''
5265 results : typing.Sequence[~VersionResult]
5266 '''
5267 self.results = [VersionResult.from_json(o) for o in results or []]
5268
5269
5270 class AddUser(Type):
5271 _toSchema = {'shared_model_tags': 'shared-model-tags', 'model_access_permission': 'model-access-permission', 'username': 'username', 'display_name': 'display-name', 'password': 'password'}
5272 _toPy = {'shared-model-tags': 'shared_model_tags', 'display-name': 'display_name', 'username': 'username', 'model-access-permission': 'model_access_permission', 'password': 'password'}
5273 def __init__(self, display_name=None, model_access_permission=None, password=None, shared_model_tags=None, username=None):
5274 '''
5275 display_name : str
5276 model_access_permission : str
5277 password : str
5278 shared_model_tags : typing.Sequence[str]
5279 username : str
5280 '''
5281 self.display_name = display_name
5282 self.model_access_permission = model_access_permission
5283 self.password = password
5284 self.shared_model_tags = shared_model_tags
5285 self.username = username
5286
5287
5288 class AddUserResult(Type):
5289 _toSchema = {'secret_key': 'secret-key', 'tag': 'tag', 'error': 'error'}
5290 _toPy = {'tag': 'tag', 'error': 'error', 'secret-key': 'secret_key'}
5291 def __init__(self, error=None, secret_key=None, tag=None):
5292 '''
5293 error : Error
5294 secret_key : typing.Sequence[int]
5295 tag : str
5296 '''
5297 self.error = Error.from_json(error)
5298 self.secret_key = secret_key
5299 self.tag = tag
5300
5301
5302 class AddUserResults(Type):
5303 _toSchema = {'results': 'results'}
5304 _toPy = {'results': 'results'}
5305 def __init__(self, results=None):
5306 '''
5307 results : typing.Sequence[~AddUserResult]
5308 '''
5309 self.results = [AddUserResult.from_json(o) for o in results or []]
5310
5311
5312 class AddUsers(Type):
5313 _toSchema = {'users': 'users'}
5314 _toPy = {'users': 'users'}
5315 def __init__(self, users=None):
5316 '''
5317 users : typing.Sequence[~AddUser]
5318 '''
5319 self.users = [AddUser.from_json(o) for o in users or []]
5320
5321
5322 class MacaroonResult(Type):
5323 _toSchema = {'error': 'error', 'result': 'result'}
5324 _toPy = {'error': 'error', 'result': 'result'}
5325 def __init__(self, error=None, result=None):
5326 '''
5327 error : Error
5328 result : Macaroon
5329 '''
5330 self.error = Error.from_json(error)
5331 self.result = Macaroon.from_json(result)
5332
5333
5334 class MacaroonResults(Type):
5335 _toSchema = {'results': 'results'}
5336 _toPy = {'results': 'results'}
5337 def __init__(self, results=None):
5338 '''
5339 results : typing.Sequence[~MacaroonResult]
5340 '''
5341 self.results = [MacaroonResult.from_json(o) for o in results or []]
5342
5343
5344 class UserInfo(Type):
5345 _toSchema = {'date_created': 'date-created', 'disabled': 'disabled', 'last_connection': 'last-connection', 'created_by': 'created-by', 'username': 'username', 'display_name': 'display-name'}
5346 _toPy = {'disabled': 'disabled', 'username': 'username', 'last-connection': 'last_connection', 'display-name': 'display_name', 'created-by': 'created_by', 'date-created': 'date_created'}
5347 def __init__(self, created_by=None, date_created=None, disabled=None, display_name=None, last_connection=None, username=None):
5348 '''
5349 created_by : str
5350 date_created : str
5351 disabled : bool
5352 display_name : str
5353 last_connection : str
5354 username : str
5355 '''
5356 self.created_by = created_by
5357 self.date_created = date_created
5358 self.disabled = disabled
5359 self.display_name = display_name
5360 self.last_connection = last_connection
5361 self.username = username
5362
5363
5364 class UserInfoRequest(Type):
5365 _toSchema = {'entities': 'entities', 'include_disabled': 'include-disabled'}
5366 _toPy = {'include-disabled': 'include_disabled', 'entities': 'entities'}
5367 def __init__(self, entities=None, include_disabled=None):
5368 '''
5369 entities : typing.Sequence[~Entity]
5370 include_disabled : bool
5371 '''
5372 self.entities = [Entity.from_json(o) for o in entities or []]
5373 self.include_disabled = include_disabled
5374
5375
5376 class UserInfoResult(Type):
5377 _toSchema = {'error': 'error', 'result': 'result'}
5378 _toPy = {'error': 'error', 'result': 'result'}
5379 def __init__(self, error=None, result=None):
5380 '''
5381 error : Error
5382 result : UserInfo
5383 '''
5384 self.error = Error.from_json(error)
5385 self.result = UserInfo.from_json(result)
5386
5387
5388 class UserInfoResults(Type):
5389 _toSchema = {'results': 'results'}
5390 _toPy = {'results': 'results'}
5391 def __init__(self, results=None):
5392 '''
5393 results : typing.Sequence[~UserInfoResult]
5394 '''
5395 self.results = [UserInfoResult.from_json(o) for o in results or []]
5396
5397
5398 class Action(Type):
5399 name = 'Action'
5400 version = 1
5401 schema = {'definitions': {'Action': {'additionalProperties': False,
5402 'properties': {'name': {'type': 'string'},
5403 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
5404 'type': 'object'}},
5405 'type': 'object'},
5406 'receiver': {'type': 'string'},
5407 'tag': {'type': 'string'}},
5408 'required': ['tag', 'receiver', 'name'],
5409 'type': 'object'},
5410 'ActionResult': {'additionalProperties': False,
5411 'properties': {'action': {'$ref': '#/definitions/Action'},
5412 'completed': {'format': 'date-time',
5413 'type': 'string'},
5414 'enqueued': {'format': 'date-time',
5415 'type': 'string'},
5416 'error': {'$ref': '#/definitions/Error'},
5417 'message': {'type': 'string'},
5418 'output': {'patternProperties': {'.*': {'additionalProperties': True,
5419 'type': 'object'}},
5420 'type': 'object'},
5421 'started': {'format': 'date-time',
5422 'type': 'string'},
5423 'status': {'type': 'string'}},
5424 'type': 'object'},
5425 'ActionResults': {'additionalProperties': False,
5426 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
5427 'type': 'array'}},
5428 'type': 'object'},
5429 'Actions': {'additionalProperties': False,
5430 'properties': {'actions': {'items': {'$ref': '#/definitions/Action'},
5431 'type': 'array'}},
5432 'type': 'object'},
5433 'ActionsByName': {'additionalProperties': False,
5434 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5435 'type': 'array'},
5436 'error': {'$ref': '#/definitions/Error'},
5437 'name': {'type': 'string'}},
5438 'type': 'object'},
5439 'ActionsByNames': {'additionalProperties': False,
5440 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByName'},
5441 'type': 'array'}},
5442 'type': 'object'},
5443 'ActionsByReceiver': {'additionalProperties': False,
5444 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
5445 'type': 'array'},
5446 'error': {'$ref': '#/definitions/Error'},
5447 'receiver': {'type': 'string'}},
5448 'type': 'object'},
5449 'ActionsByReceivers': {'additionalProperties': False,
5450 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
5451 'type': 'array'}},
5452 'type': 'object'},
5453 'Entities': {'additionalProperties': False,
5454 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5455 'type': 'array'}},
5456 'required': ['Entities'],
5457 'type': 'object'},
5458 'Entity': {'additionalProperties': False,
5459 'properties': {'Tag': {'type': 'string'}},
5460 'required': ['Tag'],
5461 'type': 'object'},
5462 'Error': {'additionalProperties': False,
5463 'properties': {'Code': {'type': 'string'},
5464 'Info': {'$ref': '#/definitions/ErrorInfo'},
5465 'Message': {'type': 'string'}},
5466 'required': ['Message', 'Code'],
5467 'type': 'object'},
5468 'ErrorInfo': {'additionalProperties': False,
5469 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5470 'MacaroonPath': {'type': 'string'}},
5471 'type': 'object'},
5472 'FindActionsByNames': {'additionalProperties': False,
5473 'properties': {'names': {'items': {'type': 'string'},
5474 'type': 'array'}},
5475 'type': 'object'},
5476 'FindTags': {'additionalProperties': False,
5477 'properties': {'prefixes': {'items': {'type': 'string'},
5478 'type': 'array'}},
5479 'required': ['prefixes'],
5480 'type': 'object'},
5481 'FindTagsResults': {'additionalProperties': False,
5482 'properties': {'matches': {'patternProperties': {'.*': {'items': {'$ref': '#/definitions/Entity'},
5483 'type': 'array'}},
5484 'type': 'object'}},
5485 'required': ['matches'],
5486 'type': 'object'},
5487 'Macaroon': {'additionalProperties': False,
5488 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5489 'type': 'array'},
5490 'data': {'items': {'type': 'integer'},
5491 'type': 'array'},
5492 'id': {'$ref': '#/definitions/packet'},
5493 'location': {'$ref': '#/definitions/packet'},
5494 'sig': {'items': {'type': 'integer'},
5495 'type': 'array'}},
5496 'required': ['data',
5497 'location',
5498 'id',
5499 'caveats',
5500 'sig'],
5501 'type': 'object'},
5502 'RunParams': {'additionalProperties': False,
5503 'properties': {'Commands': {'type': 'string'},
5504 'Machines': {'items': {'type': 'string'},
5505 'type': 'array'},
5506 'Services': {'items': {'type': 'string'},
5507 'type': 'array'},
5508 'Timeout': {'type': 'integer'},
5509 'Units': {'items': {'type': 'string'},
5510 'type': 'array'}},
5511 'required': ['Commands',
5512 'Timeout',
5513 'Machines',
5514 'Services',
5515 'Units'],
5516 'type': 'object'},
5517 'ServiceCharmActionsResult': {'additionalProperties': False,
5518 'properties': {'actions': {'$ref': '#/definitions/Actions'},
5519 'error': {'$ref': '#/definitions/Error'},
5520 'servicetag': {'type': 'string'}},
5521 'type': 'object'},
5522 'ServicesCharmActionsResults': {'additionalProperties': False,
5523 'properties': {'results': {'items': {'$ref': '#/definitions/ServiceCharmActionsResult'},
5524 'type': 'array'}},
5525 'type': 'object'},
5526 'caveat': {'additionalProperties': False,
5527 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5528 'location': {'$ref': '#/definitions/packet'},
5529 'verificationId': {'$ref': '#/definitions/packet'}},
5530 'required': ['location',
5531 'caveatId',
5532 'verificationId'],
5533 'type': 'object'},
5534 'packet': {'additionalProperties': False,
5535 'properties': {'headerLen': {'type': 'integer'},
5536 'start': {'type': 'integer'},
5537 'totalLen': {'type': 'integer'}},
5538 'required': ['start', 'totalLen', 'headerLen'],
5539 'type': 'object'}},
5540 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5541 'Result': {'$ref': '#/definitions/ActionResults'}},
5542 'type': 'object'},
5543 'Cancel': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5544 'Result': {'$ref': '#/definitions/ActionResults'}},
5545 'type': 'object'},
5546 'Enqueue': {'properties': {'Params': {'$ref': '#/definitions/Actions'},
5547 'Result': {'$ref': '#/definitions/ActionResults'}},
5548 'type': 'object'},
5549 'FindActionTagsByPrefix': {'properties': {'Params': {'$ref': '#/definitions/FindTags'},
5550 'Result': {'$ref': '#/definitions/FindTagsResults'}},
5551 'type': 'object'},
5552 'FindActionsByNames': {'properties': {'Params': {'$ref': '#/definitions/FindActionsByNames'},
5553 'Result': {'$ref': '#/definitions/ActionsByNames'}},
5554 'type': 'object'},
5555 'ListAll': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5556 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5557 'type': 'object'},
5558 'ListCompleted': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5559 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5560 'type': 'object'},
5561 'ListPending': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5562 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5563 'type': 'object'},
5564 'ListRunning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5565 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
5566 'type': 'object'},
5567 'Run': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5568 'Result': {'$ref': '#/definitions/ActionResults'}},
5569 'type': 'object'},
5570 'RunOnAllMachines': {'properties': {'Params': {'$ref': '#/definitions/RunParams'},
5571 'Result': {'$ref': '#/definitions/ActionResults'}},
5572 'type': 'object'},
5573 'ServicesCharmActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
5574 'Result': {'$ref': '#/definitions/ServicesCharmActionsResults'}},
5575 'type': 'object'}},
5576 'type': 'object'}
5577
5578
5579 @ReturnMapping(ActionResults)
5580 async def Actions(self, entities):
5581 '''
5582 entities : typing.Sequence[~Entity]
5583 Returns -> typing.Sequence[~ActionResult]
5584 '''
5585 # map input types to rpc msg
5586 params = dict()
5587 msg = dict(Type='Action', Request='Actions', Version=1, Params=params)
5588 params['Entities'] = entities
5589 reply = await self.rpc(msg)
5590 return reply
5591
5592
5593
5594 @ReturnMapping(ActionResults)
5595 async def Cancel(self, entities):
5596 '''
5597 entities : typing.Sequence[~Entity]
5598 Returns -> typing.Sequence[~ActionResult]
5599 '''
5600 # map input types to rpc msg
5601 params = dict()
5602 msg = dict(Type='Action', Request='Cancel', Version=1, Params=params)
5603 params['Entities'] = entities
5604 reply = await self.rpc(msg)
5605 return reply
5606
5607
5608
5609 @ReturnMapping(ActionResults)
5610 async def Enqueue(self, actions):
5611 '''
5612 actions : typing.Sequence[~Action]
5613 Returns -> typing.Sequence[~ActionResult]
5614 '''
5615 # map input types to rpc msg
5616 params = dict()
5617 msg = dict(Type='Action', Request='Enqueue', Version=1, Params=params)
5618 params['actions'] = actions
5619 reply = await self.rpc(msg)
5620 return reply
5621
5622
5623
5624 @ReturnMapping(FindTagsResults)
5625 async def FindActionTagsByPrefix(self, prefixes):
5626 '''
5627 prefixes : typing.Sequence[str]
5628 Returns -> typing.Sequence[~Entity]
5629 '''
5630 # map input types to rpc msg
5631 params = dict()
5632 msg = dict(Type='Action', Request='FindActionTagsByPrefix', Version=1, Params=params)
5633 params['prefixes'] = prefixes
5634 reply = await self.rpc(msg)
5635 return reply
5636
5637
5638
5639 @ReturnMapping(ActionsByNames)
5640 async def FindActionsByNames(self, names):
5641 '''
5642 names : typing.Sequence[str]
5643 Returns -> typing.Sequence[~ActionsByName]
5644 '''
5645 # map input types to rpc msg
5646 params = dict()
5647 msg = dict(Type='Action', Request='FindActionsByNames', Version=1, Params=params)
5648 params['names'] = names
5649 reply = await self.rpc(msg)
5650 return reply
5651
5652
5653
5654 @ReturnMapping(ActionsByReceivers)
5655 async def ListAll(self, entities):
5656 '''
5657 entities : typing.Sequence[~Entity]
5658 Returns -> typing.Sequence[~ActionsByReceiver]
5659 '''
5660 # map input types to rpc msg
5661 params = dict()
5662 msg = dict(Type='Action', Request='ListAll', Version=1, Params=params)
5663 params['Entities'] = entities
5664 reply = await self.rpc(msg)
5665 return reply
5666
5667
5668
5669 @ReturnMapping(ActionsByReceivers)
5670 async def ListCompleted(self, entities):
5671 '''
5672 entities : typing.Sequence[~Entity]
5673 Returns -> typing.Sequence[~ActionsByReceiver]
5674 '''
5675 # map input types to rpc msg
5676 params = dict()
5677 msg = dict(Type='Action', Request='ListCompleted', Version=1, Params=params)
5678 params['Entities'] = entities
5679 reply = await self.rpc(msg)
5680 return reply
5681
5682
5683
5684 @ReturnMapping(ActionsByReceivers)
5685 async def ListPending(self, entities):
5686 '''
5687 entities : typing.Sequence[~Entity]
5688 Returns -> typing.Sequence[~ActionsByReceiver]
5689 '''
5690 # map input types to rpc msg
5691 params = dict()
5692 msg = dict(Type='Action', Request='ListPending', Version=1, Params=params)
5693 params['Entities'] = entities
5694 reply = await self.rpc(msg)
5695 return reply
5696
5697
5698
5699 @ReturnMapping(ActionsByReceivers)
5700 async def ListRunning(self, entities):
5701 '''
5702 entities : typing.Sequence[~Entity]
5703 Returns -> typing.Sequence[~ActionsByReceiver]
5704 '''
5705 # map input types to rpc msg
5706 params = dict()
5707 msg = dict(Type='Action', Request='ListRunning', Version=1, Params=params)
5708 params['Entities'] = entities
5709 reply = await self.rpc(msg)
5710 return reply
5711
5712
5713
5714 @ReturnMapping(ActionResults)
5715 async def Run(self, commands, machines, services, timeout, units):
5716 '''
5717 commands : str
5718 machines : typing.Sequence[str]
5719 services : typing.Sequence[str]
5720 timeout : int
5721 units : typing.Sequence[str]
5722 Returns -> typing.Sequence[~ActionResult]
5723 '''
5724 # map input types to rpc msg
5725 params = dict()
5726 msg = dict(Type='Action', Request='Run', Version=1, Params=params)
5727 params['Commands'] = commands
5728 params['Machines'] = machines
5729 params['Services'] = services
5730 params['Timeout'] = timeout
5731 params['Units'] = units
5732 reply = await self.rpc(msg)
5733 return reply
5734
5735
5736
5737 @ReturnMapping(ActionResults)
5738 async def RunOnAllMachines(self, commands, machines, services, timeout, units):
5739 '''
5740 commands : str
5741 machines : typing.Sequence[str]
5742 services : typing.Sequence[str]
5743 timeout : int
5744 units : typing.Sequence[str]
5745 Returns -> typing.Sequence[~ActionResult]
5746 '''
5747 # map input types to rpc msg
5748 params = dict()
5749 msg = dict(Type='Action', Request='RunOnAllMachines', Version=1, Params=params)
5750 params['Commands'] = commands
5751 params['Machines'] = machines
5752 params['Services'] = services
5753 params['Timeout'] = timeout
5754 params['Units'] = units
5755 reply = await self.rpc(msg)
5756 return reply
5757
5758
5759
5760 @ReturnMapping(ServicesCharmActionsResults)
5761 async def ServicesCharmActions(self, entities):
5762 '''
5763 entities : typing.Sequence[~Entity]
5764 Returns -> typing.Sequence[~ServiceCharmActionsResult]
5765 '''
5766 # map input types to rpc msg
5767 params = dict()
5768 msg = dict(Type='Action', Request='ServicesCharmActions', Version=1, Params=params)
5769 params['Entities'] = entities
5770 reply = await self.rpc(msg)
5771 return reply
5772
5773
5774 class Addresser(Type):
5775 name = 'Addresser'
5776 version = 2
5777 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
5778 'properties': {'Error': {'$ref': '#/definitions/Error'},
5779 'Result': {'type': 'boolean'}},
5780 'required': ['Error', 'Result'],
5781 'type': 'object'},
5782 'EntitiesWatchResult': {'additionalProperties': False,
5783 'properties': {'Changes': {'items': {'type': 'string'},
5784 'type': 'array'},
5785 'EntityWatcherId': {'type': 'string'},
5786 'Error': {'$ref': '#/definitions/Error'}},
5787 'required': ['EntityWatcherId',
5788 'Changes',
5789 'Error'],
5790 'type': 'object'},
5791 'Error': {'additionalProperties': False,
5792 'properties': {'Code': {'type': 'string'},
5793 'Info': {'$ref': '#/definitions/ErrorInfo'},
5794 'Message': {'type': 'string'}},
5795 'required': ['Message', 'Code'],
5796 'type': 'object'},
5797 'ErrorInfo': {'additionalProperties': False,
5798 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5799 'MacaroonPath': {'type': 'string'}},
5800 'type': 'object'},
5801 'ErrorResult': {'additionalProperties': False,
5802 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5803 'required': ['Error'],
5804 'type': 'object'},
5805 'Macaroon': {'additionalProperties': False,
5806 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5807 'type': 'array'},
5808 'data': {'items': {'type': 'integer'},
5809 'type': 'array'},
5810 'id': {'$ref': '#/definitions/packet'},
5811 'location': {'$ref': '#/definitions/packet'},
5812 'sig': {'items': {'type': 'integer'},
5813 'type': 'array'}},
5814 'required': ['data',
5815 'location',
5816 'id',
5817 'caveats',
5818 'sig'],
5819 'type': 'object'},
5820 'caveat': {'additionalProperties': False,
5821 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5822 'location': {'$ref': '#/definitions/packet'},
5823 'verificationId': {'$ref': '#/definitions/packet'}},
5824 'required': ['location',
5825 'caveatId',
5826 'verificationId'],
5827 'type': 'object'},
5828 'packet': {'additionalProperties': False,
5829 'properties': {'headerLen': {'type': 'integer'},
5830 'start': {'type': 'integer'},
5831 'totalLen': {'type': 'integer'}},
5832 'required': ['start', 'totalLen', 'headerLen'],
5833 'type': 'object'}},
5834 'properties': {'CanDeallocateAddresses': {'properties': {'Result': {'$ref': '#/definitions/BoolResult'}},
5835 'type': 'object'},
5836 'CleanupIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
5837 'type': 'object'},
5838 'WatchIPAddresses': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
5839 'type': 'object'}},
5840 'type': 'object'}
5841
5842
5843 @ReturnMapping(BoolResult)
5844 async def CanDeallocateAddresses(self):
5845 '''
5846
5847 Returns -> typing.Union[_ForwardRef('Error'), bool]
5848 '''
5849 # map input types to rpc msg
5850 params = dict()
5851 msg = dict(Type='Addresser', Request='CanDeallocateAddresses', Version=2, Params=params)
5852
5853 reply = await self.rpc(msg)
5854 return reply
5855
5856
5857
5858 @ReturnMapping(ErrorResult)
5859 async def CleanupIPAddresses(self):
5860 '''
5861
5862 Returns -> Error
5863 '''
5864 # map input types to rpc msg
5865 params = dict()
5866 msg = dict(Type='Addresser', Request='CleanupIPAddresses', Version=2, Params=params)
5867
5868 reply = await self.rpc(msg)
5869 return reply
5870
5871
5872
5873 @ReturnMapping(EntitiesWatchResult)
5874 async def WatchIPAddresses(self):
5875 '''
5876
5877 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
5878 '''
5879 # map input types to rpc msg
5880 params = dict()
5881 msg = dict(Type='Addresser', Request='WatchIPAddresses', Version=2, Params=params)
5882
5883 reply = await self.rpc(msg)
5884 return reply
5885
5886
5887 class Agent(Type):
5888 name = 'Agent'
5889 version = 2
5890 schema = {'definitions': {'AgentGetEntitiesResult': {'additionalProperties': False,
5891 'properties': {'ContainerType': {'type': 'string'},
5892 'Error': {'$ref': '#/definitions/Error'},
5893 'Jobs': {'items': {'type': 'string'},
5894 'type': 'array'},
5895 'Life': {'type': 'string'}},
5896 'required': ['Life',
5897 'Jobs',
5898 'ContainerType',
5899 'Error'],
5900 'type': 'object'},
5901 'AgentGetEntitiesResults': {'additionalProperties': False,
5902 'properties': {'Entities': {'items': {'$ref': '#/definitions/AgentGetEntitiesResult'},
5903 'type': 'array'}},
5904 'required': ['Entities'],
5905 'type': 'object'},
5906 'Entities': {'additionalProperties': False,
5907 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
5908 'type': 'array'}},
5909 'required': ['Entities'],
5910 'type': 'object'},
5911 'Entity': {'additionalProperties': False,
5912 'properties': {'Tag': {'type': 'string'}},
5913 'required': ['Tag'],
5914 'type': 'object'},
5915 'EntityPassword': {'additionalProperties': False,
5916 'properties': {'Password': {'type': 'string'},
5917 'Tag': {'type': 'string'}},
5918 'required': ['Tag', 'Password'],
5919 'type': 'object'},
5920 'EntityPasswords': {'additionalProperties': False,
5921 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
5922 'type': 'array'}},
5923 'required': ['Changes'],
5924 'type': 'object'},
5925 'Error': {'additionalProperties': False,
5926 'properties': {'Code': {'type': 'string'},
5927 'Info': {'$ref': '#/definitions/ErrorInfo'},
5928 'Message': {'type': 'string'}},
5929 'required': ['Message', 'Code'],
5930 'type': 'object'},
5931 'ErrorInfo': {'additionalProperties': False,
5932 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
5933 'MacaroonPath': {'type': 'string'}},
5934 'type': 'object'},
5935 'ErrorResult': {'additionalProperties': False,
5936 'properties': {'Error': {'$ref': '#/definitions/Error'}},
5937 'required': ['Error'],
5938 'type': 'object'},
5939 'ErrorResults': {'additionalProperties': False,
5940 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
5941 'type': 'array'}},
5942 'required': ['Results'],
5943 'type': 'object'},
5944 'IsMasterResult': {'additionalProperties': False,
5945 'properties': {'Master': {'type': 'boolean'}},
5946 'required': ['Master'],
5947 'type': 'object'},
5948 'Macaroon': {'additionalProperties': False,
5949 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
5950 'type': 'array'},
5951 'data': {'items': {'type': 'integer'},
5952 'type': 'array'},
5953 'id': {'$ref': '#/definitions/packet'},
5954 'location': {'$ref': '#/definitions/packet'},
5955 'sig': {'items': {'type': 'integer'},
5956 'type': 'array'}},
5957 'required': ['data',
5958 'location',
5959 'id',
5960 'caveats',
5961 'sig'],
5962 'type': 'object'},
5963 'ModelConfigResult': {'additionalProperties': False,
5964 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
5965 'type': 'object'}},
5966 'type': 'object'}},
5967 'required': ['Config'],
5968 'type': 'object'},
5969 'NotifyWatchResult': {'additionalProperties': False,
5970 'properties': {'Error': {'$ref': '#/definitions/Error'},
5971 'NotifyWatcherId': {'type': 'string'}},
5972 'required': ['NotifyWatcherId', 'Error'],
5973 'type': 'object'},
5974 'StateServingInfo': {'additionalProperties': False,
5975 'properties': {'APIPort': {'type': 'integer'},
5976 'CAPrivateKey': {'type': 'string'},
5977 'Cert': {'type': 'string'},
5978 'PrivateKey': {'type': 'string'},
5979 'SharedSecret': {'type': 'string'},
5980 'StatePort': {'type': 'integer'},
5981 'SystemIdentity': {'type': 'string'}},
5982 'required': ['APIPort',
5983 'StatePort',
5984 'Cert',
5985 'PrivateKey',
5986 'CAPrivateKey',
5987 'SharedSecret',
5988 'SystemIdentity'],
5989 'type': 'object'},
5990 'caveat': {'additionalProperties': False,
5991 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
5992 'location': {'$ref': '#/definitions/packet'},
5993 'verificationId': {'$ref': '#/definitions/packet'}},
5994 'required': ['location',
5995 'caveatId',
5996 'verificationId'],
5997 'type': 'object'},
5998 'packet': {'additionalProperties': False,
5999 'properties': {'headerLen': {'type': 'integer'},
6000 'start': {'type': 'integer'},
6001 'totalLen': {'type': 'integer'}},
6002 'required': ['start', 'totalLen', 'headerLen'],
6003 'type': 'object'}},
6004 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6005 'Result': {'$ref': '#/definitions/ErrorResults'}},
6006 'type': 'object'},
6007 'GetEntities': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6008 'Result': {'$ref': '#/definitions/AgentGetEntitiesResults'}},
6009 'type': 'object'},
6010 'IsMaster': {'properties': {'Result': {'$ref': '#/definitions/IsMasterResult'}},
6011 'type': 'object'},
6012 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
6013 'type': 'object'},
6014 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
6015 'Result': {'$ref': '#/definitions/ErrorResults'}},
6016 'type': 'object'},
6017 'StateServingInfo': {'properties': {'Result': {'$ref': '#/definitions/StateServingInfo'}},
6018 'type': 'object'},
6019 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6020 'type': 'object'}},
6021 'type': 'object'}
6022
6023
6024 @ReturnMapping(ErrorResults)
6025 async def ClearReboot(self, entities):
6026 '''
6027 entities : typing.Sequence[~Entity]
6028 Returns -> typing.Sequence[~ErrorResult]
6029 '''
6030 # map input types to rpc msg
6031 params = dict()
6032 msg = dict(Type='Agent', Request='ClearReboot', Version=2, Params=params)
6033 params['Entities'] = entities
6034 reply = await self.rpc(msg)
6035 return reply
6036
6037
6038
6039 @ReturnMapping(AgentGetEntitiesResults)
6040 async def GetEntities(self, entities):
6041 '''
6042 entities : typing.Sequence[~Entity]
6043 Returns -> typing.Sequence[~AgentGetEntitiesResult]
6044 '''
6045 # map input types to rpc msg
6046 params = dict()
6047 msg = dict(Type='Agent', Request='GetEntities', Version=2, Params=params)
6048 params['Entities'] = entities
6049 reply = await self.rpc(msg)
6050 return reply
6051
6052
6053
6054 @ReturnMapping(IsMasterResult)
6055 async def IsMaster(self):
6056 '''
6057
6058 Returns -> bool
6059 '''
6060 # map input types to rpc msg
6061 params = dict()
6062 msg = dict(Type='Agent', Request='IsMaster', Version=2, Params=params)
6063
6064 reply = await self.rpc(msg)
6065 return reply
6066
6067
6068
6069 @ReturnMapping(ModelConfigResult)
6070 async def ModelConfig(self):
6071 '''
6072
6073 Returns -> typing.Mapping[str, typing.Any]
6074 '''
6075 # map input types to rpc msg
6076 params = dict()
6077 msg = dict(Type='Agent', Request='ModelConfig', Version=2, Params=params)
6078
6079 reply = await self.rpc(msg)
6080 return reply
6081
6082
6083
6084 @ReturnMapping(ErrorResults)
6085 async def SetPasswords(self, changes):
6086 '''
6087 changes : typing.Sequence[~EntityPassword]
6088 Returns -> typing.Sequence[~ErrorResult]
6089 '''
6090 # map input types to rpc msg
6091 params = dict()
6092 msg = dict(Type='Agent', Request='SetPasswords', Version=2, Params=params)
6093 params['Changes'] = changes
6094 reply = await self.rpc(msg)
6095 return reply
6096
6097
6098
6099 @ReturnMapping(StateServingInfo)
6100 async def StateServingInfo(self):
6101 '''
6102
6103 Returns -> typing.Union[int, str]
6104 '''
6105 # map input types to rpc msg
6106 params = dict()
6107 msg = dict(Type='Agent', Request='StateServingInfo', Version=2, Params=params)
6108
6109 reply = await self.rpc(msg)
6110 return reply
6111
6112
6113
6114 @ReturnMapping(NotifyWatchResult)
6115 async def WatchForModelConfigChanges(self):
6116 '''
6117
6118 Returns -> typing.Union[_ForwardRef('Error'), str]
6119 '''
6120 # map input types to rpc msg
6121 params = dict()
6122 msg = dict(Type='Agent', Request='WatchForModelConfigChanges', Version=2, Params=params)
6123
6124 reply = await self.rpc(msg)
6125 return reply
6126
6127
6128 class AgentTools(Type):
6129 name = 'AgentTools'
6130 version = 1
6131 schema = {'properties': {'UpdateToolsAvailable': {'type': 'object'}}, 'type': 'object'}
6132
6133
6134 @ReturnMapping(None)
6135 async def UpdateToolsAvailable(self):
6136 '''
6137
6138 Returns -> None
6139 '''
6140 # map input types to rpc msg
6141 params = dict()
6142 msg = dict(Type='AgentTools', Request='UpdateToolsAvailable', Version=1, Params=params)
6143
6144 reply = await self.rpc(msg)
6145 return reply
6146
6147
6148 class AllModelWatcher(Type):
6149 name = 'AllModelWatcher'
6150 version = 2
6151 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6152 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6153 'type': 'array'}},
6154 'required': ['Deltas'],
6155 'type': 'object'},
6156 'Delta': {'additionalProperties': False,
6157 'properties': {'Entity': {'additionalProperties': True,
6158 'type': 'object'},
6159 'Removed': {'type': 'boolean'}},
6160 'required': ['Removed', 'Entity'],
6161 'type': 'object'}},
6162 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6163 'type': 'object'},
6164 'Stop': {'type': 'object'}},
6165 'type': 'object'}
6166
6167
6168 @ReturnMapping(AllWatcherNextResults)
6169 async def Next(self):
6170 '''
6171
6172 Returns -> typing.Sequence[~Delta]
6173 '''
6174 # map input types to rpc msg
6175 params = dict()
6176 msg = dict(Type='AllModelWatcher', Request='Next', Version=2, Params=params)
6177
6178 reply = await self.rpc(msg)
6179 return reply
6180
6181
6182
6183 @ReturnMapping(None)
6184 async def Stop(self):
6185 '''
6186
6187 Returns -> None
6188 '''
6189 # map input types to rpc msg
6190 params = dict()
6191 msg = dict(Type='AllModelWatcher', Request='Stop', Version=2, Params=params)
6192
6193 reply = await self.rpc(msg)
6194 return reply
6195
6196
6197 class AllWatcher(Type):
6198 name = 'AllWatcher'
6199 version = 1
6200 schema = {'definitions': {'AllWatcherNextResults': {'additionalProperties': False,
6201 'properties': {'Deltas': {'items': {'$ref': '#/definitions/Delta'},
6202 'type': 'array'}},
6203 'required': ['Deltas'],
6204 'type': 'object'},
6205 'Delta': {'additionalProperties': False,
6206 'properties': {'Entity': {'additionalProperties': True,
6207 'type': 'object'},
6208 'Removed': {'type': 'boolean'}},
6209 'required': ['Removed', 'Entity'],
6210 'type': 'object'}},
6211 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherNextResults'}},
6212 'type': 'object'},
6213 'Stop': {'type': 'object'}},
6214 'type': 'object'}
6215
6216
6217 @ReturnMapping(AllWatcherNextResults)
6218 async def Next(self):
6219 '''
6220
6221 Returns -> typing.Sequence[~Delta]
6222 '''
6223 # map input types to rpc msg
6224 params = dict()
6225 msg = dict(Type='AllWatcher', Request='Next', Version=1, Params=params)
6226
6227 reply = await self.rpc(msg)
6228 return reply
6229
6230
6231
6232 @ReturnMapping(None)
6233 async def Stop(self):
6234 '''
6235
6236 Returns -> None
6237 '''
6238 # map input types to rpc msg
6239 params = dict()
6240 msg = dict(Type='AllWatcher', Request='Stop', Version=1, Params=params)
6241
6242 reply = await self.rpc(msg)
6243 return reply
6244
6245
6246 class Annotations(Type):
6247 name = 'Annotations'
6248 version = 2
6249 schema = {'definitions': {'AnnotationsGetResult': {'additionalProperties': False,
6250 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6251 'type': 'object'},
6252 'EntityTag': {'type': 'string'},
6253 'Error': {'$ref': '#/definitions/ErrorResult'}},
6254 'required': ['EntityTag',
6255 'Annotations',
6256 'Error'],
6257 'type': 'object'},
6258 'AnnotationsGetResults': {'additionalProperties': False,
6259 'properties': {'Results': {'items': {'$ref': '#/definitions/AnnotationsGetResult'},
6260 'type': 'array'}},
6261 'required': ['Results'],
6262 'type': 'object'},
6263 'AnnotationsSet': {'additionalProperties': False,
6264 'properties': {'Annotations': {'items': {'$ref': '#/definitions/EntityAnnotations'},
6265 'type': 'array'}},
6266 'required': ['Annotations'],
6267 'type': 'object'},
6268 'Entities': {'additionalProperties': False,
6269 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
6270 'type': 'array'}},
6271 'required': ['Entities'],
6272 'type': 'object'},
6273 'Entity': {'additionalProperties': False,
6274 'properties': {'Tag': {'type': 'string'}},
6275 'required': ['Tag'],
6276 'type': 'object'},
6277 'EntityAnnotations': {'additionalProperties': False,
6278 'properties': {'Annotations': {'patternProperties': {'.*': {'type': 'string'}},
6279 'type': 'object'},
6280 'EntityTag': {'type': 'string'}},
6281 'required': ['EntityTag', 'Annotations'],
6282 'type': 'object'},
6283 'Error': {'additionalProperties': False,
6284 'properties': {'Code': {'type': 'string'},
6285 'Info': {'$ref': '#/definitions/ErrorInfo'},
6286 'Message': {'type': 'string'}},
6287 'required': ['Message', 'Code'],
6288 'type': 'object'},
6289 'ErrorInfo': {'additionalProperties': False,
6290 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6291 'MacaroonPath': {'type': 'string'}},
6292 'type': 'object'},
6293 'ErrorResult': {'additionalProperties': False,
6294 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6295 'required': ['Error'],
6296 'type': 'object'},
6297 'ErrorResults': {'additionalProperties': False,
6298 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
6299 'type': 'array'}},
6300 'required': ['Results'],
6301 'type': 'object'},
6302 'Macaroon': {'additionalProperties': False,
6303 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6304 'type': 'array'},
6305 'data': {'items': {'type': 'integer'},
6306 'type': 'array'},
6307 'id': {'$ref': '#/definitions/packet'},
6308 'location': {'$ref': '#/definitions/packet'},
6309 'sig': {'items': {'type': 'integer'},
6310 'type': 'array'}},
6311 'required': ['data',
6312 'location',
6313 'id',
6314 'caveats',
6315 'sig'],
6316 'type': 'object'},
6317 'caveat': {'additionalProperties': False,
6318 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6319 'location': {'$ref': '#/definitions/packet'},
6320 'verificationId': {'$ref': '#/definitions/packet'}},
6321 'required': ['location',
6322 'caveatId',
6323 'verificationId'],
6324 'type': 'object'},
6325 'packet': {'additionalProperties': False,
6326 'properties': {'headerLen': {'type': 'integer'},
6327 'start': {'type': 'integer'},
6328 'totalLen': {'type': 'integer'}},
6329 'required': ['start', 'totalLen', 'headerLen'],
6330 'type': 'object'}},
6331 'properties': {'Get': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
6332 'Result': {'$ref': '#/definitions/AnnotationsGetResults'}},
6333 'type': 'object'},
6334 'Set': {'properties': {'Params': {'$ref': '#/definitions/AnnotationsSet'},
6335 'Result': {'$ref': '#/definitions/ErrorResults'}},
6336 'type': 'object'}},
6337 'type': 'object'}
6338
6339
6340 @ReturnMapping(AnnotationsGetResults)
6341 async def Get(self, entities):
6342 '''
6343 entities : typing.Sequence[~Entity]
6344 Returns -> typing.Sequence[~AnnotationsGetResult]
6345 '''
6346 # map input types to rpc msg
6347 params = dict()
6348 msg = dict(Type='Annotations', Request='Get', Version=2, Params=params)
6349 params['Entities'] = entities
6350 reply = await self.rpc(msg)
6351 return reply
6352
6353
6354
6355 @ReturnMapping(ErrorResults)
6356 async def Set(self, annotations):
6357 '''
6358 annotations : typing.Sequence[~EntityAnnotations]
6359 Returns -> typing.Sequence[~ErrorResult]
6360 '''
6361 # map input types to rpc msg
6362 params = dict()
6363 msg = dict(Type='Annotations', Request='Set', Version=2, Params=params)
6364 params['Annotations'] = annotations
6365 reply = await self.rpc(msg)
6366 return reply
6367
6368
6369 class Backups(Type):
6370 name = 'Backups'
6371 version = 1
6372 schema = {'definitions': {'BackupsCreateArgs': {'additionalProperties': False,
6373 'properties': {'Notes': {'type': 'string'}},
6374 'required': ['Notes'],
6375 'type': 'object'},
6376 'BackupsInfoArgs': {'additionalProperties': False,
6377 'properties': {'ID': {'type': 'string'}},
6378 'required': ['ID'],
6379 'type': 'object'},
6380 'BackupsListArgs': {'additionalProperties': False,
6381 'type': 'object'},
6382 'BackupsListResult': {'additionalProperties': False,
6383 'properties': {'List': {'items': {'$ref': '#/definitions/BackupsMetadataResult'},
6384 'type': 'array'}},
6385 'required': ['List'],
6386 'type': 'object'},
6387 'BackupsMetadataResult': {'additionalProperties': False,
6388 'properties': {'CACert': {'type': 'string'},
6389 'CAPrivateKey': {'type': 'string'},
6390 'Checksum': {'type': 'string'},
6391 'ChecksumFormat': {'type': 'string'},
6392 'Finished': {'format': 'date-time',
6393 'type': 'string'},
6394 'Hostname': {'type': 'string'},
6395 'ID': {'type': 'string'},
6396 'Machine': {'type': 'string'},
6397 'Model': {'type': 'string'},
6398 'Notes': {'type': 'string'},
6399 'Size': {'type': 'integer'},
6400 'Started': {'format': 'date-time',
6401 'type': 'string'},
6402 'Stored': {'format': 'date-time',
6403 'type': 'string'},
6404 'Version': {'$ref': '#/definitions/Number'}},
6405 'required': ['ID',
6406 'Checksum',
6407 'ChecksumFormat',
6408 'Size',
6409 'Stored',
6410 'Started',
6411 'Finished',
6412 'Notes',
6413 'Model',
6414 'Machine',
6415 'Hostname',
6416 'Version',
6417 'CACert',
6418 'CAPrivateKey'],
6419 'type': 'object'},
6420 'BackupsRemoveArgs': {'additionalProperties': False,
6421 'properties': {'ID': {'type': 'string'}},
6422 'required': ['ID'],
6423 'type': 'object'},
6424 'Number': {'additionalProperties': False,
6425 'properties': {'Build': {'type': 'integer'},
6426 'Major': {'type': 'integer'},
6427 'Minor': {'type': 'integer'},
6428 'Patch': {'type': 'integer'},
6429 'Tag': {'type': 'string'}},
6430 'required': ['Major',
6431 'Minor',
6432 'Tag',
6433 'Patch',
6434 'Build'],
6435 'type': 'object'},
6436 'RestoreArgs': {'additionalProperties': False,
6437 'properties': {'BackupId': {'type': 'string'}},
6438 'required': ['BackupId'],
6439 'type': 'object'}},
6440 'properties': {'Create': {'properties': {'Params': {'$ref': '#/definitions/BackupsCreateArgs'},
6441 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
6442 'type': 'object'},
6443 'FinishRestore': {'type': 'object'},
6444 'Info': {'properties': {'Params': {'$ref': '#/definitions/BackupsInfoArgs'},
6445 'Result': {'$ref': '#/definitions/BackupsMetadataResult'}},
6446 'type': 'object'},
6447 'List': {'properties': {'Params': {'$ref': '#/definitions/BackupsListArgs'},
6448 'Result': {'$ref': '#/definitions/BackupsListResult'}},
6449 'type': 'object'},
6450 'PrepareRestore': {'type': 'object'},
6451 'Remove': {'properties': {'Params': {'$ref': '#/definitions/BackupsRemoveArgs'}},
6452 'type': 'object'},
6453 'Restore': {'properties': {'Params': {'$ref': '#/definitions/RestoreArgs'}},
6454 'type': 'object'}},
6455 'type': 'object'}
6456
6457
6458 @ReturnMapping(BackupsMetadataResult)
6459 async def Create(self, notes):
6460 '''
6461 notes : str
6462 Returns -> typing.Union[str, int, _ForwardRef('Number')]
6463 '''
6464 # map input types to rpc msg
6465 params = dict()
6466 msg = dict(Type='Backups', Request='Create', Version=1, Params=params)
6467 params['Notes'] = notes
6468 reply = await self.rpc(msg)
6469 return reply
6470
6471
6472
6473 @ReturnMapping(None)
6474 async def FinishRestore(self):
6475 '''
6476
6477 Returns -> None
6478 '''
6479 # map input types to rpc msg
6480 params = dict()
6481 msg = dict(Type='Backups', Request='FinishRestore', Version=1, Params=params)
6482
6483 reply = await self.rpc(msg)
6484 return reply
6485
6486
6487
6488 @ReturnMapping(BackupsMetadataResult)
6489 async def Info(self, id_):
6490 '''
6491 id_ : str
6492 Returns -> typing.Union[str, int, _ForwardRef('Number')]
6493 '''
6494 # map input types to rpc msg
6495 params = dict()
6496 msg = dict(Type='Backups', Request='Info', Version=1, Params=params)
6497 params['ID'] = id_
6498 reply = await self.rpc(msg)
6499 return reply
6500
6501
6502
6503 @ReturnMapping(BackupsListResult)
6504 async def List(self):
6505 '''
6506
6507 Returns -> typing.Sequence[~BackupsMetadataResult]
6508 '''
6509 # map input types to rpc msg
6510 params = dict()
6511 msg = dict(Type='Backups', Request='List', Version=1, Params=params)
6512
6513 reply = await self.rpc(msg)
6514 return reply
6515
6516
6517
6518 @ReturnMapping(None)
6519 async def PrepareRestore(self):
6520 '''
6521
6522 Returns -> None
6523 '''
6524 # map input types to rpc msg
6525 params = dict()
6526 msg = dict(Type='Backups', Request='PrepareRestore', Version=1, Params=params)
6527
6528 reply = await self.rpc(msg)
6529 return reply
6530
6531
6532
6533 @ReturnMapping(None)
6534 async def Remove(self, id_):
6535 '''
6536 id_ : str
6537 Returns -> None
6538 '''
6539 # map input types to rpc msg
6540 params = dict()
6541 msg = dict(Type='Backups', Request='Remove', Version=1, Params=params)
6542 params['ID'] = id_
6543 reply = await self.rpc(msg)
6544 return reply
6545
6546
6547
6548 @ReturnMapping(None)
6549 async def Restore(self, backupid):
6550 '''
6551 backupid : str
6552 Returns -> None
6553 '''
6554 # map input types to rpc msg
6555 params = dict()
6556 msg = dict(Type='Backups', Request='Restore', Version=1, Params=params)
6557 params['BackupId'] = backupid
6558 reply = await self.rpc(msg)
6559 return reply
6560
6561
6562 class Block(Type):
6563 name = 'Block'
6564 version = 2
6565 schema = {'definitions': {'Block': {'additionalProperties': False,
6566 'properties': {'id': {'type': 'string'},
6567 'message': {'type': 'string'},
6568 'tag': {'type': 'string'},
6569 'type': {'type': 'string'}},
6570 'required': ['id', 'tag', 'type'],
6571 'type': 'object'},
6572 'BlockResult': {'additionalProperties': False,
6573 'properties': {'error': {'$ref': '#/definitions/Error'},
6574 'result': {'$ref': '#/definitions/Block'}},
6575 'required': ['result'],
6576 'type': 'object'},
6577 'BlockResults': {'additionalProperties': False,
6578 'properties': {'results': {'items': {'$ref': '#/definitions/BlockResult'},
6579 'type': 'array'}},
6580 'type': 'object'},
6581 'BlockSwitchParams': {'additionalProperties': False,
6582 'properties': {'message': {'type': 'string'},
6583 'type': {'type': 'string'}},
6584 'required': ['type'],
6585 'type': 'object'},
6586 'Error': {'additionalProperties': False,
6587 'properties': {'Code': {'type': 'string'},
6588 'Info': {'$ref': '#/definitions/ErrorInfo'},
6589 'Message': {'type': 'string'}},
6590 'required': ['Message', 'Code'],
6591 'type': 'object'},
6592 'ErrorInfo': {'additionalProperties': False,
6593 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6594 'MacaroonPath': {'type': 'string'}},
6595 'type': 'object'},
6596 'ErrorResult': {'additionalProperties': False,
6597 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6598 'required': ['Error'],
6599 'type': 'object'},
6600 'Macaroon': {'additionalProperties': False,
6601 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6602 'type': 'array'},
6603 'data': {'items': {'type': 'integer'},
6604 'type': 'array'},
6605 'id': {'$ref': '#/definitions/packet'},
6606 'location': {'$ref': '#/definitions/packet'},
6607 'sig': {'items': {'type': 'integer'},
6608 'type': 'array'}},
6609 'required': ['data',
6610 'location',
6611 'id',
6612 'caveats',
6613 'sig'],
6614 'type': 'object'},
6615 'caveat': {'additionalProperties': False,
6616 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6617 'location': {'$ref': '#/definitions/packet'},
6618 'verificationId': {'$ref': '#/definitions/packet'}},
6619 'required': ['location',
6620 'caveatId',
6621 'verificationId'],
6622 'type': 'object'},
6623 'packet': {'additionalProperties': False,
6624 'properties': {'headerLen': {'type': 'integer'},
6625 'start': {'type': 'integer'},
6626 'totalLen': {'type': 'integer'}},
6627 'required': ['start', 'totalLen', 'headerLen'],
6628 'type': 'object'}},
6629 'properties': {'List': {'properties': {'Result': {'$ref': '#/definitions/BlockResults'}},
6630 'type': 'object'},
6631 'SwitchBlockOff': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
6632 'Result': {'$ref': '#/definitions/ErrorResult'}},
6633 'type': 'object'},
6634 'SwitchBlockOn': {'properties': {'Params': {'$ref': '#/definitions/BlockSwitchParams'},
6635 'Result': {'$ref': '#/definitions/ErrorResult'}},
6636 'type': 'object'}},
6637 'type': 'object'}
6638
6639
6640 @ReturnMapping(BlockResults)
6641 async def List(self):
6642 '''
6643
6644 Returns -> typing.Sequence[~BlockResult]
6645 '''
6646 # map input types to rpc msg
6647 params = dict()
6648 msg = dict(Type='Block', Request='List', Version=2, Params=params)
6649
6650 reply = await self.rpc(msg)
6651 return reply
6652
6653
6654
6655 @ReturnMapping(ErrorResult)
6656 async def SwitchBlockOff(self, message, type_):
6657 '''
6658 message : str
6659 type_ : str
6660 Returns -> Error
6661 '''
6662 # map input types to rpc msg
6663 params = dict()
6664 msg = dict(Type='Block', Request='SwitchBlockOff', Version=2, Params=params)
6665 params['message'] = message
6666 params['type'] = type_
6667 reply = await self.rpc(msg)
6668 return reply
6669
6670
6671
6672 @ReturnMapping(ErrorResult)
6673 async def SwitchBlockOn(self, message, type_):
6674 '''
6675 message : str
6676 type_ : str
6677 Returns -> Error
6678 '''
6679 # map input types to rpc msg
6680 params = dict()
6681 msg = dict(Type='Block', Request='SwitchBlockOn', Version=2, Params=params)
6682 params['message'] = message
6683 params['type'] = type_
6684 reply = await self.rpc(msg)
6685 return reply
6686
6687
6688 class CharmRevisionUpdater(Type):
6689 name = 'CharmRevisionUpdater'
6690 version = 1
6691 schema = {'definitions': {'Error': {'additionalProperties': False,
6692 'properties': {'Code': {'type': 'string'},
6693 'Info': {'$ref': '#/definitions/ErrorInfo'},
6694 'Message': {'type': 'string'}},
6695 'required': ['Message', 'Code'],
6696 'type': 'object'},
6697 'ErrorInfo': {'additionalProperties': False,
6698 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6699 'MacaroonPath': {'type': 'string'}},
6700 'type': 'object'},
6701 'ErrorResult': {'additionalProperties': False,
6702 'properties': {'Error': {'$ref': '#/definitions/Error'}},
6703 'required': ['Error'],
6704 'type': 'object'},
6705 'Macaroon': {'additionalProperties': False,
6706 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6707 'type': 'array'},
6708 'data': {'items': {'type': 'integer'},
6709 'type': 'array'},
6710 'id': {'$ref': '#/definitions/packet'},
6711 'location': {'$ref': '#/definitions/packet'},
6712 'sig': {'items': {'type': 'integer'},
6713 'type': 'array'}},
6714 'required': ['data',
6715 'location',
6716 'id',
6717 'caveats',
6718 'sig'],
6719 'type': 'object'},
6720 'caveat': {'additionalProperties': False,
6721 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6722 'location': {'$ref': '#/definitions/packet'},
6723 'verificationId': {'$ref': '#/definitions/packet'}},
6724 'required': ['location',
6725 'caveatId',
6726 'verificationId'],
6727 'type': 'object'},
6728 'packet': {'additionalProperties': False,
6729 'properties': {'headerLen': {'type': 'integer'},
6730 'start': {'type': 'integer'},
6731 'totalLen': {'type': 'integer'}},
6732 'required': ['start', 'totalLen', 'headerLen'],
6733 'type': 'object'}},
6734 'properties': {'UpdateLatestRevisions': {'properties': {'Result': {'$ref': '#/definitions/ErrorResult'}},
6735 'type': 'object'}},
6736 'type': 'object'}
6737
6738
6739 @ReturnMapping(ErrorResult)
6740 async def UpdateLatestRevisions(self):
6741 '''
6742
6743 Returns -> Error
6744 '''
6745 # map input types to rpc msg
6746 params = dict()
6747 msg = dict(Type='CharmRevisionUpdater', Request='UpdateLatestRevisions', Version=1, Params=params)
6748
6749 reply = await self.rpc(msg)
6750 return reply
6751
6752
6753 class Charms(Type):
6754 name = 'Charms'
6755 version = 2
6756 schema = {'definitions': {'CharmInfo': {'additionalProperties': False,
6757 'properties': {'CharmURL': {'type': 'string'}},
6758 'required': ['CharmURL'],
6759 'type': 'object'},
6760 'CharmsList': {'additionalProperties': False,
6761 'properties': {'Names': {'items': {'type': 'string'},
6762 'type': 'array'}},
6763 'required': ['Names'],
6764 'type': 'object'},
6765 'CharmsListResult': {'additionalProperties': False,
6766 'properties': {'CharmURLs': {'items': {'type': 'string'},
6767 'type': 'array'}},
6768 'required': ['CharmURLs'],
6769 'type': 'object'},
6770 'IsMeteredResult': {'additionalProperties': False,
6771 'properties': {'Metered': {'type': 'boolean'}},
6772 'required': ['Metered'],
6773 'type': 'object'}},
6774 'properties': {'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
6775 'Result': {'$ref': '#/definitions/CharmInfo'}},
6776 'type': 'object'},
6777 'IsMetered': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
6778 'Result': {'$ref': '#/definitions/IsMeteredResult'}},
6779 'type': 'object'},
6780 'List': {'properties': {'Params': {'$ref': '#/definitions/CharmsList'},
6781 'Result': {'$ref': '#/definitions/CharmsListResult'}},
6782 'type': 'object'}},
6783 'type': 'object'}
6784
6785
6786 @ReturnMapping(CharmInfo)
6787 async def CharmInfo(self, charmurl):
6788 '''
6789 charmurl : str
6790 Returns -> str
6791 '''
6792 # map input types to rpc msg
6793 params = dict()
6794 msg = dict(Type='Charms', Request='CharmInfo', Version=2, Params=params)
6795 params['CharmURL'] = charmurl
6796 reply = await self.rpc(msg)
6797 return reply
6798
6799
6800
6801 @ReturnMapping(IsMeteredResult)
6802 async def IsMetered(self, charmurl):
6803 '''
6804 charmurl : str
6805 Returns -> bool
6806 '''
6807 # map input types to rpc msg
6808 params = dict()
6809 msg = dict(Type='Charms', Request='IsMetered', Version=2, Params=params)
6810 params['CharmURL'] = charmurl
6811 reply = await self.rpc(msg)
6812 return reply
6813
6814
6815
6816 @ReturnMapping(CharmsListResult)
6817 async def List(self, names):
6818 '''
6819 names : typing.Sequence[str]
6820 Returns -> typing.Sequence[str]
6821 '''
6822 # map input types to rpc msg
6823 params = dict()
6824 msg = dict(Type='Charms', Request='List', Version=2, Params=params)
6825 params['Names'] = names
6826 reply = await self.rpc(msg)
6827 return reply
6828
6829
6830 class Cleaner(Type):
6831 name = 'Cleaner'
6832 version = 2
6833 schema = {'definitions': {'Error': {'additionalProperties': False,
6834 'properties': {'Code': {'type': 'string'},
6835 'Info': {'$ref': '#/definitions/ErrorInfo'},
6836 'Message': {'type': 'string'}},
6837 'required': ['Message', 'Code'],
6838 'type': 'object'},
6839 'ErrorInfo': {'additionalProperties': False,
6840 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
6841 'MacaroonPath': {'type': 'string'}},
6842 'type': 'object'},
6843 'Macaroon': {'additionalProperties': False,
6844 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
6845 'type': 'array'},
6846 'data': {'items': {'type': 'integer'},
6847 'type': 'array'},
6848 'id': {'$ref': '#/definitions/packet'},
6849 'location': {'$ref': '#/definitions/packet'},
6850 'sig': {'items': {'type': 'integer'},
6851 'type': 'array'}},
6852 'required': ['data',
6853 'location',
6854 'id',
6855 'caveats',
6856 'sig'],
6857 'type': 'object'},
6858 'NotifyWatchResult': {'additionalProperties': False,
6859 'properties': {'Error': {'$ref': '#/definitions/Error'},
6860 'NotifyWatcherId': {'type': 'string'}},
6861 'required': ['NotifyWatcherId', 'Error'],
6862 'type': 'object'},
6863 'caveat': {'additionalProperties': False,
6864 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
6865 'location': {'$ref': '#/definitions/packet'},
6866 'verificationId': {'$ref': '#/definitions/packet'}},
6867 'required': ['location',
6868 'caveatId',
6869 'verificationId'],
6870 'type': 'object'},
6871 'packet': {'additionalProperties': False,
6872 'properties': {'headerLen': {'type': 'integer'},
6873 'start': {'type': 'integer'},
6874 'totalLen': {'type': 'integer'}},
6875 'required': ['start', 'totalLen', 'headerLen'],
6876 'type': 'object'}},
6877 'properties': {'Cleanup': {'type': 'object'},
6878 'WatchCleanups': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
6879 'type': 'object'}},
6880 'type': 'object'}
6881
6882
6883 @ReturnMapping(None)
6884 async def Cleanup(self):
6885 '''
6886
6887 Returns -> None
6888 '''
6889 # map input types to rpc msg
6890 params = dict()
6891 msg = dict(Type='Cleaner', Request='Cleanup', Version=2, Params=params)
6892
6893 reply = await self.rpc(msg)
6894 return reply
6895
6896
6897
6898 @ReturnMapping(NotifyWatchResult)
6899 async def WatchCleanups(self):
6900 '''
6901
6902 Returns -> typing.Union[_ForwardRef('Error'), str]
6903 '''
6904 # map input types to rpc msg
6905 params = dict()
6906 msg = dict(Type='Cleaner', Request='WatchCleanups', Version=2, Params=params)
6907
6908 reply = await self.rpc(msg)
6909 return reply
6910
6911
6912 class Client(Type):
6913 name = 'Client'
6914 version = 1
6915 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
6916 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
6917 'type': 'array'},
6918 'type': 'array'}},
6919 'required': ['Servers'],
6920 'type': 'object'},
6921 'AddCharm': {'additionalProperties': False,
6922 'properties': {'Channel': {'type': 'string'},
6923 'URL': {'type': 'string'}},
6924 'required': ['URL', 'Channel'],
6925 'type': 'object'},
6926 'AddCharmWithAuthorization': {'additionalProperties': False,
6927 'properties': {'Channel': {'type': 'string'},
6928 'CharmStoreMacaroon': {'$ref': '#/definitions/Macaroon'},
6929 'URL': {'type': 'string'}},
6930 'required': ['URL',
6931 'Channel',
6932 'CharmStoreMacaroon'],
6933 'type': 'object'},
6934 'AddMachineParams': {'additionalProperties': False,
6935 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
6936 'type': 'array'},
6937 'Constraints': {'$ref': '#/definitions/Value'},
6938 'ContainerType': {'type': 'string'},
6939 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
6940 'type': 'array'},
6941 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
6942 'InstanceId': {'type': 'string'},
6943 'Jobs': {'items': {'type': 'string'},
6944 'type': 'array'},
6945 'Nonce': {'type': 'string'},
6946 'ParentId': {'type': 'string'},
6947 'Placement': {'$ref': '#/definitions/Placement'},
6948 'Series': {'type': 'string'}},
6949 'required': ['Series',
6950 'Constraints',
6951 'Jobs',
6952 'Disks',
6953 'Placement',
6954 'ParentId',
6955 'ContainerType',
6956 'InstanceId',
6957 'Nonce',
6958 'HardwareCharacteristics',
6959 'Addrs'],
6960 'type': 'object'},
6961 'AddMachines': {'additionalProperties': False,
6962 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
6963 'type': 'array'}},
6964 'required': ['MachineParams'],
6965 'type': 'object'},
6966 'AddMachinesResult': {'additionalProperties': False,
6967 'properties': {'Error': {'$ref': '#/definitions/Error'},
6968 'Machine': {'type': 'string'}},
6969 'required': ['Machine', 'Error'],
6970 'type': 'object'},
6971 'AddMachinesResults': {'additionalProperties': False,
6972 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
6973 'type': 'array'}},
6974 'required': ['Machines'],
6975 'type': 'object'},
6976 'Address': {'additionalProperties': False,
6977 'properties': {'Scope': {'type': 'string'},
6978 'SpaceName': {'type': 'string'},
6979 'Type': {'type': 'string'},
6980 'Value': {'type': 'string'}},
6981 'required': ['Value', 'Type', 'Scope'],
6982 'type': 'object'},
6983 'AgentVersionResult': {'additionalProperties': False,
6984 'properties': {'Version': {'$ref': '#/definitions/Number'}},
6985 'required': ['Version'],
6986 'type': 'object'},
6987 'AllWatcherId': {'additionalProperties': False,
6988 'properties': {'AllWatcherId': {'type': 'string'}},
6989 'required': ['AllWatcherId'],
6990 'type': 'object'},
6991 'Binary': {'additionalProperties': False,
6992 'properties': {'Arch': {'type': 'string'},
6993 'Number': {'$ref': '#/definitions/Number'},
6994 'Series': {'type': 'string'}},
6995 'required': ['Number', 'Series', 'Arch'],
6996 'type': 'object'},
6997 'BundleChangesChange': {'additionalProperties': False,
6998 'properties': {'args': {'items': {'additionalProperties': True,
6999 'type': 'object'},
7000 'type': 'array'},
7001 'id': {'type': 'string'},
7002 'method': {'type': 'string'},
7003 'requires': {'items': {'type': 'string'},
7004 'type': 'array'}},
7005 'required': ['id',
7006 'method',
7007 'args',
7008 'requires'],
7009 'type': 'object'},
7010 'CharmInfo': {'additionalProperties': False,
7011 'properties': {'CharmURL': {'type': 'string'}},
7012 'required': ['CharmURL'],
7013 'type': 'object'},
7014 'Constraints': {'additionalProperties': False,
7015 'properties': {'Count': {'type': 'integer'},
7016 'Pool': {'type': 'string'},
7017 'Size': {'type': 'integer'}},
7018 'required': ['Pool', 'Size', 'Count'],
7019 'type': 'object'},
7020 'DestroyMachines': {'additionalProperties': False,
7021 'properties': {'Force': {'type': 'boolean'},
7022 'MachineNames': {'items': {'type': 'string'},
7023 'type': 'array'}},
7024 'required': ['MachineNames', 'Force'],
7025 'type': 'object'},
7026 'DetailedStatus': {'additionalProperties': False,
7027 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7028 'type': 'object'}},
7029 'type': 'object'},
7030 'Err': {'additionalProperties': True,
7031 'type': 'object'},
7032 'Info': {'type': 'string'},
7033 'Kind': {'type': 'string'},
7034 'Life': {'type': 'string'},
7035 'Since': {'format': 'date-time',
7036 'type': 'string'},
7037 'Status': {'type': 'string'},
7038 'Version': {'type': 'string'}},
7039 'required': ['Status',
7040 'Info',
7041 'Data',
7042 'Since',
7043 'Kind',
7044 'Version',
7045 'Life',
7046 'Err'],
7047 'type': 'object'},
7048 'EndpointStatus': {'additionalProperties': False,
7049 'properties': {'Name': {'type': 'string'},
7050 'Role': {'type': 'string'},
7051 'ServiceName': {'type': 'string'},
7052 'Subordinate': {'type': 'boolean'}},
7053 'required': ['ServiceName',
7054 'Name',
7055 'Role',
7056 'Subordinate'],
7057 'type': 'object'},
7058 'Entities': {'additionalProperties': False,
7059 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
7060 'type': 'array'}},
7061 'required': ['Entities'],
7062 'type': 'object'},
7063 'Entity': {'additionalProperties': False,
7064 'properties': {'Tag': {'type': 'string'}},
7065 'required': ['Tag'],
7066 'type': 'object'},
7067 'EntityStatus': {'additionalProperties': False,
7068 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
7069 'type': 'object'}},
7070 'type': 'object'},
7071 'Info': {'type': 'string'},
7072 'Since': {'format': 'date-time',
7073 'type': 'string'},
7074 'Status': {'type': 'string'}},
7075 'required': ['Status',
7076 'Info',
7077 'Data',
7078 'Since'],
7079 'type': 'object'},
7080 'Error': {'additionalProperties': False,
7081 'properties': {'Code': {'type': 'string'},
7082 'Info': {'$ref': '#/definitions/ErrorInfo'},
7083 'Message': {'type': 'string'}},
7084 'required': ['Message', 'Code'],
7085 'type': 'object'},
7086 'ErrorInfo': {'additionalProperties': False,
7087 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
7088 'MacaroonPath': {'type': 'string'}},
7089 'type': 'object'},
7090 'ErrorResult': {'additionalProperties': False,
7091 'properties': {'Error': {'$ref': '#/definitions/Error'}},
7092 'required': ['Error'],
7093 'type': 'object'},
7094 'ErrorResults': {'additionalProperties': False,
7095 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
7096 'type': 'array'}},
7097 'required': ['Results'],
7098 'type': 'object'},
7099 'FindToolsParams': {'additionalProperties': False,
7100 'properties': {'Arch': {'type': 'string'},
7101 'MajorVersion': {'type': 'integer'},
7102 'MinorVersion': {'type': 'integer'},
7103 'Number': {'$ref': '#/definitions/Number'},
7104 'Series': {'type': 'string'}},
7105 'required': ['Number',
7106 'MajorVersion',
7107 'MinorVersion',
7108 'Arch',
7109 'Series'],
7110 'type': 'object'},
7111 'FindToolsResult': {'additionalProperties': False,
7112 'properties': {'Error': {'$ref': '#/definitions/Error'},
7113 'List': {'items': {'$ref': '#/definitions/Tools'},
7114 'type': 'array'}},
7115 'required': ['List', 'Error'],
7116 'type': 'object'},
7117 'FullStatus': {'additionalProperties': False,
7118 'properties': {'AvailableVersion': {'type': 'string'},
7119 'Machines': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7120 'type': 'object'},
7121 'ModelName': {'type': 'string'},
7122 'Relations': {'items': {'$ref': '#/definitions/RelationStatus'},
7123 'type': 'array'},
7124 'Services': {'patternProperties': {'.*': {'$ref': '#/definitions/ServiceStatus'}},
7125 'type': 'object'}},
7126 'required': ['ModelName',
7127 'AvailableVersion',
7128 'Machines',
7129 'Services',
7130 'Relations'],
7131 'type': 'object'},
7132 'GetBundleChangesParams': {'additionalProperties': False,
7133 'properties': {'yaml': {'type': 'string'}},
7134 'required': ['yaml'],
7135 'type': 'object'},
7136 'GetBundleChangesResults': {'additionalProperties': False,
7137 'properties': {'changes': {'items': {'$ref': '#/definitions/BundleChangesChange'},
7138 'type': 'array'},
7139 'errors': {'items': {'type': 'string'},
7140 'type': 'array'}},
7141 'type': 'object'},
7142 'GetConstraintsResults': {'additionalProperties': False,
7143 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
7144 'required': ['Constraints'],
7145 'type': 'object'},
7146 'HardwareCharacteristics': {'additionalProperties': False,
7147 'properties': {'Arch': {'type': 'string'},
7148 'AvailabilityZone': {'type': 'string'},
7149 'CpuCores': {'type': 'integer'},
7150 'CpuPower': {'type': 'integer'},
7151 'Mem': {'type': 'integer'},
7152 'RootDisk': {'type': 'integer'},
7153 'Tags': {'items': {'type': 'string'},
7154 'type': 'array'}},
7155 'type': 'object'},
7156 'HostPort': {'additionalProperties': False,
7157 'properties': {'Address': {'$ref': '#/definitions/Address'},
7158 'Port': {'type': 'integer'}},
7159 'required': ['Address', 'Port'],
7160 'type': 'object'},
7161 'Macaroon': {'additionalProperties': False,
7162 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
7163 'type': 'array'},
7164 'data': {'items': {'type': 'integer'},
7165 'type': 'array'},
7166 'id': {'$ref': '#/definitions/packet'},
7167 'location': {'$ref': '#/definitions/packet'},
7168 'sig': {'items': {'type': 'integer'},
7169 'type': 'array'}},
7170 'required': ['data',
7171 'location',
7172 'id',
7173 'caveats',
7174 'sig'],
7175 'type': 'object'},
7176 'MachineStatus': {'additionalProperties': False,
7177 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
7178 'Containers': {'patternProperties': {'.*': {'$ref': '#/definitions/MachineStatus'}},
7179 'type': 'object'},
7180 'DNSName': {'type': 'string'},
7181 'Hardware': {'type': 'string'},
7182 'HasVote': {'type': 'boolean'},
7183 'Id': {'type': 'string'},
7184 'InstanceId': {'type': 'string'},
7185 'InstanceStatus': {'$ref': '#/definitions/DetailedStatus'},
7186 'Jobs': {'items': {'type': 'string'},
7187 'type': 'array'},
7188 'Series': {'type': 'string'},
7189 'WantsVote': {'type': 'boolean'}},
7190 'required': ['AgentStatus',
7191 'InstanceStatus',
7192 'DNSName',
7193 'InstanceId',
7194 'Series',
7195 'Id',
7196 'Containers',
7197 'Hardware',
7198 'Jobs',
7199 'HasVote',
7200 'WantsVote'],
7201 'type': 'object'},
7202 'MeterStatus': {'additionalProperties': False,
7203 'properties': {'Color': {'type': 'string'},
7204 'Message': {'type': 'string'}},
7205 'required': ['Color', 'Message'],
7206 'type': 'object'},
7207 'ModelConfigResults': {'additionalProperties': False,
7208 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7209 'type': 'object'}},
7210 'type': 'object'}},
7211 'required': ['Config'],
7212 'type': 'object'},
7213 'ModelInfo': {'additionalProperties': False,
7214 'properties': {'DefaultSeries': {'type': 'string'},
7215 'Life': {'type': 'string'},
7216 'Name': {'type': 'string'},
7217 'OwnerTag': {'type': 'string'},
7218 'ProviderType': {'type': 'string'},
7219 'ServerUUID': {'type': 'string'},
7220 'Status': {'$ref': '#/definitions/EntityStatus'},
7221 'UUID': {'type': 'string'},
7222 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
7223 'type': 'array'}},
7224 'required': ['Name',
7225 'UUID',
7226 'ServerUUID',
7227 'ProviderType',
7228 'DefaultSeries',
7229 'OwnerTag',
7230 'Life',
7231 'Status',
7232 'Users'],
7233 'type': 'object'},
7234 'ModelSet': {'additionalProperties': False,
7235 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
7236 'type': 'object'}},
7237 'type': 'object'}},
7238 'required': ['Config'],
7239 'type': 'object'},
7240 'ModelUnset': {'additionalProperties': False,
7241 'properties': {'Keys': {'items': {'type': 'string'},
7242 'type': 'array'}},
7243 'required': ['Keys'],
7244 'type': 'object'},
7245 'ModelUserInfo': {'additionalProperties': False,
7246 'properties': {'access': {'type': 'string'},
7247 'displayname': {'type': 'string'},
7248 'lastconnection': {'format': 'date-time',
7249 'type': 'string'},
7250 'user': {'type': 'string'}},
7251 'required': ['user',
7252 'displayname',
7253 'lastconnection',
7254 'access'],
7255 'type': 'object'},
7256 'ModelUserInfoResult': {'additionalProperties': False,
7257 'properties': {'error': {'$ref': '#/definitions/Error'},
7258 'result': {'$ref': '#/definitions/ModelUserInfo'}},
7259 'type': 'object'},
7260 'ModelUserInfoResults': {'additionalProperties': False,
7261 'properties': {'results': {'items': {'$ref': '#/definitions/ModelUserInfoResult'},
7262 'type': 'array'}},
7263 'required': ['results'],
7264 'type': 'object'},
7265 'Number': {'additionalProperties': False,
7266 'properties': {'Build': {'type': 'integer'},
7267 'Major': {'type': 'integer'},
7268 'Minor': {'type': 'integer'},
7269 'Patch': {'type': 'integer'},
7270 'Tag': {'type': 'string'}},
7271 'required': ['Major',
7272 'Minor',
7273 'Tag',
7274 'Patch',
7275 'Build'],
7276 'type': 'object'},
7277 'Placement': {'additionalProperties': False,
7278 'properties': {'Directive': {'type': 'string'},
7279 'Scope': {'type': 'string'}},
7280 'required': ['Scope', 'Directive'],
7281 'type': 'object'},
7282 'PrivateAddress': {'additionalProperties': False,
7283 'properties': {'Target': {'type': 'string'}},
7284 'required': ['Target'],
7285 'type': 'object'},
7286 'PrivateAddressResults': {'additionalProperties': False,
7287 'properties': {'PrivateAddress': {'type': 'string'}},
7288 'required': ['PrivateAddress'],
7289 'type': 'object'},
7290 'ProvisioningScriptParams': {'additionalProperties': False,
7291 'properties': {'DataDir': {'type': 'string'},
7292 'DisablePackageCommands': {'type': 'boolean'},
7293 'MachineId': {'type': 'string'},
7294 'Nonce': {'type': 'string'}},
7295 'required': ['MachineId',
7296 'Nonce',
7297 'DataDir',
7298 'DisablePackageCommands'],
7299 'type': 'object'},
7300 'ProvisioningScriptResult': {'additionalProperties': False,
7301 'properties': {'Script': {'type': 'string'}},
7302 'required': ['Script'],
7303 'type': 'object'},
7304 'PublicAddress': {'additionalProperties': False,
7305 'properties': {'Target': {'type': 'string'}},
7306 'required': ['Target'],
7307 'type': 'object'},
7308 'PublicAddressResults': {'additionalProperties': False,
7309 'properties': {'PublicAddress': {'type': 'string'}},
7310 'required': ['PublicAddress'],
7311 'type': 'object'},
7312 'RelationStatus': {'additionalProperties': False,
7313 'properties': {'Endpoints': {'items': {'$ref': '#/definitions/EndpointStatus'},
7314 'type': 'array'},
7315 'Id': {'type': 'integer'},
7316 'Interface': {'type': 'string'},
7317 'Key': {'type': 'string'},
7318 'Scope': {'type': 'string'}},
7319 'required': ['Id',
7320 'Key',
7321 'Interface',
7322 'Scope',
7323 'Endpoints'],
7324 'type': 'object'},
7325 'ResolveCharmResult': {'additionalProperties': False,
7326 'properties': {'Error': {'type': 'string'},
7327 'URL': {'$ref': '#/definitions/URL'}},
7328 'type': 'object'},
7329 'ResolveCharmResults': {'additionalProperties': False,
7330 'properties': {'URLs': {'items': {'$ref': '#/definitions/ResolveCharmResult'},
7331 'type': 'array'}},
7332 'required': ['URLs'],
7333 'type': 'object'},
7334 'ResolveCharms': {'additionalProperties': False,
7335 'properties': {'References': {'items': {'$ref': '#/definitions/URL'},
7336 'type': 'array'}},
7337 'required': ['References'],
7338 'type': 'object'},
7339 'Resolved': {'additionalProperties': False,
7340 'properties': {'Retry': {'type': 'boolean'},
7341 'UnitName': {'type': 'string'}},
7342 'required': ['UnitName', 'Retry'],
7343 'type': 'object'},
7344 'ServiceStatus': {'additionalProperties': False,
7345 'properties': {'CanUpgradeTo': {'type': 'string'},
7346 'Charm': {'type': 'string'},
7347 'Err': {'additionalProperties': True,
7348 'type': 'object'},
7349 'Exposed': {'type': 'boolean'},
7350 'Life': {'type': 'string'},
7351 'MeterStatuses': {'patternProperties': {'.*': {'$ref': '#/definitions/MeterStatus'}},
7352 'type': 'object'},
7353 'Relations': {'patternProperties': {'.*': {'items': {'type': 'string'},
7354 'type': 'array'}},
7355 'type': 'object'},
7356 'Status': {'$ref': '#/definitions/DetailedStatus'},
7357 'SubordinateTo': {'items': {'type': 'string'},
7358 'type': 'array'},
7359 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7360 'type': 'object'}},
7361 'required': ['Err',
7362 'Charm',
7363 'Exposed',
7364 'Life',
7365 'Relations',
7366 'CanUpgradeTo',
7367 'SubordinateTo',
7368 'Units',
7369 'MeterStatuses',
7370 'Status'],
7371 'type': 'object'},
7372 'SetConstraints': {'additionalProperties': False,
7373 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
7374 'ServiceName': {'type': 'string'}},
7375 'required': ['ServiceName', 'Constraints'],
7376 'type': 'object'},
7377 'SetModelAgentVersion': {'additionalProperties': False,
7378 'properties': {'Version': {'$ref': '#/definitions/Number'}},
7379 'required': ['Version'],
7380 'type': 'object'},
7381 'StatusHistoryArgs': {'additionalProperties': False,
7382 'properties': {'Kind': {'type': 'string'},
7383 'Name': {'type': 'string'},
7384 'Size': {'type': 'integer'}},
7385 'required': ['Kind', 'Size', 'Name'],
7386 'type': 'object'},
7387 'StatusHistoryResults': {'additionalProperties': False,
7388 'properties': {'Statuses': {'items': {'$ref': '#/definitions/DetailedStatus'},
7389 'type': 'array'}},
7390 'required': ['Statuses'],
7391 'type': 'object'},
7392 'StatusParams': {'additionalProperties': False,
7393 'properties': {'Patterns': {'items': {'type': 'string'},
7394 'type': 'array'}},
7395 'required': ['Patterns'],
7396 'type': 'object'},
7397 'Tools': {'additionalProperties': False,
7398 'properties': {'sha256': {'type': 'string'},
7399 'size': {'type': 'integer'},
7400 'url': {'type': 'string'},
7401 'version': {'$ref': '#/definitions/Binary'}},
7402 'required': ['version', 'url', 'size'],
7403 'type': 'object'},
7404 'URL': {'additionalProperties': False,
7405 'properties': {'Channel': {'type': 'string'},
7406 'Name': {'type': 'string'},
7407 'Revision': {'type': 'integer'},
7408 'Schema': {'type': 'string'},
7409 'Series': {'type': 'string'},
7410 'User': {'type': 'string'}},
7411 'required': ['Schema',
7412 'User',
7413 'Name',
7414 'Revision',
7415 'Series',
7416 'Channel'],
7417 'type': 'object'},
7418 'UnitStatus': {'additionalProperties': False,
7419 'properties': {'AgentStatus': {'$ref': '#/definitions/DetailedStatus'},
7420 'Charm': {'type': 'string'},
7421 'Machine': {'type': 'string'},
7422 'OpenedPorts': {'items': {'type': 'string'},
7423 'type': 'array'},
7424 'PublicAddress': {'type': 'string'},
7425 'Subordinates': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitStatus'}},
7426 'type': 'object'},
7427 'WorkloadStatus': {'$ref': '#/definitions/DetailedStatus'}},
7428 'required': ['AgentStatus',
7429 'WorkloadStatus',
7430 'Machine',
7431 'OpenedPorts',
7432 'PublicAddress',
7433 'Charm',
7434 'Subordinates'],
7435 'type': 'object'},
7436 'Value': {'additionalProperties': False,
7437 'properties': {'arch': {'type': 'string'},
7438 'container': {'type': 'string'},
7439 'cpu-cores': {'type': 'integer'},
7440 'cpu-power': {'type': 'integer'},
7441 'instance-type': {'type': 'string'},
7442 'mem': {'type': 'integer'},
7443 'root-disk': {'type': 'integer'},
7444 'spaces': {'items': {'type': 'string'},
7445 'type': 'array'},
7446 'tags': {'items': {'type': 'string'},
7447 'type': 'array'},
7448 'virt-type': {'type': 'string'}},
7449 'type': 'object'},
7450 'caveat': {'additionalProperties': False,
7451 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
7452 'location': {'$ref': '#/definitions/packet'},
7453 'verificationId': {'$ref': '#/definitions/packet'}},
7454 'required': ['location',
7455 'caveatId',
7456 'verificationId'],
7457 'type': 'object'},
7458 'packet': {'additionalProperties': False,
7459 'properties': {'headerLen': {'type': 'integer'},
7460 'start': {'type': 'integer'},
7461 'totalLen': {'type': 'integer'}},
7462 'required': ['start', 'totalLen', 'headerLen'],
7463 'type': 'object'}},
7464 'properties': {'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
7465 'type': 'object'},
7466 'AbortCurrentUpgrade': {'type': 'object'},
7467 'AddCharm': {'properties': {'Params': {'$ref': '#/definitions/AddCharm'}},
7468 'type': 'object'},
7469 'AddCharmWithAuthorization': {'properties': {'Params': {'$ref': '#/definitions/AddCharmWithAuthorization'}},
7470 'type': 'object'},
7471 'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7472 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7473 'type': 'object'},
7474 'AddMachinesV2': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7475 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7476 'type': 'object'},
7477 'AgentVersion': {'properties': {'Result': {'$ref': '#/definitions/AgentVersionResult'}},
7478 'type': 'object'},
7479 'CharmInfo': {'properties': {'Params': {'$ref': '#/definitions/CharmInfo'},
7480 'Result': {'$ref': '#/definitions/CharmInfo'}},
7481 'type': 'object'},
7482 'DestroyMachines': {'properties': {'Params': {'$ref': '#/definitions/DestroyMachines'}},
7483 'type': 'object'},
7484 'DestroyModel': {'type': 'object'},
7485 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
7486 'Result': {'$ref': '#/definitions/FindToolsResult'}},
7487 'type': 'object'},
7488 'FullStatus': {'properties': {'Params': {'$ref': '#/definitions/StatusParams'},
7489 'Result': {'$ref': '#/definitions/FullStatus'}},
7490 'type': 'object'},
7491 'GetBundleChanges': {'properties': {'Params': {'$ref': '#/definitions/GetBundleChangesParams'},
7492 'Result': {'$ref': '#/definitions/GetBundleChangesResults'}},
7493 'type': 'object'},
7494 'GetModelConstraints': {'properties': {'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
7495 'type': 'object'},
7496 'InjectMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
7497 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
7498 'type': 'object'},
7499 'ModelGet': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
7500 'type': 'object'},
7501 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelInfo'}},
7502 'type': 'object'},
7503 'ModelSet': {'properties': {'Params': {'$ref': '#/definitions/ModelSet'}},
7504 'type': 'object'},
7505 'ModelUnset': {'properties': {'Params': {'$ref': '#/definitions/ModelUnset'}},
7506 'type': 'object'},
7507 'ModelUserInfo': {'properties': {'Result': {'$ref': '#/definitions/ModelUserInfoResults'}},
7508 'type': 'object'},
7509 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/PrivateAddress'},
7510 'Result': {'$ref': '#/definitions/PrivateAddressResults'}},
7511 'type': 'object'},
7512 'ProvisioningScript': {'properties': {'Params': {'$ref': '#/definitions/ProvisioningScriptParams'},
7513 'Result': {'$ref': '#/definitions/ProvisioningScriptResult'}},
7514 'type': 'object'},
7515 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/PublicAddress'},
7516 'Result': {'$ref': '#/definitions/PublicAddressResults'}},
7517 'type': 'object'},
7518 'ResolveCharms': {'properties': {'Params': {'$ref': '#/definitions/ResolveCharms'},
7519 'Result': {'$ref': '#/definitions/ResolveCharmResults'}},
7520 'type': 'object'},
7521 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Resolved'}},
7522 'type': 'object'},
7523 'RetryProvisioning': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
7524 'Result': {'$ref': '#/definitions/ErrorResults'}},
7525 'type': 'object'},
7526 'SetModelAgentVersion': {'properties': {'Params': {'$ref': '#/definitions/SetModelAgentVersion'}},
7527 'type': 'object'},
7528 'SetModelConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
7529 'type': 'object'},
7530 'StatusHistory': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryArgs'},
7531 'Result': {'$ref': '#/definitions/StatusHistoryResults'}},
7532 'type': 'object'},
7533 'WatchAll': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
7534 'type': 'object'}},
7535 'type': 'object'}
7536
7537
7538 @ReturnMapping(APIHostPortsResult)
7539 async def APIHostPorts(self):
7540 '''
7541
7542 Returns -> typing.Sequence[~HostPort]
7543 '''
7544 # map input types to rpc msg
7545 params = dict()
7546 msg = dict(Type='Client', Request='APIHostPorts', Version=1, Params=params)
7547
7548 reply = await self.rpc(msg)
7549 return reply
7550
7551
7552
7553 @ReturnMapping(None)
7554 async def AbortCurrentUpgrade(self):
7555 '''
7556
7557 Returns -> None
7558 '''
7559 # map input types to rpc msg
7560 params = dict()
7561 msg = dict(Type='Client', Request='AbortCurrentUpgrade', Version=1, Params=params)
7562
7563 reply = await self.rpc(msg)
7564 return reply
7565
7566
7567
7568 @ReturnMapping(None)
7569 async def AddCharm(self, channel, url):
7570 '''
7571 channel : str
7572 url : str
7573 Returns -> None
7574 '''
7575 # map input types to rpc msg
7576 params = dict()
7577 msg = dict(Type='Client', Request='AddCharm', Version=1, Params=params)
7578 params['Channel'] = channel
7579 params['URL'] = url
7580 reply = await self.rpc(msg)
7581 return reply
7582
7583
7584
7585 @ReturnMapping(None)
7586 async def AddCharmWithAuthorization(self, channel, charmstoremacaroon, url):
7587 '''
7588 channel : str
7589 charmstoremacaroon : Macaroon
7590 url : str
7591 Returns -> None
7592 '''
7593 # map input types to rpc msg
7594 params = dict()
7595 msg = dict(Type='Client', Request='AddCharmWithAuthorization', Version=1, Params=params)
7596 params['Channel'] = channel
7597 params['CharmStoreMacaroon'] = charmstoremacaroon
7598 params['URL'] = url
7599 reply = await self.rpc(msg)
7600 return reply
7601
7602
7603
7604 @ReturnMapping(AddMachinesResults)
7605 async def AddMachines(self, machineparams):
7606 '''
7607 machineparams : typing.Sequence[~AddMachineParams]
7608 Returns -> typing.Sequence[~AddMachinesResult]
7609 '''
7610 # map input types to rpc msg
7611 params = dict()
7612 msg = dict(Type='Client', Request='AddMachines', Version=1, Params=params)
7613 params['MachineParams'] = machineparams
7614 reply = await self.rpc(msg)
7615 return reply
7616
7617
7618
7619 @ReturnMapping(AddMachinesResults)
7620 async def AddMachinesV2(self, machineparams):
7621 '''
7622 machineparams : typing.Sequence[~AddMachineParams]
7623 Returns -> typing.Sequence[~AddMachinesResult]
7624 '''
7625 # map input types to rpc msg
7626 params = dict()
7627 msg = dict(Type='Client', Request='AddMachinesV2', Version=1, Params=params)
7628 params['MachineParams'] = machineparams
7629 reply = await self.rpc(msg)
7630 return reply
7631
7632
7633
7634 @ReturnMapping(AgentVersionResult)
7635 async def AgentVersion(self):
7636 '''
7637
7638 Returns -> Number
7639 '''
7640 # map input types to rpc msg
7641 params = dict()
7642 msg = dict(Type='Client', Request='AgentVersion', Version=1, Params=params)
7643
7644 reply = await self.rpc(msg)
7645 return reply
7646
7647
7648
7649 @ReturnMapping(CharmInfo)
7650 async def CharmInfo(self, charmurl):
7651 '''
7652 charmurl : str
7653 Returns -> str
7654 '''
7655 # map input types to rpc msg
7656 params = dict()
7657 msg = dict(Type='Client', Request='CharmInfo', Version=1, Params=params)
7658 params['CharmURL'] = charmurl
7659 reply = await self.rpc(msg)
7660 return reply
7661
7662
7663
7664 @ReturnMapping(None)
7665 async def DestroyMachines(self, force, machinenames):
7666 '''
7667 force : bool
7668 machinenames : typing.Sequence[str]
7669 Returns -> None
7670 '''
7671 # map input types to rpc msg
7672 params = dict()
7673 msg = dict(Type='Client', Request='DestroyMachines', Version=1, Params=params)
7674 params['Force'] = force
7675 params['MachineNames'] = machinenames
7676 reply = await self.rpc(msg)
7677 return reply
7678
7679
7680
7681 @ReturnMapping(None)
7682 async def DestroyModel(self):
7683 '''
7684
7685 Returns -> None
7686 '''
7687 # map input types to rpc msg
7688 params = dict()
7689 msg = dict(Type='Client', Request='DestroyModel', Version=1, Params=params)
7690
7691 reply = await self.rpc(msg)
7692 return reply
7693
7694
7695
7696 @ReturnMapping(FindToolsResult)
7697 async def FindTools(self, arch, majorversion, minorversion, number, series):
7698 '''
7699 arch : str
7700 majorversion : int
7701 minorversion : int
7702 number : Number
7703 series : str
7704 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
7705 '''
7706 # map input types to rpc msg
7707 params = dict()
7708 msg = dict(Type='Client', Request='FindTools', Version=1, Params=params)
7709 params['Arch'] = arch
7710 params['MajorVersion'] = majorversion
7711 params['MinorVersion'] = minorversion
7712 params['Number'] = number
7713 params['Series'] = series
7714 reply = await self.rpc(msg)
7715 return reply
7716
7717
7718
7719 @ReturnMapping(FullStatus)
7720 async def FullStatus(self, patterns):
7721 '''
7722 patterns : typing.Sequence[str]
7723 Returns -> typing.Union[typing.Sequence[~RelationStatus], typing.Mapping[str, ~ServiceStatus]]
7724 '''
7725 # map input types to rpc msg
7726 params = dict()
7727 msg = dict(Type='Client', Request='FullStatus', Version=1, Params=params)
7728 params['Patterns'] = patterns
7729 reply = await self.rpc(msg)
7730 return reply
7731
7732
7733
7734 @ReturnMapping(GetBundleChangesResults)
7735 async def GetBundleChanges(self, yaml):
7736 '''
7737 yaml : str
7738 Returns -> typing.Sequence[~BundleChangesChange]
7739 '''
7740 # map input types to rpc msg
7741 params = dict()
7742 msg = dict(Type='Client', Request='GetBundleChanges', Version=1, Params=params)
7743 params['yaml'] = yaml
7744 reply = await self.rpc(msg)
7745 return reply
7746
7747
7748
7749 @ReturnMapping(GetConstraintsResults)
7750 async def GetModelConstraints(self):
7751 '''
7752
7753 Returns -> Value
7754 '''
7755 # map input types to rpc msg
7756 params = dict()
7757 msg = dict(Type='Client', Request='GetModelConstraints', Version=1, Params=params)
7758
7759 reply = await self.rpc(msg)
7760 return reply
7761
7762
7763
7764 @ReturnMapping(AddMachinesResults)
7765 async def InjectMachines(self, machineparams):
7766 '''
7767 machineparams : typing.Sequence[~AddMachineParams]
7768 Returns -> typing.Sequence[~AddMachinesResult]
7769 '''
7770 # map input types to rpc msg
7771 params = dict()
7772 msg = dict(Type='Client', Request='InjectMachines', Version=1, Params=params)
7773 params['MachineParams'] = machineparams
7774 reply = await self.rpc(msg)
7775 return reply
7776
7777
7778
7779 @ReturnMapping(ModelConfigResults)
7780 async def ModelGet(self):
7781 '''
7782
7783 Returns -> typing.Mapping[str, typing.Any]
7784 '''
7785 # map input types to rpc msg
7786 params = dict()
7787 msg = dict(Type='Client', Request='ModelGet', Version=1, Params=params)
7788
7789 reply = await self.rpc(msg)
7790 return reply
7791
7792
7793
7794 @ReturnMapping(ModelInfo)
7795 async def ModelInfo(self):
7796 '''
7797
7798 Returns -> typing.Union[_ForwardRef('EntityStatus'), typing.Sequence[~ModelUserInfo]]
7799 '''
7800 # map input types to rpc msg
7801 params = dict()
7802 msg = dict(Type='Client', Request='ModelInfo', Version=1, Params=params)
7803
7804 reply = await self.rpc(msg)
7805 return reply
7806
7807
7808
7809 @ReturnMapping(None)
7810 async def ModelSet(self, config):
7811 '''
7812 config : typing.Mapping[str, typing.Any]
7813 Returns -> None
7814 '''
7815 # map input types to rpc msg
7816 params = dict()
7817 msg = dict(Type='Client', Request='ModelSet', Version=1, Params=params)
7818 params['Config'] = config
7819 reply = await self.rpc(msg)
7820 return reply
7821
7822
7823
7824 @ReturnMapping(None)
7825 async def ModelUnset(self, keys):
7826 '''
7827 keys : typing.Sequence[str]
7828 Returns -> None
7829 '''
7830 # map input types to rpc msg
7831 params = dict()
7832 msg = dict(Type='Client', Request='ModelUnset', Version=1, Params=params)
7833 params['Keys'] = keys
7834 reply = await self.rpc(msg)
7835 return reply
7836
7837
7838
7839 @ReturnMapping(ModelUserInfoResults)
7840 async def ModelUserInfo(self):
7841 '''
7842
7843 Returns -> typing.Sequence[~ModelUserInfoResult]
7844 '''
7845 # map input types to rpc msg
7846 params = dict()
7847 msg = dict(Type='Client', Request='ModelUserInfo', Version=1, Params=params)
7848
7849 reply = await self.rpc(msg)
7850 return reply
7851
7852
7853
7854 @ReturnMapping(PrivateAddressResults)
7855 async def PrivateAddress(self, target):
7856 '''
7857 target : str
7858 Returns -> str
7859 '''
7860 # map input types to rpc msg
7861 params = dict()
7862 msg = dict(Type='Client', Request='PrivateAddress', Version=1, Params=params)
7863 params['Target'] = target
7864 reply = await self.rpc(msg)
7865 return reply
7866
7867
7868
7869 @ReturnMapping(ProvisioningScriptResult)
7870 async def ProvisioningScript(self, datadir, disablepackagecommands, machineid, nonce):
7871 '''
7872 datadir : str
7873 disablepackagecommands : bool
7874 machineid : str
7875 nonce : str
7876 Returns -> str
7877 '''
7878 # map input types to rpc msg
7879 params = dict()
7880 msg = dict(Type='Client', Request='ProvisioningScript', Version=1, Params=params)
7881 params['DataDir'] = datadir
7882 params['DisablePackageCommands'] = disablepackagecommands
7883 params['MachineId'] = machineid
7884 params['Nonce'] = nonce
7885 reply = await self.rpc(msg)
7886 return reply
7887
7888
7889
7890 @ReturnMapping(PublicAddressResults)
7891 async def PublicAddress(self, target):
7892 '''
7893 target : str
7894 Returns -> str
7895 '''
7896 # map input types to rpc msg
7897 params = dict()
7898 msg = dict(Type='Client', Request='PublicAddress', Version=1, Params=params)
7899 params['Target'] = target
7900 reply = await self.rpc(msg)
7901 return reply
7902
7903
7904
7905 @ReturnMapping(ResolveCharmResults)
7906 async def ResolveCharms(self, references):
7907 '''
7908 references : typing.Sequence[~URL]
7909 Returns -> typing.Sequence[~ResolveCharmResult]
7910 '''
7911 # map input types to rpc msg
7912 params = dict()
7913 msg = dict(Type='Client', Request='ResolveCharms', Version=1, Params=params)
7914 params['References'] = references
7915 reply = await self.rpc(msg)
7916 return reply
7917
7918
7919
7920 @ReturnMapping(None)
7921 async def Resolved(self, retry, unitname):
7922 '''
7923 retry : bool
7924 unitname : str
7925 Returns -> None
7926 '''
7927 # map input types to rpc msg
7928 params = dict()
7929 msg = dict(Type='Client', Request='Resolved', Version=1, Params=params)
7930 params['Retry'] = retry
7931 params['UnitName'] = unitname
7932 reply = await self.rpc(msg)
7933 return reply
7934
7935
7936
7937 @ReturnMapping(ErrorResults)
7938 async def RetryProvisioning(self, entities):
7939 '''
7940 entities : typing.Sequence[~Entity]
7941 Returns -> typing.Sequence[~ErrorResult]
7942 '''
7943 # map input types to rpc msg
7944 params = dict()
7945 msg = dict(Type='Client', Request='RetryProvisioning', Version=1, Params=params)
7946 params['Entities'] = entities
7947 reply = await self.rpc(msg)
7948 return reply
7949
7950
7951
7952 @ReturnMapping(None)
7953 async def SetModelAgentVersion(self, build, major, minor, patch, tag):
7954 '''
7955 build : int
7956 major : int
7957 minor : int
7958 patch : int
7959 tag : str
7960 Returns -> None
7961 '''
7962 # map input types to rpc msg
7963 params = dict()
7964 msg = dict(Type='Client', Request='SetModelAgentVersion', Version=1, Params=params)
7965 params['Build'] = build
7966 params['Major'] = major
7967 params['Minor'] = minor
7968 params['Patch'] = patch
7969 params['Tag'] = tag
7970 reply = await self.rpc(msg)
7971 return reply
7972
7973
7974
7975 @ReturnMapping(None)
7976 async def SetModelConstraints(self, constraints, servicename):
7977 '''
7978 constraints : Value
7979 servicename : str
7980 Returns -> None
7981 '''
7982 # map input types to rpc msg
7983 params = dict()
7984 msg = dict(Type='Client', Request='SetModelConstraints', Version=1, Params=params)
7985 params['Constraints'] = constraints
7986 params['ServiceName'] = servicename
7987 reply = await self.rpc(msg)
7988 return reply
7989
7990
7991
7992 @ReturnMapping(StatusHistoryResults)
7993 async def StatusHistory(self, kind, name, size):
7994 '''
7995 kind : str
7996 name : str
7997 size : int
7998 Returns -> typing.Sequence[~DetailedStatus]
7999 '''
8000 # map input types to rpc msg
8001 params = dict()
8002 msg = dict(Type='Client', Request='StatusHistory', Version=1, Params=params)
8003 params['Kind'] = kind
8004 params['Name'] = name
8005 params['Size'] = size
8006 reply = await self.rpc(msg)
8007 return reply
8008
8009
8010
8011 @ReturnMapping(AllWatcherId)
8012 async def WatchAll(self):
8013 '''
8014
8015 Returns -> str
8016 '''
8017 # map input types to rpc msg
8018 params = dict()
8019 msg = dict(Type='Client', Request='WatchAll', Version=1, Params=params)
8020
8021 reply = await self.rpc(msg)
8022 return reply
8023
8024
8025 class Controller(Type):
8026 name = 'Controller'
8027 version = 2
8028 schema = {'definitions': {'AllWatcherId': {'additionalProperties': False,
8029 'properties': {'AllWatcherId': {'type': 'string'}},
8030 'required': ['AllWatcherId'],
8031 'type': 'object'},
8032 'DestroyControllerArgs': {'additionalProperties': False,
8033 'properties': {'destroy-models': {'type': 'boolean'}},
8034 'required': ['destroy-models'],
8035 'type': 'object'},
8036 'Entities': {'additionalProperties': False,
8037 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8038 'type': 'array'}},
8039 'required': ['Entities'],
8040 'type': 'object'},
8041 'Entity': {'additionalProperties': False,
8042 'properties': {'Tag': {'type': 'string'}},
8043 'required': ['Tag'],
8044 'type': 'object'},
8045 'Error': {'additionalProperties': False,
8046 'properties': {'Code': {'type': 'string'},
8047 'Info': {'$ref': '#/definitions/ErrorInfo'},
8048 'Message': {'type': 'string'}},
8049 'required': ['Message', 'Code'],
8050 'type': 'object'},
8051 'ErrorInfo': {'additionalProperties': False,
8052 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8053 'MacaroonPath': {'type': 'string'}},
8054 'type': 'object'},
8055 'InitiateModelMigrationArgs': {'additionalProperties': False,
8056 'properties': {'specs': {'items': {'$ref': '#/definitions/ModelMigrationSpec'},
8057 'type': 'array'}},
8058 'required': ['specs'],
8059 'type': 'object'},
8060 'InitiateModelMigrationResult': {'additionalProperties': False,
8061 'properties': {'error': {'$ref': '#/definitions/Error'},
8062 'id': {'type': 'string'},
8063 'model-tag': {'type': 'string'}},
8064 'required': ['model-tag',
8065 'error',
8066 'id'],
8067 'type': 'object'},
8068 'InitiateModelMigrationResults': {'additionalProperties': False,
8069 'properties': {'results': {'items': {'$ref': '#/definitions/InitiateModelMigrationResult'},
8070 'type': 'array'}},
8071 'required': ['results'],
8072 'type': 'object'},
8073 'Macaroon': {'additionalProperties': False,
8074 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8075 'type': 'array'},
8076 'data': {'items': {'type': 'integer'},
8077 'type': 'array'},
8078 'id': {'$ref': '#/definitions/packet'},
8079 'location': {'$ref': '#/definitions/packet'},
8080 'sig': {'items': {'type': 'integer'},
8081 'type': 'array'}},
8082 'required': ['data',
8083 'location',
8084 'id',
8085 'caveats',
8086 'sig'],
8087 'type': 'object'},
8088 'Model': {'additionalProperties': False,
8089 'properties': {'Name': {'type': 'string'},
8090 'OwnerTag': {'type': 'string'},
8091 'UUID': {'type': 'string'}},
8092 'required': ['Name', 'UUID', 'OwnerTag'],
8093 'type': 'object'},
8094 'ModelBlockInfo': {'additionalProperties': False,
8095 'properties': {'blocks': {'items': {'type': 'string'},
8096 'type': 'array'},
8097 'model-uuid': {'type': 'string'},
8098 'name': {'type': 'string'},
8099 'owner-tag': {'type': 'string'}},
8100 'required': ['name',
8101 'model-uuid',
8102 'owner-tag',
8103 'blocks'],
8104 'type': 'object'},
8105 'ModelBlockInfoList': {'additionalProperties': False,
8106 'properties': {'models': {'items': {'$ref': '#/definitions/ModelBlockInfo'},
8107 'type': 'array'}},
8108 'type': 'object'},
8109 'ModelConfigResults': {'additionalProperties': False,
8110 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8111 'type': 'object'}},
8112 'type': 'object'}},
8113 'required': ['Config'],
8114 'type': 'object'},
8115 'ModelMigrationSpec': {'additionalProperties': False,
8116 'properties': {'model-tag': {'type': 'string'},
8117 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
8118 'required': ['model-tag',
8119 'target-info'],
8120 'type': 'object'},
8121 'ModelMigrationTargetInfo': {'additionalProperties': False,
8122 'properties': {'addrs': {'items': {'type': 'string'},
8123 'type': 'array'},
8124 'auth-tag': {'type': 'string'},
8125 'ca-cert': {'type': 'string'},
8126 'controller-tag': {'type': 'string'},
8127 'password': {'type': 'string'}},
8128 'required': ['controller-tag',
8129 'addrs',
8130 'ca-cert',
8131 'auth-tag',
8132 'password'],
8133 'type': 'object'},
8134 'ModelStatus': {'additionalProperties': False,
8135 'properties': {'hosted-machine-count': {'type': 'integer'},
8136 'life': {'type': 'string'},
8137 'model-tag': {'type': 'string'},
8138 'owner-tag': {'type': 'string'},
8139 'service-count': {'type': 'integer'}},
8140 'required': ['model-tag',
8141 'life',
8142 'hosted-machine-count',
8143 'service-count',
8144 'owner-tag'],
8145 'type': 'object'},
8146 'ModelStatusResults': {'additionalProperties': False,
8147 'properties': {'models': {'items': {'$ref': '#/definitions/ModelStatus'},
8148 'type': 'array'}},
8149 'required': ['models'],
8150 'type': 'object'},
8151 'RemoveBlocksArgs': {'additionalProperties': False,
8152 'properties': {'all': {'type': 'boolean'}},
8153 'required': ['all'],
8154 'type': 'object'},
8155 'UserModel': {'additionalProperties': False,
8156 'properties': {'LastConnection': {'format': 'date-time',
8157 'type': 'string'},
8158 'Model': {'$ref': '#/definitions/Model'}},
8159 'required': ['Model', 'LastConnection'],
8160 'type': 'object'},
8161 'UserModelList': {'additionalProperties': False,
8162 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
8163 'type': 'array'}},
8164 'required': ['UserModels'],
8165 'type': 'object'},
8166 'caveat': {'additionalProperties': False,
8167 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8168 'location': {'$ref': '#/definitions/packet'},
8169 'verificationId': {'$ref': '#/definitions/packet'}},
8170 'required': ['location',
8171 'caveatId',
8172 'verificationId'],
8173 'type': 'object'},
8174 'packet': {'additionalProperties': False,
8175 'properties': {'headerLen': {'type': 'integer'},
8176 'start': {'type': 'integer'},
8177 'totalLen': {'type': 'integer'}},
8178 'required': ['start', 'totalLen', 'headerLen'],
8179 'type': 'object'}},
8180 'properties': {'AllModels': {'properties': {'Result': {'$ref': '#/definitions/UserModelList'}},
8181 'type': 'object'},
8182 'DestroyController': {'properties': {'Params': {'$ref': '#/definitions/DestroyControllerArgs'}},
8183 'type': 'object'},
8184 'InitiateModelMigration': {'properties': {'Params': {'$ref': '#/definitions/InitiateModelMigrationArgs'},
8185 'Result': {'$ref': '#/definitions/InitiateModelMigrationResults'}},
8186 'type': 'object'},
8187 'ListBlockedModels': {'properties': {'Result': {'$ref': '#/definitions/ModelBlockInfoList'}},
8188 'type': 'object'},
8189 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResults'}},
8190 'type': 'object'},
8191 'ModelStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8192 'Result': {'$ref': '#/definitions/ModelStatusResults'}},
8193 'type': 'object'},
8194 'RemoveBlocks': {'properties': {'Params': {'$ref': '#/definitions/RemoveBlocksArgs'}},
8195 'type': 'object'},
8196 'WatchAllModels': {'properties': {'Result': {'$ref': '#/definitions/AllWatcherId'}},
8197 'type': 'object'}},
8198 'type': 'object'}
8199
8200
8201 @ReturnMapping(UserModelList)
8202 async def AllModels(self):
8203 '''
8204
8205 Returns -> typing.Sequence[~UserModel]
8206 '''
8207 # map input types to rpc msg
8208 params = dict()
8209 msg = dict(Type='Controller', Request='AllModels', Version=2, Params=params)
8210
8211 reply = await self.rpc(msg)
8212 return reply
8213
8214
8215
8216 @ReturnMapping(None)
8217 async def DestroyController(self, destroy_models):
8218 '''
8219 destroy_models : bool
8220 Returns -> None
8221 '''
8222 # map input types to rpc msg
8223 params = dict()
8224 msg = dict(Type='Controller', Request='DestroyController', Version=2, Params=params)
8225 params['destroy-models'] = destroy_models
8226 reply = await self.rpc(msg)
8227 return reply
8228
8229
8230
8231 @ReturnMapping(InitiateModelMigrationResults)
8232 async def InitiateModelMigration(self, specs):
8233 '''
8234 specs : typing.Sequence[~ModelMigrationSpec]
8235 Returns -> typing.Sequence[~InitiateModelMigrationResult]
8236 '''
8237 # map input types to rpc msg
8238 params = dict()
8239 msg = dict(Type='Controller', Request='InitiateModelMigration', Version=2, Params=params)
8240 params['specs'] = specs
8241 reply = await self.rpc(msg)
8242 return reply
8243
8244
8245
8246 @ReturnMapping(ModelBlockInfoList)
8247 async def ListBlockedModels(self):
8248 '''
8249
8250 Returns -> typing.Sequence[~ModelBlockInfo]
8251 '''
8252 # map input types to rpc msg
8253 params = dict()
8254 msg = dict(Type='Controller', Request='ListBlockedModels', Version=2, Params=params)
8255
8256 reply = await self.rpc(msg)
8257 return reply
8258
8259
8260
8261 @ReturnMapping(ModelConfigResults)
8262 async def ModelConfig(self):
8263 '''
8264
8265 Returns -> typing.Mapping[str, typing.Any]
8266 '''
8267 # map input types to rpc msg
8268 params = dict()
8269 msg = dict(Type='Controller', Request='ModelConfig', Version=2, Params=params)
8270
8271 reply = await self.rpc(msg)
8272 return reply
8273
8274
8275
8276 @ReturnMapping(ModelStatusResults)
8277 async def ModelStatus(self, entities):
8278 '''
8279 entities : typing.Sequence[~Entity]
8280 Returns -> typing.Sequence[~ModelStatus]
8281 '''
8282 # map input types to rpc msg
8283 params = dict()
8284 msg = dict(Type='Controller', Request='ModelStatus', Version=2, Params=params)
8285 params['Entities'] = entities
8286 reply = await self.rpc(msg)
8287 return reply
8288
8289
8290
8291 @ReturnMapping(None)
8292 async def RemoveBlocks(self, all_):
8293 '''
8294 all_ : bool
8295 Returns -> None
8296 '''
8297 # map input types to rpc msg
8298 params = dict()
8299 msg = dict(Type='Controller', Request='RemoveBlocks', Version=2, Params=params)
8300 params['all'] = all_
8301 reply = await self.rpc(msg)
8302 return reply
8303
8304
8305
8306 @ReturnMapping(AllWatcherId)
8307 async def WatchAllModels(self):
8308 '''
8309
8310 Returns -> str
8311 '''
8312 # map input types to rpc msg
8313 params = dict()
8314 msg = dict(Type='Controller', Request='WatchAllModels', Version=2, Params=params)
8315
8316 reply = await self.rpc(msg)
8317 return reply
8318
8319
8320 class Deployer(Type):
8321 name = 'Deployer'
8322 version = 1
8323 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
8324 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
8325 'type': 'array'},
8326 'type': 'array'}},
8327 'required': ['Servers'],
8328 'type': 'object'},
8329 'Address': {'additionalProperties': False,
8330 'properties': {'Scope': {'type': 'string'},
8331 'SpaceName': {'type': 'string'},
8332 'Type': {'type': 'string'},
8333 'Value': {'type': 'string'}},
8334 'required': ['Value', 'Type', 'Scope'],
8335 'type': 'object'},
8336 'BytesResult': {'additionalProperties': False,
8337 'properties': {'Result': {'items': {'type': 'integer'},
8338 'type': 'array'}},
8339 'required': ['Result'],
8340 'type': 'object'},
8341 'DeployerConnectionValues': {'additionalProperties': False,
8342 'properties': {'APIAddresses': {'items': {'type': 'string'},
8343 'type': 'array'},
8344 'StateAddresses': {'items': {'type': 'string'},
8345 'type': 'array'}},
8346 'required': ['StateAddresses',
8347 'APIAddresses'],
8348 'type': 'object'},
8349 'Entities': {'additionalProperties': False,
8350 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
8351 'type': 'array'}},
8352 'required': ['Entities'],
8353 'type': 'object'},
8354 'Entity': {'additionalProperties': False,
8355 'properties': {'Tag': {'type': 'string'}},
8356 'required': ['Tag'],
8357 'type': 'object'},
8358 'EntityPassword': {'additionalProperties': False,
8359 'properties': {'Password': {'type': 'string'},
8360 'Tag': {'type': 'string'}},
8361 'required': ['Tag', 'Password'],
8362 'type': 'object'},
8363 'EntityPasswords': {'additionalProperties': False,
8364 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
8365 'type': 'array'}},
8366 'required': ['Changes'],
8367 'type': 'object'},
8368 'Error': {'additionalProperties': False,
8369 'properties': {'Code': {'type': 'string'},
8370 'Info': {'$ref': '#/definitions/ErrorInfo'},
8371 'Message': {'type': 'string'}},
8372 'required': ['Message', 'Code'],
8373 'type': 'object'},
8374 'ErrorInfo': {'additionalProperties': False,
8375 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8376 'MacaroonPath': {'type': 'string'}},
8377 'type': 'object'},
8378 'ErrorResult': {'additionalProperties': False,
8379 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8380 'required': ['Error'],
8381 'type': 'object'},
8382 'ErrorResults': {'additionalProperties': False,
8383 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8384 'type': 'array'}},
8385 'required': ['Results'],
8386 'type': 'object'},
8387 'HostPort': {'additionalProperties': False,
8388 'properties': {'Address': {'$ref': '#/definitions/Address'},
8389 'Port': {'type': 'integer'}},
8390 'required': ['Address', 'Port'],
8391 'type': 'object'},
8392 'LifeResult': {'additionalProperties': False,
8393 'properties': {'Error': {'$ref': '#/definitions/Error'},
8394 'Life': {'type': 'string'}},
8395 'required': ['Life', 'Error'],
8396 'type': 'object'},
8397 'LifeResults': {'additionalProperties': False,
8398 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
8399 'type': 'array'}},
8400 'required': ['Results'],
8401 'type': 'object'},
8402 'Macaroon': {'additionalProperties': False,
8403 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8404 'type': 'array'},
8405 'data': {'items': {'type': 'integer'},
8406 'type': 'array'},
8407 'id': {'$ref': '#/definitions/packet'},
8408 'location': {'$ref': '#/definitions/packet'},
8409 'sig': {'items': {'type': 'integer'},
8410 'type': 'array'}},
8411 'required': ['data',
8412 'location',
8413 'id',
8414 'caveats',
8415 'sig'],
8416 'type': 'object'},
8417 'NotifyWatchResult': {'additionalProperties': False,
8418 'properties': {'Error': {'$ref': '#/definitions/Error'},
8419 'NotifyWatcherId': {'type': 'string'}},
8420 'required': ['NotifyWatcherId', 'Error'],
8421 'type': 'object'},
8422 'StringResult': {'additionalProperties': False,
8423 'properties': {'Error': {'$ref': '#/definitions/Error'},
8424 'Result': {'type': 'string'}},
8425 'required': ['Error', 'Result'],
8426 'type': 'object'},
8427 'StringsResult': {'additionalProperties': False,
8428 'properties': {'Error': {'$ref': '#/definitions/Error'},
8429 'Result': {'items': {'type': 'string'},
8430 'type': 'array'}},
8431 'required': ['Error', 'Result'],
8432 'type': 'object'},
8433 'StringsWatchResult': {'additionalProperties': False,
8434 'properties': {'Changes': {'items': {'type': 'string'},
8435 'type': 'array'},
8436 'Error': {'$ref': '#/definitions/Error'},
8437 'StringsWatcherId': {'type': 'string'}},
8438 'required': ['StringsWatcherId',
8439 'Changes',
8440 'Error'],
8441 'type': 'object'},
8442 'StringsWatchResults': {'additionalProperties': False,
8443 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
8444 'type': 'array'}},
8445 'required': ['Results'],
8446 'type': 'object'},
8447 'caveat': {'additionalProperties': False,
8448 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8449 'location': {'$ref': '#/definitions/packet'},
8450 'verificationId': {'$ref': '#/definitions/packet'}},
8451 'required': ['location',
8452 'caveatId',
8453 'verificationId'],
8454 'type': 'object'},
8455 'packet': {'additionalProperties': False,
8456 'properties': {'headerLen': {'type': 'integer'},
8457 'start': {'type': 'integer'},
8458 'totalLen': {'type': 'integer'}},
8459 'required': ['start', 'totalLen', 'headerLen'],
8460 'type': 'object'}},
8461 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
8462 'type': 'object'},
8463 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
8464 'type': 'object'},
8465 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
8466 'type': 'object'},
8467 'ConnectionInfo': {'properties': {'Result': {'$ref': '#/definitions/DeployerConnectionValues'}},
8468 'type': 'object'},
8469 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8470 'Result': {'$ref': '#/definitions/LifeResults'}},
8471 'type': 'object'},
8472 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
8473 'type': 'object'},
8474 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8475 'Result': {'$ref': '#/definitions/ErrorResults'}},
8476 'type': 'object'},
8477 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
8478 'Result': {'$ref': '#/definitions/ErrorResults'}},
8479 'type': 'object'},
8480 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
8481 'type': 'object'},
8482 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
8483 'type': 'object'},
8484 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
8485 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
8486 'type': 'object'}},
8487 'type': 'object'}
8488
8489
8490 @ReturnMapping(StringsResult)
8491 async def APIAddresses(self):
8492 '''
8493
8494 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
8495 '''
8496 # map input types to rpc msg
8497 params = dict()
8498 msg = dict(Type='Deployer', Request='APIAddresses', Version=1, Params=params)
8499
8500 reply = await self.rpc(msg)
8501 return reply
8502
8503
8504
8505 @ReturnMapping(APIHostPortsResult)
8506 async def APIHostPorts(self):
8507 '''
8508
8509 Returns -> typing.Sequence[~HostPort]
8510 '''
8511 # map input types to rpc msg
8512 params = dict()
8513 msg = dict(Type='Deployer', Request='APIHostPorts', Version=1, Params=params)
8514
8515 reply = await self.rpc(msg)
8516 return reply
8517
8518
8519
8520 @ReturnMapping(BytesResult)
8521 async def CACert(self):
8522 '''
8523
8524 Returns -> typing.Sequence[int]
8525 '''
8526 # map input types to rpc msg
8527 params = dict()
8528 msg = dict(Type='Deployer', Request='CACert', Version=1, Params=params)
8529
8530 reply = await self.rpc(msg)
8531 return reply
8532
8533
8534
8535 @ReturnMapping(DeployerConnectionValues)
8536 async def ConnectionInfo(self):
8537 '''
8538
8539 Returns -> typing.Sequence[str]
8540 '''
8541 # map input types to rpc msg
8542 params = dict()
8543 msg = dict(Type='Deployer', Request='ConnectionInfo', Version=1, Params=params)
8544
8545 reply = await self.rpc(msg)
8546 return reply
8547
8548
8549
8550 @ReturnMapping(LifeResults)
8551 async def Life(self, entities):
8552 '''
8553 entities : typing.Sequence[~Entity]
8554 Returns -> typing.Sequence[~LifeResult]
8555 '''
8556 # map input types to rpc msg
8557 params = dict()
8558 msg = dict(Type='Deployer', Request='Life', Version=1, Params=params)
8559 params['Entities'] = entities
8560 reply = await self.rpc(msg)
8561 return reply
8562
8563
8564
8565 @ReturnMapping(StringResult)
8566 async def ModelUUID(self):
8567 '''
8568
8569 Returns -> typing.Union[_ForwardRef('Error'), str]
8570 '''
8571 # map input types to rpc msg
8572 params = dict()
8573 msg = dict(Type='Deployer', Request='ModelUUID', Version=1, Params=params)
8574
8575 reply = await self.rpc(msg)
8576 return reply
8577
8578
8579
8580 @ReturnMapping(ErrorResults)
8581 async def Remove(self, entities):
8582 '''
8583 entities : typing.Sequence[~Entity]
8584 Returns -> typing.Sequence[~ErrorResult]
8585 '''
8586 # map input types to rpc msg
8587 params = dict()
8588 msg = dict(Type='Deployer', Request='Remove', Version=1, Params=params)
8589 params['Entities'] = entities
8590 reply = await self.rpc(msg)
8591 return reply
8592
8593
8594
8595 @ReturnMapping(ErrorResults)
8596 async def SetPasswords(self, changes):
8597 '''
8598 changes : typing.Sequence[~EntityPassword]
8599 Returns -> typing.Sequence[~ErrorResult]
8600 '''
8601 # map input types to rpc msg
8602 params = dict()
8603 msg = dict(Type='Deployer', Request='SetPasswords', Version=1, Params=params)
8604 params['Changes'] = changes
8605 reply = await self.rpc(msg)
8606 return reply
8607
8608
8609
8610 @ReturnMapping(StringsResult)
8611 async def StateAddresses(self):
8612 '''
8613
8614 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
8615 '''
8616 # map input types to rpc msg
8617 params = dict()
8618 msg = dict(Type='Deployer', Request='StateAddresses', Version=1, Params=params)
8619
8620 reply = await self.rpc(msg)
8621 return reply
8622
8623
8624
8625 @ReturnMapping(NotifyWatchResult)
8626 async def WatchAPIHostPorts(self):
8627 '''
8628
8629 Returns -> typing.Union[_ForwardRef('Error'), str]
8630 '''
8631 # map input types to rpc msg
8632 params = dict()
8633 msg = dict(Type='Deployer', Request='WatchAPIHostPorts', Version=1, Params=params)
8634
8635 reply = await self.rpc(msg)
8636 return reply
8637
8638
8639
8640 @ReturnMapping(StringsWatchResults)
8641 async def WatchUnits(self, entities):
8642 '''
8643 entities : typing.Sequence[~Entity]
8644 Returns -> typing.Sequence[~StringsWatchResult]
8645 '''
8646 # map input types to rpc msg
8647 params = dict()
8648 msg = dict(Type='Deployer', Request='WatchUnits', Version=1, Params=params)
8649 params['Entities'] = entities
8650 reply = await self.rpc(msg)
8651 return reply
8652
8653
8654 class DiscoverSpaces(Type):
8655 name = 'DiscoverSpaces'
8656 version = 2
8657 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
8658 'properties': {'SpaceTag': {'type': 'string'},
8659 'SubnetProviderId': {'type': 'string'},
8660 'SubnetTag': {'type': 'string'},
8661 'Zones': {'items': {'type': 'string'},
8662 'type': 'array'}},
8663 'required': ['SpaceTag'],
8664 'type': 'object'},
8665 'AddSubnetsParams': {'additionalProperties': False,
8666 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
8667 'type': 'array'}},
8668 'required': ['Subnets'],
8669 'type': 'object'},
8670 'CreateSpaceParams': {'additionalProperties': False,
8671 'properties': {'ProviderId': {'type': 'string'},
8672 'Public': {'type': 'boolean'},
8673 'SpaceTag': {'type': 'string'},
8674 'SubnetTags': {'items': {'type': 'string'},
8675 'type': 'array'}},
8676 'required': ['SubnetTags',
8677 'SpaceTag',
8678 'Public'],
8679 'type': 'object'},
8680 'CreateSpacesParams': {'additionalProperties': False,
8681 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
8682 'type': 'array'}},
8683 'required': ['Spaces'],
8684 'type': 'object'},
8685 'DiscoverSpacesResults': {'additionalProperties': False,
8686 'properties': {'Results': {'items': {'$ref': '#/definitions/ProviderSpace'},
8687 'type': 'array'}},
8688 'required': ['Results'],
8689 'type': 'object'},
8690 'Error': {'additionalProperties': False,
8691 'properties': {'Code': {'type': 'string'},
8692 'Info': {'$ref': '#/definitions/ErrorInfo'},
8693 'Message': {'type': 'string'}},
8694 'required': ['Message', 'Code'],
8695 'type': 'object'},
8696 'ErrorInfo': {'additionalProperties': False,
8697 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8698 'MacaroonPath': {'type': 'string'}},
8699 'type': 'object'},
8700 'ErrorResult': {'additionalProperties': False,
8701 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8702 'required': ['Error'],
8703 'type': 'object'},
8704 'ErrorResults': {'additionalProperties': False,
8705 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8706 'type': 'array'}},
8707 'required': ['Results'],
8708 'type': 'object'},
8709 'ListSubnetsResults': {'additionalProperties': False,
8710 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
8711 'type': 'array'}},
8712 'required': ['Results'],
8713 'type': 'object'},
8714 'Macaroon': {'additionalProperties': False,
8715 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8716 'type': 'array'},
8717 'data': {'items': {'type': 'integer'},
8718 'type': 'array'},
8719 'id': {'$ref': '#/definitions/packet'},
8720 'location': {'$ref': '#/definitions/packet'},
8721 'sig': {'items': {'type': 'integer'},
8722 'type': 'array'}},
8723 'required': ['data',
8724 'location',
8725 'id',
8726 'caveats',
8727 'sig'],
8728 'type': 'object'},
8729 'ModelConfigResult': {'additionalProperties': False,
8730 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
8731 'type': 'object'}},
8732 'type': 'object'}},
8733 'required': ['Config'],
8734 'type': 'object'},
8735 'ProviderSpace': {'additionalProperties': False,
8736 'properties': {'Error': {'$ref': '#/definitions/Error'},
8737 'Name': {'type': 'string'},
8738 'ProviderId': {'type': 'string'},
8739 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
8740 'type': 'array'}},
8741 'required': ['Name',
8742 'ProviderId',
8743 'Subnets'],
8744 'type': 'object'},
8745 'Subnet': {'additionalProperties': False,
8746 'properties': {'CIDR': {'type': 'string'},
8747 'Life': {'type': 'string'},
8748 'ProviderId': {'type': 'string'},
8749 'SpaceTag': {'type': 'string'},
8750 'StaticRangeHighIP': {'items': {'type': 'integer'},
8751 'type': 'array'},
8752 'StaticRangeLowIP': {'items': {'type': 'integer'},
8753 'type': 'array'},
8754 'Status': {'type': 'string'},
8755 'VLANTag': {'type': 'integer'},
8756 'Zones': {'items': {'type': 'string'},
8757 'type': 'array'}},
8758 'required': ['CIDR',
8759 'VLANTag',
8760 'Life',
8761 'SpaceTag',
8762 'Zones'],
8763 'type': 'object'},
8764 'SubnetsFilters': {'additionalProperties': False,
8765 'properties': {'SpaceTag': {'type': 'string'},
8766 'Zone': {'type': 'string'}},
8767 'type': 'object'},
8768 'caveat': {'additionalProperties': False,
8769 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8770 'location': {'$ref': '#/definitions/packet'},
8771 'verificationId': {'$ref': '#/definitions/packet'}},
8772 'required': ['location',
8773 'caveatId',
8774 'verificationId'],
8775 'type': 'object'},
8776 'packet': {'additionalProperties': False,
8777 'properties': {'headerLen': {'type': 'integer'},
8778 'start': {'type': 'integer'},
8779 'totalLen': {'type': 'integer'}},
8780 'required': ['start', 'totalLen', 'headerLen'],
8781 'type': 'object'}},
8782 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
8783 'Result': {'$ref': '#/definitions/ErrorResults'}},
8784 'type': 'object'},
8785 'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
8786 'Result': {'$ref': '#/definitions/ErrorResults'}},
8787 'type': 'object'},
8788 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/DiscoverSpacesResults'}},
8789 'type': 'object'},
8790 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
8791 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
8792 'type': 'object'},
8793 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
8794 'type': 'object'}},
8795 'type': 'object'}
8796
8797
8798 @ReturnMapping(ErrorResults)
8799 async def AddSubnets(self, subnets):
8800 '''
8801 subnets : typing.Sequence[~AddSubnetParams]
8802 Returns -> typing.Sequence[~ErrorResult]
8803 '''
8804 # map input types to rpc msg
8805 params = dict()
8806 msg = dict(Type='DiscoverSpaces', Request='AddSubnets', Version=2, Params=params)
8807 params['Subnets'] = subnets
8808 reply = await self.rpc(msg)
8809 return reply
8810
8811
8812
8813 @ReturnMapping(ErrorResults)
8814 async def CreateSpaces(self, spaces):
8815 '''
8816 spaces : typing.Sequence[~CreateSpaceParams]
8817 Returns -> typing.Sequence[~ErrorResult]
8818 '''
8819 # map input types to rpc msg
8820 params = dict()
8821 msg = dict(Type='DiscoverSpaces', Request='CreateSpaces', Version=2, Params=params)
8822 params['Spaces'] = spaces
8823 reply = await self.rpc(msg)
8824 return reply
8825
8826
8827
8828 @ReturnMapping(DiscoverSpacesResults)
8829 async def ListSpaces(self):
8830 '''
8831
8832 Returns -> typing.Sequence[~ProviderSpace]
8833 '''
8834 # map input types to rpc msg
8835 params = dict()
8836 msg = dict(Type='DiscoverSpaces', Request='ListSpaces', Version=2, Params=params)
8837
8838 reply = await self.rpc(msg)
8839 return reply
8840
8841
8842
8843 @ReturnMapping(ListSubnetsResults)
8844 async def ListSubnets(self, spacetag, zone):
8845 '''
8846 spacetag : str
8847 zone : str
8848 Returns -> typing.Sequence[~Subnet]
8849 '''
8850 # map input types to rpc msg
8851 params = dict()
8852 msg = dict(Type='DiscoverSpaces', Request='ListSubnets', Version=2, Params=params)
8853 params['SpaceTag'] = spacetag
8854 params['Zone'] = zone
8855 reply = await self.rpc(msg)
8856 return reply
8857
8858
8859
8860 @ReturnMapping(ModelConfigResult)
8861 async def ModelConfig(self):
8862 '''
8863
8864 Returns -> typing.Mapping[str, typing.Any]
8865 '''
8866 # map input types to rpc msg
8867 params = dict()
8868 msg = dict(Type='DiscoverSpaces', Request='ModelConfig', Version=2, Params=params)
8869
8870 reply = await self.rpc(msg)
8871 return reply
8872
8873
8874 class DiskManager(Type):
8875 name = 'DiskManager'
8876 version = 2
8877 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
8878 'properties': {'BusAddress': {'type': 'string'},
8879 'DeviceLinks': {'items': {'type': 'string'},
8880 'type': 'array'},
8881 'DeviceName': {'type': 'string'},
8882 'FilesystemType': {'type': 'string'},
8883 'HardwareId': {'type': 'string'},
8884 'InUse': {'type': 'boolean'},
8885 'Label': {'type': 'string'},
8886 'MountPoint': {'type': 'string'},
8887 'Size': {'type': 'integer'},
8888 'UUID': {'type': 'string'}},
8889 'required': ['DeviceName',
8890 'DeviceLinks',
8891 'Label',
8892 'UUID',
8893 'HardwareId',
8894 'BusAddress',
8895 'Size',
8896 'FilesystemType',
8897 'InUse',
8898 'MountPoint'],
8899 'type': 'object'},
8900 'Error': {'additionalProperties': False,
8901 'properties': {'Code': {'type': 'string'},
8902 'Info': {'$ref': '#/definitions/ErrorInfo'},
8903 'Message': {'type': 'string'}},
8904 'required': ['Message', 'Code'],
8905 'type': 'object'},
8906 'ErrorInfo': {'additionalProperties': False,
8907 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8908 'MacaroonPath': {'type': 'string'}},
8909 'type': 'object'},
8910 'ErrorResult': {'additionalProperties': False,
8911 'properties': {'Error': {'$ref': '#/definitions/Error'}},
8912 'required': ['Error'],
8913 'type': 'object'},
8914 'ErrorResults': {'additionalProperties': False,
8915 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
8916 'type': 'array'}},
8917 'required': ['Results'],
8918 'type': 'object'},
8919 'Macaroon': {'additionalProperties': False,
8920 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
8921 'type': 'array'},
8922 'data': {'items': {'type': 'integer'},
8923 'type': 'array'},
8924 'id': {'$ref': '#/definitions/packet'},
8925 'location': {'$ref': '#/definitions/packet'},
8926 'sig': {'items': {'type': 'integer'},
8927 'type': 'array'}},
8928 'required': ['data',
8929 'location',
8930 'id',
8931 'caveats',
8932 'sig'],
8933 'type': 'object'},
8934 'MachineBlockDevices': {'additionalProperties': False,
8935 'properties': {'blockdevices': {'items': {'$ref': '#/definitions/BlockDevice'},
8936 'type': 'array'},
8937 'machine': {'type': 'string'}},
8938 'required': ['machine'],
8939 'type': 'object'},
8940 'SetMachineBlockDevices': {'additionalProperties': False,
8941 'properties': {'machineblockdevices': {'items': {'$ref': '#/definitions/MachineBlockDevices'},
8942 'type': 'array'}},
8943 'required': ['machineblockdevices'],
8944 'type': 'object'},
8945 'caveat': {'additionalProperties': False,
8946 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
8947 'location': {'$ref': '#/definitions/packet'},
8948 'verificationId': {'$ref': '#/definitions/packet'}},
8949 'required': ['location',
8950 'caveatId',
8951 'verificationId'],
8952 'type': 'object'},
8953 'packet': {'additionalProperties': False,
8954 'properties': {'headerLen': {'type': 'integer'},
8955 'start': {'type': 'integer'},
8956 'totalLen': {'type': 'integer'}},
8957 'required': ['start', 'totalLen', 'headerLen'],
8958 'type': 'object'}},
8959 'properties': {'SetMachineBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/SetMachineBlockDevices'},
8960 'Result': {'$ref': '#/definitions/ErrorResults'}},
8961 'type': 'object'}},
8962 'type': 'object'}
8963
8964
8965 @ReturnMapping(ErrorResults)
8966 async def SetMachineBlockDevices(self, machineblockdevices):
8967 '''
8968 machineblockdevices : typing.Sequence[~MachineBlockDevices]
8969 Returns -> typing.Sequence[~ErrorResult]
8970 '''
8971 # map input types to rpc msg
8972 params = dict()
8973 msg = dict(Type='DiskManager', Request='SetMachineBlockDevices', Version=2, Params=params)
8974 params['machineblockdevices'] = machineblockdevices
8975 reply = await self.rpc(msg)
8976 return reply
8977
8978
8979 class EntityWatcher(Type):
8980 name = 'EntityWatcher'
8981 version = 2
8982 schema = {'definitions': {'EntitiesWatchResult': {'additionalProperties': False,
8983 'properties': {'Changes': {'items': {'type': 'string'},
8984 'type': 'array'},
8985 'EntityWatcherId': {'type': 'string'},
8986 'Error': {'$ref': '#/definitions/Error'}},
8987 'required': ['EntityWatcherId',
8988 'Changes',
8989 'Error'],
8990 'type': 'object'},
8991 'Error': {'additionalProperties': False,
8992 'properties': {'Code': {'type': 'string'},
8993 'Info': {'$ref': '#/definitions/ErrorInfo'},
8994 'Message': {'type': 'string'}},
8995 'required': ['Message', 'Code'],
8996 'type': 'object'},
8997 'ErrorInfo': {'additionalProperties': False,
8998 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
8999 'MacaroonPath': {'type': 'string'}},
9000 'type': 'object'},
9001 'Macaroon': {'additionalProperties': False,
9002 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9003 'type': 'array'},
9004 'data': {'items': {'type': 'integer'},
9005 'type': 'array'},
9006 'id': {'$ref': '#/definitions/packet'},
9007 'location': {'$ref': '#/definitions/packet'},
9008 'sig': {'items': {'type': 'integer'},
9009 'type': 'array'}},
9010 'required': ['data',
9011 'location',
9012 'id',
9013 'caveats',
9014 'sig'],
9015 'type': 'object'},
9016 'caveat': {'additionalProperties': False,
9017 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9018 'location': {'$ref': '#/definitions/packet'},
9019 'verificationId': {'$ref': '#/definitions/packet'}},
9020 'required': ['location',
9021 'caveatId',
9022 'verificationId'],
9023 'type': 'object'},
9024 'packet': {'additionalProperties': False,
9025 'properties': {'headerLen': {'type': 'integer'},
9026 'start': {'type': 'integer'},
9027 'totalLen': {'type': 'integer'}},
9028 'required': ['start', 'totalLen', 'headerLen'],
9029 'type': 'object'}},
9030 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/EntitiesWatchResult'}},
9031 'type': 'object'},
9032 'Stop': {'type': 'object'}},
9033 'type': 'object'}
9034
9035
9036 @ReturnMapping(EntitiesWatchResult)
9037 async def Next(self):
9038 '''
9039
9040 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9041 '''
9042 # map input types to rpc msg
9043 params = dict()
9044 msg = dict(Type='EntityWatcher', Request='Next', Version=2, Params=params)
9045
9046 reply = await self.rpc(msg)
9047 return reply
9048
9049
9050
9051 @ReturnMapping(None)
9052 async def Stop(self):
9053 '''
9054
9055 Returns -> None
9056 '''
9057 # map input types to rpc msg
9058 params = dict()
9059 msg = dict(Type='EntityWatcher', Request='Stop', Version=2, Params=params)
9060
9061 reply = await self.rpc(msg)
9062 return reply
9063
9064
9065 class FilesystemAttachmentsWatcher(Type):
9066 name = 'FilesystemAttachmentsWatcher'
9067 version = 2
9068 schema = {'definitions': {'Error': {'additionalProperties': False,
9069 'properties': {'Code': {'type': 'string'},
9070 'Info': {'$ref': '#/definitions/ErrorInfo'},
9071 'Message': {'type': 'string'}},
9072 'required': ['Message', 'Code'],
9073 'type': 'object'},
9074 'ErrorInfo': {'additionalProperties': False,
9075 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9076 'MacaroonPath': {'type': 'string'}},
9077 'type': 'object'},
9078 'Macaroon': {'additionalProperties': False,
9079 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9080 'type': 'array'},
9081 'data': {'items': {'type': 'integer'},
9082 'type': 'array'},
9083 'id': {'$ref': '#/definitions/packet'},
9084 'location': {'$ref': '#/definitions/packet'},
9085 'sig': {'items': {'type': 'integer'},
9086 'type': 'array'}},
9087 'required': ['data',
9088 'location',
9089 'id',
9090 'caveats',
9091 'sig'],
9092 'type': 'object'},
9093 'MachineStorageId': {'additionalProperties': False,
9094 'properties': {'attachmenttag': {'type': 'string'},
9095 'machinetag': {'type': 'string'}},
9096 'required': ['machinetag',
9097 'attachmenttag'],
9098 'type': 'object'},
9099 'MachineStorageIdsWatchResult': {'additionalProperties': False,
9100 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
9101 'type': 'array'},
9102 'Error': {'$ref': '#/definitions/Error'},
9103 'MachineStorageIdsWatcherId': {'type': 'string'}},
9104 'required': ['MachineStorageIdsWatcherId',
9105 'Changes',
9106 'Error'],
9107 'type': 'object'},
9108 'caveat': {'additionalProperties': False,
9109 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9110 'location': {'$ref': '#/definitions/packet'},
9111 'verificationId': {'$ref': '#/definitions/packet'}},
9112 'required': ['location',
9113 'caveatId',
9114 'verificationId'],
9115 'type': 'object'},
9116 'packet': {'additionalProperties': False,
9117 'properties': {'headerLen': {'type': 'integer'},
9118 'start': {'type': 'integer'},
9119 'totalLen': {'type': 'integer'}},
9120 'required': ['start', 'totalLen', 'headerLen'],
9121 'type': 'object'}},
9122 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
9123 'type': 'object'},
9124 'Stop': {'type': 'object'}},
9125 'type': 'object'}
9126
9127
9128 @ReturnMapping(MachineStorageIdsWatchResult)
9129 async def Next(self):
9130 '''
9131
9132 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
9133 '''
9134 # map input types to rpc msg
9135 params = dict()
9136 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Next', Version=2, Params=params)
9137
9138 reply = await self.rpc(msg)
9139 return reply
9140
9141
9142
9143 @ReturnMapping(None)
9144 async def Stop(self):
9145 '''
9146
9147 Returns -> None
9148 '''
9149 # map input types to rpc msg
9150 params = dict()
9151 msg = dict(Type='FilesystemAttachmentsWatcher', Request='Stop', Version=2, Params=params)
9152
9153 reply = await self.rpc(msg)
9154 return reply
9155
9156
9157 class Firewaller(Type):
9158 name = 'Firewaller'
9159 version = 2
9160 schema = {'definitions': {'BoolResult': {'additionalProperties': False,
9161 'properties': {'Error': {'$ref': '#/definitions/Error'},
9162 'Result': {'type': 'boolean'}},
9163 'required': ['Error', 'Result'],
9164 'type': 'object'},
9165 'BoolResults': {'additionalProperties': False,
9166 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
9167 'type': 'array'}},
9168 'required': ['Results'],
9169 'type': 'object'},
9170 'Entities': {'additionalProperties': False,
9171 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
9172 'type': 'array'}},
9173 'required': ['Entities'],
9174 'type': 'object'},
9175 'Entity': {'additionalProperties': False,
9176 'properties': {'Tag': {'type': 'string'}},
9177 'required': ['Tag'],
9178 'type': 'object'},
9179 'Error': {'additionalProperties': False,
9180 'properties': {'Code': {'type': 'string'},
9181 'Info': {'$ref': '#/definitions/ErrorInfo'},
9182 'Message': {'type': 'string'}},
9183 'required': ['Message', 'Code'],
9184 'type': 'object'},
9185 'ErrorInfo': {'additionalProperties': False,
9186 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9187 'MacaroonPath': {'type': 'string'}},
9188 'type': 'object'},
9189 'LifeResult': {'additionalProperties': False,
9190 'properties': {'Error': {'$ref': '#/definitions/Error'},
9191 'Life': {'type': 'string'}},
9192 'required': ['Life', 'Error'],
9193 'type': 'object'},
9194 'LifeResults': {'additionalProperties': False,
9195 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
9196 'type': 'array'}},
9197 'required': ['Results'],
9198 'type': 'object'},
9199 'Macaroon': {'additionalProperties': False,
9200 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9201 'type': 'array'},
9202 'data': {'items': {'type': 'integer'},
9203 'type': 'array'},
9204 'id': {'$ref': '#/definitions/packet'},
9205 'location': {'$ref': '#/definitions/packet'},
9206 'sig': {'items': {'type': 'integer'},
9207 'type': 'array'}},
9208 'required': ['data',
9209 'location',
9210 'id',
9211 'caveats',
9212 'sig'],
9213 'type': 'object'},
9214 'MachinePortRange': {'additionalProperties': False,
9215 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
9216 'RelationTag': {'type': 'string'},
9217 'UnitTag': {'type': 'string'}},
9218 'required': ['UnitTag',
9219 'RelationTag',
9220 'PortRange'],
9221 'type': 'object'},
9222 'MachinePorts': {'additionalProperties': False,
9223 'properties': {'MachineTag': {'type': 'string'},
9224 'SubnetTag': {'type': 'string'}},
9225 'required': ['MachineTag', 'SubnetTag'],
9226 'type': 'object'},
9227 'MachinePortsParams': {'additionalProperties': False,
9228 'properties': {'Params': {'items': {'$ref': '#/definitions/MachinePorts'},
9229 'type': 'array'}},
9230 'required': ['Params'],
9231 'type': 'object'},
9232 'MachinePortsResult': {'additionalProperties': False,
9233 'properties': {'Error': {'$ref': '#/definitions/Error'},
9234 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
9235 'type': 'array'}},
9236 'required': ['Error', 'Ports'],
9237 'type': 'object'},
9238 'MachinePortsResults': {'additionalProperties': False,
9239 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
9240 'type': 'array'}},
9241 'required': ['Results'],
9242 'type': 'object'},
9243 'ModelConfigResult': {'additionalProperties': False,
9244 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
9245 'type': 'object'}},
9246 'type': 'object'}},
9247 'required': ['Config'],
9248 'type': 'object'},
9249 'NotifyWatchResult': {'additionalProperties': False,
9250 'properties': {'Error': {'$ref': '#/definitions/Error'},
9251 'NotifyWatcherId': {'type': 'string'}},
9252 'required': ['NotifyWatcherId', 'Error'],
9253 'type': 'object'},
9254 'NotifyWatchResults': {'additionalProperties': False,
9255 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
9256 'type': 'array'}},
9257 'required': ['Results'],
9258 'type': 'object'},
9259 'PortRange': {'additionalProperties': False,
9260 'properties': {'FromPort': {'type': 'integer'},
9261 'Protocol': {'type': 'string'},
9262 'ToPort': {'type': 'integer'}},
9263 'required': ['FromPort', 'ToPort', 'Protocol'],
9264 'type': 'object'},
9265 'StringResult': {'additionalProperties': False,
9266 'properties': {'Error': {'$ref': '#/definitions/Error'},
9267 'Result': {'type': 'string'}},
9268 'required': ['Error', 'Result'],
9269 'type': 'object'},
9270 'StringResults': {'additionalProperties': False,
9271 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
9272 'type': 'array'}},
9273 'required': ['Results'],
9274 'type': 'object'},
9275 'StringsResult': {'additionalProperties': False,
9276 'properties': {'Error': {'$ref': '#/definitions/Error'},
9277 'Result': {'items': {'type': 'string'},
9278 'type': 'array'}},
9279 'required': ['Error', 'Result'],
9280 'type': 'object'},
9281 'StringsResults': {'additionalProperties': False,
9282 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
9283 'type': 'array'}},
9284 'required': ['Results'],
9285 'type': 'object'},
9286 'StringsWatchResult': {'additionalProperties': False,
9287 'properties': {'Changes': {'items': {'type': 'string'},
9288 'type': 'array'},
9289 'Error': {'$ref': '#/definitions/Error'},
9290 'StringsWatcherId': {'type': 'string'}},
9291 'required': ['StringsWatcherId',
9292 'Changes',
9293 'Error'],
9294 'type': 'object'},
9295 'StringsWatchResults': {'additionalProperties': False,
9296 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
9297 'type': 'array'}},
9298 'required': ['Results'],
9299 'type': 'object'},
9300 'caveat': {'additionalProperties': False,
9301 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9302 'location': {'$ref': '#/definitions/packet'},
9303 'verificationId': {'$ref': '#/definitions/packet'}},
9304 'required': ['location',
9305 'caveatId',
9306 'verificationId'],
9307 'type': 'object'},
9308 'packet': {'additionalProperties': False,
9309 'properties': {'headerLen': {'type': 'integer'},
9310 'start': {'type': 'integer'},
9311 'totalLen': {'type': 'integer'}},
9312 'required': ['start', 'totalLen', 'headerLen'],
9313 'type': 'object'}},
9314 'properties': {'GetAssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9315 'Result': {'$ref': '#/definitions/StringResults'}},
9316 'type': 'object'},
9317 'GetExposed': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9318 'Result': {'$ref': '#/definitions/BoolResults'}},
9319 'type': 'object'},
9320 'GetMachineActiveSubnets': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9321 'Result': {'$ref': '#/definitions/StringsResults'}},
9322 'type': 'object'},
9323 'GetMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/MachinePortsParams'},
9324 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
9325 'type': 'object'},
9326 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9327 'Result': {'$ref': '#/definitions/StringResults'}},
9328 'type': 'object'},
9329 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9330 'Result': {'$ref': '#/definitions/LifeResults'}},
9331 'type': 'object'},
9332 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
9333 'type': 'object'},
9334 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9335 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
9336 'type': 'object'},
9337 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
9338 'type': 'object'},
9339 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
9340 'type': 'object'},
9341 'WatchOpenedPorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9342 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9343 'type': 'object'},
9344 'WatchUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
9345 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
9346 'type': 'object'}},
9347 'type': 'object'}
9348
9349
9350 @ReturnMapping(StringResults)
9351 async def GetAssignedMachine(self, entities):
9352 '''
9353 entities : typing.Sequence[~Entity]
9354 Returns -> typing.Sequence[~StringResult]
9355 '''
9356 # map input types to rpc msg
9357 params = dict()
9358 msg = dict(Type='Firewaller', Request='GetAssignedMachine', Version=2, Params=params)
9359 params['Entities'] = entities
9360 reply = await self.rpc(msg)
9361 return reply
9362
9363
9364
9365 @ReturnMapping(BoolResults)
9366 async def GetExposed(self, entities):
9367 '''
9368 entities : typing.Sequence[~Entity]
9369 Returns -> typing.Sequence[~BoolResult]
9370 '''
9371 # map input types to rpc msg
9372 params = dict()
9373 msg = dict(Type='Firewaller', Request='GetExposed', Version=2, Params=params)
9374 params['Entities'] = entities
9375 reply = await self.rpc(msg)
9376 return reply
9377
9378
9379
9380 @ReturnMapping(StringsResults)
9381 async def GetMachineActiveSubnets(self, entities):
9382 '''
9383 entities : typing.Sequence[~Entity]
9384 Returns -> typing.Sequence[~StringsResult]
9385 '''
9386 # map input types to rpc msg
9387 params = dict()
9388 msg = dict(Type='Firewaller', Request='GetMachineActiveSubnets', Version=2, Params=params)
9389 params['Entities'] = entities
9390 reply = await self.rpc(msg)
9391 return reply
9392
9393
9394
9395 @ReturnMapping(MachinePortsResults)
9396 async def GetMachinePorts(self, params):
9397 '''
9398 params : typing.Sequence[~MachinePorts]
9399 Returns -> typing.Sequence[~MachinePortsResult]
9400 '''
9401 # map input types to rpc msg
9402 params = dict()
9403 msg = dict(Type='Firewaller', Request='GetMachinePorts', Version=2, Params=params)
9404 params['Params'] = params
9405 reply = await self.rpc(msg)
9406 return reply
9407
9408
9409
9410 @ReturnMapping(StringResults)
9411 async def InstanceId(self, entities):
9412 '''
9413 entities : typing.Sequence[~Entity]
9414 Returns -> typing.Sequence[~StringResult]
9415 '''
9416 # map input types to rpc msg
9417 params = dict()
9418 msg = dict(Type='Firewaller', Request='InstanceId', Version=2, Params=params)
9419 params['Entities'] = entities
9420 reply = await self.rpc(msg)
9421 return reply
9422
9423
9424
9425 @ReturnMapping(LifeResults)
9426 async def Life(self, entities):
9427 '''
9428 entities : typing.Sequence[~Entity]
9429 Returns -> typing.Sequence[~LifeResult]
9430 '''
9431 # map input types to rpc msg
9432 params = dict()
9433 msg = dict(Type='Firewaller', Request='Life', Version=2, Params=params)
9434 params['Entities'] = entities
9435 reply = await self.rpc(msg)
9436 return reply
9437
9438
9439
9440 @ReturnMapping(ModelConfigResult)
9441 async def ModelConfig(self):
9442 '''
9443
9444 Returns -> typing.Mapping[str, typing.Any]
9445 '''
9446 # map input types to rpc msg
9447 params = dict()
9448 msg = dict(Type='Firewaller', Request='ModelConfig', Version=2, Params=params)
9449
9450 reply = await self.rpc(msg)
9451 return reply
9452
9453
9454
9455 @ReturnMapping(NotifyWatchResults)
9456 async def Watch(self, entities):
9457 '''
9458 entities : typing.Sequence[~Entity]
9459 Returns -> typing.Sequence[~NotifyWatchResult]
9460 '''
9461 # map input types to rpc msg
9462 params = dict()
9463 msg = dict(Type='Firewaller', Request='Watch', Version=2, Params=params)
9464 params['Entities'] = entities
9465 reply = await self.rpc(msg)
9466 return reply
9467
9468
9469
9470 @ReturnMapping(NotifyWatchResult)
9471 async def WatchForModelConfigChanges(self):
9472 '''
9473
9474 Returns -> typing.Union[_ForwardRef('Error'), str]
9475 '''
9476 # map input types to rpc msg
9477 params = dict()
9478 msg = dict(Type='Firewaller', Request='WatchForModelConfigChanges', Version=2, Params=params)
9479
9480 reply = await self.rpc(msg)
9481 return reply
9482
9483
9484
9485 @ReturnMapping(StringsWatchResult)
9486 async def WatchModelMachines(self):
9487 '''
9488
9489 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
9490 '''
9491 # map input types to rpc msg
9492 params = dict()
9493 msg = dict(Type='Firewaller', Request='WatchModelMachines', Version=2, Params=params)
9494
9495 reply = await self.rpc(msg)
9496 return reply
9497
9498
9499
9500 @ReturnMapping(StringsWatchResults)
9501 async def WatchOpenedPorts(self, entities):
9502 '''
9503 entities : typing.Sequence[~Entity]
9504 Returns -> typing.Sequence[~StringsWatchResult]
9505 '''
9506 # map input types to rpc msg
9507 params = dict()
9508 msg = dict(Type='Firewaller', Request='WatchOpenedPorts', Version=2, Params=params)
9509 params['Entities'] = entities
9510 reply = await self.rpc(msg)
9511 return reply
9512
9513
9514
9515 @ReturnMapping(StringsWatchResults)
9516 async def WatchUnits(self, entities):
9517 '''
9518 entities : typing.Sequence[~Entity]
9519 Returns -> typing.Sequence[~StringsWatchResult]
9520 '''
9521 # map input types to rpc msg
9522 params = dict()
9523 msg = dict(Type='Firewaller', Request='WatchUnits', Version=2, Params=params)
9524 params['Entities'] = entities
9525 reply = await self.rpc(msg)
9526 return reply
9527
9528
9529 class HighAvailability(Type):
9530 name = 'HighAvailability'
9531 version = 2
9532 schema = {'definitions': {'Address': {'additionalProperties': False,
9533 'properties': {'Scope': {'type': 'string'},
9534 'SpaceName': {'type': 'string'},
9535 'SpaceProviderId': {'type': 'string'},
9536 'Type': {'type': 'string'},
9537 'Value': {'type': 'string'}},
9538 'required': ['Value',
9539 'Type',
9540 'Scope',
9541 'SpaceName',
9542 'SpaceProviderId'],
9543 'type': 'object'},
9544 'ControllersChangeResult': {'additionalProperties': False,
9545 'properties': {'Error': {'$ref': '#/definitions/Error'},
9546 'Result': {'$ref': '#/definitions/ControllersChanges'}},
9547 'required': ['Result', 'Error'],
9548 'type': 'object'},
9549 'ControllersChangeResults': {'additionalProperties': False,
9550 'properties': {'Results': {'items': {'$ref': '#/definitions/ControllersChangeResult'},
9551 'type': 'array'}},
9552 'required': ['Results'],
9553 'type': 'object'},
9554 'ControllersChanges': {'additionalProperties': False,
9555 'properties': {'added': {'items': {'type': 'string'},
9556 'type': 'array'},
9557 'converted': {'items': {'type': 'string'},
9558 'type': 'array'},
9559 'demoted': {'items': {'type': 'string'},
9560 'type': 'array'},
9561 'maintained': {'items': {'type': 'string'},
9562 'type': 'array'},
9563 'promoted': {'items': {'type': 'string'},
9564 'type': 'array'},
9565 'removed': {'items': {'type': 'string'},
9566 'type': 'array'}},
9567 'type': 'object'},
9568 'ControllersSpec': {'additionalProperties': False,
9569 'properties': {'ModelTag': {'type': 'string'},
9570 'constraints': {'$ref': '#/definitions/Value'},
9571 'num-controllers': {'type': 'integer'},
9572 'placement': {'items': {'type': 'string'},
9573 'type': 'array'},
9574 'series': {'type': 'string'}},
9575 'required': ['ModelTag',
9576 'num-controllers'],
9577 'type': 'object'},
9578 'ControllersSpecs': {'additionalProperties': False,
9579 'properties': {'Specs': {'items': {'$ref': '#/definitions/ControllersSpec'},
9580 'type': 'array'}},
9581 'required': ['Specs'],
9582 'type': 'object'},
9583 'Error': {'additionalProperties': False,
9584 'properties': {'Code': {'type': 'string'},
9585 'Info': {'$ref': '#/definitions/ErrorInfo'},
9586 'Message': {'type': 'string'}},
9587 'required': ['Message', 'Code'],
9588 'type': 'object'},
9589 'ErrorInfo': {'additionalProperties': False,
9590 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9591 'MacaroonPath': {'type': 'string'}},
9592 'type': 'object'},
9593 'HAMember': {'additionalProperties': False,
9594 'properties': {'PublicAddress': {'$ref': '#/definitions/Address'},
9595 'Series': {'type': 'string'},
9596 'Tag': {'type': 'string'}},
9597 'required': ['Tag', 'PublicAddress', 'Series'],
9598 'type': 'object'},
9599 'Macaroon': {'additionalProperties': False,
9600 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9601 'type': 'array'},
9602 'data': {'items': {'type': 'integer'},
9603 'type': 'array'},
9604 'id': {'$ref': '#/definitions/packet'},
9605 'location': {'$ref': '#/definitions/packet'},
9606 'sig': {'items': {'type': 'integer'},
9607 'type': 'array'}},
9608 'required': ['data',
9609 'location',
9610 'id',
9611 'caveats',
9612 'sig'],
9613 'type': 'object'},
9614 'Member': {'additionalProperties': False,
9615 'properties': {'Address': {'type': 'string'},
9616 'Arbiter': {'type': 'boolean'},
9617 'BuildIndexes': {'type': 'boolean'},
9618 'Hidden': {'type': 'boolean'},
9619 'Id': {'type': 'integer'},
9620 'Priority': {'type': 'number'},
9621 'SlaveDelay': {'type': 'integer'},
9622 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
9623 'type': 'object'},
9624 'Votes': {'type': 'integer'}},
9625 'required': ['Id',
9626 'Address',
9627 'Arbiter',
9628 'BuildIndexes',
9629 'Hidden',
9630 'Priority',
9631 'Tags',
9632 'SlaveDelay',
9633 'Votes'],
9634 'type': 'object'},
9635 'MongoUpgradeResults': {'additionalProperties': False,
9636 'properties': {'Master': {'$ref': '#/definitions/HAMember'},
9637 'Members': {'items': {'$ref': '#/definitions/HAMember'},
9638 'type': 'array'},
9639 'RsMembers': {'items': {'$ref': '#/definitions/Member'},
9640 'type': 'array'}},
9641 'required': ['RsMembers',
9642 'Master',
9643 'Members'],
9644 'type': 'object'},
9645 'ResumeReplicationParams': {'additionalProperties': False,
9646 'properties': {'Members': {'items': {'$ref': '#/definitions/Member'},
9647 'type': 'array'}},
9648 'required': ['Members'],
9649 'type': 'object'},
9650 'UpgradeMongoParams': {'additionalProperties': False,
9651 'properties': {'Target': {'$ref': '#/definitions/Version'}},
9652 'required': ['Target'],
9653 'type': 'object'},
9654 'Value': {'additionalProperties': False,
9655 'properties': {'arch': {'type': 'string'},
9656 'container': {'type': 'string'},
9657 'cpu-cores': {'type': 'integer'},
9658 'cpu-power': {'type': 'integer'},
9659 'instance-type': {'type': 'string'},
9660 'mem': {'type': 'integer'},
9661 'root-disk': {'type': 'integer'},
9662 'spaces': {'items': {'type': 'string'},
9663 'type': 'array'},
9664 'tags': {'items': {'type': 'string'},
9665 'type': 'array'},
9666 'virt-type': {'type': 'string'}},
9667 'type': 'object'},
9668 'Version': {'additionalProperties': False,
9669 'properties': {'Major': {'type': 'integer'},
9670 'Minor': {'type': 'integer'},
9671 'Patch': {'type': 'string'},
9672 'StorageEngine': {'type': 'string'}},
9673 'required': ['Major',
9674 'Minor',
9675 'Patch',
9676 'StorageEngine'],
9677 'type': 'object'},
9678 'caveat': {'additionalProperties': False,
9679 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9680 'location': {'$ref': '#/definitions/packet'},
9681 'verificationId': {'$ref': '#/definitions/packet'}},
9682 'required': ['location',
9683 'caveatId',
9684 'verificationId'],
9685 'type': 'object'},
9686 'packet': {'additionalProperties': False,
9687 'properties': {'headerLen': {'type': 'integer'},
9688 'start': {'type': 'integer'},
9689 'totalLen': {'type': 'integer'}},
9690 'required': ['start', 'totalLen', 'headerLen'],
9691 'type': 'object'}},
9692 'properties': {'EnableHA': {'properties': {'Params': {'$ref': '#/definitions/ControllersSpecs'},
9693 'Result': {'$ref': '#/definitions/ControllersChangeResults'}},
9694 'type': 'object'},
9695 'ResumeHAReplicationAfterUpgrade': {'properties': {'Params': {'$ref': '#/definitions/ResumeReplicationParams'}},
9696 'type': 'object'},
9697 'StopHAReplicationForUpgrade': {'properties': {'Params': {'$ref': '#/definitions/UpgradeMongoParams'},
9698 'Result': {'$ref': '#/definitions/MongoUpgradeResults'}},
9699 'type': 'object'}},
9700 'type': 'object'}
9701
9702
9703 @ReturnMapping(ControllersChangeResults)
9704 async def EnableHA(self, specs):
9705 '''
9706 specs : typing.Sequence[~ControllersSpec]
9707 Returns -> typing.Sequence[~ControllersChangeResult]
9708 '''
9709 # map input types to rpc msg
9710 params = dict()
9711 msg = dict(Type='HighAvailability', Request='EnableHA', Version=2, Params=params)
9712 params['Specs'] = specs
9713 reply = await self.rpc(msg)
9714 return reply
9715
9716
9717
9718 @ReturnMapping(None)
9719 async def ResumeHAReplicationAfterUpgrade(self, members):
9720 '''
9721 members : typing.Sequence[~Member]
9722 Returns -> None
9723 '''
9724 # map input types to rpc msg
9725 params = dict()
9726 msg = dict(Type='HighAvailability', Request='ResumeHAReplicationAfterUpgrade', Version=2, Params=params)
9727 params['Members'] = members
9728 reply = await self.rpc(msg)
9729 return reply
9730
9731
9732
9733 @ReturnMapping(MongoUpgradeResults)
9734 async def StopHAReplicationForUpgrade(self, major, minor, patch, storageengine):
9735 '''
9736 major : int
9737 minor : int
9738 patch : str
9739 storageengine : str
9740 Returns -> typing.Union[_ForwardRef('HAMember'), typing.Sequence[~Member]]
9741 '''
9742 # map input types to rpc msg
9743 params = dict()
9744 msg = dict(Type='HighAvailability', Request='StopHAReplicationForUpgrade', Version=2, Params=params)
9745 params['Major'] = major
9746 params['Minor'] = minor
9747 params['Patch'] = patch
9748 params['StorageEngine'] = storageengine
9749 reply = await self.rpc(msg)
9750 return reply
9751
9752
9753 class HostKeyReporter(Type):
9754 name = 'HostKeyReporter'
9755 version = 1
9756 schema = {'definitions': {'Error': {'additionalProperties': False,
9757 'properties': {'Code': {'type': 'string'},
9758 'Info': {'$ref': '#/definitions/ErrorInfo'},
9759 'Message': {'type': 'string'}},
9760 'required': ['Message', 'Code'],
9761 'type': 'object'},
9762 'ErrorInfo': {'additionalProperties': False,
9763 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9764 'MacaroonPath': {'type': 'string'}},
9765 'type': 'object'},
9766 'ErrorResult': {'additionalProperties': False,
9767 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9768 'required': ['Error'],
9769 'type': 'object'},
9770 'ErrorResults': {'additionalProperties': False,
9771 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9772 'type': 'array'}},
9773 'required': ['Results'],
9774 'type': 'object'},
9775 'Macaroon': {'additionalProperties': False,
9776 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9777 'type': 'array'},
9778 'data': {'items': {'type': 'integer'},
9779 'type': 'array'},
9780 'id': {'$ref': '#/definitions/packet'},
9781 'location': {'$ref': '#/definitions/packet'},
9782 'sig': {'items': {'type': 'integer'},
9783 'type': 'array'}},
9784 'required': ['data',
9785 'location',
9786 'id',
9787 'caveats',
9788 'sig'],
9789 'type': 'object'},
9790 'SSHHostKeySet': {'additionalProperties': False,
9791 'properties': {'entity-keys': {'items': {'$ref': '#/definitions/SSHHostKeys'},
9792 'type': 'array'}},
9793 'required': ['entity-keys'],
9794 'type': 'object'},
9795 'SSHHostKeys': {'additionalProperties': False,
9796 'properties': {'public-keys': {'items': {'type': 'string'},
9797 'type': 'array'},
9798 'tag': {'type': 'string'}},
9799 'required': ['tag', 'public-keys'],
9800 'type': 'object'},
9801 'caveat': {'additionalProperties': False,
9802 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9803 'location': {'$ref': '#/definitions/packet'},
9804 'verificationId': {'$ref': '#/definitions/packet'}},
9805 'required': ['location',
9806 'caveatId',
9807 'verificationId'],
9808 'type': 'object'},
9809 'packet': {'additionalProperties': False,
9810 'properties': {'headerLen': {'type': 'integer'},
9811 'start': {'type': 'integer'},
9812 'totalLen': {'type': 'integer'}},
9813 'required': ['start', 'totalLen', 'headerLen'],
9814 'type': 'object'}},
9815 'properties': {'ReportKeys': {'properties': {'Params': {'$ref': '#/definitions/SSHHostKeySet'},
9816 'Result': {'$ref': '#/definitions/ErrorResults'}},
9817 'type': 'object'}},
9818 'type': 'object'}
9819
9820
9821 @ReturnMapping(ErrorResults)
9822 async def ReportKeys(self, entity_keys):
9823 '''
9824 entity_keys : typing.Sequence[~SSHHostKeys]
9825 Returns -> typing.Sequence[~ErrorResult]
9826 '''
9827 # map input types to rpc msg
9828 params = dict()
9829 msg = dict(Type='HostKeyReporter', Request='ReportKeys', Version=1, Params=params)
9830 params['entity-keys'] = entity_keys
9831 reply = await self.rpc(msg)
9832 return reply
9833
9834
9835 class ImageManager(Type):
9836 name = 'ImageManager'
9837 version = 2
9838 schema = {'definitions': {'Error': {'additionalProperties': False,
9839 'properties': {'Code': {'type': 'string'},
9840 'Info': {'$ref': '#/definitions/ErrorInfo'},
9841 'Message': {'type': 'string'}},
9842 'required': ['Message', 'Code'],
9843 'type': 'object'},
9844 'ErrorInfo': {'additionalProperties': False,
9845 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9846 'MacaroonPath': {'type': 'string'}},
9847 'type': 'object'},
9848 'ErrorResult': {'additionalProperties': False,
9849 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9850 'required': ['Error'],
9851 'type': 'object'},
9852 'ErrorResults': {'additionalProperties': False,
9853 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9854 'type': 'array'}},
9855 'required': ['Results'],
9856 'type': 'object'},
9857 'ImageFilterParams': {'additionalProperties': False,
9858 'properties': {'images': {'items': {'$ref': '#/definitions/ImageSpec'},
9859 'type': 'array'}},
9860 'required': ['images'],
9861 'type': 'object'},
9862 'ImageMetadata': {'additionalProperties': False,
9863 'properties': {'arch': {'type': 'string'},
9864 'created': {'format': 'date-time',
9865 'type': 'string'},
9866 'kind': {'type': 'string'},
9867 'series': {'type': 'string'},
9868 'url': {'type': 'string'}},
9869 'required': ['kind',
9870 'arch',
9871 'series',
9872 'url',
9873 'created'],
9874 'type': 'object'},
9875 'ImageSpec': {'additionalProperties': False,
9876 'properties': {'arch': {'type': 'string'},
9877 'kind': {'type': 'string'},
9878 'series': {'type': 'string'}},
9879 'required': ['kind', 'arch', 'series'],
9880 'type': 'object'},
9881 'ListImageResult': {'additionalProperties': False,
9882 'properties': {'result': {'items': {'$ref': '#/definitions/ImageMetadata'},
9883 'type': 'array'}},
9884 'required': ['result'],
9885 'type': 'object'},
9886 'Macaroon': {'additionalProperties': False,
9887 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
9888 'type': 'array'},
9889 'data': {'items': {'type': 'integer'},
9890 'type': 'array'},
9891 'id': {'$ref': '#/definitions/packet'},
9892 'location': {'$ref': '#/definitions/packet'},
9893 'sig': {'items': {'type': 'integer'},
9894 'type': 'array'}},
9895 'required': ['data',
9896 'location',
9897 'id',
9898 'caveats',
9899 'sig'],
9900 'type': 'object'},
9901 'caveat': {'additionalProperties': False,
9902 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
9903 'location': {'$ref': '#/definitions/packet'},
9904 'verificationId': {'$ref': '#/definitions/packet'}},
9905 'required': ['location',
9906 'caveatId',
9907 'verificationId'],
9908 'type': 'object'},
9909 'packet': {'additionalProperties': False,
9910 'properties': {'headerLen': {'type': 'integer'},
9911 'start': {'type': 'integer'},
9912 'totalLen': {'type': 'integer'}},
9913 'required': ['start', 'totalLen', 'headerLen'],
9914 'type': 'object'}},
9915 'properties': {'DeleteImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
9916 'Result': {'$ref': '#/definitions/ErrorResults'}},
9917 'type': 'object'},
9918 'ListImages': {'properties': {'Params': {'$ref': '#/definitions/ImageFilterParams'},
9919 'Result': {'$ref': '#/definitions/ListImageResult'}},
9920 'type': 'object'}},
9921 'type': 'object'}
9922
9923
9924 @ReturnMapping(ErrorResults)
9925 async def DeleteImages(self, images):
9926 '''
9927 images : typing.Sequence[~ImageSpec]
9928 Returns -> typing.Sequence[~ErrorResult]
9929 '''
9930 # map input types to rpc msg
9931 params = dict()
9932 msg = dict(Type='ImageManager', Request='DeleteImages', Version=2, Params=params)
9933 params['images'] = images
9934 reply = await self.rpc(msg)
9935 return reply
9936
9937
9938
9939 @ReturnMapping(ListImageResult)
9940 async def ListImages(self, images):
9941 '''
9942 images : typing.Sequence[~ImageSpec]
9943 Returns -> typing.Sequence[~ImageMetadata]
9944 '''
9945 # map input types to rpc msg
9946 params = dict()
9947 msg = dict(Type='ImageManager', Request='ListImages', Version=2, Params=params)
9948 params['images'] = images
9949 reply = await self.rpc(msg)
9950 return reply
9951
9952
9953 class ImageMetadata(Type):
9954 name = 'ImageMetadata'
9955 version = 2
9956 schema = {'definitions': {'CloudImageMetadata': {'additionalProperties': False,
9957 'properties': {'arch': {'type': 'string'},
9958 'image_id': {'type': 'string'},
9959 'priority': {'type': 'integer'},
9960 'region': {'type': 'string'},
9961 'root_storage_size': {'type': 'integer'},
9962 'root_storage_type': {'type': 'string'},
9963 'series': {'type': 'string'},
9964 'source': {'type': 'string'},
9965 'stream': {'type': 'string'},
9966 'version': {'type': 'string'},
9967 'virt_type': {'type': 'string'}},
9968 'required': ['image_id',
9969 'region',
9970 'version',
9971 'series',
9972 'arch',
9973 'source',
9974 'priority'],
9975 'type': 'object'},
9976 'CloudImageMetadataList': {'additionalProperties': False,
9977 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
9978 'type': 'array'}},
9979 'type': 'object'},
9980 'Error': {'additionalProperties': False,
9981 'properties': {'Code': {'type': 'string'},
9982 'Info': {'$ref': '#/definitions/ErrorInfo'},
9983 'Message': {'type': 'string'}},
9984 'required': ['Message', 'Code'],
9985 'type': 'object'},
9986 'ErrorInfo': {'additionalProperties': False,
9987 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
9988 'MacaroonPath': {'type': 'string'}},
9989 'type': 'object'},
9990 'ErrorResult': {'additionalProperties': False,
9991 'properties': {'Error': {'$ref': '#/definitions/Error'}},
9992 'required': ['Error'],
9993 'type': 'object'},
9994 'ErrorResults': {'additionalProperties': False,
9995 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
9996 'type': 'array'}},
9997 'required': ['Results'],
9998 'type': 'object'},
9999 'ImageMetadataFilter': {'additionalProperties': False,
10000 'properties': {'arches': {'items': {'type': 'string'},
10001 'type': 'array'},
10002 'region': {'type': 'string'},
10003 'root-storage-type': {'type': 'string'},
10004 'series': {'items': {'type': 'string'},
10005 'type': 'array'},
10006 'stream': {'type': 'string'},
10007 'virt_type': {'type': 'string'}},
10008 'type': 'object'},
10009 'ListCloudImageMetadataResult': {'additionalProperties': False,
10010 'properties': {'result': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
10011 'type': 'array'}},
10012 'required': ['result'],
10013 'type': 'object'},
10014 'Macaroon': {'additionalProperties': False,
10015 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10016 'type': 'array'},
10017 'data': {'items': {'type': 'integer'},
10018 'type': 'array'},
10019 'id': {'$ref': '#/definitions/packet'},
10020 'location': {'$ref': '#/definitions/packet'},
10021 'sig': {'items': {'type': 'integer'},
10022 'type': 'array'}},
10023 'required': ['data',
10024 'location',
10025 'id',
10026 'caveats',
10027 'sig'],
10028 'type': 'object'},
10029 'MetadataImageIds': {'additionalProperties': False,
10030 'properties': {'image_ids': {'items': {'type': 'string'},
10031 'type': 'array'}},
10032 'required': ['image_ids'],
10033 'type': 'object'},
10034 'MetadataSaveParams': {'additionalProperties': False,
10035 'properties': {'metadata': {'items': {'$ref': '#/definitions/CloudImageMetadataList'},
10036 'type': 'array'}},
10037 'type': 'object'},
10038 'caveat': {'additionalProperties': False,
10039 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10040 'location': {'$ref': '#/definitions/packet'},
10041 'verificationId': {'$ref': '#/definitions/packet'}},
10042 'required': ['location',
10043 'caveatId',
10044 'verificationId'],
10045 'type': 'object'},
10046 'packet': {'additionalProperties': False,
10047 'properties': {'headerLen': {'type': 'integer'},
10048 'start': {'type': 'integer'},
10049 'totalLen': {'type': 'integer'}},
10050 'required': ['start', 'totalLen', 'headerLen'],
10051 'type': 'object'}},
10052 'properties': {'Delete': {'properties': {'Params': {'$ref': '#/definitions/MetadataImageIds'},
10053 'Result': {'$ref': '#/definitions/ErrorResults'}},
10054 'type': 'object'},
10055 'List': {'properties': {'Params': {'$ref': '#/definitions/ImageMetadataFilter'},
10056 'Result': {'$ref': '#/definitions/ListCloudImageMetadataResult'}},
10057 'type': 'object'},
10058 'Save': {'properties': {'Params': {'$ref': '#/definitions/MetadataSaveParams'},
10059 'Result': {'$ref': '#/definitions/ErrorResults'}},
10060 'type': 'object'},
10061 'UpdateFromPublishedImages': {'type': 'object'}},
10062 'type': 'object'}
10063
10064
10065 @ReturnMapping(ErrorResults)
10066 async def Delete(self, image_ids):
10067 '''
10068 image_ids : typing.Sequence[str]
10069 Returns -> typing.Sequence[~ErrorResult]
10070 '''
10071 # map input types to rpc msg
10072 params = dict()
10073 msg = dict(Type='ImageMetadata', Request='Delete', Version=2, Params=params)
10074 params['image_ids'] = image_ids
10075 reply = await self.rpc(msg)
10076 return reply
10077
10078
10079
10080 @ReturnMapping(ListCloudImageMetadataResult)
10081 async def List(self, arches, region, root_storage_type, series, stream, virt_type):
10082 '''
10083 arches : typing.Sequence[str]
10084 region : str
10085 root_storage_type : str
10086 series : typing.Sequence[str]
10087 stream : str
10088 virt_type : str
10089 Returns -> typing.Sequence[~CloudImageMetadata]
10090 '''
10091 # map input types to rpc msg
10092 params = dict()
10093 msg = dict(Type='ImageMetadata', Request='List', Version=2, Params=params)
10094 params['arches'] = arches
10095 params['region'] = region
10096 params['root-storage-type'] = root_storage_type
10097 params['series'] = series
10098 params['stream'] = stream
10099 params['virt_type'] = virt_type
10100 reply = await self.rpc(msg)
10101 return reply
10102
10103
10104
10105 @ReturnMapping(ErrorResults)
10106 async def Save(self, metadata):
10107 '''
10108 metadata : typing.Sequence[~CloudImageMetadataList]
10109 Returns -> typing.Sequence[~ErrorResult]
10110 '''
10111 # map input types to rpc msg
10112 params = dict()
10113 msg = dict(Type='ImageMetadata', Request='Save', Version=2, Params=params)
10114 params['metadata'] = metadata
10115 reply = await self.rpc(msg)
10116 return reply
10117
10118
10119
10120 @ReturnMapping(None)
10121 async def UpdateFromPublishedImages(self):
10122 '''
10123
10124 Returns -> None
10125 '''
10126 # map input types to rpc msg
10127 params = dict()
10128 msg = dict(Type='ImageMetadata', Request='UpdateFromPublishedImages', Version=2, Params=params)
10129
10130 reply = await self.rpc(msg)
10131 return reply
10132
10133
10134 class InstancePoller(Type):
10135 name = 'InstancePoller'
10136 version = 2
10137 schema = {'definitions': {'Address': {'additionalProperties': False,
10138 'properties': {'Scope': {'type': 'string'},
10139 'SpaceName': {'type': 'string'},
10140 'Type': {'type': 'string'},
10141 'Value': {'type': 'string'}},
10142 'required': ['Value', 'Type', 'Scope'],
10143 'type': 'object'},
10144 'BoolResult': {'additionalProperties': False,
10145 'properties': {'Error': {'$ref': '#/definitions/Error'},
10146 'Result': {'type': 'boolean'}},
10147 'required': ['Error', 'Result'],
10148 'type': 'object'},
10149 'BoolResults': {'additionalProperties': False,
10150 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
10151 'type': 'array'}},
10152 'required': ['Results'],
10153 'type': 'object'},
10154 'Entities': {'additionalProperties': False,
10155 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10156 'type': 'array'}},
10157 'required': ['Entities'],
10158 'type': 'object'},
10159 'Entity': {'additionalProperties': False,
10160 'properties': {'Tag': {'type': 'string'}},
10161 'required': ['Tag'],
10162 'type': 'object'},
10163 'EntityStatusArgs': {'additionalProperties': False,
10164 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10165 'type': 'object'}},
10166 'type': 'object'},
10167 'Info': {'type': 'string'},
10168 'Status': {'type': 'string'},
10169 'Tag': {'type': 'string'}},
10170 'required': ['Tag',
10171 'Status',
10172 'Info',
10173 'Data'],
10174 'type': 'object'},
10175 'Error': {'additionalProperties': False,
10176 'properties': {'Code': {'type': 'string'},
10177 'Info': {'$ref': '#/definitions/ErrorInfo'},
10178 'Message': {'type': 'string'}},
10179 'required': ['Message', 'Code'],
10180 'type': 'object'},
10181 'ErrorInfo': {'additionalProperties': False,
10182 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10183 'MacaroonPath': {'type': 'string'}},
10184 'type': 'object'},
10185 'ErrorResult': {'additionalProperties': False,
10186 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10187 'required': ['Error'],
10188 'type': 'object'},
10189 'ErrorResults': {'additionalProperties': False,
10190 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10191 'type': 'array'}},
10192 'required': ['Results'],
10193 'type': 'object'},
10194 'LifeResult': {'additionalProperties': False,
10195 'properties': {'Error': {'$ref': '#/definitions/Error'},
10196 'Life': {'type': 'string'}},
10197 'required': ['Life', 'Error'],
10198 'type': 'object'},
10199 'LifeResults': {'additionalProperties': False,
10200 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10201 'type': 'array'}},
10202 'required': ['Results'],
10203 'type': 'object'},
10204 'Macaroon': {'additionalProperties': False,
10205 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10206 'type': 'array'},
10207 'data': {'items': {'type': 'integer'},
10208 'type': 'array'},
10209 'id': {'$ref': '#/definitions/packet'},
10210 'location': {'$ref': '#/definitions/packet'},
10211 'sig': {'items': {'type': 'integer'},
10212 'type': 'array'}},
10213 'required': ['data',
10214 'location',
10215 'id',
10216 'caveats',
10217 'sig'],
10218 'type': 'object'},
10219 'MachineAddresses': {'additionalProperties': False,
10220 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
10221 'type': 'array'},
10222 'Tag': {'type': 'string'}},
10223 'required': ['Tag', 'Addresses'],
10224 'type': 'object'},
10225 'MachineAddressesResult': {'additionalProperties': False,
10226 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
10227 'type': 'array'},
10228 'Error': {'$ref': '#/definitions/Error'}},
10229 'required': ['Error', 'Addresses'],
10230 'type': 'object'},
10231 'MachineAddressesResults': {'additionalProperties': False,
10232 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineAddressesResult'},
10233 'type': 'array'}},
10234 'required': ['Results'],
10235 'type': 'object'},
10236 'ModelConfigResult': {'additionalProperties': False,
10237 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
10238 'type': 'object'}},
10239 'type': 'object'}},
10240 'required': ['Config'],
10241 'type': 'object'},
10242 'NotifyWatchResult': {'additionalProperties': False,
10243 'properties': {'Error': {'$ref': '#/definitions/Error'},
10244 'NotifyWatcherId': {'type': 'string'}},
10245 'required': ['NotifyWatcherId', 'Error'],
10246 'type': 'object'},
10247 'SetMachinesAddresses': {'additionalProperties': False,
10248 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
10249 'type': 'array'}},
10250 'required': ['MachineAddresses'],
10251 'type': 'object'},
10252 'SetStatus': {'additionalProperties': False,
10253 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
10254 'type': 'array'}},
10255 'required': ['Entities'],
10256 'type': 'object'},
10257 'StatusResult': {'additionalProperties': False,
10258 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
10259 'type': 'object'}},
10260 'type': 'object'},
10261 'Error': {'$ref': '#/definitions/Error'},
10262 'Id': {'type': 'string'},
10263 'Info': {'type': 'string'},
10264 'Life': {'type': 'string'},
10265 'Since': {'format': 'date-time',
10266 'type': 'string'},
10267 'Status': {'type': 'string'}},
10268 'required': ['Error',
10269 'Id',
10270 'Life',
10271 'Status',
10272 'Info',
10273 'Data',
10274 'Since'],
10275 'type': 'object'},
10276 'StatusResults': {'additionalProperties': False,
10277 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
10278 'type': 'array'}},
10279 'required': ['Results'],
10280 'type': 'object'},
10281 'StringResult': {'additionalProperties': False,
10282 'properties': {'Error': {'$ref': '#/definitions/Error'},
10283 'Result': {'type': 'string'}},
10284 'required': ['Error', 'Result'],
10285 'type': 'object'},
10286 'StringResults': {'additionalProperties': False,
10287 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
10288 'type': 'array'}},
10289 'required': ['Results'],
10290 'type': 'object'},
10291 'StringsWatchResult': {'additionalProperties': False,
10292 'properties': {'Changes': {'items': {'type': 'string'},
10293 'type': 'array'},
10294 'Error': {'$ref': '#/definitions/Error'},
10295 'StringsWatcherId': {'type': 'string'}},
10296 'required': ['StringsWatcherId',
10297 'Changes',
10298 'Error'],
10299 'type': 'object'},
10300 'caveat': {'additionalProperties': False,
10301 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10302 'location': {'$ref': '#/definitions/packet'},
10303 'verificationId': {'$ref': '#/definitions/packet'}},
10304 'required': ['location',
10305 'caveatId',
10306 'verificationId'],
10307 'type': 'object'},
10308 'packet': {'additionalProperties': False,
10309 'properties': {'headerLen': {'type': 'integer'},
10310 'start': {'type': 'integer'},
10311 'totalLen': {'type': 'integer'}},
10312 'required': ['start', 'totalLen', 'headerLen'],
10313 'type': 'object'}},
10314 'properties': {'AreManuallyProvisioned': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10315 'Result': {'$ref': '#/definitions/BoolResults'}},
10316 'type': 'object'},
10317 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10318 'Result': {'$ref': '#/definitions/StringResults'}},
10319 'type': 'object'},
10320 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10321 'Result': {'$ref': '#/definitions/StatusResults'}},
10322 'type': 'object'},
10323 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10324 'Result': {'$ref': '#/definitions/LifeResults'}},
10325 'type': 'object'},
10326 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
10327 'type': 'object'},
10328 'ProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10329 'Result': {'$ref': '#/definitions/MachineAddressesResults'}},
10330 'type': 'object'},
10331 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
10332 'Result': {'$ref': '#/definitions/ErrorResults'}},
10333 'type': 'object'},
10334 'SetProviderAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
10335 'Result': {'$ref': '#/definitions/ErrorResults'}},
10336 'type': 'object'},
10337 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10338 'Result': {'$ref': '#/definitions/StatusResults'}},
10339 'type': 'object'},
10340 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
10341 'type': 'object'},
10342 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
10343 'type': 'object'}},
10344 'type': 'object'}
10345
10346
10347 @ReturnMapping(BoolResults)
10348 async def AreManuallyProvisioned(self, entities):
10349 '''
10350 entities : typing.Sequence[~Entity]
10351 Returns -> typing.Sequence[~BoolResult]
10352 '''
10353 # map input types to rpc msg
10354 params = dict()
10355 msg = dict(Type='InstancePoller', Request='AreManuallyProvisioned', Version=2, Params=params)
10356 params['Entities'] = entities
10357 reply = await self.rpc(msg)
10358 return reply
10359
10360
10361
10362 @ReturnMapping(StringResults)
10363 async def InstanceId(self, entities):
10364 '''
10365 entities : typing.Sequence[~Entity]
10366 Returns -> typing.Sequence[~StringResult]
10367 '''
10368 # map input types to rpc msg
10369 params = dict()
10370 msg = dict(Type='InstancePoller', Request='InstanceId', Version=2, Params=params)
10371 params['Entities'] = entities
10372 reply = await self.rpc(msg)
10373 return reply
10374
10375
10376
10377 @ReturnMapping(StatusResults)
10378 async def InstanceStatus(self, entities):
10379 '''
10380 entities : typing.Sequence[~Entity]
10381 Returns -> typing.Sequence[~StatusResult]
10382 '''
10383 # map input types to rpc msg
10384 params = dict()
10385 msg = dict(Type='InstancePoller', Request='InstanceStatus', Version=2, Params=params)
10386 params['Entities'] = entities
10387 reply = await self.rpc(msg)
10388 return reply
10389
10390
10391
10392 @ReturnMapping(LifeResults)
10393 async def Life(self, entities):
10394 '''
10395 entities : typing.Sequence[~Entity]
10396 Returns -> typing.Sequence[~LifeResult]
10397 '''
10398 # map input types to rpc msg
10399 params = dict()
10400 msg = dict(Type='InstancePoller', Request='Life', Version=2, Params=params)
10401 params['Entities'] = entities
10402 reply = await self.rpc(msg)
10403 return reply
10404
10405
10406
10407 @ReturnMapping(ModelConfigResult)
10408 async def ModelConfig(self):
10409 '''
10410
10411 Returns -> typing.Mapping[str, typing.Any]
10412 '''
10413 # map input types to rpc msg
10414 params = dict()
10415 msg = dict(Type='InstancePoller', Request='ModelConfig', Version=2, Params=params)
10416
10417 reply = await self.rpc(msg)
10418 return reply
10419
10420
10421
10422 @ReturnMapping(MachineAddressesResults)
10423 async def ProviderAddresses(self, entities):
10424 '''
10425 entities : typing.Sequence[~Entity]
10426 Returns -> typing.Sequence[~MachineAddressesResult]
10427 '''
10428 # map input types to rpc msg
10429 params = dict()
10430 msg = dict(Type='InstancePoller', Request='ProviderAddresses', Version=2, Params=params)
10431 params['Entities'] = entities
10432 reply = await self.rpc(msg)
10433 return reply
10434
10435
10436
10437 @ReturnMapping(ErrorResults)
10438 async def SetInstanceStatus(self, entities):
10439 '''
10440 entities : typing.Sequence[~EntityStatusArgs]
10441 Returns -> typing.Sequence[~ErrorResult]
10442 '''
10443 # map input types to rpc msg
10444 params = dict()
10445 msg = dict(Type='InstancePoller', Request='SetInstanceStatus', Version=2, Params=params)
10446 params['Entities'] = entities
10447 reply = await self.rpc(msg)
10448 return reply
10449
10450
10451
10452 @ReturnMapping(ErrorResults)
10453 async def SetProviderAddresses(self, machineaddresses):
10454 '''
10455 machineaddresses : typing.Sequence[~MachineAddresses]
10456 Returns -> typing.Sequence[~ErrorResult]
10457 '''
10458 # map input types to rpc msg
10459 params = dict()
10460 msg = dict(Type='InstancePoller', Request='SetProviderAddresses', Version=2, Params=params)
10461 params['MachineAddresses'] = machineaddresses
10462 reply = await self.rpc(msg)
10463 return reply
10464
10465
10466
10467 @ReturnMapping(StatusResults)
10468 async def Status(self, entities):
10469 '''
10470 entities : typing.Sequence[~Entity]
10471 Returns -> typing.Sequence[~StatusResult]
10472 '''
10473 # map input types to rpc msg
10474 params = dict()
10475 msg = dict(Type='InstancePoller', Request='Status', Version=2, Params=params)
10476 params['Entities'] = entities
10477 reply = await self.rpc(msg)
10478 return reply
10479
10480
10481
10482 @ReturnMapping(NotifyWatchResult)
10483 async def WatchForModelConfigChanges(self):
10484 '''
10485
10486 Returns -> typing.Union[_ForwardRef('Error'), str]
10487 '''
10488 # map input types to rpc msg
10489 params = dict()
10490 msg = dict(Type='InstancePoller', Request='WatchForModelConfigChanges', Version=2, Params=params)
10491
10492 reply = await self.rpc(msg)
10493 return reply
10494
10495
10496
10497 @ReturnMapping(StringsWatchResult)
10498 async def WatchModelMachines(self):
10499 '''
10500
10501 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
10502 '''
10503 # map input types to rpc msg
10504 params = dict()
10505 msg = dict(Type='InstancePoller', Request='WatchModelMachines', Version=2, Params=params)
10506
10507 reply = await self.rpc(msg)
10508 return reply
10509
10510
10511 class KeyManager(Type):
10512 name = 'KeyManager'
10513 version = 1
10514 schema = {'definitions': {'Entities': {'additionalProperties': False,
10515 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10516 'type': 'array'}},
10517 'required': ['Entities'],
10518 'type': 'object'},
10519 'Entity': {'additionalProperties': False,
10520 'properties': {'Tag': {'type': 'string'}},
10521 'required': ['Tag'],
10522 'type': 'object'},
10523 'Error': {'additionalProperties': False,
10524 'properties': {'Code': {'type': 'string'},
10525 'Info': {'$ref': '#/definitions/ErrorInfo'},
10526 'Message': {'type': 'string'}},
10527 'required': ['Message', 'Code'],
10528 'type': 'object'},
10529 'ErrorInfo': {'additionalProperties': False,
10530 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10531 'MacaroonPath': {'type': 'string'}},
10532 'type': 'object'},
10533 'ErrorResult': {'additionalProperties': False,
10534 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10535 'required': ['Error'],
10536 'type': 'object'},
10537 'ErrorResults': {'additionalProperties': False,
10538 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10539 'type': 'array'}},
10540 'required': ['Results'],
10541 'type': 'object'},
10542 'ListSSHKeys': {'additionalProperties': False,
10543 'properties': {'Entities': {'$ref': '#/definitions/Entities'},
10544 'Mode': {'type': 'boolean'}},
10545 'required': ['Entities', 'Mode'],
10546 'type': 'object'},
10547 'Macaroon': {'additionalProperties': False,
10548 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10549 'type': 'array'},
10550 'data': {'items': {'type': 'integer'},
10551 'type': 'array'},
10552 'id': {'$ref': '#/definitions/packet'},
10553 'location': {'$ref': '#/definitions/packet'},
10554 'sig': {'items': {'type': 'integer'},
10555 'type': 'array'}},
10556 'required': ['data',
10557 'location',
10558 'id',
10559 'caveats',
10560 'sig'],
10561 'type': 'object'},
10562 'ModifyUserSSHKeys': {'additionalProperties': False,
10563 'properties': {'Keys': {'items': {'type': 'string'},
10564 'type': 'array'},
10565 'User': {'type': 'string'}},
10566 'required': ['User', 'Keys'],
10567 'type': 'object'},
10568 'StringsResult': {'additionalProperties': False,
10569 'properties': {'Error': {'$ref': '#/definitions/Error'},
10570 'Result': {'items': {'type': 'string'},
10571 'type': 'array'}},
10572 'required': ['Error', 'Result'],
10573 'type': 'object'},
10574 'StringsResults': {'additionalProperties': False,
10575 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10576 'type': 'array'}},
10577 'required': ['Results'],
10578 'type': 'object'},
10579 'caveat': {'additionalProperties': False,
10580 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10581 'location': {'$ref': '#/definitions/packet'},
10582 'verificationId': {'$ref': '#/definitions/packet'}},
10583 'required': ['location',
10584 'caveatId',
10585 'verificationId'],
10586 'type': 'object'},
10587 'packet': {'additionalProperties': False,
10588 'properties': {'headerLen': {'type': 'integer'},
10589 'start': {'type': 'integer'},
10590 'totalLen': {'type': 'integer'}},
10591 'required': ['start', 'totalLen', 'headerLen'],
10592 'type': 'object'}},
10593 'properties': {'AddKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10594 'Result': {'$ref': '#/definitions/ErrorResults'}},
10595 'type': 'object'},
10596 'DeleteKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10597 'Result': {'$ref': '#/definitions/ErrorResults'}},
10598 'type': 'object'},
10599 'ImportKeys': {'properties': {'Params': {'$ref': '#/definitions/ModifyUserSSHKeys'},
10600 'Result': {'$ref': '#/definitions/ErrorResults'}},
10601 'type': 'object'},
10602 'ListKeys': {'properties': {'Params': {'$ref': '#/definitions/ListSSHKeys'},
10603 'Result': {'$ref': '#/definitions/StringsResults'}},
10604 'type': 'object'}},
10605 'type': 'object'}
10606
10607
10608 @ReturnMapping(ErrorResults)
10609 async def AddKeys(self, keys, user):
10610 '''
10611 keys : typing.Sequence[str]
10612 user : str
10613 Returns -> typing.Sequence[~ErrorResult]
10614 '''
10615 # map input types to rpc msg
10616 params = dict()
10617 msg = dict(Type='KeyManager', Request='AddKeys', Version=1, Params=params)
10618 params['Keys'] = keys
10619 params['User'] = user
10620 reply = await self.rpc(msg)
10621 return reply
10622
10623
10624
10625 @ReturnMapping(ErrorResults)
10626 async def DeleteKeys(self, keys, user):
10627 '''
10628 keys : typing.Sequence[str]
10629 user : str
10630 Returns -> typing.Sequence[~ErrorResult]
10631 '''
10632 # map input types to rpc msg
10633 params = dict()
10634 msg = dict(Type='KeyManager', Request='DeleteKeys', Version=1, Params=params)
10635 params['Keys'] = keys
10636 params['User'] = user
10637 reply = await self.rpc(msg)
10638 return reply
10639
10640
10641
10642 @ReturnMapping(ErrorResults)
10643 async def ImportKeys(self, keys, user):
10644 '''
10645 keys : typing.Sequence[str]
10646 user : str
10647 Returns -> typing.Sequence[~ErrorResult]
10648 '''
10649 # map input types to rpc msg
10650 params = dict()
10651 msg = dict(Type='KeyManager', Request='ImportKeys', Version=1, Params=params)
10652 params['Keys'] = keys
10653 params['User'] = user
10654 reply = await self.rpc(msg)
10655 return reply
10656
10657
10658
10659 @ReturnMapping(StringsResults)
10660 async def ListKeys(self, entities, mode):
10661 '''
10662 entities : Entities
10663 mode : bool
10664 Returns -> typing.Sequence[~StringsResult]
10665 '''
10666 # map input types to rpc msg
10667 params = dict()
10668 msg = dict(Type='KeyManager', Request='ListKeys', Version=1, Params=params)
10669 params['Entities'] = entities
10670 params['Mode'] = mode
10671 reply = await self.rpc(msg)
10672 return reply
10673
10674
10675 class KeyUpdater(Type):
10676 name = 'KeyUpdater'
10677 version = 1
10678 schema = {'definitions': {'Entities': {'additionalProperties': False,
10679 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10680 'type': 'array'}},
10681 'required': ['Entities'],
10682 'type': 'object'},
10683 'Entity': {'additionalProperties': False,
10684 'properties': {'Tag': {'type': 'string'}},
10685 'required': ['Tag'],
10686 'type': 'object'},
10687 'Error': {'additionalProperties': False,
10688 'properties': {'Code': {'type': 'string'},
10689 'Info': {'$ref': '#/definitions/ErrorInfo'},
10690 'Message': {'type': 'string'}},
10691 'required': ['Message', 'Code'],
10692 'type': 'object'},
10693 'ErrorInfo': {'additionalProperties': False,
10694 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10695 'MacaroonPath': {'type': 'string'}},
10696 'type': 'object'},
10697 'Macaroon': {'additionalProperties': False,
10698 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10699 'type': 'array'},
10700 'data': {'items': {'type': 'integer'},
10701 'type': 'array'},
10702 'id': {'$ref': '#/definitions/packet'},
10703 'location': {'$ref': '#/definitions/packet'},
10704 'sig': {'items': {'type': 'integer'},
10705 'type': 'array'}},
10706 'required': ['data',
10707 'location',
10708 'id',
10709 'caveats',
10710 'sig'],
10711 'type': 'object'},
10712 'NotifyWatchResult': {'additionalProperties': False,
10713 'properties': {'Error': {'$ref': '#/definitions/Error'},
10714 'NotifyWatcherId': {'type': 'string'}},
10715 'required': ['NotifyWatcherId', 'Error'],
10716 'type': 'object'},
10717 'NotifyWatchResults': {'additionalProperties': False,
10718 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10719 'type': 'array'}},
10720 'required': ['Results'],
10721 'type': 'object'},
10722 'StringsResult': {'additionalProperties': False,
10723 'properties': {'Error': {'$ref': '#/definitions/Error'},
10724 'Result': {'items': {'type': 'string'},
10725 'type': 'array'}},
10726 'required': ['Error', 'Result'],
10727 'type': 'object'},
10728 'StringsResults': {'additionalProperties': False,
10729 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
10730 'type': 'array'}},
10731 'required': ['Results'],
10732 'type': 'object'},
10733 'caveat': {'additionalProperties': False,
10734 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10735 'location': {'$ref': '#/definitions/packet'},
10736 'verificationId': {'$ref': '#/definitions/packet'}},
10737 'required': ['location',
10738 'caveatId',
10739 'verificationId'],
10740 'type': 'object'},
10741 'packet': {'additionalProperties': False,
10742 'properties': {'headerLen': {'type': 'integer'},
10743 'start': {'type': 'integer'},
10744 'totalLen': {'type': 'integer'}},
10745 'required': ['start', 'totalLen', 'headerLen'],
10746 'type': 'object'}},
10747 'properties': {'AuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10748 'Result': {'$ref': '#/definitions/StringsResults'}},
10749 'type': 'object'},
10750 'WatchAuthorisedKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10751 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10752 'type': 'object'}},
10753 'type': 'object'}
10754
10755
10756 @ReturnMapping(StringsResults)
10757 async def AuthorisedKeys(self, entities):
10758 '''
10759 entities : typing.Sequence[~Entity]
10760 Returns -> typing.Sequence[~StringsResult]
10761 '''
10762 # map input types to rpc msg
10763 params = dict()
10764 msg = dict(Type='KeyUpdater', Request='AuthorisedKeys', Version=1, Params=params)
10765 params['Entities'] = entities
10766 reply = await self.rpc(msg)
10767 return reply
10768
10769
10770
10771 @ReturnMapping(NotifyWatchResults)
10772 async def WatchAuthorisedKeys(self, entities):
10773 '''
10774 entities : typing.Sequence[~Entity]
10775 Returns -> typing.Sequence[~NotifyWatchResult]
10776 '''
10777 # map input types to rpc msg
10778 params = dict()
10779 msg = dict(Type='KeyUpdater', Request='WatchAuthorisedKeys', Version=1, Params=params)
10780 params['Entities'] = entities
10781 reply = await self.rpc(msg)
10782 return reply
10783
10784
10785 class LeadershipService(Type):
10786 name = 'LeadershipService'
10787 version = 2
10788 schema = {'definitions': {'ClaimLeadershipBulkParams': {'additionalProperties': False,
10789 'properties': {'Params': {'items': {'$ref': '#/definitions/ClaimLeadershipParams'},
10790 'type': 'array'}},
10791 'required': ['Params'],
10792 'type': 'object'},
10793 'ClaimLeadershipBulkResults': {'additionalProperties': False,
10794 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
10795 'type': 'array'}},
10796 'required': ['Results'],
10797 'type': 'object'},
10798 'ClaimLeadershipParams': {'additionalProperties': False,
10799 'properties': {'DurationSeconds': {'type': 'number'},
10800 'ServiceTag': {'type': 'string'},
10801 'UnitTag': {'type': 'string'}},
10802 'required': ['ServiceTag',
10803 'UnitTag',
10804 'DurationSeconds'],
10805 'type': 'object'},
10806 'Error': {'additionalProperties': False,
10807 'properties': {'Code': {'type': 'string'},
10808 'Info': {'$ref': '#/definitions/ErrorInfo'},
10809 'Message': {'type': 'string'}},
10810 'required': ['Message', 'Code'],
10811 'type': 'object'},
10812 'ErrorInfo': {'additionalProperties': False,
10813 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10814 'MacaroonPath': {'type': 'string'}},
10815 'type': 'object'},
10816 'ErrorResult': {'additionalProperties': False,
10817 'properties': {'Error': {'$ref': '#/definitions/Error'}},
10818 'required': ['Error'],
10819 'type': 'object'},
10820 'Macaroon': {'additionalProperties': False,
10821 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10822 'type': 'array'},
10823 'data': {'items': {'type': 'integer'},
10824 'type': 'array'},
10825 'id': {'$ref': '#/definitions/packet'},
10826 'location': {'$ref': '#/definitions/packet'},
10827 'sig': {'items': {'type': 'integer'},
10828 'type': 'array'}},
10829 'required': ['data',
10830 'location',
10831 'id',
10832 'caveats',
10833 'sig'],
10834 'type': 'object'},
10835 'ServiceTag': {'additionalProperties': False,
10836 'properties': {'Name': {'type': 'string'}},
10837 'required': ['Name'],
10838 'type': 'object'},
10839 'caveat': {'additionalProperties': False,
10840 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10841 'location': {'$ref': '#/definitions/packet'},
10842 'verificationId': {'$ref': '#/definitions/packet'}},
10843 'required': ['location',
10844 'caveatId',
10845 'verificationId'],
10846 'type': 'object'},
10847 'packet': {'additionalProperties': False,
10848 'properties': {'headerLen': {'type': 'integer'},
10849 'start': {'type': 'integer'},
10850 'totalLen': {'type': 'integer'}},
10851 'required': ['start', 'totalLen', 'headerLen'],
10852 'type': 'object'}},
10853 'properties': {'BlockUntilLeadershipReleased': {'properties': {'Params': {'$ref': '#/definitions/ServiceTag'},
10854 'Result': {'$ref': '#/definitions/ErrorResult'}},
10855 'type': 'object'},
10856 'ClaimLeadership': {'properties': {'Params': {'$ref': '#/definitions/ClaimLeadershipBulkParams'},
10857 'Result': {'$ref': '#/definitions/ClaimLeadershipBulkResults'}},
10858 'type': 'object'}},
10859 'type': 'object'}
10860
10861
10862 @ReturnMapping(ErrorResult)
10863 async def BlockUntilLeadershipReleased(self, name):
10864 '''
10865 name : str
10866 Returns -> Error
10867 '''
10868 # map input types to rpc msg
10869 params = dict()
10870 msg = dict(Type='LeadershipService', Request='BlockUntilLeadershipReleased', Version=2, Params=params)
10871 params['Name'] = name
10872 reply = await self.rpc(msg)
10873 return reply
10874
10875
10876
10877 @ReturnMapping(ClaimLeadershipBulkResults)
10878 async def ClaimLeadership(self, params):
10879 '''
10880 params : typing.Sequence[~ClaimLeadershipParams]
10881 Returns -> typing.Sequence[~ErrorResult]
10882 '''
10883 # map input types to rpc msg
10884 params = dict()
10885 msg = dict(Type='LeadershipService', Request='ClaimLeadership', Version=2, Params=params)
10886 params['Params'] = params
10887 reply = await self.rpc(msg)
10888 return reply
10889
10890
10891 class LifeFlag(Type):
10892 name = 'LifeFlag'
10893 version = 1
10894 schema = {'definitions': {'Entities': {'additionalProperties': False,
10895 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
10896 'type': 'array'}},
10897 'required': ['Entities'],
10898 'type': 'object'},
10899 'Entity': {'additionalProperties': False,
10900 'properties': {'Tag': {'type': 'string'}},
10901 'required': ['Tag'],
10902 'type': 'object'},
10903 'Error': {'additionalProperties': False,
10904 'properties': {'Code': {'type': 'string'},
10905 'Info': {'$ref': '#/definitions/ErrorInfo'},
10906 'Message': {'type': 'string'}},
10907 'required': ['Message', 'Code'],
10908 'type': 'object'},
10909 'ErrorInfo': {'additionalProperties': False,
10910 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
10911 'MacaroonPath': {'type': 'string'}},
10912 'type': 'object'},
10913 'LifeResult': {'additionalProperties': False,
10914 'properties': {'Error': {'$ref': '#/definitions/Error'},
10915 'Life': {'type': 'string'}},
10916 'required': ['Life', 'Error'],
10917 'type': 'object'},
10918 'LifeResults': {'additionalProperties': False,
10919 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
10920 'type': 'array'}},
10921 'required': ['Results'],
10922 'type': 'object'},
10923 'Macaroon': {'additionalProperties': False,
10924 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
10925 'type': 'array'},
10926 'data': {'items': {'type': 'integer'},
10927 'type': 'array'},
10928 'id': {'$ref': '#/definitions/packet'},
10929 'location': {'$ref': '#/definitions/packet'},
10930 'sig': {'items': {'type': 'integer'},
10931 'type': 'array'}},
10932 'required': ['data',
10933 'location',
10934 'id',
10935 'caveats',
10936 'sig'],
10937 'type': 'object'},
10938 'NotifyWatchResult': {'additionalProperties': False,
10939 'properties': {'Error': {'$ref': '#/definitions/Error'},
10940 'NotifyWatcherId': {'type': 'string'}},
10941 'required': ['NotifyWatcherId', 'Error'],
10942 'type': 'object'},
10943 'NotifyWatchResults': {'additionalProperties': False,
10944 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
10945 'type': 'array'}},
10946 'required': ['Results'],
10947 'type': 'object'},
10948 'caveat': {'additionalProperties': False,
10949 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
10950 'location': {'$ref': '#/definitions/packet'},
10951 'verificationId': {'$ref': '#/definitions/packet'}},
10952 'required': ['location',
10953 'caveatId',
10954 'verificationId'],
10955 'type': 'object'},
10956 'packet': {'additionalProperties': False,
10957 'properties': {'headerLen': {'type': 'integer'},
10958 'start': {'type': 'integer'},
10959 'totalLen': {'type': 'integer'}},
10960 'required': ['start', 'totalLen', 'headerLen'],
10961 'type': 'object'}},
10962 'properties': {'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10963 'Result': {'$ref': '#/definitions/LifeResults'}},
10964 'type': 'object'},
10965 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
10966 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
10967 'type': 'object'}},
10968 'type': 'object'}
10969
10970
10971 @ReturnMapping(LifeResults)
10972 async def Life(self, entities):
10973 '''
10974 entities : typing.Sequence[~Entity]
10975 Returns -> typing.Sequence[~LifeResult]
10976 '''
10977 # map input types to rpc msg
10978 params = dict()
10979 msg = dict(Type='LifeFlag', Request='Life', Version=1, Params=params)
10980 params['Entities'] = entities
10981 reply = await self.rpc(msg)
10982 return reply
10983
10984
10985
10986 @ReturnMapping(NotifyWatchResults)
10987 async def Watch(self, entities):
10988 '''
10989 entities : typing.Sequence[~Entity]
10990 Returns -> typing.Sequence[~NotifyWatchResult]
10991 '''
10992 # map input types to rpc msg
10993 params = dict()
10994 msg = dict(Type='LifeFlag', Request='Watch', Version=1, Params=params)
10995 params['Entities'] = entities
10996 reply = await self.rpc(msg)
10997 return reply
10998
10999
11000 class Logger(Type):
11001 name = 'Logger'
11002 version = 1
11003 schema = {'definitions': {'Entities': {'additionalProperties': False,
11004 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11005 'type': 'array'}},
11006 'required': ['Entities'],
11007 'type': 'object'},
11008 'Entity': {'additionalProperties': False,
11009 'properties': {'Tag': {'type': 'string'}},
11010 'required': ['Tag'],
11011 'type': 'object'},
11012 'Error': {'additionalProperties': False,
11013 'properties': {'Code': {'type': 'string'},
11014 'Info': {'$ref': '#/definitions/ErrorInfo'},
11015 'Message': {'type': 'string'}},
11016 'required': ['Message', 'Code'],
11017 'type': 'object'},
11018 'ErrorInfo': {'additionalProperties': False,
11019 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11020 'MacaroonPath': {'type': 'string'}},
11021 'type': 'object'},
11022 'Macaroon': {'additionalProperties': False,
11023 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11024 'type': 'array'},
11025 'data': {'items': {'type': 'integer'},
11026 'type': 'array'},
11027 'id': {'$ref': '#/definitions/packet'},
11028 'location': {'$ref': '#/definitions/packet'},
11029 'sig': {'items': {'type': 'integer'},
11030 'type': 'array'}},
11031 'required': ['data',
11032 'location',
11033 'id',
11034 'caveats',
11035 'sig'],
11036 'type': 'object'},
11037 'NotifyWatchResult': {'additionalProperties': False,
11038 'properties': {'Error': {'$ref': '#/definitions/Error'},
11039 'NotifyWatcherId': {'type': 'string'}},
11040 'required': ['NotifyWatcherId', 'Error'],
11041 'type': 'object'},
11042 'NotifyWatchResults': {'additionalProperties': False,
11043 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11044 'type': 'array'}},
11045 'required': ['Results'],
11046 'type': 'object'},
11047 'StringResult': {'additionalProperties': False,
11048 'properties': {'Error': {'$ref': '#/definitions/Error'},
11049 'Result': {'type': 'string'}},
11050 'required': ['Error', 'Result'],
11051 'type': 'object'},
11052 'StringResults': {'additionalProperties': False,
11053 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
11054 'type': 'array'}},
11055 'required': ['Results'],
11056 'type': 'object'},
11057 'caveat': {'additionalProperties': False,
11058 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11059 'location': {'$ref': '#/definitions/packet'},
11060 'verificationId': {'$ref': '#/definitions/packet'}},
11061 'required': ['location',
11062 'caveatId',
11063 'verificationId'],
11064 'type': 'object'},
11065 'packet': {'additionalProperties': False,
11066 'properties': {'headerLen': {'type': 'integer'},
11067 'start': {'type': 'integer'},
11068 'totalLen': {'type': 'integer'}},
11069 'required': ['start', 'totalLen', 'headerLen'],
11070 'type': 'object'}},
11071 'properties': {'LoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11072 'Result': {'$ref': '#/definitions/StringResults'}},
11073 'type': 'object'},
11074 'WatchLoggingConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11075 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11076 'type': 'object'}},
11077 'type': 'object'}
11078
11079
11080 @ReturnMapping(StringResults)
11081 async def LoggingConfig(self, entities):
11082 '''
11083 entities : typing.Sequence[~Entity]
11084 Returns -> typing.Sequence[~StringResult]
11085 '''
11086 # map input types to rpc msg
11087 params = dict()
11088 msg = dict(Type='Logger', Request='LoggingConfig', Version=1, Params=params)
11089 params['Entities'] = entities
11090 reply = await self.rpc(msg)
11091 return reply
11092
11093
11094
11095 @ReturnMapping(NotifyWatchResults)
11096 async def WatchLoggingConfig(self, entities):
11097 '''
11098 entities : typing.Sequence[~Entity]
11099 Returns -> typing.Sequence[~NotifyWatchResult]
11100 '''
11101 # map input types to rpc msg
11102 params = dict()
11103 msg = dict(Type='Logger', Request='WatchLoggingConfig', Version=1, Params=params)
11104 params['Entities'] = entities
11105 reply = await self.rpc(msg)
11106 return reply
11107
11108
11109 class MachineActions(Type):
11110 name = 'MachineActions'
11111 version = 1
11112 schema = {'definitions': {'Action': {'additionalProperties': False,
11113 'properties': {'name': {'type': 'string'},
11114 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
11115 'type': 'object'}},
11116 'type': 'object'},
11117 'receiver': {'type': 'string'},
11118 'tag': {'type': 'string'}},
11119 'required': ['tag', 'receiver', 'name'],
11120 'type': 'object'},
11121 'ActionExecutionResult': {'additionalProperties': False,
11122 'properties': {'actiontag': {'type': 'string'},
11123 'message': {'type': 'string'},
11124 'results': {'patternProperties': {'.*': {'additionalProperties': True,
11125 'type': 'object'}},
11126 'type': 'object'},
11127 'status': {'type': 'string'}},
11128 'required': ['actiontag', 'status'],
11129 'type': 'object'},
11130 'ActionExecutionResults': {'additionalProperties': False,
11131 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
11132 'type': 'array'}},
11133 'type': 'object'},
11134 'ActionResult': {'additionalProperties': False,
11135 'properties': {'action': {'$ref': '#/definitions/Action'},
11136 'completed': {'format': 'date-time',
11137 'type': 'string'},
11138 'enqueued': {'format': 'date-time',
11139 'type': 'string'},
11140 'error': {'$ref': '#/definitions/Error'},
11141 'message': {'type': 'string'},
11142 'output': {'patternProperties': {'.*': {'additionalProperties': True,
11143 'type': 'object'}},
11144 'type': 'object'},
11145 'started': {'format': 'date-time',
11146 'type': 'string'},
11147 'status': {'type': 'string'}},
11148 'type': 'object'},
11149 'ActionResults': {'additionalProperties': False,
11150 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
11151 'type': 'array'}},
11152 'type': 'object'},
11153 'ActionsByReceiver': {'additionalProperties': False,
11154 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionResult'},
11155 'type': 'array'},
11156 'error': {'$ref': '#/definitions/Error'},
11157 'receiver': {'type': 'string'}},
11158 'type': 'object'},
11159 'ActionsByReceivers': {'additionalProperties': False,
11160 'properties': {'actions': {'items': {'$ref': '#/definitions/ActionsByReceiver'},
11161 'type': 'array'}},
11162 'type': 'object'},
11163 'Entities': {'additionalProperties': False,
11164 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11165 'type': 'array'}},
11166 'required': ['Entities'],
11167 'type': 'object'},
11168 'Entity': {'additionalProperties': False,
11169 'properties': {'Tag': {'type': 'string'}},
11170 'required': ['Tag'],
11171 'type': 'object'},
11172 'Error': {'additionalProperties': False,
11173 'properties': {'Code': {'type': 'string'},
11174 'Info': {'$ref': '#/definitions/ErrorInfo'},
11175 'Message': {'type': 'string'}},
11176 'required': ['Message', 'Code'],
11177 'type': 'object'},
11178 'ErrorInfo': {'additionalProperties': False,
11179 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11180 'MacaroonPath': {'type': 'string'}},
11181 'type': 'object'},
11182 'ErrorResult': {'additionalProperties': False,
11183 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11184 'required': ['Error'],
11185 'type': 'object'},
11186 'ErrorResults': {'additionalProperties': False,
11187 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11188 'type': 'array'}},
11189 'required': ['Results'],
11190 'type': 'object'},
11191 'Macaroon': {'additionalProperties': False,
11192 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11193 'type': 'array'},
11194 'data': {'items': {'type': 'integer'},
11195 'type': 'array'},
11196 'id': {'$ref': '#/definitions/packet'},
11197 'location': {'$ref': '#/definitions/packet'},
11198 'sig': {'items': {'type': 'integer'},
11199 'type': 'array'}},
11200 'required': ['data',
11201 'location',
11202 'id',
11203 'caveats',
11204 'sig'],
11205 'type': 'object'},
11206 'StringsWatchResult': {'additionalProperties': False,
11207 'properties': {'Changes': {'items': {'type': 'string'},
11208 'type': 'array'},
11209 'Error': {'$ref': '#/definitions/Error'},
11210 'StringsWatcherId': {'type': 'string'}},
11211 'required': ['StringsWatcherId',
11212 'Changes',
11213 'Error'],
11214 'type': 'object'},
11215 'StringsWatchResults': {'additionalProperties': False,
11216 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
11217 'type': 'array'}},
11218 'required': ['Results'],
11219 'type': 'object'},
11220 'caveat': {'additionalProperties': False,
11221 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11222 'location': {'$ref': '#/definitions/packet'},
11223 'verificationId': {'$ref': '#/definitions/packet'}},
11224 'required': ['location',
11225 'caveatId',
11226 'verificationId'],
11227 'type': 'object'},
11228 'packet': {'additionalProperties': False,
11229 'properties': {'headerLen': {'type': 'integer'},
11230 'start': {'type': 'integer'},
11231 'totalLen': {'type': 'integer'}},
11232 'required': ['start', 'totalLen', 'headerLen'],
11233 'type': 'object'}},
11234 'properties': {'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11235 'Result': {'$ref': '#/definitions/ActionResults'}},
11236 'type': 'object'},
11237 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11238 'Result': {'$ref': '#/definitions/ErrorResults'}},
11239 'type': 'object'},
11240 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
11241 'Result': {'$ref': '#/definitions/ErrorResults'}},
11242 'type': 'object'},
11243 'RunningActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11244 'Result': {'$ref': '#/definitions/ActionsByReceivers'}},
11245 'type': 'object'},
11246 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11247 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
11248 'type': 'object'}},
11249 'type': 'object'}
11250
11251
11252 @ReturnMapping(ActionResults)
11253 async def Actions(self, entities):
11254 '''
11255 entities : typing.Sequence[~Entity]
11256 Returns -> typing.Sequence[~ActionResult]
11257 '''
11258 # map input types to rpc msg
11259 params = dict()
11260 msg = dict(Type='MachineActions', Request='Actions', Version=1, Params=params)
11261 params['Entities'] = entities
11262 reply = await self.rpc(msg)
11263 return reply
11264
11265
11266
11267 @ReturnMapping(ErrorResults)
11268 async def BeginActions(self, entities):
11269 '''
11270 entities : typing.Sequence[~Entity]
11271 Returns -> typing.Sequence[~ErrorResult]
11272 '''
11273 # map input types to rpc msg
11274 params = dict()
11275 msg = dict(Type='MachineActions', Request='BeginActions', Version=1, Params=params)
11276 params['Entities'] = entities
11277 reply = await self.rpc(msg)
11278 return reply
11279
11280
11281
11282 @ReturnMapping(ErrorResults)
11283 async def FinishActions(self, results):
11284 '''
11285 results : typing.Sequence[~ActionExecutionResult]
11286 Returns -> typing.Sequence[~ErrorResult]
11287 '''
11288 # map input types to rpc msg
11289 params = dict()
11290 msg = dict(Type='MachineActions', Request='FinishActions', Version=1, Params=params)
11291 params['results'] = results
11292 reply = await self.rpc(msg)
11293 return reply
11294
11295
11296
11297 @ReturnMapping(ActionsByReceivers)
11298 async def RunningActions(self, entities):
11299 '''
11300 entities : typing.Sequence[~Entity]
11301 Returns -> typing.Sequence[~ActionsByReceiver]
11302 '''
11303 # map input types to rpc msg
11304 params = dict()
11305 msg = dict(Type='MachineActions', Request='RunningActions', Version=1, Params=params)
11306 params['Entities'] = entities
11307 reply = await self.rpc(msg)
11308 return reply
11309
11310
11311
11312 @ReturnMapping(StringsWatchResults)
11313 async def WatchActionNotifications(self, entities):
11314 '''
11315 entities : typing.Sequence[~Entity]
11316 Returns -> typing.Sequence[~StringsWatchResult]
11317 '''
11318 # map input types to rpc msg
11319 params = dict()
11320 msg = dict(Type='MachineActions', Request='WatchActionNotifications', Version=1, Params=params)
11321 params['Entities'] = entities
11322 reply = await self.rpc(msg)
11323 return reply
11324
11325
11326 class MachineManager(Type):
11327 name = 'MachineManager'
11328 version = 2
11329 schema = {'definitions': {'AddMachineParams': {'additionalProperties': False,
11330 'properties': {'Addrs': {'items': {'$ref': '#/definitions/Address'},
11331 'type': 'array'},
11332 'Constraints': {'$ref': '#/definitions/Value'},
11333 'ContainerType': {'type': 'string'},
11334 'Disks': {'items': {'$ref': '#/definitions/Constraints'},
11335 'type': 'array'},
11336 'HardwareCharacteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
11337 'InstanceId': {'type': 'string'},
11338 'Jobs': {'items': {'type': 'string'},
11339 'type': 'array'},
11340 'Nonce': {'type': 'string'},
11341 'ParentId': {'type': 'string'},
11342 'Placement': {'$ref': '#/definitions/Placement'},
11343 'Series': {'type': 'string'}},
11344 'required': ['Series',
11345 'Constraints',
11346 'Jobs',
11347 'Disks',
11348 'Placement',
11349 'ParentId',
11350 'ContainerType',
11351 'InstanceId',
11352 'Nonce',
11353 'HardwareCharacteristics',
11354 'Addrs'],
11355 'type': 'object'},
11356 'AddMachines': {'additionalProperties': False,
11357 'properties': {'MachineParams': {'items': {'$ref': '#/definitions/AddMachineParams'},
11358 'type': 'array'}},
11359 'required': ['MachineParams'],
11360 'type': 'object'},
11361 'AddMachinesResult': {'additionalProperties': False,
11362 'properties': {'Error': {'$ref': '#/definitions/Error'},
11363 'Machine': {'type': 'string'}},
11364 'required': ['Machine', 'Error'],
11365 'type': 'object'},
11366 'AddMachinesResults': {'additionalProperties': False,
11367 'properties': {'Machines': {'items': {'$ref': '#/definitions/AddMachinesResult'},
11368 'type': 'array'}},
11369 'required': ['Machines'],
11370 'type': 'object'},
11371 'Address': {'additionalProperties': False,
11372 'properties': {'Scope': {'type': 'string'},
11373 'SpaceName': {'type': 'string'},
11374 'Type': {'type': 'string'},
11375 'Value': {'type': 'string'}},
11376 'required': ['Value', 'Type', 'Scope'],
11377 'type': 'object'},
11378 'Constraints': {'additionalProperties': False,
11379 'properties': {'Count': {'type': 'integer'},
11380 'Pool': {'type': 'string'},
11381 'Size': {'type': 'integer'}},
11382 'required': ['Pool', 'Size', 'Count'],
11383 'type': 'object'},
11384 'Error': {'additionalProperties': False,
11385 'properties': {'Code': {'type': 'string'},
11386 'Info': {'$ref': '#/definitions/ErrorInfo'},
11387 'Message': {'type': 'string'}},
11388 'required': ['Message', 'Code'],
11389 'type': 'object'},
11390 'ErrorInfo': {'additionalProperties': False,
11391 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11392 'MacaroonPath': {'type': 'string'}},
11393 'type': 'object'},
11394 'HardwareCharacteristics': {'additionalProperties': False,
11395 'properties': {'Arch': {'type': 'string'},
11396 'AvailabilityZone': {'type': 'string'},
11397 'CpuCores': {'type': 'integer'},
11398 'CpuPower': {'type': 'integer'},
11399 'Mem': {'type': 'integer'},
11400 'RootDisk': {'type': 'integer'},
11401 'Tags': {'items': {'type': 'string'},
11402 'type': 'array'}},
11403 'type': 'object'},
11404 'Macaroon': {'additionalProperties': False,
11405 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11406 'type': 'array'},
11407 'data': {'items': {'type': 'integer'},
11408 'type': 'array'},
11409 'id': {'$ref': '#/definitions/packet'},
11410 'location': {'$ref': '#/definitions/packet'},
11411 'sig': {'items': {'type': 'integer'},
11412 'type': 'array'}},
11413 'required': ['data',
11414 'location',
11415 'id',
11416 'caveats',
11417 'sig'],
11418 'type': 'object'},
11419 'Placement': {'additionalProperties': False,
11420 'properties': {'Directive': {'type': 'string'},
11421 'Scope': {'type': 'string'}},
11422 'required': ['Scope', 'Directive'],
11423 'type': 'object'},
11424 'Value': {'additionalProperties': False,
11425 'properties': {'arch': {'type': 'string'},
11426 'container': {'type': 'string'},
11427 'cpu-cores': {'type': 'integer'},
11428 'cpu-power': {'type': 'integer'},
11429 'instance-type': {'type': 'string'},
11430 'mem': {'type': 'integer'},
11431 'root-disk': {'type': 'integer'},
11432 'spaces': {'items': {'type': 'string'},
11433 'type': 'array'},
11434 'tags': {'items': {'type': 'string'},
11435 'type': 'array'},
11436 'virt-type': {'type': 'string'}},
11437 'type': 'object'},
11438 'caveat': {'additionalProperties': False,
11439 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11440 'location': {'$ref': '#/definitions/packet'},
11441 'verificationId': {'$ref': '#/definitions/packet'}},
11442 'required': ['location',
11443 'caveatId',
11444 'verificationId'],
11445 'type': 'object'},
11446 'packet': {'additionalProperties': False,
11447 'properties': {'headerLen': {'type': 'integer'},
11448 'start': {'type': 'integer'},
11449 'totalLen': {'type': 'integer'}},
11450 'required': ['start', 'totalLen', 'headerLen'],
11451 'type': 'object'}},
11452 'properties': {'AddMachines': {'properties': {'Params': {'$ref': '#/definitions/AddMachines'},
11453 'Result': {'$ref': '#/definitions/AddMachinesResults'}},
11454 'type': 'object'}},
11455 'type': 'object'}
11456
11457
11458 @ReturnMapping(AddMachinesResults)
11459 async def AddMachines(self, machineparams):
11460 '''
11461 machineparams : typing.Sequence[~AddMachineParams]
11462 Returns -> typing.Sequence[~AddMachinesResult]
11463 '''
11464 # map input types to rpc msg
11465 params = dict()
11466 msg = dict(Type='MachineManager', Request='AddMachines', Version=2, Params=params)
11467 params['MachineParams'] = machineparams
11468 reply = await self.rpc(msg)
11469 return reply
11470
11471
11472 class Machiner(Type):
11473 name = 'Machiner'
11474 version = 1
11475 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
11476 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
11477 'type': 'array'},
11478 'type': 'array'}},
11479 'required': ['Servers'],
11480 'type': 'object'},
11481 'Address': {'additionalProperties': False,
11482 'properties': {'Scope': {'type': 'string'},
11483 'SpaceName': {'type': 'string'},
11484 'Type': {'type': 'string'},
11485 'Value': {'type': 'string'}},
11486 'required': ['Value', 'Type', 'Scope'],
11487 'type': 'object'},
11488 'BytesResult': {'additionalProperties': False,
11489 'properties': {'Result': {'items': {'type': 'integer'},
11490 'type': 'array'}},
11491 'required': ['Result'],
11492 'type': 'object'},
11493 'Entities': {'additionalProperties': False,
11494 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11495 'type': 'array'}},
11496 'required': ['Entities'],
11497 'type': 'object'},
11498 'Entity': {'additionalProperties': False,
11499 'properties': {'Tag': {'type': 'string'}},
11500 'required': ['Tag'],
11501 'type': 'object'},
11502 'EntityStatusArgs': {'additionalProperties': False,
11503 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
11504 'type': 'object'}},
11505 'type': 'object'},
11506 'Info': {'type': 'string'},
11507 'Status': {'type': 'string'},
11508 'Tag': {'type': 'string'}},
11509 'required': ['Tag',
11510 'Status',
11511 'Info',
11512 'Data'],
11513 'type': 'object'},
11514 'Error': {'additionalProperties': False,
11515 'properties': {'Code': {'type': 'string'},
11516 'Info': {'$ref': '#/definitions/ErrorInfo'},
11517 'Message': {'type': 'string'}},
11518 'required': ['Message', 'Code'],
11519 'type': 'object'},
11520 'ErrorInfo': {'additionalProperties': False,
11521 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11522 'MacaroonPath': {'type': 'string'}},
11523 'type': 'object'},
11524 'ErrorResult': {'additionalProperties': False,
11525 'properties': {'Error': {'$ref': '#/definitions/Error'}},
11526 'required': ['Error'],
11527 'type': 'object'},
11528 'ErrorResults': {'additionalProperties': False,
11529 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
11530 'type': 'array'}},
11531 'required': ['Results'],
11532 'type': 'object'},
11533 'HostPort': {'additionalProperties': False,
11534 'properties': {'Address': {'$ref': '#/definitions/Address'},
11535 'Port': {'type': 'integer'}},
11536 'required': ['Address', 'Port'],
11537 'type': 'object'},
11538 'JobsResult': {'additionalProperties': False,
11539 'properties': {'Error': {'$ref': '#/definitions/Error'},
11540 'Jobs': {'items': {'type': 'string'},
11541 'type': 'array'}},
11542 'required': ['Jobs', 'Error'],
11543 'type': 'object'},
11544 'JobsResults': {'additionalProperties': False,
11545 'properties': {'Results': {'items': {'$ref': '#/definitions/JobsResult'},
11546 'type': 'array'}},
11547 'required': ['Results'],
11548 'type': 'object'},
11549 'LifeResult': {'additionalProperties': False,
11550 'properties': {'Error': {'$ref': '#/definitions/Error'},
11551 'Life': {'type': 'string'}},
11552 'required': ['Life', 'Error'],
11553 'type': 'object'},
11554 'LifeResults': {'additionalProperties': False,
11555 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
11556 'type': 'array'}},
11557 'required': ['Results'],
11558 'type': 'object'},
11559 'Macaroon': {'additionalProperties': False,
11560 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11561 'type': 'array'},
11562 'data': {'items': {'type': 'integer'},
11563 'type': 'array'},
11564 'id': {'$ref': '#/definitions/packet'},
11565 'location': {'$ref': '#/definitions/packet'},
11566 'sig': {'items': {'type': 'integer'},
11567 'type': 'array'}},
11568 'required': ['data',
11569 'location',
11570 'id',
11571 'caveats',
11572 'sig'],
11573 'type': 'object'},
11574 'MachineAddresses': {'additionalProperties': False,
11575 'properties': {'Addresses': {'items': {'$ref': '#/definitions/Address'},
11576 'type': 'array'},
11577 'Tag': {'type': 'string'}},
11578 'required': ['Tag', 'Addresses'],
11579 'type': 'object'},
11580 'NetworkConfig': {'additionalProperties': False,
11581 'properties': {'Address': {'type': 'string'},
11582 'CIDR': {'type': 'string'},
11583 'ConfigType': {'type': 'string'},
11584 'DNSSearchDomains': {'items': {'type': 'string'},
11585 'type': 'array'},
11586 'DNSServers': {'items': {'type': 'string'},
11587 'type': 'array'},
11588 'DeviceIndex': {'type': 'integer'},
11589 'Disabled': {'type': 'boolean'},
11590 'GatewayAddress': {'type': 'string'},
11591 'InterfaceName': {'type': 'string'},
11592 'InterfaceType': {'type': 'string'},
11593 'MACAddress': {'type': 'string'},
11594 'MTU': {'type': 'integer'},
11595 'NoAutoStart': {'type': 'boolean'},
11596 'ParentInterfaceName': {'type': 'string'},
11597 'ProviderAddressId': {'type': 'string'},
11598 'ProviderId': {'type': 'string'},
11599 'ProviderSpaceId': {'type': 'string'},
11600 'ProviderSubnetId': {'type': 'string'},
11601 'ProviderVLANId': {'type': 'string'},
11602 'VLANTag': {'type': 'integer'}},
11603 'required': ['DeviceIndex',
11604 'MACAddress',
11605 'CIDR',
11606 'MTU',
11607 'ProviderId',
11608 'ProviderSubnetId',
11609 'ProviderSpaceId',
11610 'ProviderAddressId',
11611 'ProviderVLANId',
11612 'VLANTag',
11613 'InterfaceName',
11614 'ParentInterfaceName',
11615 'InterfaceType',
11616 'Disabled'],
11617 'type': 'object'},
11618 'NotifyWatchResult': {'additionalProperties': False,
11619 'properties': {'Error': {'$ref': '#/definitions/Error'},
11620 'NotifyWatcherId': {'type': 'string'}},
11621 'required': ['NotifyWatcherId', 'Error'],
11622 'type': 'object'},
11623 'NotifyWatchResults': {'additionalProperties': False,
11624 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11625 'type': 'array'}},
11626 'required': ['Results'],
11627 'type': 'object'},
11628 'SetMachineNetworkConfig': {'additionalProperties': False,
11629 'properties': {'Config': {'items': {'$ref': '#/definitions/NetworkConfig'},
11630 'type': 'array'},
11631 'Tag': {'type': 'string'}},
11632 'required': ['Tag', 'Config'],
11633 'type': 'object'},
11634 'SetMachinesAddresses': {'additionalProperties': False,
11635 'properties': {'MachineAddresses': {'items': {'$ref': '#/definitions/MachineAddresses'},
11636 'type': 'array'}},
11637 'required': ['MachineAddresses'],
11638 'type': 'object'},
11639 'SetStatus': {'additionalProperties': False,
11640 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
11641 'type': 'array'}},
11642 'required': ['Entities'],
11643 'type': 'object'},
11644 'StringResult': {'additionalProperties': False,
11645 'properties': {'Error': {'$ref': '#/definitions/Error'},
11646 'Result': {'type': 'string'}},
11647 'required': ['Error', 'Result'],
11648 'type': 'object'},
11649 'StringsResult': {'additionalProperties': False,
11650 'properties': {'Error': {'$ref': '#/definitions/Error'},
11651 'Result': {'items': {'type': 'string'},
11652 'type': 'array'}},
11653 'required': ['Error', 'Result'],
11654 'type': 'object'},
11655 'caveat': {'additionalProperties': False,
11656 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11657 'location': {'$ref': '#/definitions/packet'},
11658 'verificationId': {'$ref': '#/definitions/packet'}},
11659 'required': ['location',
11660 'caveatId',
11661 'verificationId'],
11662 'type': 'object'},
11663 'packet': {'additionalProperties': False,
11664 'properties': {'headerLen': {'type': 'integer'},
11665 'start': {'type': 'integer'},
11666 'totalLen': {'type': 'integer'}},
11667 'required': ['start', 'totalLen', 'headerLen'],
11668 'type': 'object'}},
11669 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
11670 'type': 'object'},
11671 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
11672 'type': 'object'},
11673 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
11674 'type': 'object'},
11675 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11676 'Result': {'$ref': '#/definitions/ErrorResults'}},
11677 'type': 'object'},
11678 'Jobs': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11679 'Result': {'$ref': '#/definitions/JobsResults'}},
11680 'type': 'object'},
11681 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11682 'Result': {'$ref': '#/definitions/LifeResults'}},
11683 'type': 'object'},
11684 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
11685 'type': 'object'},
11686 'SetMachineAddresses': {'properties': {'Params': {'$ref': '#/definitions/SetMachinesAddresses'},
11687 'Result': {'$ref': '#/definitions/ErrorResults'}},
11688 'type': 'object'},
11689 'SetObservedNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/SetMachineNetworkConfig'}},
11690 'type': 'object'},
11691 'SetProviderNetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11692 'Result': {'$ref': '#/definitions/ErrorResults'}},
11693 'type': 'object'},
11694 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11695 'Result': {'$ref': '#/definitions/ErrorResults'}},
11696 'type': 'object'},
11697 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
11698 'Result': {'$ref': '#/definitions/ErrorResults'}},
11699 'type': 'object'},
11700 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11701 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11702 'type': 'object'},
11703 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
11704 'type': 'object'}},
11705 'type': 'object'}
11706
11707
11708 @ReturnMapping(StringsResult)
11709 async def APIAddresses(self):
11710 '''
11711
11712 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
11713 '''
11714 # map input types to rpc msg
11715 params = dict()
11716 msg = dict(Type='Machiner', Request='APIAddresses', Version=1, Params=params)
11717
11718 reply = await self.rpc(msg)
11719 return reply
11720
11721
11722
11723 @ReturnMapping(APIHostPortsResult)
11724 async def APIHostPorts(self):
11725 '''
11726
11727 Returns -> typing.Sequence[~HostPort]
11728 '''
11729 # map input types to rpc msg
11730 params = dict()
11731 msg = dict(Type='Machiner', Request='APIHostPorts', Version=1, Params=params)
11732
11733 reply = await self.rpc(msg)
11734 return reply
11735
11736
11737
11738 @ReturnMapping(BytesResult)
11739 async def CACert(self):
11740 '''
11741
11742 Returns -> typing.Sequence[int]
11743 '''
11744 # map input types to rpc msg
11745 params = dict()
11746 msg = dict(Type='Machiner', Request='CACert', Version=1, Params=params)
11747
11748 reply = await self.rpc(msg)
11749 return reply
11750
11751
11752
11753 @ReturnMapping(ErrorResults)
11754 async def EnsureDead(self, entities):
11755 '''
11756 entities : typing.Sequence[~Entity]
11757 Returns -> typing.Sequence[~ErrorResult]
11758 '''
11759 # map input types to rpc msg
11760 params = dict()
11761 msg = dict(Type='Machiner', Request='EnsureDead', Version=1, Params=params)
11762 params['Entities'] = entities
11763 reply = await self.rpc(msg)
11764 return reply
11765
11766
11767
11768 @ReturnMapping(JobsResults)
11769 async def Jobs(self, entities):
11770 '''
11771 entities : typing.Sequence[~Entity]
11772 Returns -> typing.Sequence[~JobsResult]
11773 '''
11774 # map input types to rpc msg
11775 params = dict()
11776 msg = dict(Type='Machiner', Request='Jobs', Version=1, Params=params)
11777 params['Entities'] = entities
11778 reply = await self.rpc(msg)
11779 return reply
11780
11781
11782
11783 @ReturnMapping(LifeResults)
11784 async def Life(self, entities):
11785 '''
11786 entities : typing.Sequence[~Entity]
11787 Returns -> typing.Sequence[~LifeResult]
11788 '''
11789 # map input types to rpc msg
11790 params = dict()
11791 msg = dict(Type='Machiner', Request='Life', Version=1, Params=params)
11792 params['Entities'] = entities
11793 reply = await self.rpc(msg)
11794 return reply
11795
11796
11797
11798 @ReturnMapping(StringResult)
11799 async def ModelUUID(self):
11800 '''
11801
11802 Returns -> typing.Union[_ForwardRef('Error'), str]
11803 '''
11804 # map input types to rpc msg
11805 params = dict()
11806 msg = dict(Type='Machiner', Request='ModelUUID', Version=1, Params=params)
11807
11808 reply = await self.rpc(msg)
11809 return reply
11810
11811
11812
11813 @ReturnMapping(ErrorResults)
11814 async def SetMachineAddresses(self, machineaddresses):
11815 '''
11816 machineaddresses : typing.Sequence[~MachineAddresses]
11817 Returns -> typing.Sequence[~ErrorResult]
11818 '''
11819 # map input types to rpc msg
11820 params = dict()
11821 msg = dict(Type='Machiner', Request='SetMachineAddresses', Version=1, Params=params)
11822 params['MachineAddresses'] = machineaddresses
11823 reply = await self.rpc(msg)
11824 return reply
11825
11826
11827
11828 @ReturnMapping(None)
11829 async def SetObservedNetworkConfig(self, config, tag):
11830 '''
11831 config : typing.Sequence[~NetworkConfig]
11832 tag : str
11833 Returns -> None
11834 '''
11835 # map input types to rpc msg
11836 params = dict()
11837 msg = dict(Type='Machiner', Request='SetObservedNetworkConfig', Version=1, Params=params)
11838 params['Config'] = config
11839 params['Tag'] = tag
11840 reply = await self.rpc(msg)
11841 return reply
11842
11843
11844
11845 @ReturnMapping(ErrorResults)
11846 async def SetProviderNetworkConfig(self, entities):
11847 '''
11848 entities : typing.Sequence[~Entity]
11849 Returns -> typing.Sequence[~ErrorResult]
11850 '''
11851 # map input types to rpc msg
11852 params = dict()
11853 msg = dict(Type='Machiner', Request='SetProviderNetworkConfig', Version=1, Params=params)
11854 params['Entities'] = entities
11855 reply = await self.rpc(msg)
11856 return reply
11857
11858
11859
11860 @ReturnMapping(ErrorResults)
11861 async def SetStatus(self, entities):
11862 '''
11863 entities : typing.Sequence[~EntityStatusArgs]
11864 Returns -> typing.Sequence[~ErrorResult]
11865 '''
11866 # map input types to rpc msg
11867 params = dict()
11868 msg = dict(Type='Machiner', Request='SetStatus', Version=1, Params=params)
11869 params['Entities'] = entities
11870 reply = await self.rpc(msg)
11871 return reply
11872
11873
11874
11875 @ReturnMapping(ErrorResults)
11876 async def UpdateStatus(self, entities):
11877 '''
11878 entities : typing.Sequence[~EntityStatusArgs]
11879 Returns -> typing.Sequence[~ErrorResult]
11880 '''
11881 # map input types to rpc msg
11882 params = dict()
11883 msg = dict(Type='Machiner', Request='UpdateStatus', Version=1, Params=params)
11884 params['Entities'] = entities
11885 reply = await self.rpc(msg)
11886 return reply
11887
11888
11889
11890 @ReturnMapping(NotifyWatchResults)
11891 async def Watch(self, entities):
11892 '''
11893 entities : typing.Sequence[~Entity]
11894 Returns -> typing.Sequence[~NotifyWatchResult]
11895 '''
11896 # map input types to rpc msg
11897 params = dict()
11898 msg = dict(Type='Machiner', Request='Watch', Version=1, Params=params)
11899 params['Entities'] = entities
11900 reply = await self.rpc(msg)
11901 return reply
11902
11903
11904
11905 @ReturnMapping(NotifyWatchResult)
11906 async def WatchAPIHostPorts(self):
11907 '''
11908
11909 Returns -> typing.Union[_ForwardRef('Error'), str]
11910 '''
11911 # map input types to rpc msg
11912 params = dict()
11913 msg = dict(Type='Machiner', Request='WatchAPIHostPorts', Version=1, Params=params)
11914
11915 reply = await self.rpc(msg)
11916 return reply
11917
11918
11919 class MeterStatus(Type):
11920 name = 'MeterStatus'
11921 version = 1
11922 schema = {'definitions': {'Entities': {'additionalProperties': False,
11923 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
11924 'type': 'array'}},
11925 'required': ['Entities'],
11926 'type': 'object'},
11927 'Entity': {'additionalProperties': False,
11928 'properties': {'Tag': {'type': 'string'}},
11929 'required': ['Tag'],
11930 'type': 'object'},
11931 'Error': {'additionalProperties': False,
11932 'properties': {'Code': {'type': 'string'},
11933 'Info': {'$ref': '#/definitions/ErrorInfo'},
11934 'Message': {'type': 'string'}},
11935 'required': ['Message', 'Code'],
11936 'type': 'object'},
11937 'ErrorInfo': {'additionalProperties': False,
11938 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
11939 'MacaroonPath': {'type': 'string'}},
11940 'type': 'object'},
11941 'Macaroon': {'additionalProperties': False,
11942 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
11943 'type': 'array'},
11944 'data': {'items': {'type': 'integer'},
11945 'type': 'array'},
11946 'id': {'$ref': '#/definitions/packet'},
11947 'location': {'$ref': '#/definitions/packet'},
11948 'sig': {'items': {'type': 'integer'},
11949 'type': 'array'}},
11950 'required': ['data',
11951 'location',
11952 'id',
11953 'caveats',
11954 'sig'],
11955 'type': 'object'},
11956 'MeterStatusResult': {'additionalProperties': False,
11957 'properties': {'Code': {'type': 'string'},
11958 'Error': {'$ref': '#/definitions/Error'},
11959 'Info': {'type': 'string'}},
11960 'required': ['Code', 'Info', 'Error'],
11961 'type': 'object'},
11962 'MeterStatusResults': {'additionalProperties': False,
11963 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
11964 'type': 'array'}},
11965 'required': ['Results'],
11966 'type': 'object'},
11967 'NotifyWatchResult': {'additionalProperties': False,
11968 'properties': {'Error': {'$ref': '#/definitions/Error'},
11969 'NotifyWatcherId': {'type': 'string'}},
11970 'required': ['NotifyWatcherId', 'Error'],
11971 'type': 'object'},
11972 'NotifyWatchResults': {'additionalProperties': False,
11973 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
11974 'type': 'array'}},
11975 'required': ['Results'],
11976 'type': 'object'},
11977 'caveat': {'additionalProperties': False,
11978 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
11979 'location': {'$ref': '#/definitions/packet'},
11980 'verificationId': {'$ref': '#/definitions/packet'}},
11981 'required': ['location',
11982 'caveatId',
11983 'verificationId'],
11984 'type': 'object'},
11985 'packet': {'additionalProperties': False,
11986 'properties': {'headerLen': {'type': 'integer'},
11987 'start': {'type': 'integer'},
11988 'totalLen': {'type': 'integer'}},
11989 'required': ['start', 'totalLen', 'headerLen'],
11990 'type': 'object'}},
11991 'properties': {'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11992 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
11993 'type': 'object'},
11994 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
11995 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
11996 'type': 'object'}},
11997 'type': 'object'}
11998
11999
12000 @ReturnMapping(MeterStatusResults)
12001 async def GetMeterStatus(self, entities):
12002 '''
12003 entities : typing.Sequence[~Entity]
12004 Returns -> typing.Sequence[~MeterStatusResult]
12005 '''
12006 # map input types to rpc msg
12007 params = dict()
12008 msg = dict(Type='MeterStatus', Request='GetMeterStatus', Version=1, Params=params)
12009 params['Entities'] = entities
12010 reply = await self.rpc(msg)
12011 return reply
12012
12013
12014
12015 @ReturnMapping(NotifyWatchResults)
12016 async def WatchMeterStatus(self, entities):
12017 '''
12018 entities : typing.Sequence[~Entity]
12019 Returns -> typing.Sequence[~NotifyWatchResult]
12020 '''
12021 # map input types to rpc msg
12022 params = dict()
12023 msg = dict(Type='MeterStatus', Request='WatchMeterStatus', Version=1, Params=params)
12024 params['Entities'] = entities
12025 reply = await self.rpc(msg)
12026 return reply
12027
12028
12029 class MetricsAdder(Type):
12030 name = 'MetricsAdder'
12031 version = 2
12032 schema = {'definitions': {'Error': {'additionalProperties': False,
12033 'properties': {'Code': {'type': 'string'},
12034 'Info': {'$ref': '#/definitions/ErrorInfo'},
12035 'Message': {'type': 'string'}},
12036 'required': ['Message', 'Code'],
12037 'type': 'object'},
12038 'ErrorInfo': {'additionalProperties': False,
12039 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12040 'MacaroonPath': {'type': 'string'}},
12041 'type': 'object'},
12042 'ErrorResult': {'additionalProperties': False,
12043 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12044 'required': ['Error'],
12045 'type': 'object'},
12046 'ErrorResults': {'additionalProperties': False,
12047 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12048 'type': 'array'}},
12049 'required': ['Results'],
12050 'type': 'object'},
12051 'Macaroon': {'additionalProperties': False,
12052 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12053 'type': 'array'},
12054 'data': {'items': {'type': 'integer'},
12055 'type': 'array'},
12056 'id': {'$ref': '#/definitions/packet'},
12057 'location': {'$ref': '#/definitions/packet'},
12058 'sig': {'items': {'type': 'integer'},
12059 'type': 'array'}},
12060 'required': ['data',
12061 'location',
12062 'id',
12063 'caveats',
12064 'sig'],
12065 'type': 'object'},
12066 'Metric': {'additionalProperties': False,
12067 'properties': {'Key': {'type': 'string'},
12068 'Time': {'format': 'date-time',
12069 'type': 'string'},
12070 'Value': {'type': 'string'}},
12071 'required': ['Key', 'Value', 'Time'],
12072 'type': 'object'},
12073 'MetricBatch': {'additionalProperties': False,
12074 'properties': {'CharmURL': {'type': 'string'},
12075 'Created': {'format': 'date-time',
12076 'type': 'string'},
12077 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
12078 'type': 'array'},
12079 'UUID': {'type': 'string'}},
12080 'required': ['UUID',
12081 'CharmURL',
12082 'Created',
12083 'Metrics'],
12084 'type': 'object'},
12085 'MetricBatchParam': {'additionalProperties': False,
12086 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
12087 'Tag': {'type': 'string'}},
12088 'required': ['Tag', 'Batch'],
12089 'type': 'object'},
12090 'MetricBatchParams': {'additionalProperties': False,
12091 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
12092 'type': 'array'}},
12093 'required': ['Batches'],
12094 'type': 'object'},
12095 'caveat': {'additionalProperties': False,
12096 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12097 'location': {'$ref': '#/definitions/packet'},
12098 'verificationId': {'$ref': '#/definitions/packet'}},
12099 'required': ['location',
12100 'caveatId',
12101 'verificationId'],
12102 'type': 'object'},
12103 'packet': {'additionalProperties': False,
12104 'properties': {'headerLen': {'type': 'integer'},
12105 'start': {'type': 'integer'},
12106 'totalLen': {'type': 'integer'}},
12107 'required': ['start', 'totalLen', 'headerLen'],
12108 'type': 'object'}},
12109 'properties': {'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
12110 'Result': {'$ref': '#/definitions/ErrorResults'}},
12111 'type': 'object'}},
12112 'type': 'object'}
12113
12114
12115 @ReturnMapping(ErrorResults)
12116 async def AddMetricBatches(self, batches):
12117 '''
12118 batches : typing.Sequence[~MetricBatchParam]
12119 Returns -> typing.Sequence[~ErrorResult]
12120 '''
12121 # map input types to rpc msg
12122 params = dict()
12123 msg = dict(Type='MetricsAdder', Request='AddMetricBatches', Version=2, Params=params)
12124 params['Batches'] = batches
12125 reply = await self.rpc(msg)
12126 return reply
12127
12128
12129 class MetricsDebug(Type):
12130 name = 'MetricsDebug'
12131 version = 1
12132 schema = {'definitions': {'Entities': {'additionalProperties': False,
12133 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12134 'type': 'array'}},
12135 'required': ['Entities'],
12136 'type': 'object'},
12137 'Entity': {'additionalProperties': False,
12138 'properties': {'Tag': {'type': 'string'}},
12139 'required': ['Tag'],
12140 'type': 'object'},
12141 'EntityMetrics': {'additionalProperties': False,
12142 'properties': {'error': {'$ref': '#/definitions/Error'},
12143 'metrics': {'items': {'$ref': '#/definitions/MetricResult'},
12144 'type': 'array'}},
12145 'type': 'object'},
12146 'Error': {'additionalProperties': False,
12147 'properties': {'Code': {'type': 'string'},
12148 'Info': {'$ref': '#/definitions/ErrorInfo'},
12149 'Message': {'type': 'string'}},
12150 'required': ['Message', 'Code'],
12151 'type': 'object'},
12152 'ErrorInfo': {'additionalProperties': False,
12153 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12154 'MacaroonPath': {'type': 'string'}},
12155 'type': 'object'},
12156 'ErrorResult': {'additionalProperties': False,
12157 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12158 'required': ['Error'],
12159 'type': 'object'},
12160 'ErrorResults': {'additionalProperties': False,
12161 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12162 'type': 'array'}},
12163 'required': ['Results'],
12164 'type': 'object'},
12165 'Macaroon': {'additionalProperties': False,
12166 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12167 'type': 'array'},
12168 'data': {'items': {'type': 'integer'},
12169 'type': 'array'},
12170 'id': {'$ref': '#/definitions/packet'},
12171 'location': {'$ref': '#/definitions/packet'},
12172 'sig': {'items': {'type': 'integer'},
12173 'type': 'array'}},
12174 'required': ['data',
12175 'location',
12176 'id',
12177 'caveats',
12178 'sig'],
12179 'type': 'object'},
12180 'MeterStatusParam': {'additionalProperties': False,
12181 'properties': {'code': {'type': 'string'},
12182 'info': {'type': 'string'},
12183 'tag': {'type': 'string'}},
12184 'required': ['tag', 'code', 'info'],
12185 'type': 'object'},
12186 'MeterStatusParams': {'additionalProperties': False,
12187 'properties': {'statues': {'items': {'$ref': '#/definitions/MeterStatusParam'},
12188 'type': 'array'}},
12189 'required': ['statues'],
12190 'type': 'object'},
12191 'MetricResult': {'additionalProperties': False,
12192 'properties': {'key': {'type': 'string'},
12193 'time': {'format': 'date-time',
12194 'type': 'string'},
12195 'value': {'type': 'string'}},
12196 'required': ['time', 'key', 'value'],
12197 'type': 'object'},
12198 'MetricResults': {'additionalProperties': False,
12199 'properties': {'results': {'items': {'$ref': '#/definitions/EntityMetrics'},
12200 'type': 'array'}},
12201 'required': ['results'],
12202 'type': 'object'},
12203 'caveat': {'additionalProperties': False,
12204 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12205 'location': {'$ref': '#/definitions/packet'},
12206 'verificationId': {'$ref': '#/definitions/packet'}},
12207 'required': ['location',
12208 'caveatId',
12209 'verificationId'],
12210 'type': 'object'},
12211 'packet': {'additionalProperties': False,
12212 'properties': {'headerLen': {'type': 'integer'},
12213 'start': {'type': 'integer'},
12214 'totalLen': {'type': 'integer'}},
12215 'required': ['start', 'totalLen', 'headerLen'],
12216 'type': 'object'}},
12217 'properties': {'GetMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12218 'Result': {'$ref': '#/definitions/MetricResults'}},
12219 'type': 'object'},
12220 'SetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/MeterStatusParams'},
12221 'Result': {'$ref': '#/definitions/ErrorResults'}},
12222 'type': 'object'}},
12223 'type': 'object'}
12224
12225
12226 @ReturnMapping(MetricResults)
12227 async def GetMetrics(self, entities):
12228 '''
12229 entities : typing.Sequence[~Entity]
12230 Returns -> typing.Sequence[~EntityMetrics]
12231 '''
12232 # map input types to rpc msg
12233 params = dict()
12234 msg = dict(Type='MetricsDebug', Request='GetMetrics', Version=1, Params=params)
12235 params['Entities'] = entities
12236 reply = await self.rpc(msg)
12237 return reply
12238
12239
12240
12241 @ReturnMapping(ErrorResults)
12242 async def SetMeterStatus(self, statues):
12243 '''
12244 statues : typing.Sequence[~MeterStatusParam]
12245 Returns -> typing.Sequence[~ErrorResult]
12246 '''
12247 # map input types to rpc msg
12248 params = dict()
12249 msg = dict(Type='MetricsDebug', Request='SetMeterStatus', Version=1, Params=params)
12250 params['statues'] = statues
12251 reply = await self.rpc(msg)
12252 return reply
12253
12254
12255 class MetricsManager(Type):
12256 name = 'MetricsManager'
12257 version = 1
12258 schema = {'definitions': {'Entities': {'additionalProperties': False,
12259 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12260 'type': 'array'}},
12261 'required': ['Entities'],
12262 'type': 'object'},
12263 'Entity': {'additionalProperties': False,
12264 'properties': {'Tag': {'type': 'string'}},
12265 'required': ['Tag'],
12266 'type': 'object'},
12267 'Error': {'additionalProperties': False,
12268 'properties': {'Code': {'type': 'string'},
12269 'Info': {'$ref': '#/definitions/ErrorInfo'},
12270 'Message': {'type': 'string'}},
12271 'required': ['Message', 'Code'],
12272 'type': 'object'},
12273 'ErrorInfo': {'additionalProperties': False,
12274 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12275 'MacaroonPath': {'type': 'string'}},
12276 'type': 'object'},
12277 'ErrorResult': {'additionalProperties': False,
12278 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12279 'required': ['Error'],
12280 'type': 'object'},
12281 'ErrorResults': {'additionalProperties': False,
12282 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12283 'type': 'array'}},
12284 'required': ['Results'],
12285 'type': 'object'},
12286 'Macaroon': {'additionalProperties': False,
12287 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12288 'type': 'array'},
12289 'data': {'items': {'type': 'integer'},
12290 'type': 'array'},
12291 'id': {'$ref': '#/definitions/packet'},
12292 'location': {'$ref': '#/definitions/packet'},
12293 'sig': {'items': {'type': 'integer'},
12294 'type': 'array'}},
12295 'required': ['data',
12296 'location',
12297 'id',
12298 'caveats',
12299 'sig'],
12300 'type': 'object'},
12301 'caveat': {'additionalProperties': False,
12302 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12303 'location': {'$ref': '#/definitions/packet'},
12304 'verificationId': {'$ref': '#/definitions/packet'}},
12305 'required': ['location',
12306 'caveatId',
12307 'verificationId'],
12308 'type': 'object'},
12309 'packet': {'additionalProperties': False,
12310 'properties': {'headerLen': {'type': 'integer'},
12311 'start': {'type': 'integer'},
12312 'totalLen': {'type': 'integer'}},
12313 'required': ['start', 'totalLen', 'headerLen'],
12314 'type': 'object'}},
12315 'properties': {'CleanupOldMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12316 'Result': {'$ref': '#/definitions/ErrorResults'}},
12317 'type': 'object'},
12318 'SendMetrics': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12319 'Result': {'$ref': '#/definitions/ErrorResults'}},
12320 'type': 'object'}},
12321 'type': 'object'}
12322
12323
12324 @ReturnMapping(ErrorResults)
12325 async def CleanupOldMetrics(self, entities):
12326 '''
12327 entities : typing.Sequence[~Entity]
12328 Returns -> typing.Sequence[~ErrorResult]
12329 '''
12330 # map input types to rpc msg
12331 params = dict()
12332 msg = dict(Type='MetricsManager', Request='CleanupOldMetrics', Version=1, Params=params)
12333 params['Entities'] = entities
12334 reply = await self.rpc(msg)
12335 return reply
12336
12337
12338
12339 @ReturnMapping(ErrorResults)
12340 async def SendMetrics(self, entities):
12341 '''
12342 entities : typing.Sequence[~Entity]
12343 Returns -> typing.Sequence[~ErrorResult]
12344 '''
12345 # map input types to rpc msg
12346 params = dict()
12347 msg = dict(Type='MetricsManager', Request='SendMetrics', Version=1, Params=params)
12348 params['Entities'] = entities
12349 reply = await self.rpc(msg)
12350 return reply
12351
12352
12353 class MigrationFlag(Type):
12354 name = 'MigrationFlag'
12355 version = 1
12356 schema = {'definitions': {'Entities': {'additionalProperties': False,
12357 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12358 'type': 'array'}},
12359 'required': ['Entities'],
12360 'type': 'object'},
12361 'Entity': {'additionalProperties': False,
12362 'properties': {'Tag': {'type': 'string'}},
12363 'required': ['Tag'],
12364 'type': 'object'},
12365 'Error': {'additionalProperties': False,
12366 'properties': {'Code': {'type': 'string'},
12367 'Info': {'$ref': '#/definitions/ErrorInfo'},
12368 'Message': {'type': 'string'}},
12369 'required': ['Message', 'Code'],
12370 'type': 'object'},
12371 'ErrorInfo': {'additionalProperties': False,
12372 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12373 'MacaroonPath': {'type': 'string'}},
12374 'type': 'object'},
12375 'Macaroon': {'additionalProperties': False,
12376 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12377 'type': 'array'},
12378 'data': {'items': {'type': 'integer'},
12379 'type': 'array'},
12380 'id': {'$ref': '#/definitions/packet'},
12381 'location': {'$ref': '#/definitions/packet'},
12382 'sig': {'items': {'type': 'integer'},
12383 'type': 'array'}},
12384 'required': ['data',
12385 'location',
12386 'id',
12387 'caveats',
12388 'sig'],
12389 'type': 'object'},
12390 'NotifyWatchResult': {'additionalProperties': False,
12391 'properties': {'Error': {'$ref': '#/definitions/Error'},
12392 'NotifyWatcherId': {'type': 'string'}},
12393 'required': ['NotifyWatcherId', 'Error'],
12394 'type': 'object'},
12395 'NotifyWatchResults': {'additionalProperties': False,
12396 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
12397 'type': 'array'}},
12398 'required': ['Results'],
12399 'type': 'object'},
12400 'PhaseResult': {'additionalProperties': False,
12401 'properties': {'Error': {'$ref': '#/definitions/Error'},
12402 'phase': {'type': 'string'}},
12403 'required': ['phase', 'Error'],
12404 'type': 'object'},
12405 'PhaseResults': {'additionalProperties': False,
12406 'properties': {'Results': {'items': {'$ref': '#/definitions/PhaseResult'},
12407 'type': 'array'}},
12408 'required': ['Results'],
12409 'type': 'object'},
12410 'caveat': {'additionalProperties': False,
12411 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12412 'location': {'$ref': '#/definitions/packet'},
12413 'verificationId': {'$ref': '#/definitions/packet'}},
12414 'required': ['location',
12415 'caveatId',
12416 'verificationId'],
12417 'type': 'object'},
12418 'packet': {'additionalProperties': False,
12419 'properties': {'headerLen': {'type': 'integer'},
12420 'start': {'type': 'integer'},
12421 'totalLen': {'type': 'integer'}},
12422 'required': ['start', 'totalLen', 'headerLen'],
12423 'type': 'object'}},
12424 'properties': {'Phase': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12425 'Result': {'$ref': '#/definitions/PhaseResults'}},
12426 'type': 'object'},
12427 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12428 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
12429 'type': 'object'}},
12430 'type': 'object'}
12431
12432
12433 @ReturnMapping(PhaseResults)
12434 async def Phase(self, entities):
12435 '''
12436 entities : typing.Sequence[~Entity]
12437 Returns -> typing.Sequence[~PhaseResult]
12438 '''
12439 # map input types to rpc msg
12440 params = dict()
12441 msg = dict(Type='MigrationFlag', Request='Phase', Version=1, Params=params)
12442 params['Entities'] = entities
12443 reply = await self.rpc(msg)
12444 return reply
12445
12446
12447
12448 @ReturnMapping(NotifyWatchResults)
12449 async def Watch(self, entities):
12450 '''
12451 entities : typing.Sequence[~Entity]
12452 Returns -> typing.Sequence[~NotifyWatchResult]
12453 '''
12454 # map input types to rpc msg
12455 params = dict()
12456 msg = dict(Type='MigrationFlag', Request='Watch', Version=1, Params=params)
12457 params['Entities'] = entities
12458 reply = await self.rpc(msg)
12459 return reply
12460
12461
12462 class MigrationMaster(Type):
12463 name = 'MigrationMaster'
12464 version = 1
12465 schema = {'definitions': {'Error': {'additionalProperties': False,
12466 'properties': {'Code': {'type': 'string'},
12467 'Info': {'$ref': '#/definitions/ErrorInfo'},
12468 'Message': {'type': 'string'}},
12469 'required': ['Message', 'Code'],
12470 'type': 'object'},
12471 'ErrorInfo': {'additionalProperties': False,
12472 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12473 'MacaroonPath': {'type': 'string'}},
12474 'type': 'object'},
12475 'FullMigrationStatus': {'additionalProperties': False,
12476 'properties': {'attempt': {'type': 'integer'},
12477 'phase': {'type': 'string'},
12478 'spec': {'$ref': '#/definitions/ModelMigrationSpec'}},
12479 'required': ['spec',
12480 'attempt',
12481 'phase'],
12482 'type': 'object'},
12483 'Macaroon': {'additionalProperties': False,
12484 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12485 'type': 'array'},
12486 'data': {'items': {'type': 'integer'},
12487 'type': 'array'},
12488 'id': {'$ref': '#/definitions/packet'},
12489 'location': {'$ref': '#/definitions/packet'},
12490 'sig': {'items': {'type': 'integer'},
12491 'type': 'array'}},
12492 'required': ['data',
12493 'location',
12494 'id',
12495 'caveats',
12496 'sig'],
12497 'type': 'object'},
12498 'ModelMigrationSpec': {'additionalProperties': False,
12499 'properties': {'model-tag': {'type': 'string'},
12500 'target-info': {'$ref': '#/definitions/ModelMigrationTargetInfo'}},
12501 'required': ['model-tag',
12502 'target-info'],
12503 'type': 'object'},
12504 'ModelMigrationTargetInfo': {'additionalProperties': False,
12505 'properties': {'addrs': {'items': {'type': 'string'},
12506 'type': 'array'},
12507 'auth-tag': {'type': 'string'},
12508 'ca-cert': {'type': 'string'},
12509 'controller-tag': {'type': 'string'},
12510 'password': {'type': 'string'}},
12511 'required': ['controller-tag',
12512 'addrs',
12513 'ca-cert',
12514 'auth-tag',
12515 'password'],
12516 'type': 'object'},
12517 'NotifyWatchResult': {'additionalProperties': False,
12518 'properties': {'Error': {'$ref': '#/definitions/Error'},
12519 'NotifyWatcherId': {'type': 'string'}},
12520 'required': ['NotifyWatcherId', 'Error'],
12521 'type': 'object'},
12522 'SerializedModel': {'additionalProperties': False,
12523 'properties': {'bytes': {'items': {'type': 'integer'},
12524 'type': 'array'}},
12525 'required': ['bytes'],
12526 'type': 'object'},
12527 'SetMigrationPhaseArgs': {'additionalProperties': False,
12528 'properties': {'phase': {'type': 'string'}},
12529 'required': ['phase'],
12530 'type': 'object'},
12531 'caveat': {'additionalProperties': False,
12532 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12533 'location': {'$ref': '#/definitions/packet'},
12534 'verificationId': {'$ref': '#/definitions/packet'}},
12535 'required': ['location',
12536 'caveatId',
12537 'verificationId'],
12538 'type': 'object'},
12539 'packet': {'additionalProperties': False,
12540 'properties': {'headerLen': {'type': 'integer'},
12541 'start': {'type': 'integer'},
12542 'totalLen': {'type': 'integer'}},
12543 'required': ['start', 'totalLen', 'headerLen'],
12544 'type': 'object'}},
12545 'properties': {'Export': {'properties': {'Result': {'$ref': '#/definitions/SerializedModel'}},
12546 'type': 'object'},
12547 'GetMigrationStatus': {'properties': {'Result': {'$ref': '#/definitions/FullMigrationStatus'}},
12548 'type': 'object'},
12549 'SetPhase': {'properties': {'Params': {'$ref': '#/definitions/SetMigrationPhaseArgs'}},
12550 'type': 'object'},
12551 'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12552 'type': 'object'}},
12553 'type': 'object'}
12554
12555
12556 @ReturnMapping(SerializedModel)
12557 async def Export(self):
12558 '''
12559
12560 Returns -> typing.Sequence[int]
12561 '''
12562 # map input types to rpc msg
12563 params = dict()
12564 msg = dict(Type='MigrationMaster', Request='Export', Version=1, Params=params)
12565
12566 reply = await self.rpc(msg)
12567 return reply
12568
12569
12570
12571 @ReturnMapping(FullMigrationStatus)
12572 async def GetMigrationStatus(self):
12573 '''
12574
12575 Returns -> typing.Union[int, str, _ForwardRef('ModelMigrationSpec')]
12576 '''
12577 # map input types to rpc msg
12578 params = dict()
12579 msg = dict(Type='MigrationMaster', Request='GetMigrationStatus', Version=1, Params=params)
12580
12581 reply = await self.rpc(msg)
12582 return reply
12583
12584
12585
12586 @ReturnMapping(None)
12587 async def SetPhase(self, phase):
12588 '''
12589 phase : str
12590 Returns -> None
12591 '''
12592 # map input types to rpc msg
12593 params = dict()
12594 msg = dict(Type='MigrationMaster', Request='SetPhase', Version=1, Params=params)
12595 params['phase'] = phase
12596 reply = await self.rpc(msg)
12597 return reply
12598
12599
12600
12601 @ReturnMapping(NotifyWatchResult)
12602 async def Watch(self):
12603 '''
12604
12605 Returns -> typing.Union[_ForwardRef('Error'), str]
12606 '''
12607 # map input types to rpc msg
12608 params = dict()
12609 msg = dict(Type='MigrationMaster', Request='Watch', Version=1, Params=params)
12610
12611 reply = await self.rpc(msg)
12612 return reply
12613
12614
12615 class MigrationMinion(Type):
12616 name = 'MigrationMinion'
12617 version = 1
12618 schema = {'definitions': {'Error': {'additionalProperties': False,
12619 'properties': {'Code': {'type': 'string'},
12620 'Info': {'$ref': '#/definitions/ErrorInfo'},
12621 'Message': {'type': 'string'}},
12622 'required': ['Message', 'Code'],
12623 'type': 'object'},
12624 'ErrorInfo': {'additionalProperties': False,
12625 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12626 'MacaroonPath': {'type': 'string'}},
12627 'type': 'object'},
12628 'Macaroon': {'additionalProperties': False,
12629 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12630 'type': 'array'},
12631 'data': {'items': {'type': 'integer'},
12632 'type': 'array'},
12633 'id': {'$ref': '#/definitions/packet'},
12634 'location': {'$ref': '#/definitions/packet'},
12635 'sig': {'items': {'type': 'integer'},
12636 'type': 'array'}},
12637 'required': ['data',
12638 'location',
12639 'id',
12640 'caveats',
12641 'sig'],
12642 'type': 'object'},
12643 'NotifyWatchResult': {'additionalProperties': False,
12644 'properties': {'Error': {'$ref': '#/definitions/Error'},
12645 'NotifyWatcherId': {'type': 'string'}},
12646 'required': ['NotifyWatcherId', 'Error'],
12647 'type': 'object'},
12648 'caveat': {'additionalProperties': False,
12649 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12650 'location': {'$ref': '#/definitions/packet'},
12651 'verificationId': {'$ref': '#/definitions/packet'}},
12652 'required': ['location',
12653 'caveatId',
12654 'verificationId'],
12655 'type': 'object'},
12656 'packet': {'additionalProperties': False,
12657 'properties': {'headerLen': {'type': 'integer'},
12658 'start': {'type': 'integer'},
12659 'totalLen': {'type': 'integer'}},
12660 'required': ['start', 'totalLen', 'headerLen'],
12661 'type': 'object'}},
12662 'properties': {'Watch': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
12663 'type': 'object'}},
12664 'type': 'object'}
12665
12666
12667 @ReturnMapping(NotifyWatchResult)
12668 async def Watch(self):
12669 '''
12670
12671 Returns -> typing.Union[_ForwardRef('Error'), str]
12672 '''
12673 # map input types to rpc msg
12674 params = dict()
12675 msg = dict(Type='MigrationMinion', Request='Watch', Version=1, Params=params)
12676
12677 reply = await self.rpc(msg)
12678 return reply
12679
12680
12681 class MigrationStatusWatcher(Type):
12682 name = 'MigrationStatusWatcher'
12683 version = 1
12684 schema = {'definitions': {'MigrationStatus': {'additionalProperties': False,
12685 'properties': {'attempt': {'type': 'integer'},
12686 'phase': {'type': 'string'},
12687 'source-api-addrs': {'items': {'type': 'string'},
12688 'type': 'array'},
12689 'source-ca-cert': {'type': 'string'},
12690 'target-api-addrs': {'items': {'type': 'string'},
12691 'type': 'array'},
12692 'target-ca-cert': {'type': 'string'}},
12693 'required': ['attempt',
12694 'phase',
12695 'source-api-addrs',
12696 'source-ca-cert',
12697 'target-api-addrs',
12698 'target-ca-cert'],
12699 'type': 'object'}},
12700 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MigrationStatus'}},
12701 'type': 'object'},
12702 'Stop': {'type': 'object'}},
12703 'type': 'object'}
12704
12705
12706 @ReturnMapping(MigrationStatus)
12707 async def Next(self):
12708 '''
12709
12710 Returns -> typing.Union[int, typing.Sequence[str]]
12711 '''
12712 # map input types to rpc msg
12713 params = dict()
12714 msg = dict(Type='MigrationStatusWatcher', Request='Next', Version=1, Params=params)
12715
12716 reply = await self.rpc(msg)
12717 return reply
12718
12719
12720
12721 @ReturnMapping(None)
12722 async def Stop(self):
12723 '''
12724
12725 Returns -> None
12726 '''
12727 # map input types to rpc msg
12728 params = dict()
12729 msg = dict(Type='MigrationStatusWatcher', Request='Stop', Version=1, Params=params)
12730
12731 reply = await self.rpc(msg)
12732 return reply
12733
12734
12735 class MigrationTarget(Type):
12736 name = 'MigrationTarget'
12737 version = 1
12738 schema = {'definitions': {'ModelArgs': {'additionalProperties': False,
12739 'properties': {'model-tag': {'type': 'string'}},
12740 'required': ['model-tag'],
12741 'type': 'object'},
12742 'SerializedModel': {'additionalProperties': False,
12743 'properties': {'bytes': {'items': {'type': 'integer'},
12744 'type': 'array'}},
12745 'required': ['bytes'],
12746 'type': 'object'}},
12747 'properties': {'Abort': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
12748 'type': 'object'},
12749 'Activate': {'properties': {'Params': {'$ref': '#/definitions/ModelArgs'}},
12750 'type': 'object'},
12751 'Import': {'properties': {'Params': {'$ref': '#/definitions/SerializedModel'}},
12752 'type': 'object'}},
12753 'type': 'object'}
12754
12755
12756 @ReturnMapping(None)
12757 async def Abort(self, model_tag):
12758 '''
12759 model_tag : str
12760 Returns -> None
12761 '''
12762 # map input types to rpc msg
12763 params = dict()
12764 msg = dict(Type='MigrationTarget', Request='Abort', Version=1, Params=params)
12765 params['model-tag'] = model_tag
12766 reply = await self.rpc(msg)
12767 return reply
12768
12769
12770
12771 @ReturnMapping(None)
12772 async def Activate(self, model_tag):
12773 '''
12774 model_tag : str
12775 Returns -> None
12776 '''
12777 # map input types to rpc msg
12778 params = dict()
12779 msg = dict(Type='MigrationTarget', Request='Activate', Version=1, Params=params)
12780 params['model-tag'] = model_tag
12781 reply = await self.rpc(msg)
12782 return reply
12783
12784
12785
12786 @ReturnMapping(None)
12787 async def Import(self, bytes_):
12788 '''
12789 bytes_ : typing.Sequence[int]
12790 Returns -> None
12791 '''
12792 # map input types to rpc msg
12793 params = dict()
12794 msg = dict(Type='MigrationTarget', Request='Import', Version=1, Params=params)
12795 params['bytes'] = bytes_
12796 reply = await self.rpc(msg)
12797 return reply
12798
12799
12800 class ModelManager(Type):
12801 name = 'ModelManager'
12802 version = 2
12803 schema = {'definitions': {'Entities': {'additionalProperties': False,
12804 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
12805 'type': 'array'}},
12806 'required': ['Entities'],
12807 'type': 'object'},
12808 'Entity': {'additionalProperties': False,
12809 'properties': {'Tag': {'type': 'string'}},
12810 'required': ['Tag'],
12811 'type': 'object'},
12812 'EntityStatus': {'additionalProperties': False,
12813 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
12814 'type': 'object'}},
12815 'type': 'object'},
12816 'Info': {'type': 'string'},
12817 'Since': {'format': 'date-time',
12818 'type': 'string'},
12819 'Status': {'type': 'string'}},
12820 'required': ['Status',
12821 'Info',
12822 'Data',
12823 'Since'],
12824 'type': 'object'},
12825 'Error': {'additionalProperties': False,
12826 'properties': {'Code': {'type': 'string'},
12827 'Info': {'$ref': '#/definitions/ErrorInfo'},
12828 'Message': {'type': 'string'}},
12829 'required': ['Message', 'Code'],
12830 'type': 'object'},
12831 'ErrorInfo': {'additionalProperties': False,
12832 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
12833 'MacaroonPath': {'type': 'string'}},
12834 'type': 'object'},
12835 'ErrorResult': {'additionalProperties': False,
12836 'properties': {'Error': {'$ref': '#/definitions/Error'}},
12837 'required': ['Error'],
12838 'type': 'object'},
12839 'ErrorResults': {'additionalProperties': False,
12840 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
12841 'type': 'array'}},
12842 'required': ['Results'],
12843 'type': 'object'},
12844 'Macaroon': {'additionalProperties': False,
12845 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
12846 'type': 'array'},
12847 'data': {'items': {'type': 'integer'},
12848 'type': 'array'},
12849 'id': {'$ref': '#/definitions/packet'},
12850 'location': {'$ref': '#/definitions/packet'},
12851 'sig': {'items': {'type': 'integer'},
12852 'type': 'array'}},
12853 'required': ['data',
12854 'location',
12855 'id',
12856 'caveats',
12857 'sig'],
12858 'type': 'object'},
12859 'Model': {'additionalProperties': False,
12860 'properties': {'Name': {'type': 'string'},
12861 'OwnerTag': {'type': 'string'},
12862 'UUID': {'type': 'string'}},
12863 'required': ['Name', 'UUID', 'OwnerTag'],
12864 'type': 'object'},
12865 'ModelConfigResult': {'additionalProperties': False,
12866 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12867 'type': 'object'}},
12868 'type': 'object'}},
12869 'required': ['Config'],
12870 'type': 'object'},
12871 'ModelCreateArgs': {'additionalProperties': False,
12872 'properties': {'Account': {'patternProperties': {'.*': {'additionalProperties': True,
12873 'type': 'object'}},
12874 'type': 'object'},
12875 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
12876 'type': 'object'}},
12877 'type': 'object'},
12878 'OwnerTag': {'type': 'string'}},
12879 'required': ['OwnerTag',
12880 'Account',
12881 'Config'],
12882 'type': 'object'},
12883 'ModelInfo': {'additionalProperties': False,
12884 'properties': {'DefaultSeries': {'type': 'string'},
12885 'Life': {'type': 'string'},
12886 'Name': {'type': 'string'},
12887 'OwnerTag': {'type': 'string'},
12888 'ProviderType': {'type': 'string'},
12889 'ServerUUID': {'type': 'string'},
12890 'Status': {'$ref': '#/definitions/EntityStatus'},
12891 'UUID': {'type': 'string'},
12892 'Users': {'items': {'$ref': '#/definitions/ModelUserInfo'},
12893 'type': 'array'}},
12894 'required': ['Name',
12895 'UUID',
12896 'ServerUUID',
12897 'ProviderType',
12898 'DefaultSeries',
12899 'OwnerTag',
12900 'Life',
12901 'Status',
12902 'Users'],
12903 'type': 'object'},
12904 'ModelInfoResult': {'additionalProperties': False,
12905 'properties': {'error': {'$ref': '#/definitions/Error'},
12906 'result': {'$ref': '#/definitions/ModelInfo'}},
12907 'type': 'object'},
12908 'ModelInfoResults': {'additionalProperties': False,
12909 'properties': {'results': {'items': {'$ref': '#/definitions/ModelInfoResult'},
12910 'type': 'array'}},
12911 'required': ['results'],
12912 'type': 'object'},
12913 'ModelSkeletonConfigArgs': {'additionalProperties': False,
12914 'properties': {'Provider': {'type': 'string'},
12915 'Region': {'type': 'string'}},
12916 'required': ['Provider', 'Region'],
12917 'type': 'object'},
12918 'ModelUserInfo': {'additionalProperties': False,
12919 'properties': {'access': {'type': 'string'},
12920 'displayname': {'type': 'string'},
12921 'lastconnection': {'format': 'date-time',
12922 'type': 'string'},
12923 'user': {'type': 'string'}},
12924 'required': ['user',
12925 'displayname',
12926 'lastconnection',
12927 'access'],
12928 'type': 'object'},
12929 'ModifyModelAccess': {'additionalProperties': False,
12930 'properties': {'access': {'type': 'string'},
12931 'action': {'type': 'string'},
12932 'model-tag': {'type': 'string'},
12933 'user-tag': {'type': 'string'}},
12934 'required': ['user-tag',
12935 'action',
12936 'access',
12937 'model-tag'],
12938 'type': 'object'},
12939 'ModifyModelAccessRequest': {'additionalProperties': False,
12940 'properties': {'changes': {'items': {'$ref': '#/definitions/ModifyModelAccess'},
12941 'type': 'array'}},
12942 'required': ['changes'],
12943 'type': 'object'},
12944 'UserModel': {'additionalProperties': False,
12945 'properties': {'LastConnection': {'format': 'date-time',
12946 'type': 'string'},
12947 'Model': {'$ref': '#/definitions/Model'}},
12948 'required': ['Model', 'LastConnection'],
12949 'type': 'object'},
12950 'UserModelList': {'additionalProperties': False,
12951 'properties': {'UserModels': {'items': {'$ref': '#/definitions/UserModel'},
12952 'type': 'array'}},
12953 'required': ['UserModels'],
12954 'type': 'object'},
12955 'caveat': {'additionalProperties': False,
12956 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
12957 'location': {'$ref': '#/definitions/packet'},
12958 'verificationId': {'$ref': '#/definitions/packet'}},
12959 'required': ['location',
12960 'caveatId',
12961 'verificationId'],
12962 'type': 'object'},
12963 'packet': {'additionalProperties': False,
12964 'properties': {'headerLen': {'type': 'integer'},
12965 'start': {'type': 'integer'},
12966 'totalLen': {'type': 'integer'}},
12967 'required': ['start', 'totalLen', 'headerLen'],
12968 'type': 'object'}},
12969 'properties': {'ConfigSkeleton': {'properties': {'Params': {'$ref': '#/definitions/ModelSkeletonConfigArgs'},
12970 'Result': {'$ref': '#/definitions/ModelConfigResult'}},
12971 'type': 'object'},
12972 'CreateModel': {'properties': {'Params': {'$ref': '#/definitions/ModelCreateArgs'},
12973 'Result': {'$ref': '#/definitions/Model'}},
12974 'type': 'object'},
12975 'ListModels': {'properties': {'Params': {'$ref': '#/definitions/Entity'},
12976 'Result': {'$ref': '#/definitions/UserModelList'}},
12977 'type': 'object'},
12978 'ModelInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
12979 'Result': {'$ref': '#/definitions/ModelInfoResults'}},
12980 'type': 'object'},
12981 'ModifyModelAccess': {'properties': {'Params': {'$ref': '#/definitions/ModifyModelAccessRequest'},
12982 'Result': {'$ref': '#/definitions/ErrorResults'}},
12983 'type': 'object'}},
12984 'type': 'object'}
12985
12986
12987 @ReturnMapping(ModelConfigResult)
12988 async def ConfigSkeleton(self, provider, region):
12989 '''
12990 provider : str
12991 region : str
12992 Returns -> typing.Mapping[str, typing.Any]
12993 '''
12994 # map input types to rpc msg
12995 params = dict()
12996 msg = dict(Type='ModelManager', Request='ConfigSkeleton', Version=2, Params=params)
12997 params['Provider'] = provider
12998 params['Region'] = region
12999 reply = await self.rpc(msg)
13000 return reply
13001
13002
13003
13004 @ReturnMapping(Model)
13005 async def CreateModel(self, account, config, ownertag):
13006 '''
13007 account : typing.Mapping[str, typing.Any]
13008 config : typing.Mapping[str, typing.Any]
13009 ownertag : str
13010 Returns -> <class 'str'>
13011 '''
13012 # map input types to rpc msg
13013 params = dict()
13014 msg = dict(Type='ModelManager', Request='CreateModel', Version=2, Params=params)
13015 params['Account'] = account
13016 params['Config'] = config
13017 params['OwnerTag'] = ownertag
13018 reply = await self.rpc(msg)
13019 return reply
13020
13021
13022
13023 @ReturnMapping(UserModelList)
13024 async def ListModels(self, tag):
13025 '''
13026 tag : str
13027 Returns -> typing.Sequence[~UserModel]
13028 '''
13029 # map input types to rpc msg
13030 params = dict()
13031 msg = dict(Type='ModelManager', Request='ListModels', Version=2, Params=params)
13032 params['Tag'] = tag
13033 reply = await self.rpc(msg)
13034 return reply
13035
13036
13037
13038 @ReturnMapping(ModelInfoResults)
13039 async def ModelInfo(self, entities):
13040 '''
13041 entities : typing.Sequence[~Entity]
13042 Returns -> typing.Sequence[~ModelInfoResult]
13043 '''
13044 # map input types to rpc msg
13045 params = dict()
13046 msg = dict(Type='ModelManager', Request='ModelInfo', Version=2, Params=params)
13047 params['Entities'] = entities
13048 reply = await self.rpc(msg)
13049 return reply
13050
13051
13052
13053 @ReturnMapping(ErrorResults)
13054 async def ModifyModelAccess(self, changes):
13055 '''
13056 changes : typing.Sequence[~ModifyModelAccess]
13057 Returns -> typing.Sequence[~ErrorResult]
13058 '''
13059 # map input types to rpc msg
13060 params = dict()
13061 msg = dict(Type='ModelManager', Request='ModifyModelAccess', Version=2, Params=params)
13062 params['changes'] = changes
13063 reply = await self.rpc(msg)
13064 return reply
13065
13066
13067 class NotifyWatcher(Type):
13068 name = 'NotifyWatcher'
13069 version = 1
13070 schema = {'properties': {'Next': {'type': 'object'}, 'Stop': {'type': 'object'}},
13071 'type': 'object'}
13072
13073
13074 @ReturnMapping(None)
13075 async def Next(self):
13076 '''
13077
13078 Returns -> None
13079 '''
13080 # map input types to rpc msg
13081 params = dict()
13082 msg = dict(Type='NotifyWatcher', Request='Next', Version=1, Params=params)
13083
13084 reply = await self.rpc(msg)
13085 return reply
13086
13087
13088
13089 @ReturnMapping(None)
13090 async def Stop(self):
13091 '''
13092
13093 Returns -> None
13094 '''
13095 # map input types to rpc msg
13096 params = dict()
13097 msg = dict(Type='NotifyWatcher', Request='Stop', Version=1, Params=params)
13098
13099 reply = await self.rpc(msg)
13100 return reply
13101
13102
13103 class Pinger(Type):
13104 name = 'Pinger'
13105 version = 1
13106 schema = {'properties': {'Ping': {'type': 'object'}, 'Stop': {'type': 'object'}},
13107 'type': 'object'}
13108
13109
13110 @ReturnMapping(None)
13111 async def Ping(self):
13112 '''
13113
13114 Returns -> None
13115 '''
13116 # map input types to rpc msg
13117 params = dict()
13118 msg = dict(Type='Pinger', Request='Ping', Version=1, Params=params)
13119
13120 reply = await self.rpc(msg)
13121 return reply
13122
13123
13124
13125 @ReturnMapping(None)
13126 async def Stop(self):
13127 '''
13128
13129 Returns -> None
13130 '''
13131 # map input types to rpc msg
13132 params = dict()
13133 msg = dict(Type='Pinger', Request='Stop', Version=1, Params=params)
13134
13135 reply = await self.rpc(msg)
13136 return reply
13137
13138
13139 class Provisioner(Type):
13140 name = 'Provisioner'
13141 version = 2
13142 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
13143 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
13144 'type': 'array'},
13145 'type': 'array'}},
13146 'required': ['Servers'],
13147 'type': 'object'},
13148 'Address': {'additionalProperties': False,
13149 'properties': {'Scope': {'type': 'string'},
13150 'SpaceName': {'type': 'string'},
13151 'Type': {'type': 'string'},
13152 'Value': {'type': 'string'}},
13153 'required': ['Value', 'Type', 'Scope'],
13154 'type': 'object'},
13155 'Binary': {'additionalProperties': False,
13156 'properties': {'Arch': {'type': 'string'},
13157 'Number': {'$ref': '#/definitions/Number'},
13158 'Series': {'type': 'string'}},
13159 'required': ['Number', 'Series', 'Arch'],
13160 'type': 'object'},
13161 'BytesResult': {'additionalProperties': False,
13162 'properties': {'Result': {'items': {'type': 'integer'},
13163 'type': 'array'}},
13164 'required': ['Result'],
13165 'type': 'object'},
13166 'CloudImageMetadata': {'additionalProperties': False,
13167 'properties': {'arch': {'type': 'string'},
13168 'image_id': {'type': 'string'},
13169 'priority': {'type': 'integer'},
13170 'region': {'type': 'string'},
13171 'root_storage_size': {'type': 'integer'},
13172 'root_storage_type': {'type': 'string'},
13173 'series': {'type': 'string'},
13174 'source': {'type': 'string'},
13175 'stream': {'type': 'string'},
13176 'version': {'type': 'string'},
13177 'virt_type': {'type': 'string'}},
13178 'required': ['image_id',
13179 'region',
13180 'version',
13181 'series',
13182 'arch',
13183 'source',
13184 'priority'],
13185 'type': 'object'},
13186 'ConstraintsResult': {'additionalProperties': False,
13187 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
13188 'Error': {'$ref': '#/definitions/Error'}},
13189 'required': ['Error', 'Constraints'],
13190 'type': 'object'},
13191 'ConstraintsResults': {'additionalProperties': False,
13192 'properties': {'Results': {'items': {'$ref': '#/definitions/ConstraintsResult'},
13193 'type': 'array'}},
13194 'required': ['Results'],
13195 'type': 'object'},
13196 'ContainerConfig': {'additionalProperties': False,
13197 'properties': {'AllowLXCLoopMounts': {'type': 'boolean'},
13198 'AptMirror': {'type': 'string'},
13199 'AptProxy': {'$ref': '#/definitions/Settings'},
13200 'AuthorizedKeys': {'type': 'string'},
13201 'PreferIPv6': {'type': 'boolean'},
13202 'ProviderType': {'type': 'string'},
13203 'Proxy': {'$ref': '#/definitions/Settings'},
13204 'SSLHostnameVerification': {'type': 'boolean'},
13205 'UpdateBehavior': {'$ref': '#/definitions/UpdateBehavior'}},
13206 'required': ['ProviderType',
13207 'AuthorizedKeys',
13208 'SSLHostnameVerification',
13209 'Proxy',
13210 'AptProxy',
13211 'AptMirror',
13212 'PreferIPv6',
13213 'AllowLXCLoopMounts',
13214 'UpdateBehavior'],
13215 'type': 'object'},
13216 'ContainerManagerConfig': {'additionalProperties': False,
13217 'properties': {'ManagerConfig': {'patternProperties': {'.*': {'type': 'string'}},
13218 'type': 'object'}},
13219 'required': ['ManagerConfig'],
13220 'type': 'object'},
13221 'ContainerManagerConfigParams': {'additionalProperties': False,
13222 'properties': {'Type': {'type': 'string'}},
13223 'required': ['Type'],
13224 'type': 'object'},
13225 'DistributionGroupResult': {'additionalProperties': False,
13226 'properties': {'Error': {'$ref': '#/definitions/Error'},
13227 'Result': {'items': {'type': 'string'},
13228 'type': 'array'}},
13229 'required': ['Error', 'Result'],
13230 'type': 'object'},
13231 'DistributionGroupResults': {'additionalProperties': False,
13232 'properties': {'Results': {'items': {'$ref': '#/definitions/DistributionGroupResult'},
13233 'type': 'array'}},
13234 'required': ['Results'],
13235 'type': 'object'},
13236 'Entities': {'additionalProperties': False,
13237 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
13238 'type': 'array'}},
13239 'required': ['Entities'],
13240 'type': 'object'},
13241 'Entity': {'additionalProperties': False,
13242 'properties': {'Tag': {'type': 'string'}},
13243 'required': ['Tag'],
13244 'type': 'object'},
13245 'EntityPassword': {'additionalProperties': False,
13246 'properties': {'Password': {'type': 'string'},
13247 'Tag': {'type': 'string'}},
13248 'required': ['Tag', 'Password'],
13249 'type': 'object'},
13250 'EntityPasswords': {'additionalProperties': False,
13251 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
13252 'type': 'array'}},
13253 'required': ['Changes'],
13254 'type': 'object'},
13255 'EntityStatusArgs': {'additionalProperties': False,
13256 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13257 'type': 'object'}},
13258 'type': 'object'},
13259 'Info': {'type': 'string'},
13260 'Status': {'type': 'string'},
13261 'Tag': {'type': 'string'}},
13262 'required': ['Tag',
13263 'Status',
13264 'Info',
13265 'Data'],
13266 'type': 'object'},
13267 'Error': {'additionalProperties': False,
13268 'properties': {'Code': {'type': 'string'},
13269 'Info': {'$ref': '#/definitions/ErrorInfo'},
13270 'Message': {'type': 'string'}},
13271 'required': ['Message', 'Code'],
13272 'type': 'object'},
13273 'ErrorInfo': {'additionalProperties': False,
13274 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
13275 'MacaroonPath': {'type': 'string'}},
13276 'type': 'object'},
13277 'ErrorResult': {'additionalProperties': False,
13278 'properties': {'Error': {'$ref': '#/definitions/Error'}},
13279 'required': ['Error'],
13280 'type': 'object'},
13281 'ErrorResults': {'additionalProperties': False,
13282 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
13283 'type': 'array'}},
13284 'required': ['Results'],
13285 'type': 'object'},
13286 'FindToolsParams': {'additionalProperties': False,
13287 'properties': {'Arch': {'type': 'string'},
13288 'MajorVersion': {'type': 'integer'},
13289 'MinorVersion': {'type': 'integer'},
13290 'Number': {'$ref': '#/definitions/Number'},
13291 'Series': {'type': 'string'}},
13292 'required': ['Number',
13293 'MajorVersion',
13294 'MinorVersion',
13295 'Arch',
13296 'Series'],
13297 'type': 'object'},
13298 'FindToolsResult': {'additionalProperties': False,
13299 'properties': {'Error': {'$ref': '#/definitions/Error'},
13300 'List': {'items': {'$ref': '#/definitions/Tools'},
13301 'type': 'array'}},
13302 'required': ['List', 'Error'],
13303 'type': 'object'},
13304 'HardwareCharacteristics': {'additionalProperties': False,
13305 'properties': {'Arch': {'type': 'string'},
13306 'AvailabilityZone': {'type': 'string'},
13307 'CpuCores': {'type': 'integer'},
13308 'CpuPower': {'type': 'integer'},
13309 'Mem': {'type': 'integer'},
13310 'RootDisk': {'type': 'integer'},
13311 'Tags': {'items': {'type': 'string'},
13312 'type': 'array'}},
13313 'type': 'object'},
13314 'HostPort': {'additionalProperties': False,
13315 'properties': {'Address': {'$ref': '#/definitions/Address'},
13316 'Port': {'type': 'integer'}},
13317 'required': ['Address', 'Port'],
13318 'type': 'object'},
13319 'InstanceInfo': {'additionalProperties': False,
13320 'properties': {'Characteristics': {'$ref': '#/definitions/HardwareCharacteristics'},
13321 'InstanceId': {'type': 'string'},
13322 'NetworkConfig': {'items': {'$ref': '#/definitions/NetworkConfig'},
13323 'type': 'array'},
13324 'Nonce': {'type': 'string'},
13325 'Tag': {'type': 'string'},
13326 'VolumeAttachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
13327 'type': 'object'},
13328 'Volumes': {'items': {'$ref': '#/definitions/Volume'},
13329 'type': 'array'}},
13330 'required': ['Tag',
13331 'InstanceId',
13332 'Nonce',
13333 'Characteristics',
13334 'Volumes',
13335 'VolumeAttachments',
13336 'NetworkConfig'],
13337 'type': 'object'},
13338 'InstancesInfo': {'additionalProperties': False,
13339 'properties': {'Machines': {'items': {'$ref': '#/definitions/InstanceInfo'},
13340 'type': 'array'}},
13341 'required': ['Machines'],
13342 'type': 'object'},
13343 'LifeResult': {'additionalProperties': False,
13344 'properties': {'Error': {'$ref': '#/definitions/Error'},
13345 'Life': {'type': 'string'}},
13346 'required': ['Life', 'Error'],
13347 'type': 'object'},
13348 'LifeResults': {'additionalProperties': False,
13349 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
13350 'type': 'array'}},
13351 'required': ['Results'],
13352 'type': 'object'},
13353 'Macaroon': {'additionalProperties': False,
13354 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
13355 'type': 'array'},
13356 'data': {'items': {'type': 'integer'},
13357 'type': 'array'},
13358 'id': {'$ref': '#/definitions/packet'},
13359 'location': {'$ref': '#/definitions/packet'},
13360 'sig': {'items': {'type': 'integer'},
13361 'type': 'array'}},
13362 'required': ['data',
13363 'location',
13364 'id',
13365 'caveats',
13366 'sig'],
13367 'type': 'object'},
13368 'MachineContainers': {'additionalProperties': False,
13369 'properties': {'ContainerTypes': {'items': {'type': 'string'},
13370 'type': 'array'},
13371 'MachineTag': {'type': 'string'}},
13372 'required': ['MachineTag',
13373 'ContainerTypes'],
13374 'type': 'object'},
13375 'MachineContainersParams': {'additionalProperties': False,
13376 'properties': {'Params': {'items': {'$ref': '#/definitions/MachineContainers'},
13377 'type': 'array'}},
13378 'required': ['Params'],
13379 'type': 'object'},
13380 'MachineNetworkConfigResult': {'additionalProperties': False,
13381 'properties': {'Error': {'$ref': '#/definitions/Error'},
13382 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
13383 'type': 'array'}},
13384 'required': ['Error', 'Info'],
13385 'type': 'object'},
13386 'MachineNetworkConfigResults': {'additionalProperties': False,
13387 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineNetworkConfigResult'},
13388 'type': 'array'}},
13389 'required': ['Results'],
13390 'type': 'object'},
13391 'ModelConfigResult': {'additionalProperties': False,
13392 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
13393 'type': 'object'}},
13394 'type': 'object'}},
13395 'required': ['Config'],
13396 'type': 'object'},
13397 'NetworkConfig': {'additionalProperties': False,
13398 'properties': {'Address': {'type': 'string'},
13399 'CIDR': {'type': 'string'},
13400 'ConfigType': {'type': 'string'},
13401 'DNSSearchDomains': {'items': {'type': 'string'},
13402 'type': 'array'},
13403 'DNSServers': {'items': {'type': 'string'},
13404 'type': 'array'},
13405 'DeviceIndex': {'type': 'integer'},
13406 'Disabled': {'type': 'boolean'},
13407 'GatewayAddress': {'type': 'string'},
13408 'InterfaceName': {'type': 'string'},
13409 'InterfaceType': {'type': 'string'},
13410 'MACAddress': {'type': 'string'},
13411 'MTU': {'type': 'integer'},
13412 'NoAutoStart': {'type': 'boolean'},
13413 'ParentInterfaceName': {'type': 'string'},
13414 'ProviderAddressId': {'type': 'string'},
13415 'ProviderId': {'type': 'string'},
13416 'ProviderSpaceId': {'type': 'string'},
13417 'ProviderSubnetId': {'type': 'string'},
13418 'ProviderVLANId': {'type': 'string'},
13419 'VLANTag': {'type': 'integer'}},
13420 'required': ['DeviceIndex',
13421 'MACAddress',
13422 'CIDR',
13423 'MTU',
13424 'ProviderId',
13425 'ProviderSubnetId',
13426 'ProviderSpaceId',
13427 'ProviderAddressId',
13428 'ProviderVLANId',
13429 'VLANTag',
13430 'InterfaceName',
13431 'ParentInterfaceName',
13432 'InterfaceType',
13433 'Disabled'],
13434 'type': 'object'},
13435 'NotifyWatchResult': {'additionalProperties': False,
13436 'properties': {'Error': {'$ref': '#/definitions/Error'},
13437 'NotifyWatcherId': {'type': 'string'}},
13438 'required': ['NotifyWatcherId', 'Error'],
13439 'type': 'object'},
13440 'Number': {'additionalProperties': False,
13441 'properties': {'Build': {'type': 'integer'},
13442 'Major': {'type': 'integer'},
13443 'Minor': {'type': 'integer'},
13444 'Patch': {'type': 'integer'},
13445 'Tag': {'type': 'string'}},
13446 'required': ['Major',
13447 'Minor',
13448 'Tag',
13449 'Patch',
13450 'Build'],
13451 'type': 'object'},
13452 'ProvisioningInfo': {'additionalProperties': False,
13453 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
13454 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
13455 'type': 'object'},
13456 'ImageMetadata': {'items': {'$ref': '#/definitions/CloudImageMetadata'},
13457 'type': 'array'},
13458 'Jobs': {'items': {'type': 'string'},
13459 'type': 'array'},
13460 'Placement': {'type': 'string'},
13461 'Series': {'type': 'string'},
13462 'SubnetsToZones': {'patternProperties': {'.*': {'items': {'type': 'string'},
13463 'type': 'array'}},
13464 'type': 'object'},
13465 'Tags': {'patternProperties': {'.*': {'type': 'string'}},
13466 'type': 'object'},
13467 'Volumes': {'items': {'$ref': '#/definitions/VolumeParams'},
13468 'type': 'array'}},
13469 'required': ['Constraints',
13470 'Series',
13471 'Placement',
13472 'Jobs',
13473 'Volumes',
13474 'Tags',
13475 'SubnetsToZones',
13476 'ImageMetadata',
13477 'EndpointBindings'],
13478 'type': 'object'},
13479 'ProvisioningInfoResult': {'additionalProperties': False,
13480 'properties': {'Error': {'$ref': '#/definitions/Error'},
13481 'Result': {'$ref': '#/definitions/ProvisioningInfo'}},
13482 'required': ['Error', 'Result'],
13483 'type': 'object'},
13484 'ProvisioningInfoResults': {'additionalProperties': False,
13485 'properties': {'Results': {'items': {'$ref': '#/definitions/ProvisioningInfoResult'},
13486 'type': 'array'}},
13487 'required': ['Results'],
13488 'type': 'object'},
13489 'SetStatus': {'additionalProperties': False,
13490 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
13491 'type': 'array'}},
13492 'required': ['Entities'],
13493 'type': 'object'},
13494 'Settings': {'additionalProperties': False,
13495 'properties': {'Ftp': {'type': 'string'},
13496 'Http': {'type': 'string'},
13497 'Https': {'type': 'string'},
13498 'NoProxy': {'type': 'string'}},
13499 'required': ['Http', 'Https', 'Ftp', 'NoProxy'],
13500 'type': 'object'},
13501 'StatusResult': {'additionalProperties': False,
13502 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
13503 'type': 'object'}},
13504 'type': 'object'},
13505 'Error': {'$ref': '#/definitions/Error'},
13506 'Id': {'type': 'string'},
13507 'Info': {'type': 'string'},
13508 'Life': {'type': 'string'},
13509 'Since': {'format': 'date-time',
13510 'type': 'string'},
13511 'Status': {'type': 'string'}},
13512 'required': ['Error',
13513 'Id',
13514 'Life',
13515 'Status',
13516 'Info',
13517 'Data',
13518 'Since'],
13519 'type': 'object'},
13520 'StatusResults': {'additionalProperties': False,
13521 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
13522 'type': 'array'}},
13523 'required': ['Results'],
13524 'type': 'object'},
13525 'StringResult': {'additionalProperties': False,
13526 'properties': {'Error': {'$ref': '#/definitions/Error'},
13527 'Result': {'type': 'string'}},
13528 'required': ['Error', 'Result'],
13529 'type': 'object'},
13530 'StringResults': {'additionalProperties': False,
13531 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
13532 'type': 'array'}},
13533 'required': ['Results'],
13534 'type': 'object'},
13535 'StringsResult': {'additionalProperties': False,
13536 'properties': {'Error': {'$ref': '#/definitions/Error'},
13537 'Result': {'items': {'type': 'string'},
13538 'type': 'array'}},
13539 'required': ['Error', 'Result'],
13540 'type': 'object'},
13541 'StringsWatchResult': {'additionalProperties': False,
13542 'properties': {'Changes': {'items': {'type': 'string'},
13543 'type': 'array'},
13544 'Error': {'$ref': '#/definitions/Error'},
13545 'StringsWatcherId': {'type': 'string'}},
13546 'required': ['StringsWatcherId',
13547 'Changes',
13548 'Error'],
13549 'type': 'object'},
13550 'StringsWatchResults': {'additionalProperties': False,
13551 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
13552 'type': 'array'}},
13553 'required': ['Results'],
13554 'type': 'object'},
13555 'Tools': {'additionalProperties': False,
13556 'properties': {'sha256': {'type': 'string'},
13557 'size': {'type': 'integer'},
13558 'url': {'type': 'string'},
13559 'version': {'$ref': '#/definitions/Binary'}},
13560 'required': ['version', 'url', 'size'],
13561 'type': 'object'},
13562 'ToolsResult': {'additionalProperties': False,
13563 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
13564 'Error': {'$ref': '#/definitions/Error'},
13565 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
13566 'type': 'array'}},
13567 'required': ['ToolsList',
13568 'DisableSSLHostnameVerification',
13569 'Error'],
13570 'type': 'object'},
13571 'ToolsResults': {'additionalProperties': False,
13572 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
13573 'type': 'array'}},
13574 'required': ['Results'],
13575 'type': 'object'},
13576 'UpdateBehavior': {'additionalProperties': False,
13577 'properties': {'EnableOSRefreshUpdate': {'type': 'boolean'},
13578 'EnableOSUpgrade': {'type': 'boolean'}},
13579 'required': ['EnableOSRefreshUpdate',
13580 'EnableOSUpgrade'],
13581 'type': 'object'},
13582 'Value': {'additionalProperties': False,
13583 'properties': {'arch': {'type': 'string'},
13584 'container': {'type': 'string'},
13585 'cpu-cores': {'type': 'integer'},
13586 'cpu-power': {'type': 'integer'},
13587 'instance-type': {'type': 'string'},
13588 'mem': {'type': 'integer'},
13589 'root-disk': {'type': 'integer'},
13590 'spaces': {'items': {'type': 'string'},
13591 'type': 'array'},
13592 'tags': {'items': {'type': 'string'},
13593 'type': 'array'},
13594 'virt-type': {'type': 'string'}},
13595 'type': 'object'},
13596 'Volume': {'additionalProperties': False,
13597 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
13598 'volumetag': {'type': 'string'}},
13599 'required': ['volumetag', 'info'],
13600 'type': 'object'},
13601 'VolumeAttachmentInfo': {'additionalProperties': False,
13602 'properties': {'busaddress': {'type': 'string'},
13603 'devicelink': {'type': 'string'},
13604 'devicename': {'type': 'string'},
13605 'read-only': {'type': 'boolean'}},
13606 'type': 'object'},
13607 'VolumeAttachmentParams': {'additionalProperties': False,
13608 'properties': {'instanceid': {'type': 'string'},
13609 'machinetag': {'type': 'string'},
13610 'provider': {'type': 'string'},
13611 'read-only': {'type': 'boolean'},
13612 'volumeid': {'type': 'string'},
13613 'volumetag': {'type': 'string'}},
13614 'required': ['volumetag',
13615 'machinetag',
13616 'provider'],
13617 'type': 'object'},
13618 'VolumeInfo': {'additionalProperties': False,
13619 'properties': {'hardwareid': {'type': 'string'},
13620 'persistent': {'type': 'boolean'},
13621 'size': {'type': 'integer'},
13622 'volumeid': {'type': 'string'}},
13623 'required': ['volumeid', 'size', 'persistent'],
13624 'type': 'object'},
13625 'VolumeParams': {'additionalProperties': False,
13626 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
13627 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
13628 'type': 'object'}},
13629 'type': 'object'},
13630 'provider': {'type': 'string'},
13631 'size': {'type': 'integer'},
13632 'tags': {'patternProperties': {'.*': {'type': 'string'}},
13633 'type': 'object'},
13634 'volumetag': {'type': 'string'}},
13635 'required': ['volumetag', 'size', 'provider'],
13636 'type': 'object'},
13637 'WatchContainer': {'additionalProperties': False,
13638 'properties': {'ContainerType': {'type': 'string'},
13639 'MachineTag': {'type': 'string'}},
13640 'required': ['MachineTag', 'ContainerType'],
13641 'type': 'object'},
13642 'WatchContainers': {'additionalProperties': False,
13643 'properties': {'Params': {'items': {'$ref': '#/definitions/WatchContainer'},
13644 'type': 'array'}},
13645 'required': ['Params'],
13646 'type': 'object'},
13647 'caveat': {'additionalProperties': False,
13648 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
13649 'location': {'$ref': '#/definitions/packet'},
13650 'verificationId': {'$ref': '#/definitions/packet'}},
13651 'required': ['location',
13652 'caveatId',
13653 'verificationId'],
13654 'type': 'object'},
13655 'packet': {'additionalProperties': False,
13656 'properties': {'headerLen': {'type': 'integer'},
13657 'start': {'type': 'integer'},
13658 'totalLen': {'type': 'integer'}},
13659 'required': ['start', 'totalLen', 'headerLen'],
13660 'type': 'object'}},
13661 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13662 'type': 'object'},
13663 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
13664 'type': 'object'},
13665 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
13666 'type': 'object'},
13667 'Constraints': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13668 'Result': {'$ref': '#/definitions/ConstraintsResults'}},
13669 'type': 'object'},
13670 'ContainerConfig': {'properties': {'Result': {'$ref': '#/definitions/ContainerConfig'}},
13671 'type': 'object'},
13672 'ContainerManagerConfig': {'properties': {'Params': {'$ref': '#/definitions/ContainerManagerConfigParams'},
13673 'Result': {'$ref': '#/definitions/ContainerManagerConfig'}},
13674 'type': 'object'},
13675 'DistributionGroup': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13676 'Result': {'$ref': '#/definitions/DistributionGroupResults'}},
13677 'type': 'object'},
13678 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13679 'Result': {'$ref': '#/definitions/ErrorResults'}},
13680 'type': 'object'},
13681 'FindTools': {'properties': {'Params': {'$ref': '#/definitions/FindToolsParams'},
13682 'Result': {'$ref': '#/definitions/FindToolsResult'}},
13683 'type': 'object'},
13684 'GetContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13685 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
13686 'type': 'object'},
13687 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13688 'Result': {'$ref': '#/definitions/StringResults'}},
13689 'type': 'object'},
13690 'InstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13691 'Result': {'$ref': '#/definitions/StatusResults'}},
13692 'type': 'object'},
13693 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13694 'Result': {'$ref': '#/definitions/LifeResults'}},
13695 'type': 'object'},
13696 'MachinesWithTransientErrors': {'properties': {'Result': {'$ref': '#/definitions/StatusResults'}},
13697 'type': 'object'},
13698 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
13699 'type': 'object'},
13700 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
13701 'type': 'object'},
13702 'PrepareContainerInterfaceInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13703 'Result': {'$ref': '#/definitions/MachineNetworkConfigResults'}},
13704 'type': 'object'},
13705 'ProvisioningInfo': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13706 'Result': {'$ref': '#/definitions/ProvisioningInfoResults'}},
13707 'type': 'object'},
13708 'ReleaseContainerAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13709 'Result': {'$ref': '#/definitions/ErrorResults'}},
13710 'type': 'object'},
13711 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13712 'Result': {'$ref': '#/definitions/ErrorResults'}},
13713 'type': 'object'},
13714 'Series': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13715 'Result': {'$ref': '#/definitions/StringResults'}},
13716 'type': 'object'},
13717 'SetInstanceInfo': {'properties': {'Params': {'$ref': '#/definitions/InstancesInfo'},
13718 'Result': {'$ref': '#/definitions/ErrorResults'}},
13719 'type': 'object'},
13720 'SetInstanceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13721 'Result': {'$ref': '#/definitions/ErrorResults'}},
13722 'type': 'object'},
13723 'SetPasswords': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
13724 'Result': {'$ref': '#/definitions/ErrorResults'}},
13725 'type': 'object'},
13726 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13727 'Result': {'$ref': '#/definitions/ErrorResults'}},
13728 'type': 'object'},
13729 'SetSupportedContainers': {'properties': {'Params': {'$ref': '#/definitions/MachineContainersParams'},
13730 'Result': {'$ref': '#/definitions/ErrorResults'}},
13731 'type': 'object'},
13732 'StateAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
13733 'type': 'object'},
13734 'Status': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13735 'Result': {'$ref': '#/definitions/StatusResults'}},
13736 'type': 'object'},
13737 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
13738 'Result': {'$ref': '#/definitions/ToolsResults'}},
13739 'type': 'object'},
13740 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
13741 'Result': {'$ref': '#/definitions/ErrorResults'}},
13742 'type': 'object'},
13743 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13744 'type': 'object'},
13745 'WatchAllContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
13746 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13747 'type': 'object'},
13748 'WatchContainers': {'properties': {'Params': {'$ref': '#/definitions/WatchContainers'},
13749 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
13750 'type': 'object'},
13751 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13752 'type': 'object'},
13753 'WatchMachineErrorRetry': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
13754 'type': 'object'},
13755 'WatchModelMachines': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
13756 'type': 'object'}},
13757 'type': 'object'}
13758
13759
13760 @ReturnMapping(StringsResult)
13761 async def APIAddresses(self):
13762 '''
13763
13764 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
13765 '''
13766 # map input types to rpc msg
13767 params = dict()
13768 msg = dict(Type='Provisioner', Request='APIAddresses', Version=2, Params=params)
13769
13770 reply = await self.rpc(msg)
13771 return reply
13772
13773
13774
13775 @ReturnMapping(APIHostPortsResult)
13776 async def APIHostPorts(self):
13777 '''
13778
13779 Returns -> typing.Sequence[~HostPort]
13780 '''
13781 # map input types to rpc msg
13782 params = dict()
13783 msg = dict(Type='Provisioner', Request='APIHostPorts', Version=2, Params=params)
13784
13785 reply = await self.rpc(msg)
13786 return reply
13787
13788
13789
13790 @ReturnMapping(BytesResult)
13791 async def CACert(self):
13792 '''
13793
13794 Returns -> typing.Sequence[int]
13795 '''
13796 # map input types to rpc msg
13797 params = dict()
13798 msg = dict(Type='Provisioner', Request='CACert', Version=2, Params=params)
13799
13800 reply = await self.rpc(msg)
13801 return reply
13802
13803
13804
13805 @ReturnMapping(ConstraintsResults)
13806 async def Constraints(self, entities):
13807 '''
13808 entities : typing.Sequence[~Entity]
13809 Returns -> typing.Sequence[~ConstraintsResult]
13810 '''
13811 # map input types to rpc msg
13812 params = dict()
13813 msg = dict(Type='Provisioner', Request='Constraints', Version=2, Params=params)
13814 params['Entities'] = entities
13815 reply = await self.rpc(msg)
13816 return reply
13817
13818
13819
13820 @ReturnMapping(ContainerConfig)
13821 async def ContainerConfig(self):
13822 '''
13823
13824 Returns -> typing.Union[bool, str, _ForwardRef('Settings'), _ForwardRef('Settings'), _ForwardRef('UpdateBehavior')]
13825 '''
13826 # map input types to rpc msg
13827 params = dict()
13828 msg = dict(Type='Provisioner', Request='ContainerConfig', Version=2, Params=params)
13829
13830 reply = await self.rpc(msg)
13831 return reply
13832
13833
13834
13835 @ReturnMapping(ContainerManagerConfig)
13836 async def ContainerManagerConfig(self, type_):
13837 '''
13838 type_ : str
13839 Returns -> typing.Mapping[str, str]
13840 '''
13841 # map input types to rpc msg
13842 params = dict()
13843 msg = dict(Type='Provisioner', Request='ContainerManagerConfig', Version=2, Params=params)
13844 params['Type'] = type_
13845 reply = await self.rpc(msg)
13846 return reply
13847
13848
13849
13850 @ReturnMapping(DistributionGroupResults)
13851 async def DistributionGroup(self, entities):
13852 '''
13853 entities : typing.Sequence[~Entity]
13854 Returns -> typing.Sequence[~DistributionGroupResult]
13855 '''
13856 # map input types to rpc msg
13857 params = dict()
13858 msg = dict(Type='Provisioner', Request='DistributionGroup', Version=2, Params=params)
13859 params['Entities'] = entities
13860 reply = await self.rpc(msg)
13861 return reply
13862
13863
13864
13865 @ReturnMapping(ErrorResults)
13866 async def EnsureDead(self, entities):
13867 '''
13868 entities : typing.Sequence[~Entity]
13869 Returns -> typing.Sequence[~ErrorResult]
13870 '''
13871 # map input types to rpc msg
13872 params = dict()
13873 msg = dict(Type='Provisioner', Request='EnsureDead', Version=2, Params=params)
13874 params['Entities'] = entities
13875 reply = await self.rpc(msg)
13876 return reply
13877
13878
13879
13880 @ReturnMapping(FindToolsResult)
13881 async def FindTools(self, arch, majorversion, minorversion, number, series):
13882 '''
13883 arch : str
13884 majorversion : int
13885 minorversion : int
13886 number : Number
13887 series : str
13888 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[~Tools]]
13889 '''
13890 # map input types to rpc msg
13891 params = dict()
13892 msg = dict(Type='Provisioner', Request='FindTools', Version=2, Params=params)
13893 params['Arch'] = arch
13894 params['MajorVersion'] = majorversion
13895 params['MinorVersion'] = minorversion
13896 params['Number'] = number
13897 params['Series'] = series
13898 reply = await self.rpc(msg)
13899 return reply
13900
13901
13902
13903 @ReturnMapping(MachineNetworkConfigResults)
13904 async def GetContainerInterfaceInfo(self, entities):
13905 '''
13906 entities : typing.Sequence[~Entity]
13907 Returns -> typing.Sequence[~MachineNetworkConfigResult]
13908 '''
13909 # map input types to rpc msg
13910 params = dict()
13911 msg = dict(Type='Provisioner', Request='GetContainerInterfaceInfo', Version=2, Params=params)
13912 params['Entities'] = entities
13913 reply = await self.rpc(msg)
13914 return reply
13915
13916
13917
13918 @ReturnMapping(StringResults)
13919 async def InstanceId(self, entities):
13920 '''
13921 entities : typing.Sequence[~Entity]
13922 Returns -> typing.Sequence[~StringResult]
13923 '''
13924 # map input types to rpc msg
13925 params = dict()
13926 msg = dict(Type='Provisioner', Request='InstanceId', Version=2, Params=params)
13927 params['Entities'] = entities
13928 reply = await self.rpc(msg)
13929 return reply
13930
13931
13932
13933 @ReturnMapping(StatusResults)
13934 async def InstanceStatus(self, entities):
13935 '''
13936 entities : typing.Sequence[~Entity]
13937 Returns -> typing.Sequence[~StatusResult]
13938 '''
13939 # map input types to rpc msg
13940 params = dict()
13941 msg = dict(Type='Provisioner', Request='InstanceStatus', Version=2, Params=params)
13942 params['Entities'] = entities
13943 reply = await self.rpc(msg)
13944 return reply
13945
13946
13947
13948 @ReturnMapping(LifeResults)
13949 async def Life(self, entities):
13950 '''
13951 entities : typing.Sequence[~Entity]
13952 Returns -> typing.Sequence[~LifeResult]
13953 '''
13954 # map input types to rpc msg
13955 params = dict()
13956 msg = dict(Type='Provisioner', Request='Life', Version=2, Params=params)
13957 params['Entities'] = entities
13958 reply = await self.rpc(msg)
13959 return reply
13960
13961
13962
13963 @ReturnMapping(StatusResults)
13964 async def MachinesWithTransientErrors(self):
13965 '''
13966
13967 Returns -> typing.Sequence[~StatusResult]
13968 '''
13969 # map input types to rpc msg
13970 params = dict()
13971 msg = dict(Type='Provisioner', Request='MachinesWithTransientErrors', Version=2, Params=params)
13972
13973 reply = await self.rpc(msg)
13974 return reply
13975
13976
13977
13978 @ReturnMapping(ModelConfigResult)
13979 async def ModelConfig(self):
13980 '''
13981
13982 Returns -> typing.Mapping[str, typing.Any]
13983 '''
13984 # map input types to rpc msg
13985 params = dict()
13986 msg = dict(Type='Provisioner', Request='ModelConfig', Version=2, Params=params)
13987
13988 reply = await self.rpc(msg)
13989 return reply
13990
13991
13992
13993 @ReturnMapping(StringResult)
13994 async def ModelUUID(self):
13995 '''
13996
13997 Returns -> typing.Union[_ForwardRef('Error'), str]
13998 '''
13999 # map input types to rpc msg
14000 params = dict()
14001 msg = dict(Type='Provisioner', Request='ModelUUID', Version=2, Params=params)
14002
14003 reply = await self.rpc(msg)
14004 return reply
14005
14006
14007
14008 @ReturnMapping(MachineNetworkConfigResults)
14009 async def PrepareContainerInterfaceInfo(self, entities):
14010 '''
14011 entities : typing.Sequence[~Entity]
14012 Returns -> typing.Sequence[~MachineNetworkConfigResult]
14013 '''
14014 # map input types to rpc msg
14015 params = dict()
14016 msg = dict(Type='Provisioner', Request='PrepareContainerInterfaceInfo', Version=2, Params=params)
14017 params['Entities'] = entities
14018 reply = await self.rpc(msg)
14019 return reply
14020
14021
14022
14023 @ReturnMapping(ProvisioningInfoResults)
14024 async def ProvisioningInfo(self, entities):
14025 '''
14026 entities : typing.Sequence[~Entity]
14027 Returns -> typing.Sequence[~ProvisioningInfoResult]
14028 '''
14029 # map input types to rpc msg
14030 params = dict()
14031 msg = dict(Type='Provisioner', Request='ProvisioningInfo', Version=2, Params=params)
14032 params['Entities'] = entities
14033 reply = await self.rpc(msg)
14034 return reply
14035
14036
14037
14038 @ReturnMapping(ErrorResults)
14039 async def ReleaseContainerAddresses(self, entities):
14040 '''
14041 entities : typing.Sequence[~Entity]
14042 Returns -> typing.Sequence[~ErrorResult]
14043 '''
14044 # map input types to rpc msg
14045 params = dict()
14046 msg = dict(Type='Provisioner', Request='ReleaseContainerAddresses', Version=2, Params=params)
14047 params['Entities'] = entities
14048 reply = await self.rpc(msg)
14049 return reply
14050
14051
14052
14053 @ReturnMapping(ErrorResults)
14054 async def Remove(self, entities):
14055 '''
14056 entities : typing.Sequence[~Entity]
14057 Returns -> typing.Sequence[~ErrorResult]
14058 '''
14059 # map input types to rpc msg
14060 params = dict()
14061 msg = dict(Type='Provisioner', Request='Remove', Version=2, Params=params)
14062 params['Entities'] = entities
14063 reply = await self.rpc(msg)
14064 return reply
14065
14066
14067
14068 @ReturnMapping(StringResults)
14069 async def Series(self, entities):
14070 '''
14071 entities : typing.Sequence[~Entity]
14072 Returns -> typing.Sequence[~StringResult]
14073 '''
14074 # map input types to rpc msg
14075 params = dict()
14076 msg = dict(Type='Provisioner', Request='Series', Version=2, Params=params)
14077 params['Entities'] = entities
14078 reply = await self.rpc(msg)
14079 return reply
14080
14081
14082
14083 @ReturnMapping(ErrorResults)
14084 async def SetInstanceInfo(self, machines):
14085 '''
14086 machines : typing.Sequence[~InstanceInfo]
14087 Returns -> typing.Sequence[~ErrorResult]
14088 '''
14089 # map input types to rpc msg
14090 params = dict()
14091 msg = dict(Type='Provisioner', Request='SetInstanceInfo', Version=2, Params=params)
14092 params['Machines'] = machines
14093 reply = await self.rpc(msg)
14094 return reply
14095
14096
14097
14098 @ReturnMapping(ErrorResults)
14099 async def SetInstanceStatus(self, entities):
14100 '''
14101 entities : typing.Sequence[~EntityStatusArgs]
14102 Returns -> typing.Sequence[~ErrorResult]
14103 '''
14104 # map input types to rpc msg
14105 params = dict()
14106 msg = dict(Type='Provisioner', Request='SetInstanceStatus', Version=2, Params=params)
14107 params['Entities'] = entities
14108 reply = await self.rpc(msg)
14109 return reply
14110
14111
14112
14113 @ReturnMapping(ErrorResults)
14114 async def SetPasswords(self, changes):
14115 '''
14116 changes : typing.Sequence[~EntityPassword]
14117 Returns -> typing.Sequence[~ErrorResult]
14118 '''
14119 # map input types to rpc msg
14120 params = dict()
14121 msg = dict(Type='Provisioner', Request='SetPasswords', Version=2, Params=params)
14122 params['Changes'] = changes
14123 reply = await self.rpc(msg)
14124 return reply
14125
14126
14127
14128 @ReturnMapping(ErrorResults)
14129 async def SetStatus(self, entities):
14130 '''
14131 entities : typing.Sequence[~EntityStatusArgs]
14132 Returns -> typing.Sequence[~ErrorResult]
14133 '''
14134 # map input types to rpc msg
14135 params = dict()
14136 msg = dict(Type='Provisioner', Request='SetStatus', Version=2, Params=params)
14137 params['Entities'] = entities
14138 reply = await self.rpc(msg)
14139 return reply
14140
14141
14142
14143 @ReturnMapping(ErrorResults)
14144 async def SetSupportedContainers(self, params):
14145 '''
14146 params : typing.Sequence[~MachineContainers]
14147 Returns -> typing.Sequence[~ErrorResult]
14148 '''
14149 # map input types to rpc msg
14150 params = dict()
14151 msg = dict(Type='Provisioner', Request='SetSupportedContainers', Version=2, Params=params)
14152 params['Params'] = params
14153 reply = await self.rpc(msg)
14154 return reply
14155
14156
14157
14158 @ReturnMapping(StringsResult)
14159 async def StateAddresses(self):
14160 '''
14161
14162 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
14163 '''
14164 # map input types to rpc msg
14165 params = dict()
14166 msg = dict(Type='Provisioner', Request='StateAddresses', Version=2, Params=params)
14167
14168 reply = await self.rpc(msg)
14169 return reply
14170
14171
14172
14173 @ReturnMapping(StatusResults)
14174 async def Status(self, entities):
14175 '''
14176 entities : typing.Sequence[~Entity]
14177 Returns -> typing.Sequence[~StatusResult]
14178 '''
14179 # map input types to rpc msg
14180 params = dict()
14181 msg = dict(Type='Provisioner', Request='Status', Version=2, Params=params)
14182 params['Entities'] = entities
14183 reply = await self.rpc(msg)
14184 return reply
14185
14186
14187
14188 @ReturnMapping(ToolsResults)
14189 async def Tools(self, entities):
14190 '''
14191 entities : typing.Sequence[~Entity]
14192 Returns -> typing.Sequence[~ToolsResult]
14193 '''
14194 # map input types to rpc msg
14195 params = dict()
14196 msg = dict(Type='Provisioner', Request='Tools', Version=2, Params=params)
14197 params['Entities'] = entities
14198 reply = await self.rpc(msg)
14199 return reply
14200
14201
14202
14203 @ReturnMapping(ErrorResults)
14204 async def UpdateStatus(self, entities):
14205 '''
14206 entities : typing.Sequence[~EntityStatusArgs]
14207 Returns -> typing.Sequence[~ErrorResult]
14208 '''
14209 # map input types to rpc msg
14210 params = dict()
14211 msg = dict(Type='Provisioner', Request='UpdateStatus', Version=2, Params=params)
14212 params['Entities'] = entities
14213 reply = await self.rpc(msg)
14214 return reply
14215
14216
14217
14218 @ReturnMapping(NotifyWatchResult)
14219 async def WatchAPIHostPorts(self):
14220 '''
14221
14222 Returns -> typing.Union[_ForwardRef('Error'), str]
14223 '''
14224 # map input types to rpc msg
14225 params = dict()
14226 msg = dict(Type='Provisioner', Request='WatchAPIHostPorts', Version=2, Params=params)
14227
14228 reply = await self.rpc(msg)
14229 return reply
14230
14231
14232
14233 @ReturnMapping(StringsWatchResults)
14234 async def WatchAllContainers(self, params):
14235 '''
14236 params : typing.Sequence[~WatchContainer]
14237 Returns -> typing.Sequence[~StringsWatchResult]
14238 '''
14239 # map input types to rpc msg
14240 params = dict()
14241 msg = dict(Type='Provisioner', Request='WatchAllContainers', Version=2, Params=params)
14242 params['Params'] = params
14243 reply = await self.rpc(msg)
14244 return reply
14245
14246
14247
14248 @ReturnMapping(StringsWatchResults)
14249 async def WatchContainers(self, params):
14250 '''
14251 params : typing.Sequence[~WatchContainer]
14252 Returns -> typing.Sequence[~StringsWatchResult]
14253 '''
14254 # map input types to rpc msg
14255 params = dict()
14256 msg = dict(Type='Provisioner', Request='WatchContainers', Version=2, Params=params)
14257 params['Params'] = params
14258 reply = await self.rpc(msg)
14259 return reply
14260
14261
14262
14263 @ReturnMapping(NotifyWatchResult)
14264 async def WatchForModelConfigChanges(self):
14265 '''
14266
14267 Returns -> typing.Union[_ForwardRef('Error'), str]
14268 '''
14269 # map input types to rpc msg
14270 params = dict()
14271 msg = dict(Type='Provisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
14272
14273 reply = await self.rpc(msg)
14274 return reply
14275
14276
14277
14278 @ReturnMapping(NotifyWatchResult)
14279 async def WatchMachineErrorRetry(self):
14280 '''
14281
14282 Returns -> typing.Union[_ForwardRef('Error'), str]
14283 '''
14284 # map input types to rpc msg
14285 params = dict()
14286 msg = dict(Type='Provisioner', Request='WatchMachineErrorRetry', Version=2, Params=params)
14287
14288 reply = await self.rpc(msg)
14289 return reply
14290
14291
14292
14293 @ReturnMapping(StringsWatchResult)
14294 async def WatchModelMachines(self):
14295 '''
14296
14297 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
14298 '''
14299 # map input types to rpc msg
14300 params = dict()
14301 msg = dict(Type='Provisioner', Request='WatchModelMachines', Version=2, Params=params)
14302
14303 reply = await self.rpc(msg)
14304 return reply
14305
14306
14307 class ProxyUpdater(Type):
14308 name = 'ProxyUpdater'
14309 version = 1
14310 schema = {'definitions': {'Entities': {'additionalProperties': False,
14311 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14312 'type': 'array'}},
14313 'required': ['Entities'],
14314 'type': 'object'},
14315 'Entity': {'additionalProperties': False,
14316 'properties': {'Tag': {'type': 'string'}},
14317 'required': ['Tag'],
14318 'type': 'object'},
14319 'Error': {'additionalProperties': False,
14320 'properties': {'Code': {'type': 'string'},
14321 'Info': {'$ref': '#/definitions/ErrorInfo'},
14322 'Message': {'type': 'string'}},
14323 'required': ['Message', 'Code'],
14324 'type': 'object'},
14325 'ErrorInfo': {'additionalProperties': False,
14326 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14327 'MacaroonPath': {'type': 'string'}},
14328 'type': 'object'},
14329 'Macaroon': {'additionalProperties': False,
14330 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14331 'type': 'array'},
14332 'data': {'items': {'type': 'integer'},
14333 'type': 'array'},
14334 'id': {'$ref': '#/definitions/packet'},
14335 'location': {'$ref': '#/definitions/packet'},
14336 'sig': {'items': {'type': 'integer'},
14337 'type': 'array'}},
14338 'required': ['data',
14339 'location',
14340 'id',
14341 'caveats',
14342 'sig'],
14343 'type': 'object'},
14344 'NotifyWatchResult': {'additionalProperties': False,
14345 'properties': {'Error': {'$ref': '#/definitions/Error'},
14346 'NotifyWatcherId': {'type': 'string'}},
14347 'required': ['NotifyWatcherId', 'Error'],
14348 'type': 'object'},
14349 'NotifyWatchResults': {'additionalProperties': False,
14350 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14351 'type': 'array'}},
14352 'required': ['Results'],
14353 'type': 'object'},
14354 'ProxyConfig': {'additionalProperties': False,
14355 'properties': {'FTP': {'type': 'string'},
14356 'HTTP': {'type': 'string'},
14357 'HTTPS': {'type': 'string'},
14358 'NoProxy': {'type': 'string'}},
14359 'required': ['HTTP',
14360 'HTTPS',
14361 'FTP',
14362 'NoProxy'],
14363 'type': 'object'},
14364 'ProxyConfigResult': {'additionalProperties': False,
14365 'properties': {'APTProxySettings': {'$ref': '#/definitions/ProxyConfig'},
14366 'Error': {'$ref': '#/definitions/Error'},
14367 'ProxySettings': {'$ref': '#/definitions/ProxyConfig'}},
14368 'required': ['ProxySettings',
14369 'APTProxySettings'],
14370 'type': 'object'},
14371 'ProxyConfigResults': {'additionalProperties': False,
14372 'properties': {'Results': {'items': {'$ref': '#/definitions/ProxyConfigResult'},
14373 'type': 'array'}},
14374 'required': ['Results'],
14375 'type': 'object'},
14376 'caveat': {'additionalProperties': False,
14377 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14378 'location': {'$ref': '#/definitions/packet'},
14379 'verificationId': {'$ref': '#/definitions/packet'}},
14380 'required': ['location',
14381 'caveatId',
14382 'verificationId'],
14383 'type': 'object'},
14384 'packet': {'additionalProperties': False,
14385 'properties': {'headerLen': {'type': 'integer'},
14386 'start': {'type': 'integer'},
14387 'totalLen': {'type': 'integer'}},
14388 'required': ['start', 'totalLen', 'headerLen'],
14389 'type': 'object'}},
14390 'properties': {'ProxyConfig': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14391 'Result': {'$ref': '#/definitions/ProxyConfigResults'}},
14392 'type': 'object'},
14393 'WatchForProxyConfigAndAPIHostPortChanges': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14394 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14395 'type': 'object'}},
14396 'type': 'object'}
14397
14398
14399 @ReturnMapping(ProxyConfigResults)
14400 async def ProxyConfig(self, entities):
14401 '''
14402 entities : typing.Sequence[~Entity]
14403 Returns -> typing.Sequence[~ProxyConfigResult]
14404 '''
14405 # map input types to rpc msg
14406 params = dict()
14407 msg = dict(Type='ProxyUpdater', Request='ProxyConfig', Version=1, Params=params)
14408 params['Entities'] = entities
14409 reply = await self.rpc(msg)
14410 return reply
14411
14412
14413
14414 @ReturnMapping(NotifyWatchResults)
14415 async def WatchForProxyConfigAndAPIHostPortChanges(self, entities):
14416 '''
14417 entities : typing.Sequence[~Entity]
14418 Returns -> typing.Sequence[~NotifyWatchResult]
14419 '''
14420 # map input types to rpc msg
14421 params = dict()
14422 msg = dict(Type='ProxyUpdater', Request='WatchForProxyConfigAndAPIHostPortChanges', Version=1, Params=params)
14423 params['Entities'] = entities
14424 reply = await self.rpc(msg)
14425 return reply
14426
14427
14428 class Reboot(Type):
14429 name = 'Reboot'
14430 version = 2
14431 schema = {'definitions': {'Entities': {'additionalProperties': False,
14432 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14433 'type': 'array'}},
14434 'required': ['Entities'],
14435 'type': 'object'},
14436 'Entity': {'additionalProperties': False,
14437 'properties': {'Tag': {'type': 'string'}},
14438 'required': ['Tag'],
14439 'type': 'object'},
14440 'Error': {'additionalProperties': False,
14441 'properties': {'Code': {'type': 'string'},
14442 'Info': {'$ref': '#/definitions/ErrorInfo'},
14443 'Message': {'type': 'string'}},
14444 'required': ['Message', 'Code'],
14445 'type': 'object'},
14446 'ErrorInfo': {'additionalProperties': False,
14447 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14448 'MacaroonPath': {'type': 'string'}},
14449 'type': 'object'},
14450 'ErrorResult': {'additionalProperties': False,
14451 'properties': {'Error': {'$ref': '#/definitions/Error'}},
14452 'required': ['Error'],
14453 'type': 'object'},
14454 'ErrorResults': {'additionalProperties': False,
14455 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
14456 'type': 'array'}},
14457 'required': ['Results'],
14458 'type': 'object'},
14459 'Macaroon': {'additionalProperties': False,
14460 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14461 'type': 'array'},
14462 'data': {'items': {'type': 'integer'},
14463 'type': 'array'},
14464 'id': {'$ref': '#/definitions/packet'},
14465 'location': {'$ref': '#/definitions/packet'},
14466 'sig': {'items': {'type': 'integer'},
14467 'type': 'array'}},
14468 'required': ['data',
14469 'location',
14470 'id',
14471 'caveats',
14472 'sig'],
14473 'type': 'object'},
14474 'NotifyWatchResult': {'additionalProperties': False,
14475 'properties': {'Error': {'$ref': '#/definitions/Error'},
14476 'NotifyWatcherId': {'type': 'string'}},
14477 'required': ['NotifyWatcherId', 'Error'],
14478 'type': 'object'},
14479 'RebootActionResult': {'additionalProperties': False,
14480 'properties': {'error': {'$ref': '#/definitions/Error'},
14481 'result': {'type': 'string'}},
14482 'type': 'object'},
14483 'RebootActionResults': {'additionalProperties': False,
14484 'properties': {'results': {'items': {'$ref': '#/definitions/RebootActionResult'},
14485 'type': 'array'}},
14486 'type': 'object'},
14487 'caveat': {'additionalProperties': False,
14488 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14489 'location': {'$ref': '#/definitions/packet'},
14490 'verificationId': {'$ref': '#/definitions/packet'}},
14491 'required': ['location',
14492 'caveatId',
14493 'verificationId'],
14494 'type': 'object'},
14495 'packet': {'additionalProperties': False,
14496 'properties': {'headerLen': {'type': 'integer'},
14497 'start': {'type': 'integer'},
14498 'totalLen': {'type': 'integer'}},
14499 'required': ['start', 'totalLen', 'headerLen'],
14500 'type': 'object'}},
14501 'properties': {'ClearReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14502 'Result': {'$ref': '#/definitions/ErrorResults'}},
14503 'type': 'object'},
14504 'GetRebootAction': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14505 'Result': {'$ref': '#/definitions/RebootActionResults'}},
14506 'type': 'object'},
14507 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14508 'Result': {'$ref': '#/definitions/ErrorResults'}},
14509 'type': 'object'},
14510 'WatchForRebootEvent': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
14511 'type': 'object'}},
14512 'type': 'object'}
14513
14514
14515 @ReturnMapping(ErrorResults)
14516 async def ClearReboot(self, entities):
14517 '''
14518 entities : typing.Sequence[~Entity]
14519 Returns -> typing.Sequence[~ErrorResult]
14520 '''
14521 # map input types to rpc msg
14522 params = dict()
14523 msg = dict(Type='Reboot', Request='ClearReboot', Version=2, Params=params)
14524 params['Entities'] = entities
14525 reply = await self.rpc(msg)
14526 return reply
14527
14528
14529
14530 @ReturnMapping(RebootActionResults)
14531 async def GetRebootAction(self, entities):
14532 '''
14533 entities : typing.Sequence[~Entity]
14534 Returns -> typing.Sequence[~RebootActionResult]
14535 '''
14536 # map input types to rpc msg
14537 params = dict()
14538 msg = dict(Type='Reboot', Request='GetRebootAction', Version=2, Params=params)
14539 params['Entities'] = entities
14540 reply = await self.rpc(msg)
14541 return reply
14542
14543
14544
14545 @ReturnMapping(ErrorResults)
14546 async def RequestReboot(self, entities):
14547 '''
14548 entities : typing.Sequence[~Entity]
14549 Returns -> typing.Sequence[~ErrorResult]
14550 '''
14551 # map input types to rpc msg
14552 params = dict()
14553 msg = dict(Type='Reboot', Request='RequestReboot', Version=2, Params=params)
14554 params['Entities'] = entities
14555 reply = await self.rpc(msg)
14556 return reply
14557
14558
14559
14560 @ReturnMapping(NotifyWatchResult)
14561 async def WatchForRebootEvent(self):
14562 '''
14563
14564 Returns -> typing.Union[_ForwardRef('Error'), str]
14565 '''
14566 # map input types to rpc msg
14567 params = dict()
14568 msg = dict(Type='Reboot', Request='WatchForRebootEvent', Version=2, Params=params)
14569
14570 reply = await self.rpc(msg)
14571 return reply
14572
14573
14574 class RelationUnitsWatcher(Type):
14575 name = 'RelationUnitsWatcher'
14576 version = 1
14577 schema = {'definitions': {'Error': {'additionalProperties': False,
14578 'properties': {'Code': {'type': 'string'},
14579 'Info': {'$ref': '#/definitions/ErrorInfo'},
14580 'Message': {'type': 'string'}},
14581 'required': ['Message', 'Code'],
14582 'type': 'object'},
14583 'ErrorInfo': {'additionalProperties': False,
14584 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14585 'MacaroonPath': {'type': 'string'}},
14586 'type': 'object'},
14587 'Macaroon': {'additionalProperties': False,
14588 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14589 'type': 'array'},
14590 'data': {'items': {'type': 'integer'},
14591 'type': 'array'},
14592 'id': {'$ref': '#/definitions/packet'},
14593 'location': {'$ref': '#/definitions/packet'},
14594 'sig': {'items': {'type': 'integer'},
14595 'type': 'array'}},
14596 'required': ['data',
14597 'location',
14598 'id',
14599 'caveats',
14600 'sig'],
14601 'type': 'object'},
14602 'RelationUnitsChange': {'additionalProperties': False,
14603 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
14604 'type': 'object'},
14605 'Departed': {'items': {'type': 'string'},
14606 'type': 'array'}},
14607 'required': ['Changed', 'Departed'],
14608 'type': 'object'},
14609 'RelationUnitsWatchResult': {'additionalProperties': False,
14610 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
14611 'Error': {'$ref': '#/definitions/Error'},
14612 'RelationUnitsWatcherId': {'type': 'string'}},
14613 'required': ['RelationUnitsWatcherId',
14614 'Changes',
14615 'Error'],
14616 'type': 'object'},
14617 'UnitSettings': {'additionalProperties': False,
14618 'properties': {'Version': {'type': 'integer'}},
14619 'required': ['Version'],
14620 'type': 'object'},
14621 'caveat': {'additionalProperties': False,
14622 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14623 'location': {'$ref': '#/definitions/packet'},
14624 'verificationId': {'$ref': '#/definitions/packet'}},
14625 'required': ['location',
14626 'caveatId',
14627 'verificationId'],
14628 'type': 'object'},
14629 'packet': {'additionalProperties': False,
14630 'properties': {'headerLen': {'type': 'integer'},
14631 'start': {'type': 'integer'},
14632 'totalLen': {'type': 'integer'}},
14633 'required': ['start', 'totalLen', 'headerLen'],
14634 'type': 'object'}},
14635 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/RelationUnitsWatchResult'}},
14636 'type': 'object'},
14637 'Stop': {'type': 'object'}},
14638 'type': 'object'}
14639
14640
14641 @ReturnMapping(RelationUnitsWatchResult)
14642 async def Next(self):
14643 '''
14644
14645 Returns -> typing.Union[_ForwardRef('RelationUnitsChange'), _ForwardRef('Error'), str]
14646 '''
14647 # map input types to rpc msg
14648 params = dict()
14649 msg = dict(Type='RelationUnitsWatcher', Request='Next', Version=1, Params=params)
14650
14651 reply = await self.rpc(msg)
14652 return reply
14653
14654
14655
14656 @ReturnMapping(None)
14657 async def Stop(self):
14658 '''
14659
14660 Returns -> None
14661 '''
14662 # map input types to rpc msg
14663 params = dict()
14664 msg = dict(Type='RelationUnitsWatcher', Request='Stop', Version=1, Params=params)
14665
14666 reply = await self.rpc(msg)
14667 return reply
14668
14669
14670 class Resumer(Type):
14671 name = 'Resumer'
14672 version = 2
14673 schema = {'properties': {'ResumeTransactions': {'type': 'object'}}, 'type': 'object'}
14674
14675
14676 @ReturnMapping(None)
14677 async def ResumeTransactions(self):
14678 '''
14679
14680 Returns -> None
14681 '''
14682 # map input types to rpc msg
14683 params = dict()
14684 msg = dict(Type='Resumer', Request='ResumeTransactions', Version=2, Params=params)
14685
14686 reply = await self.rpc(msg)
14687 return reply
14688
14689
14690 class RetryStrategy(Type):
14691 name = 'RetryStrategy'
14692 version = 1
14693 schema = {'definitions': {'Entities': {'additionalProperties': False,
14694 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14695 'type': 'array'}},
14696 'required': ['Entities'],
14697 'type': 'object'},
14698 'Entity': {'additionalProperties': False,
14699 'properties': {'Tag': {'type': 'string'}},
14700 'required': ['Tag'],
14701 'type': 'object'},
14702 'Error': {'additionalProperties': False,
14703 'properties': {'Code': {'type': 'string'},
14704 'Info': {'$ref': '#/definitions/ErrorInfo'},
14705 'Message': {'type': 'string'}},
14706 'required': ['Message', 'Code'],
14707 'type': 'object'},
14708 'ErrorInfo': {'additionalProperties': False,
14709 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14710 'MacaroonPath': {'type': 'string'}},
14711 'type': 'object'},
14712 'Macaroon': {'additionalProperties': False,
14713 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14714 'type': 'array'},
14715 'data': {'items': {'type': 'integer'},
14716 'type': 'array'},
14717 'id': {'$ref': '#/definitions/packet'},
14718 'location': {'$ref': '#/definitions/packet'},
14719 'sig': {'items': {'type': 'integer'},
14720 'type': 'array'}},
14721 'required': ['data',
14722 'location',
14723 'id',
14724 'caveats',
14725 'sig'],
14726 'type': 'object'},
14727 'NotifyWatchResult': {'additionalProperties': False,
14728 'properties': {'Error': {'$ref': '#/definitions/Error'},
14729 'NotifyWatcherId': {'type': 'string'}},
14730 'required': ['NotifyWatcherId', 'Error'],
14731 'type': 'object'},
14732 'NotifyWatchResults': {'additionalProperties': False,
14733 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
14734 'type': 'array'}},
14735 'required': ['Results'],
14736 'type': 'object'},
14737 'RetryStrategy': {'additionalProperties': False,
14738 'properties': {'JitterRetryTime': {'type': 'boolean'},
14739 'MaxRetryTime': {'type': 'integer'},
14740 'MinRetryTime': {'type': 'integer'},
14741 'RetryTimeFactor': {'type': 'integer'},
14742 'ShouldRetry': {'type': 'boolean'}},
14743 'required': ['ShouldRetry',
14744 'MinRetryTime',
14745 'MaxRetryTime',
14746 'JitterRetryTime',
14747 'RetryTimeFactor'],
14748 'type': 'object'},
14749 'RetryStrategyResult': {'additionalProperties': False,
14750 'properties': {'Error': {'$ref': '#/definitions/Error'},
14751 'Result': {'$ref': '#/definitions/RetryStrategy'}},
14752 'required': ['Error', 'Result'],
14753 'type': 'object'},
14754 'RetryStrategyResults': {'additionalProperties': False,
14755 'properties': {'Results': {'items': {'$ref': '#/definitions/RetryStrategyResult'},
14756 'type': 'array'}},
14757 'required': ['Results'],
14758 'type': 'object'},
14759 'caveat': {'additionalProperties': False,
14760 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14761 'location': {'$ref': '#/definitions/packet'},
14762 'verificationId': {'$ref': '#/definitions/packet'}},
14763 'required': ['location',
14764 'caveatId',
14765 'verificationId'],
14766 'type': 'object'},
14767 'packet': {'additionalProperties': False,
14768 'properties': {'headerLen': {'type': 'integer'},
14769 'start': {'type': 'integer'},
14770 'totalLen': {'type': 'integer'}},
14771 'required': ['start', 'totalLen', 'headerLen'],
14772 'type': 'object'}},
14773 'properties': {'RetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14774 'Result': {'$ref': '#/definitions/RetryStrategyResults'}},
14775 'type': 'object'},
14776 'WatchRetryStrategy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14777 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
14778 'type': 'object'}},
14779 'type': 'object'}
14780
14781
14782 @ReturnMapping(RetryStrategyResults)
14783 async def RetryStrategy(self, entities):
14784 '''
14785 entities : typing.Sequence[~Entity]
14786 Returns -> typing.Sequence[~RetryStrategyResult]
14787 '''
14788 # map input types to rpc msg
14789 params = dict()
14790 msg = dict(Type='RetryStrategy', Request='RetryStrategy', Version=1, Params=params)
14791 params['Entities'] = entities
14792 reply = await self.rpc(msg)
14793 return reply
14794
14795
14796
14797 @ReturnMapping(NotifyWatchResults)
14798 async def WatchRetryStrategy(self, entities):
14799 '''
14800 entities : typing.Sequence[~Entity]
14801 Returns -> typing.Sequence[~NotifyWatchResult]
14802 '''
14803 # map input types to rpc msg
14804 params = dict()
14805 msg = dict(Type='RetryStrategy', Request='WatchRetryStrategy', Version=1, Params=params)
14806 params['Entities'] = entities
14807 reply = await self.rpc(msg)
14808 return reply
14809
14810
14811 class SSHClient(Type):
14812 name = 'SSHClient'
14813 version = 1
14814 schema = {'definitions': {'Entities': {'additionalProperties': False,
14815 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
14816 'type': 'array'}},
14817 'required': ['Entities'],
14818 'type': 'object'},
14819 'Entity': {'additionalProperties': False,
14820 'properties': {'Tag': {'type': 'string'}},
14821 'required': ['Tag'],
14822 'type': 'object'},
14823 'Error': {'additionalProperties': False,
14824 'properties': {'Code': {'type': 'string'},
14825 'Info': {'$ref': '#/definitions/ErrorInfo'},
14826 'Message': {'type': 'string'}},
14827 'required': ['Message', 'Code'],
14828 'type': 'object'},
14829 'ErrorInfo': {'additionalProperties': False,
14830 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
14831 'MacaroonPath': {'type': 'string'}},
14832 'type': 'object'},
14833 'Macaroon': {'additionalProperties': False,
14834 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
14835 'type': 'array'},
14836 'data': {'items': {'type': 'integer'},
14837 'type': 'array'},
14838 'id': {'$ref': '#/definitions/packet'},
14839 'location': {'$ref': '#/definitions/packet'},
14840 'sig': {'items': {'type': 'integer'},
14841 'type': 'array'}},
14842 'required': ['data',
14843 'location',
14844 'id',
14845 'caveats',
14846 'sig'],
14847 'type': 'object'},
14848 'SSHAddressResult': {'additionalProperties': False,
14849 'properties': {'address': {'type': 'string'},
14850 'error': {'$ref': '#/definitions/Error'}},
14851 'type': 'object'},
14852 'SSHAddressResults': {'additionalProperties': False,
14853 'properties': {'results': {'items': {'$ref': '#/definitions/SSHAddressResult'},
14854 'type': 'array'}},
14855 'required': ['results'],
14856 'type': 'object'},
14857 'SSHProxyResult': {'additionalProperties': False,
14858 'properties': {'use-proxy': {'type': 'boolean'}},
14859 'required': ['use-proxy'],
14860 'type': 'object'},
14861 'SSHPublicKeysResult': {'additionalProperties': False,
14862 'properties': {'error': {'$ref': '#/definitions/Error'},
14863 'public-keys': {'items': {'type': 'string'},
14864 'type': 'array'}},
14865 'type': 'object'},
14866 'SSHPublicKeysResults': {'additionalProperties': False,
14867 'properties': {'results': {'items': {'$ref': '#/definitions/SSHPublicKeysResult'},
14868 'type': 'array'}},
14869 'required': ['results'],
14870 'type': 'object'},
14871 'caveat': {'additionalProperties': False,
14872 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
14873 'location': {'$ref': '#/definitions/packet'},
14874 'verificationId': {'$ref': '#/definitions/packet'}},
14875 'required': ['location',
14876 'caveatId',
14877 'verificationId'],
14878 'type': 'object'},
14879 'packet': {'additionalProperties': False,
14880 'properties': {'headerLen': {'type': 'integer'},
14881 'start': {'type': 'integer'},
14882 'totalLen': {'type': 'integer'}},
14883 'required': ['start', 'totalLen', 'headerLen'],
14884 'type': 'object'}},
14885 'properties': {'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14886 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
14887 'type': 'object'},
14888 'Proxy': {'properties': {'Result': {'$ref': '#/definitions/SSHProxyResult'}},
14889 'type': 'object'},
14890 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14891 'Result': {'$ref': '#/definitions/SSHAddressResults'}},
14892 'type': 'object'},
14893 'PublicKeys': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
14894 'Result': {'$ref': '#/definitions/SSHPublicKeysResults'}},
14895 'type': 'object'}},
14896 'type': 'object'}
14897
14898
14899 @ReturnMapping(SSHAddressResults)
14900 async def PrivateAddress(self, entities):
14901 '''
14902 entities : typing.Sequence[~Entity]
14903 Returns -> typing.Sequence[~SSHAddressResult]
14904 '''
14905 # map input types to rpc msg
14906 params = dict()
14907 msg = dict(Type='SSHClient', Request='PrivateAddress', Version=1, Params=params)
14908 params['Entities'] = entities
14909 reply = await self.rpc(msg)
14910 return reply
14911
14912
14913
14914 @ReturnMapping(SSHProxyResult)
14915 async def Proxy(self):
14916 '''
14917
14918 Returns -> bool
14919 '''
14920 # map input types to rpc msg
14921 params = dict()
14922 msg = dict(Type='SSHClient', Request='Proxy', Version=1, Params=params)
14923
14924 reply = await self.rpc(msg)
14925 return reply
14926
14927
14928
14929 @ReturnMapping(SSHAddressResults)
14930 async def PublicAddress(self, entities):
14931 '''
14932 entities : typing.Sequence[~Entity]
14933 Returns -> typing.Sequence[~SSHAddressResult]
14934 '''
14935 # map input types to rpc msg
14936 params = dict()
14937 msg = dict(Type='SSHClient', Request='PublicAddress', Version=1, Params=params)
14938 params['Entities'] = entities
14939 reply = await self.rpc(msg)
14940 return reply
14941
14942
14943
14944 @ReturnMapping(SSHPublicKeysResults)
14945 async def PublicKeys(self, entities):
14946 '''
14947 entities : typing.Sequence[~Entity]
14948 Returns -> typing.Sequence[~SSHPublicKeysResult]
14949 '''
14950 # map input types to rpc msg
14951 params = dict()
14952 msg = dict(Type='SSHClient', Request='PublicKeys', Version=1, Params=params)
14953 params['Entities'] = entities
14954 reply = await self.rpc(msg)
14955 return reply
14956
14957
14958 class Service(Type):
14959 name = 'Service'
14960 version = 3
14961 schema = {'definitions': {'AddRelation': {'additionalProperties': False,
14962 'properties': {'Endpoints': {'items': {'type': 'string'},
14963 'type': 'array'}},
14964 'required': ['Endpoints'],
14965 'type': 'object'},
14966 'AddRelationResults': {'additionalProperties': False,
14967 'properties': {'Endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/Relation'}},
14968 'type': 'object'}},
14969 'required': ['Endpoints'],
14970 'type': 'object'},
14971 'AddServiceUnits': {'additionalProperties': False,
14972 'properties': {'NumUnits': {'type': 'integer'},
14973 'Placement': {'items': {'$ref': '#/definitions/Placement'},
14974 'type': 'array'},
14975 'ServiceName': {'type': 'string'}},
14976 'required': ['ServiceName',
14977 'NumUnits',
14978 'Placement'],
14979 'type': 'object'},
14980 'AddServiceUnitsResults': {'additionalProperties': False,
14981 'properties': {'Units': {'items': {'type': 'string'},
14982 'type': 'array'}},
14983 'required': ['Units'],
14984 'type': 'object'},
14985 'Constraints': {'additionalProperties': False,
14986 'properties': {'Count': {'type': 'integer'},
14987 'Pool': {'type': 'string'},
14988 'Size': {'type': 'integer'}},
14989 'required': ['Pool', 'Size', 'Count'],
14990 'type': 'object'},
14991 'DestroyRelation': {'additionalProperties': False,
14992 'properties': {'Endpoints': {'items': {'type': 'string'},
14993 'type': 'array'}},
14994 'required': ['Endpoints'],
14995 'type': 'object'},
14996 'DestroyServiceUnits': {'additionalProperties': False,
14997 'properties': {'UnitNames': {'items': {'type': 'string'},
14998 'type': 'array'}},
14999 'required': ['UnitNames'],
15000 'type': 'object'},
15001 'Error': {'additionalProperties': False,
15002 'properties': {'Code': {'type': 'string'},
15003 'Info': {'$ref': '#/definitions/ErrorInfo'},
15004 'Message': {'type': 'string'}},
15005 'required': ['Message', 'Code'],
15006 'type': 'object'},
15007 'ErrorInfo': {'additionalProperties': False,
15008 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15009 'MacaroonPath': {'type': 'string'}},
15010 'type': 'object'},
15011 'ErrorResult': {'additionalProperties': False,
15012 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15013 'required': ['Error'],
15014 'type': 'object'},
15015 'ErrorResults': {'additionalProperties': False,
15016 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15017 'type': 'array'}},
15018 'required': ['Results'],
15019 'type': 'object'},
15020 'GetConstraintsResults': {'additionalProperties': False,
15021 'properties': {'Constraints': {'$ref': '#/definitions/Value'}},
15022 'required': ['Constraints'],
15023 'type': 'object'},
15024 'GetServiceConstraints': {'additionalProperties': False,
15025 'properties': {'ServiceName': {'type': 'string'}},
15026 'required': ['ServiceName'],
15027 'type': 'object'},
15028 'Macaroon': {'additionalProperties': False,
15029 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15030 'type': 'array'},
15031 'data': {'items': {'type': 'integer'},
15032 'type': 'array'},
15033 'id': {'$ref': '#/definitions/packet'},
15034 'location': {'$ref': '#/definitions/packet'},
15035 'sig': {'items': {'type': 'integer'},
15036 'type': 'array'}},
15037 'required': ['data',
15038 'location',
15039 'id',
15040 'caveats',
15041 'sig'],
15042 'type': 'object'},
15043 'Placement': {'additionalProperties': False,
15044 'properties': {'Directive': {'type': 'string'},
15045 'Scope': {'type': 'string'}},
15046 'required': ['Scope', 'Directive'],
15047 'type': 'object'},
15048 'Relation': {'additionalProperties': False,
15049 'properties': {'Interface': {'type': 'string'},
15050 'Limit': {'type': 'integer'},
15051 'Name': {'type': 'string'},
15052 'Optional': {'type': 'boolean'},
15053 'Role': {'type': 'string'},
15054 'Scope': {'type': 'string'}},
15055 'required': ['Name',
15056 'Role',
15057 'Interface',
15058 'Optional',
15059 'Limit',
15060 'Scope'],
15061 'type': 'object'},
15062 'ServiceCharmRelations': {'additionalProperties': False,
15063 'properties': {'ServiceName': {'type': 'string'}},
15064 'required': ['ServiceName'],
15065 'type': 'object'},
15066 'ServiceCharmRelationsResults': {'additionalProperties': False,
15067 'properties': {'CharmRelations': {'items': {'type': 'string'},
15068 'type': 'array'}},
15069 'required': ['CharmRelations'],
15070 'type': 'object'},
15071 'ServiceDeploy': {'additionalProperties': False,
15072 'properties': {'Channel': {'type': 'string'},
15073 'CharmUrl': {'type': 'string'},
15074 'Config': {'patternProperties': {'.*': {'type': 'string'}},
15075 'type': 'object'},
15076 'ConfigYAML': {'type': 'string'},
15077 'Constraints': {'$ref': '#/definitions/Value'},
15078 'EndpointBindings': {'patternProperties': {'.*': {'type': 'string'}},
15079 'type': 'object'},
15080 'NumUnits': {'type': 'integer'},
15081 'Placement': {'items': {'$ref': '#/definitions/Placement'},
15082 'type': 'array'},
15083 'Resources': {'patternProperties': {'.*': {'type': 'string'}},
15084 'type': 'object'},
15085 'Series': {'type': 'string'},
15086 'ServiceName': {'type': 'string'},
15087 'Storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}},
15088 'type': 'object'}},
15089 'required': ['ServiceName',
15090 'Series',
15091 'CharmUrl',
15092 'Channel',
15093 'NumUnits',
15094 'Config',
15095 'ConfigYAML',
15096 'Constraints',
15097 'Placement',
15098 'Storage',
15099 'EndpointBindings',
15100 'Resources'],
15101 'type': 'object'},
15102 'ServiceDestroy': {'additionalProperties': False,
15103 'properties': {'ServiceName': {'type': 'string'}},
15104 'required': ['ServiceName'],
15105 'type': 'object'},
15106 'ServiceExpose': {'additionalProperties': False,
15107 'properties': {'ServiceName': {'type': 'string'}},
15108 'required': ['ServiceName'],
15109 'type': 'object'},
15110 'ServiceGet': {'additionalProperties': False,
15111 'properties': {'ServiceName': {'type': 'string'}},
15112 'required': ['ServiceName'],
15113 'type': 'object'},
15114 'ServiceGetResults': {'additionalProperties': False,
15115 'properties': {'Charm': {'type': 'string'},
15116 'Config': {'patternProperties': {'.*': {'additionalProperties': True,
15117 'type': 'object'}},
15118 'type': 'object'},
15119 'Constraints': {'$ref': '#/definitions/Value'},
15120 'Service': {'type': 'string'}},
15121 'required': ['Service',
15122 'Charm',
15123 'Config',
15124 'Constraints'],
15125 'type': 'object'},
15126 'ServiceMetricCredential': {'additionalProperties': False,
15127 'properties': {'MetricCredentials': {'items': {'type': 'integer'},
15128 'type': 'array'},
15129 'ServiceName': {'type': 'string'}},
15130 'required': ['ServiceName',
15131 'MetricCredentials'],
15132 'type': 'object'},
15133 'ServiceMetricCredentials': {'additionalProperties': False,
15134 'properties': {'Creds': {'items': {'$ref': '#/definitions/ServiceMetricCredential'},
15135 'type': 'array'}},
15136 'required': ['Creds'],
15137 'type': 'object'},
15138 'ServiceSet': {'additionalProperties': False,
15139 'properties': {'Options': {'patternProperties': {'.*': {'type': 'string'}},
15140 'type': 'object'},
15141 'ServiceName': {'type': 'string'}},
15142 'required': ['ServiceName', 'Options'],
15143 'type': 'object'},
15144 'ServiceSetCharm': {'additionalProperties': False,
15145 'properties': {'charmurl': {'type': 'string'},
15146 'cs-channel': {'type': 'string'},
15147 'forceseries': {'type': 'boolean'},
15148 'forceunits': {'type': 'boolean'},
15149 'resourceids': {'patternProperties': {'.*': {'type': 'string'}},
15150 'type': 'object'},
15151 'servicename': {'type': 'string'}},
15152 'required': ['servicename',
15153 'charmurl',
15154 'cs-channel',
15155 'forceunits',
15156 'forceseries',
15157 'resourceids'],
15158 'type': 'object'},
15159 'ServiceUnexpose': {'additionalProperties': False,
15160 'properties': {'ServiceName': {'type': 'string'}},
15161 'required': ['ServiceName'],
15162 'type': 'object'},
15163 'ServiceUnset': {'additionalProperties': False,
15164 'properties': {'Options': {'items': {'type': 'string'},
15165 'type': 'array'},
15166 'ServiceName': {'type': 'string'}},
15167 'required': ['ServiceName', 'Options'],
15168 'type': 'object'},
15169 'ServiceUpdate': {'additionalProperties': False,
15170 'properties': {'CharmUrl': {'type': 'string'},
15171 'Constraints': {'$ref': '#/definitions/Value'},
15172 'ForceCharmUrl': {'type': 'boolean'},
15173 'ForceSeries': {'type': 'boolean'},
15174 'MinUnits': {'type': 'integer'},
15175 'ServiceName': {'type': 'string'},
15176 'SettingsStrings': {'patternProperties': {'.*': {'type': 'string'}},
15177 'type': 'object'},
15178 'SettingsYAML': {'type': 'string'}},
15179 'required': ['ServiceName',
15180 'CharmUrl',
15181 'ForceCharmUrl',
15182 'ForceSeries',
15183 'MinUnits',
15184 'SettingsStrings',
15185 'SettingsYAML',
15186 'Constraints'],
15187 'type': 'object'},
15188 'ServicesDeploy': {'additionalProperties': False,
15189 'properties': {'Services': {'items': {'$ref': '#/definitions/ServiceDeploy'},
15190 'type': 'array'}},
15191 'required': ['Services'],
15192 'type': 'object'},
15193 'SetConstraints': {'additionalProperties': False,
15194 'properties': {'Constraints': {'$ref': '#/definitions/Value'},
15195 'ServiceName': {'type': 'string'}},
15196 'required': ['ServiceName', 'Constraints'],
15197 'type': 'object'},
15198 'StringResult': {'additionalProperties': False,
15199 'properties': {'Error': {'$ref': '#/definitions/Error'},
15200 'Result': {'type': 'string'}},
15201 'required': ['Error', 'Result'],
15202 'type': 'object'},
15203 'Value': {'additionalProperties': False,
15204 'properties': {'arch': {'type': 'string'},
15205 'container': {'type': 'string'},
15206 'cpu-cores': {'type': 'integer'},
15207 'cpu-power': {'type': 'integer'},
15208 'instance-type': {'type': 'string'},
15209 'mem': {'type': 'integer'},
15210 'root-disk': {'type': 'integer'},
15211 'spaces': {'items': {'type': 'string'},
15212 'type': 'array'},
15213 'tags': {'items': {'type': 'string'},
15214 'type': 'array'},
15215 'virt-type': {'type': 'string'}},
15216 'type': 'object'},
15217 'caveat': {'additionalProperties': False,
15218 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15219 'location': {'$ref': '#/definitions/packet'},
15220 'verificationId': {'$ref': '#/definitions/packet'}},
15221 'required': ['location',
15222 'caveatId',
15223 'verificationId'],
15224 'type': 'object'},
15225 'packet': {'additionalProperties': False,
15226 'properties': {'headerLen': {'type': 'integer'},
15227 'start': {'type': 'integer'},
15228 'totalLen': {'type': 'integer'}},
15229 'required': ['start', 'totalLen', 'headerLen'],
15230 'type': 'object'}},
15231 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'},
15232 'Result': {'$ref': '#/definitions/AddRelationResults'}},
15233 'type': 'object'},
15234 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddServiceUnits'},
15235 'Result': {'$ref': '#/definitions/AddServiceUnitsResults'}},
15236 'type': 'object'},
15237 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ServiceCharmRelations'},
15238 'Result': {'$ref': '#/definitions/ServiceCharmRelationsResults'}},
15239 'type': 'object'},
15240 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ServicesDeploy'},
15241 'Result': {'$ref': '#/definitions/ErrorResults'}},
15242 'type': 'object'},
15243 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ServiceDestroy'}},
15244 'type': 'object'},
15245 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}},
15246 'type': 'object'},
15247 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyServiceUnits'}},
15248 'type': 'object'},
15249 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ServiceExpose'}},
15250 'type': 'object'},
15251 'Get': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
15252 'Result': {'$ref': '#/definitions/ServiceGetResults'}},
15253 'type': 'object'},
15254 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ServiceGet'},
15255 'Result': {'$ref': '#/definitions/StringResult'}},
15256 'type': 'object'},
15257 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetServiceConstraints'},
15258 'Result': {'$ref': '#/definitions/GetConstraintsResults'}},
15259 'type': 'object'},
15260 'Set': {'properties': {'Params': {'$ref': '#/definitions/ServiceSet'}},
15261 'type': 'object'},
15262 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ServiceSetCharm'}},
15263 'type': 'object'},
15264 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}},
15265 'type': 'object'},
15266 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ServiceMetricCredentials'},
15267 'Result': {'$ref': '#/definitions/ErrorResults'}},
15268 'type': 'object'},
15269 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnexpose'}},
15270 'type': 'object'},
15271 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ServiceUnset'}},
15272 'type': 'object'},
15273 'Update': {'properties': {'Params': {'$ref': '#/definitions/ServiceUpdate'}},
15274 'type': 'object'}},
15275 'type': 'object'}
15276
15277
15278 @ReturnMapping(AddRelationResults)
15279 async def AddRelation(self, endpoints):
15280 '''
15281 endpoints : typing.Sequence[str]
15282 Returns -> typing.Mapping[str, ~Relation]
15283 '''
15284 # map input types to rpc msg
15285 params = dict()
15286 msg = dict(Type='Service', Request='AddRelation', Version=3, Params=params)
15287 params['Endpoints'] = endpoints
15288 reply = await self.rpc(msg)
15289 return reply
15290
15291
15292
15293 @ReturnMapping(AddServiceUnitsResults)
15294 async def AddUnits(self, numunits, placement, servicename):
15295 '''
15296 numunits : int
15297 placement : typing.Sequence[~Placement]
15298 servicename : str
15299 Returns -> typing.Sequence[str]
15300 '''
15301 # map input types to rpc msg
15302 params = dict()
15303 msg = dict(Type='Service', Request='AddUnits', Version=3, Params=params)
15304 params['NumUnits'] = numunits
15305 params['Placement'] = placement
15306 params['ServiceName'] = servicename
15307 reply = await self.rpc(msg)
15308 return reply
15309
15310
15311
15312 @ReturnMapping(ServiceCharmRelationsResults)
15313 async def CharmRelations(self, servicename):
15314 '''
15315 servicename : str
15316 Returns -> typing.Sequence[str]
15317 '''
15318 # map input types to rpc msg
15319 params = dict()
15320 msg = dict(Type='Service', Request='CharmRelations', Version=3, Params=params)
15321 params['ServiceName'] = servicename
15322 reply = await self.rpc(msg)
15323 return reply
15324
15325
15326
15327 @ReturnMapping(ErrorResults)
15328 async def Deploy(self, services):
15329 '''
15330 services : typing.Sequence[~ServiceDeploy]
15331 Returns -> typing.Sequence[~ErrorResult]
15332 '''
15333 # map input types to rpc msg
15334 params = dict()
15335 msg = dict(Type='Service', Request='Deploy', Version=3, Params=params)
15336 params['Services'] = services
15337 reply = await self.rpc(msg)
15338 return reply
15339
15340
15341
15342 @ReturnMapping(None)
15343 async def Destroy(self, servicename):
15344 '''
15345 servicename : str
15346 Returns -> None
15347 '''
15348 # map input types to rpc msg
15349 params = dict()
15350 msg = dict(Type='Service', Request='Destroy', Version=3, Params=params)
15351 params['ServiceName'] = servicename
15352 reply = await self.rpc(msg)
15353 return reply
15354
15355
15356
15357 @ReturnMapping(None)
15358 async def DestroyRelation(self, endpoints):
15359 '''
15360 endpoints : typing.Sequence[str]
15361 Returns -> None
15362 '''
15363 # map input types to rpc msg
15364 params = dict()
15365 msg = dict(Type='Service', Request='DestroyRelation', Version=3, Params=params)
15366 params['Endpoints'] = endpoints
15367 reply = await self.rpc(msg)
15368 return reply
15369
15370
15371
15372 @ReturnMapping(None)
15373 async def DestroyUnits(self, unitnames):
15374 '''
15375 unitnames : typing.Sequence[str]
15376 Returns -> None
15377 '''
15378 # map input types to rpc msg
15379 params = dict()
15380 msg = dict(Type='Service', Request='DestroyUnits', Version=3, Params=params)
15381 params['UnitNames'] = unitnames
15382 reply = await self.rpc(msg)
15383 return reply
15384
15385
15386
15387 @ReturnMapping(None)
15388 async def Expose(self, servicename):
15389 '''
15390 servicename : str
15391 Returns -> None
15392 '''
15393 # map input types to rpc msg
15394 params = dict()
15395 msg = dict(Type='Service', Request='Expose', Version=3, Params=params)
15396 params['ServiceName'] = servicename
15397 reply = await self.rpc(msg)
15398 return reply
15399
15400
15401
15402 @ReturnMapping(ServiceGetResults)
15403 async def Get(self, servicename):
15404 '''
15405 servicename : str
15406 Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')]
15407 '''
15408 # map input types to rpc msg
15409 params = dict()
15410 msg = dict(Type='Service', Request='Get', Version=3, Params=params)
15411 params['ServiceName'] = servicename
15412 reply = await self.rpc(msg)
15413 return reply
15414
15415
15416
15417 @ReturnMapping(StringResult)
15418 async def GetCharmURL(self, servicename):
15419 '''
15420 servicename : str
15421 Returns -> typing.Union[_ForwardRef('Error'), str]
15422 '''
15423 # map input types to rpc msg
15424 params = dict()
15425 msg = dict(Type='Service', Request='GetCharmURL', Version=3, Params=params)
15426 params['ServiceName'] = servicename
15427 reply = await self.rpc(msg)
15428 return reply
15429
15430
15431
15432 @ReturnMapping(GetConstraintsResults)
15433 async def GetConstraints(self, servicename):
15434 '''
15435 servicename : str
15436 Returns -> Value
15437 '''
15438 # map input types to rpc msg
15439 params = dict()
15440 msg = dict(Type='Service', Request='GetConstraints', Version=3, Params=params)
15441 params['ServiceName'] = servicename
15442 reply = await self.rpc(msg)
15443 return reply
15444
15445
15446
15447 @ReturnMapping(None)
15448 async def Set(self, options, servicename):
15449 '''
15450 options : typing.Mapping[str, str]
15451 servicename : str
15452 Returns -> None
15453 '''
15454 # map input types to rpc msg
15455 params = dict()
15456 msg = dict(Type='Service', Request='Set', Version=3, Params=params)
15457 params['Options'] = options
15458 params['ServiceName'] = servicename
15459 reply = await self.rpc(msg)
15460 return reply
15461
15462
15463
15464 @ReturnMapping(None)
15465 async def SetCharm(self, charmurl, cs_channel, forceseries, forceunits, resourceids, servicename):
15466 '''
15467 charmurl : str
15468 cs_channel : str
15469 forceseries : bool
15470 forceunits : bool
15471 resourceids : typing.Mapping[str, str]
15472 servicename : str
15473 Returns -> None
15474 '''
15475 # map input types to rpc msg
15476 params = dict()
15477 msg = dict(Type='Service', Request='SetCharm', Version=3, Params=params)
15478 params['charmurl'] = charmurl
15479 params['cs-channel'] = cs_channel
15480 params['forceseries'] = forceseries
15481 params['forceunits'] = forceunits
15482 params['resourceids'] = resourceids
15483 params['servicename'] = servicename
15484 reply = await self.rpc(msg)
15485 return reply
15486
15487
15488
15489 @ReturnMapping(None)
15490 async def SetConstraints(self, constraints, servicename):
15491 '''
15492 constraints : Value
15493 servicename : str
15494 Returns -> None
15495 '''
15496 # map input types to rpc msg
15497 params = dict()
15498 msg = dict(Type='Service', Request='SetConstraints', Version=3, Params=params)
15499 params['Constraints'] = constraints
15500 params['ServiceName'] = servicename
15501 reply = await self.rpc(msg)
15502 return reply
15503
15504
15505
15506 @ReturnMapping(ErrorResults)
15507 async def SetMetricCredentials(self, creds):
15508 '''
15509 creds : typing.Sequence[~ServiceMetricCredential]
15510 Returns -> typing.Sequence[~ErrorResult]
15511 '''
15512 # map input types to rpc msg
15513 params = dict()
15514 msg = dict(Type='Service', Request='SetMetricCredentials', Version=3, Params=params)
15515 params['Creds'] = creds
15516 reply = await self.rpc(msg)
15517 return reply
15518
15519
15520
15521 @ReturnMapping(None)
15522 async def Unexpose(self, servicename):
15523 '''
15524 servicename : str
15525 Returns -> None
15526 '''
15527 # map input types to rpc msg
15528 params = dict()
15529 msg = dict(Type='Service', Request='Unexpose', Version=3, Params=params)
15530 params['ServiceName'] = servicename
15531 reply = await self.rpc(msg)
15532 return reply
15533
15534
15535
15536 @ReturnMapping(None)
15537 async def Unset(self, options, servicename):
15538 '''
15539 options : typing.Sequence[str]
15540 servicename : str
15541 Returns -> None
15542 '''
15543 # map input types to rpc msg
15544 params = dict()
15545 msg = dict(Type='Service', Request='Unset', Version=3, Params=params)
15546 params['Options'] = options
15547 params['ServiceName'] = servicename
15548 reply = await self.rpc(msg)
15549 return reply
15550
15551
15552
15553 @ReturnMapping(None)
15554 async def Update(self, charmurl, constraints, forcecharmurl, forceseries, minunits, servicename, settingsstrings, settingsyaml):
15555 '''
15556 charmurl : str
15557 constraints : Value
15558 forcecharmurl : bool
15559 forceseries : bool
15560 minunits : int
15561 servicename : str
15562 settingsstrings : typing.Mapping[str, str]
15563 settingsyaml : str
15564 Returns -> None
15565 '''
15566 # map input types to rpc msg
15567 params = dict()
15568 msg = dict(Type='Service', Request='Update', Version=3, Params=params)
15569 params['CharmUrl'] = charmurl
15570 params['Constraints'] = constraints
15571 params['ForceCharmUrl'] = forcecharmurl
15572 params['ForceSeries'] = forceseries
15573 params['MinUnits'] = minunits
15574 params['ServiceName'] = servicename
15575 params['SettingsStrings'] = settingsstrings
15576 params['SettingsYAML'] = settingsyaml
15577 reply = await self.rpc(msg)
15578 return reply
15579
15580
15581 class ServiceScaler(Type):
15582 name = 'ServiceScaler'
15583 version = 1
15584 schema = {'definitions': {'Entities': {'additionalProperties': False,
15585 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15586 'type': 'array'}},
15587 'required': ['Entities'],
15588 'type': 'object'},
15589 'Entity': {'additionalProperties': False,
15590 'properties': {'Tag': {'type': 'string'}},
15591 'required': ['Tag'],
15592 'type': 'object'},
15593 'Error': {'additionalProperties': False,
15594 'properties': {'Code': {'type': 'string'},
15595 'Info': {'$ref': '#/definitions/ErrorInfo'},
15596 'Message': {'type': 'string'}},
15597 'required': ['Message', 'Code'],
15598 'type': 'object'},
15599 'ErrorInfo': {'additionalProperties': False,
15600 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15601 'MacaroonPath': {'type': 'string'}},
15602 'type': 'object'},
15603 'ErrorResult': {'additionalProperties': False,
15604 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15605 'required': ['Error'],
15606 'type': 'object'},
15607 'ErrorResults': {'additionalProperties': False,
15608 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15609 'type': 'array'}},
15610 'required': ['Results'],
15611 'type': 'object'},
15612 'Macaroon': {'additionalProperties': False,
15613 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15614 'type': 'array'},
15615 'data': {'items': {'type': 'integer'},
15616 'type': 'array'},
15617 'id': {'$ref': '#/definitions/packet'},
15618 'location': {'$ref': '#/definitions/packet'},
15619 'sig': {'items': {'type': 'integer'},
15620 'type': 'array'}},
15621 'required': ['data',
15622 'location',
15623 'id',
15624 'caveats',
15625 'sig'],
15626 'type': 'object'},
15627 'StringsWatchResult': {'additionalProperties': False,
15628 'properties': {'Changes': {'items': {'type': 'string'},
15629 'type': 'array'},
15630 'Error': {'$ref': '#/definitions/Error'},
15631 'StringsWatcherId': {'type': 'string'}},
15632 'required': ['StringsWatcherId',
15633 'Changes',
15634 'Error'],
15635 'type': 'object'},
15636 'caveat': {'additionalProperties': False,
15637 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15638 'location': {'$ref': '#/definitions/packet'},
15639 'verificationId': {'$ref': '#/definitions/packet'}},
15640 'required': ['location',
15641 'caveatId',
15642 'verificationId'],
15643 'type': 'object'},
15644 'packet': {'additionalProperties': False,
15645 'properties': {'headerLen': {'type': 'integer'},
15646 'start': {'type': 'integer'},
15647 'totalLen': {'type': 'integer'}},
15648 'required': ['start', 'totalLen', 'headerLen'],
15649 'type': 'object'}},
15650 'properties': {'Rescale': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15651 'Result': {'$ref': '#/definitions/ErrorResults'}},
15652 'type': 'object'},
15653 'Watch': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
15654 'type': 'object'}},
15655 'type': 'object'}
15656
15657
15658 @ReturnMapping(ErrorResults)
15659 async def Rescale(self, entities):
15660 '''
15661 entities : typing.Sequence[~Entity]
15662 Returns -> typing.Sequence[~ErrorResult]
15663 '''
15664 # map input types to rpc msg
15665 params = dict()
15666 msg = dict(Type='ServiceScaler', Request='Rescale', Version=1, Params=params)
15667 params['Entities'] = entities
15668 reply = await self.rpc(msg)
15669 return reply
15670
15671
15672
15673 @ReturnMapping(StringsWatchResult)
15674 async def Watch(self):
15675 '''
15676
15677 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
15678 '''
15679 # map input types to rpc msg
15680 params = dict()
15681 msg = dict(Type='ServiceScaler', Request='Watch', Version=1, Params=params)
15682
15683 reply = await self.rpc(msg)
15684 return reply
15685
15686
15687 class Singular(Type):
15688 name = 'Singular'
15689 version = 1
15690 schema = {'definitions': {'Entities': {'additionalProperties': False,
15691 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15692 'type': 'array'}},
15693 'required': ['Entities'],
15694 'type': 'object'},
15695 'Entity': {'additionalProperties': False,
15696 'properties': {'Tag': {'type': 'string'}},
15697 'required': ['Tag'],
15698 'type': 'object'},
15699 'Error': {'additionalProperties': False,
15700 'properties': {'Code': {'type': 'string'},
15701 'Info': {'$ref': '#/definitions/ErrorInfo'},
15702 'Message': {'type': 'string'}},
15703 'required': ['Message', 'Code'],
15704 'type': 'object'},
15705 'ErrorInfo': {'additionalProperties': False,
15706 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15707 'MacaroonPath': {'type': 'string'}},
15708 'type': 'object'},
15709 'ErrorResult': {'additionalProperties': False,
15710 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15711 'required': ['Error'],
15712 'type': 'object'},
15713 'ErrorResults': {'additionalProperties': False,
15714 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15715 'type': 'array'}},
15716 'required': ['Results'],
15717 'type': 'object'},
15718 'Macaroon': {'additionalProperties': False,
15719 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15720 'type': 'array'},
15721 'data': {'items': {'type': 'integer'},
15722 'type': 'array'},
15723 'id': {'$ref': '#/definitions/packet'},
15724 'location': {'$ref': '#/definitions/packet'},
15725 'sig': {'items': {'type': 'integer'},
15726 'type': 'array'}},
15727 'required': ['data',
15728 'location',
15729 'id',
15730 'caveats',
15731 'sig'],
15732 'type': 'object'},
15733 'SingularClaim': {'additionalProperties': False,
15734 'properties': {'ControllerTag': {'type': 'string'},
15735 'Duration': {'type': 'integer'},
15736 'ModelTag': {'type': 'string'}},
15737 'required': ['ModelTag',
15738 'ControllerTag',
15739 'Duration'],
15740 'type': 'object'},
15741 'SingularClaims': {'additionalProperties': False,
15742 'properties': {'Claims': {'items': {'$ref': '#/definitions/SingularClaim'},
15743 'type': 'array'}},
15744 'required': ['Claims'],
15745 'type': 'object'},
15746 'caveat': {'additionalProperties': False,
15747 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15748 'location': {'$ref': '#/definitions/packet'},
15749 'verificationId': {'$ref': '#/definitions/packet'}},
15750 'required': ['location',
15751 'caveatId',
15752 'verificationId'],
15753 'type': 'object'},
15754 'packet': {'additionalProperties': False,
15755 'properties': {'headerLen': {'type': 'integer'},
15756 'start': {'type': 'integer'},
15757 'totalLen': {'type': 'integer'}},
15758 'required': ['start', 'totalLen', 'headerLen'],
15759 'type': 'object'}},
15760 'properties': {'Claim': {'properties': {'Params': {'$ref': '#/definitions/SingularClaims'},
15761 'Result': {'$ref': '#/definitions/ErrorResults'}},
15762 'type': 'object'},
15763 'Wait': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
15764 'Result': {'$ref': '#/definitions/ErrorResults'}},
15765 'type': 'object'}},
15766 'type': 'object'}
15767
15768
15769 @ReturnMapping(ErrorResults)
15770 async def Claim(self, claims):
15771 '''
15772 claims : typing.Sequence[~SingularClaim]
15773 Returns -> typing.Sequence[~ErrorResult]
15774 '''
15775 # map input types to rpc msg
15776 params = dict()
15777 msg = dict(Type='Singular', Request='Claim', Version=1, Params=params)
15778 params['Claims'] = claims
15779 reply = await self.rpc(msg)
15780 return reply
15781
15782
15783
15784 @ReturnMapping(ErrorResults)
15785 async def Wait(self, entities):
15786 '''
15787 entities : typing.Sequence[~Entity]
15788 Returns -> typing.Sequence[~ErrorResult]
15789 '''
15790 # map input types to rpc msg
15791 params = dict()
15792 msg = dict(Type='Singular', Request='Wait', Version=1, Params=params)
15793 params['Entities'] = entities
15794 reply = await self.rpc(msg)
15795 return reply
15796
15797
15798 class Spaces(Type):
15799 name = 'Spaces'
15800 version = 2
15801 schema = {'definitions': {'CreateSpaceParams': {'additionalProperties': False,
15802 'properties': {'ProviderId': {'type': 'string'},
15803 'Public': {'type': 'boolean'},
15804 'SpaceTag': {'type': 'string'},
15805 'SubnetTags': {'items': {'type': 'string'},
15806 'type': 'array'}},
15807 'required': ['SubnetTags',
15808 'SpaceTag',
15809 'Public'],
15810 'type': 'object'},
15811 'CreateSpacesParams': {'additionalProperties': False,
15812 'properties': {'Spaces': {'items': {'$ref': '#/definitions/CreateSpaceParams'},
15813 'type': 'array'}},
15814 'required': ['Spaces'],
15815 'type': 'object'},
15816 'Error': {'additionalProperties': False,
15817 'properties': {'Code': {'type': 'string'},
15818 'Info': {'$ref': '#/definitions/ErrorInfo'},
15819 'Message': {'type': 'string'}},
15820 'required': ['Message', 'Code'],
15821 'type': 'object'},
15822 'ErrorInfo': {'additionalProperties': False,
15823 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15824 'MacaroonPath': {'type': 'string'}},
15825 'type': 'object'},
15826 'ErrorResult': {'additionalProperties': False,
15827 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15828 'required': ['Error'],
15829 'type': 'object'},
15830 'ErrorResults': {'additionalProperties': False,
15831 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15832 'type': 'array'}},
15833 'required': ['Results'],
15834 'type': 'object'},
15835 'ListSpacesResults': {'additionalProperties': False,
15836 'properties': {'Results': {'items': {'$ref': '#/definitions/Space'},
15837 'type': 'array'}},
15838 'required': ['Results'],
15839 'type': 'object'},
15840 'Macaroon': {'additionalProperties': False,
15841 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
15842 'type': 'array'},
15843 'data': {'items': {'type': 'integer'},
15844 'type': 'array'},
15845 'id': {'$ref': '#/definitions/packet'},
15846 'location': {'$ref': '#/definitions/packet'},
15847 'sig': {'items': {'type': 'integer'},
15848 'type': 'array'}},
15849 'required': ['data',
15850 'location',
15851 'id',
15852 'caveats',
15853 'sig'],
15854 'type': 'object'},
15855 'Space': {'additionalProperties': False,
15856 'properties': {'Error': {'$ref': '#/definitions/Error'},
15857 'Name': {'type': 'string'},
15858 'Subnets': {'items': {'$ref': '#/definitions/Subnet'},
15859 'type': 'array'}},
15860 'required': ['Name', 'Subnets'],
15861 'type': 'object'},
15862 'Subnet': {'additionalProperties': False,
15863 'properties': {'CIDR': {'type': 'string'},
15864 'Life': {'type': 'string'},
15865 'ProviderId': {'type': 'string'},
15866 'SpaceTag': {'type': 'string'},
15867 'StaticRangeHighIP': {'items': {'type': 'integer'},
15868 'type': 'array'},
15869 'StaticRangeLowIP': {'items': {'type': 'integer'},
15870 'type': 'array'},
15871 'Status': {'type': 'string'},
15872 'VLANTag': {'type': 'integer'},
15873 'Zones': {'items': {'type': 'string'},
15874 'type': 'array'}},
15875 'required': ['CIDR',
15876 'VLANTag',
15877 'Life',
15878 'SpaceTag',
15879 'Zones'],
15880 'type': 'object'},
15881 'caveat': {'additionalProperties': False,
15882 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
15883 'location': {'$ref': '#/definitions/packet'},
15884 'verificationId': {'$ref': '#/definitions/packet'}},
15885 'required': ['location',
15886 'caveatId',
15887 'verificationId'],
15888 'type': 'object'},
15889 'packet': {'additionalProperties': False,
15890 'properties': {'headerLen': {'type': 'integer'},
15891 'start': {'type': 'integer'},
15892 'totalLen': {'type': 'integer'}},
15893 'required': ['start', 'totalLen', 'headerLen'],
15894 'type': 'object'}},
15895 'properties': {'CreateSpaces': {'properties': {'Params': {'$ref': '#/definitions/CreateSpacesParams'},
15896 'Result': {'$ref': '#/definitions/ErrorResults'}},
15897 'type': 'object'},
15898 'ListSpaces': {'properties': {'Result': {'$ref': '#/definitions/ListSpacesResults'}},
15899 'type': 'object'}},
15900 'type': 'object'}
15901
15902
15903 @ReturnMapping(ErrorResults)
15904 async def CreateSpaces(self, spaces):
15905 '''
15906 spaces : typing.Sequence[~CreateSpaceParams]
15907 Returns -> typing.Sequence[~ErrorResult]
15908 '''
15909 # map input types to rpc msg
15910 params = dict()
15911 msg = dict(Type='Spaces', Request='CreateSpaces', Version=2, Params=params)
15912 params['Spaces'] = spaces
15913 reply = await self.rpc(msg)
15914 return reply
15915
15916
15917
15918 @ReturnMapping(ListSpacesResults)
15919 async def ListSpaces(self):
15920 '''
15921
15922 Returns -> typing.Sequence[~Space]
15923 '''
15924 # map input types to rpc msg
15925 params = dict()
15926 msg = dict(Type='Spaces', Request='ListSpaces', Version=2, Params=params)
15927
15928 reply = await self.rpc(msg)
15929 return reply
15930
15931
15932 class StatusHistory(Type):
15933 name = 'StatusHistory'
15934 version = 2
15935 schema = {'definitions': {'StatusHistoryPruneArgs': {'additionalProperties': False,
15936 'properties': {'MaxLogsPerEntity': {'type': 'integer'}},
15937 'required': ['MaxLogsPerEntity'],
15938 'type': 'object'}},
15939 'properties': {'Prune': {'properties': {'Params': {'$ref': '#/definitions/StatusHistoryPruneArgs'}},
15940 'type': 'object'}},
15941 'type': 'object'}
15942
15943
15944 @ReturnMapping(None)
15945 async def Prune(self, maxlogsperentity):
15946 '''
15947 maxlogsperentity : int
15948 Returns -> None
15949 '''
15950 # map input types to rpc msg
15951 params = dict()
15952 msg = dict(Type='StatusHistory', Request='Prune', Version=2, Params=params)
15953 params['MaxLogsPerEntity'] = maxlogsperentity
15954 reply = await self.rpc(msg)
15955 return reply
15956
15957
15958 class Storage(Type):
15959 name = 'Storage'
15960 version = 2
15961 schema = {'definitions': {'Entities': {'additionalProperties': False,
15962 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
15963 'type': 'array'}},
15964 'required': ['Entities'],
15965 'type': 'object'},
15966 'Entity': {'additionalProperties': False,
15967 'properties': {'Tag': {'type': 'string'}},
15968 'required': ['Tag'],
15969 'type': 'object'},
15970 'EntityStatus': {'additionalProperties': False,
15971 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
15972 'type': 'object'}},
15973 'type': 'object'},
15974 'Info': {'type': 'string'},
15975 'Since': {'format': 'date-time',
15976 'type': 'string'},
15977 'Status': {'type': 'string'}},
15978 'required': ['Status',
15979 'Info',
15980 'Data',
15981 'Since'],
15982 'type': 'object'},
15983 'Error': {'additionalProperties': False,
15984 'properties': {'Code': {'type': 'string'},
15985 'Info': {'$ref': '#/definitions/ErrorInfo'},
15986 'Message': {'type': 'string'}},
15987 'required': ['Message', 'Code'],
15988 'type': 'object'},
15989 'ErrorInfo': {'additionalProperties': False,
15990 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
15991 'MacaroonPath': {'type': 'string'}},
15992 'type': 'object'},
15993 'ErrorResult': {'additionalProperties': False,
15994 'properties': {'Error': {'$ref': '#/definitions/Error'}},
15995 'required': ['Error'],
15996 'type': 'object'},
15997 'ErrorResults': {'additionalProperties': False,
15998 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
15999 'type': 'array'}},
16000 'required': ['Results'],
16001 'type': 'object'},
16002 'FilesystemAttachmentInfo': {'additionalProperties': False,
16003 'properties': {'mountpoint': {'type': 'string'},
16004 'read-only': {'type': 'boolean'}},
16005 'type': 'object'},
16006 'FilesystemDetails': {'additionalProperties': False,
16007 'properties': {'filesystemtag': {'type': 'string'},
16008 'info': {'$ref': '#/definitions/FilesystemInfo'},
16009 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentInfo'}},
16010 'type': 'object'},
16011 'status': {'$ref': '#/definitions/EntityStatus'},
16012 'storage': {'$ref': '#/definitions/StorageDetails'},
16013 'volumetag': {'type': 'string'}},
16014 'required': ['filesystemtag',
16015 'info',
16016 'status'],
16017 'type': 'object'},
16018 'FilesystemDetailsListResult': {'additionalProperties': False,
16019 'properties': {'error': {'$ref': '#/definitions/Error'},
16020 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'},
16021 'type': 'array'}},
16022 'type': 'object'},
16023 'FilesystemDetailsListResults': {'additionalProperties': False,
16024 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'},
16025 'type': 'array'}},
16026 'type': 'object'},
16027 'FilesystemFilter': {'additionalProperties': False,
16028 'properties': {'machines': {'items': {'type': 'string'},
16029 'type': 'array'}},
16030 'type': 'object'},
16031 'FilesystemFilters': {'additionalProperties': False,
16032 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'},
16033 'type': 'array'}},
16034 'type': 'object'},
16035 'FilesystemInfo': {'additionalProperties': False,
16036 'properties': {'filesystemid': {'type': 'string'},
16037 'size': {'type': 'integer'}},
16038 'required': ['filesystemid', 'size'],
16039 'type': 'object'},
16040 'Macaroon': {'additionalProperties': False,
16041 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16042 'type': 'array'},
16043 'data': {'items': {'type': 'integer'},
16044 'type': 'array'},
16045 'id': {'$ref': '#/definitions/packet'},
16046 'location': {'$ref': '#/definitions/packet'},
16047 'sig': {'items': {'type': 'integer'},
16048 'type': 'array'}},
16049 'required': ['data',
16050 'location',
16051 'id',
16052 'caveats',
16053 'sig'],
16054 'type': 'object'},
16055 'StorageAddParams': {'additionalProperties': False,
16056 'properties': {'StorageName': {'type': 'string'},
16057 'storage': {'$ref': '#/definitions/StorageConstraints'},
16058 'unit': {'type': 'string'}},
16059 'required': ['unit',
16060 'StorageName',
16061 'storage'],
16062 'type': 'object'},
16063 'StorageAttachmentDetails': {'additionalProperties': False,
16064 'properties': {'location': {'type': 'string'},
16065 'machinetag': {'type': 'string'},
16066 'storagetag': {'type': 'string'},
16067 'unittag': {'type': 'string'}},
16068 'required': ['storagetag',
16069 'unittag',
16070 'machinetag'],
16071 'type': 'object'},
16072 'StorageConstraints': {'additionalProperties': False,
16073 'properties': {'Count': {'type': 'integer'},
16074 'Pool': {'type': 'string'},
16075 'Size': {'type': 'integer'}},
16076 'required': ['Pool', 'Size', 'Count'],
16077 'type': 'object'},
16078 'StorageDetails': {'additionalProperties': False,
16079 'properties': {'Persistent': {'type': 'boolean'},
16080 'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}},
16081 'type': 'object'},
16082 'kind': {'type': 'integer'},
16083 'ownertag': {'type': 'string'},
16084 'status': {'$ref': '#/definitions/EntityStatus'},
16085 'storagetag': {'type': 'string'}},
16086 'required': ['storagetag',
16087 'ownertag',
16088 'kind',
16089 'status',
16090 'Persistent'],
16091 'type': 'object'},
16092 'StorageDetailsListResult': {'additionalProperties': False,
16093 'properties': {'error': {'$ref': '#/definitions/Error'},
16094 'result': {'items': {'$ref': '#/definitions/StorageDetails'},
16095 'type': 'array'}},
16096 'type': 'object'},
16097 'StorageDetailsListResults': {'additionalProperties': False,
16098 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'},
16099 'type': 'array'}},
16100 'type': 'object'},
16101 'StorageDetailsResult': {'additionalProperties': False,
16102 'properties': {'error': {'$ref': '#/definitions/Error'},
16103 'result': {'$ref': '#/definitions/StorageDetails'}},
16104 'type': 'object'},
16105 'StorageDetailsResults': {'additionalProperties': False,
16106 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'},
16107 'type': 'array'}},
16108 'type': 'object'},
16109 'StorageFilter': {'additionalProperties': False,
16110 'type': 'object'},
16111 'StorageFilters': {'additionalProperties': False,
16112 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'},
16113 'type': 'array'}},
16114 'type': 'object'},
16115 'StoragePool': {'additionalProperties': False,
16116 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True,
16117 'type': 'object'}},
16118 'type': 'object'},
16119 'name': {'type': 'string'},
16120 'provider': {'type': 'string'}},
16121 'required': ['name', 'provider', 'attrs'],
16122 'type': 'object'},
16123 'StoragePoolFilter': {'additionalProperties': False,
16124 'properties': {'names': {'items': {'type': 'string'},
16125 'type': 'array'},
16126 'providers': {'items': {'type': 'string'},
16127 'type': 'array'}},
16128 'type': 'object'},
16129 'StoragePoolFilters': {'additionalProperties': False,
16130 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'},
16131 'type': 'array'}},
16132 'type': 'object'},
16133 'StoragePoolsResult': {'additionalProperties': False,
16134 'properties': {'error': {'$ref': '#/definitions/Error'},
16135 'storagepools': {'items': {'$ref': '#/definitions/StoragePool'},
16136 'type': 'array'}},
16137 'type': 'object'},
16138 'StoragePoolsResults': {'additionalProperties': False,
16139 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'},
16140 'type': 'array'}},
16141 'type': 'object'},
16142 'StoragesAddParams': {'additionalProperties': False,
16143 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
16144 'type': 'array'}},
16145 'required': ['storages'],
16146 'type': 'object'},
16147 'VolumeAttachmentInfo': {'additionalProperties': False,
16148 'properties': {'busaddress': {'type': 'string'},
16149 'devicelink': {'type': 'string'},
16150 'devicename': {'type': 'string'},
16151 'read-only': {'type': 'boolean'}},
16152 'type': 'object'},
16153 'VolumeDetails': {'additionalProperties': False,
16154 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16155 'machineattachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentInfo'}},
16156 'type': 'object'},
16157 'status': {'$ref': '#/definitions/EntityStatus'},
16158 'storage': {'$ref': '#/definitions/StorageDetails'},
16159 'volumetag': {'type': 'string'}},
16160 'required': ['volumetag', 'info', 'status'],
16161 'type': 'object'},
16162 'VolumeDetailsListResult': {'additionalProperties': False,
16163 'properties': {'error': {'$ref': '#/definitions/Error'},
16164 'result': {'items': {'$ref': '#/definitions/VolumeDetails'},
16165 'type': 'array'}},
16166 'type': 'object'},
16167 'VolumeDetailsListResults': {'additionalProperties': False,
16168 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'},
16169 'type': 'array'}},
16170 'type': 'object'},
16171 'VolumeFilter': {'additionalProperties': False,
16172 'properties': {'machines': {'items': {'type': 'string'},
16173 'type': 'array'}},
16174 'type': 'object'},
16175 'VolumeFilters': {'additionalProperties': False,
16176 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'},
16177 'type': 'array'}},
16178 'type': 'object'},
16179 'VolumeInfo': {'additionalProperties': False,
16180 'properties': {'hardwareid': {'type': 'string'},
16181 'persistent': {'type': 'boolean'},
16182 'size': {'type': 'integer'},
16183 'volumeid': {'type': 'string'}},
16184 'required': ['volumeid', 'size', 'persistent'],
16185 'type': 'object'},
16186 'caveat': {'additionalProperties': False,
16187 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16188 'location': {'$ref': '#/definitions/packet'},
16189 'verificationId': {'$ref': '#/definitions/packet'}},
16190 'required': ['location',
16191 'caveatId',
16192 'verificationId'],
16193 'type': 'object'},
16194 'packet': {'additionalProperties': False,
16195 'properties': {'headerLen': {'type': 'integer'},
16196 'start': {'type': 'integer'},
16197 'totalLen': {'type': 'integer'}},
16198 'required': ['start', 'totalLen', 'headerLen'],
16199 'type': 'object'}},
16200 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
16201 'Result': {'$ref': '#/definitions/ErrorResults'}},
16202 'type': 'object'},
16203 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}},
16204 'type': 'object'},
16205 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'},
16206 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}},
16207 'type': 'object'},
16208 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'},
16209 'Result': {'$ref': '#/definitions/StoragePoolsResults'}},
16210 'type': 'object'},
16211 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'},
16212 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}},
16213 'type': 'object'},
16214 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'},
16215 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}},
16216 'type': 'object'},
16217 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16218 'Result': {'$ref': '#/definitions/StorageDetailsResults'}},
16219 'type': 'object'}},
16220 'type': 'object'}
16221
16222
16223 @ReturnMapping(ErrorResults)
16224 async def AddToUnit(self, storages):
16225 '''
16226 storages : typing.Sequence[~StorageAddParams]
16227 Returns -> typing.Sequence[~ErrorResult]
16228 '''
16229 # map input types to rpc msg
16230 params = dict()
16231 msg = dict(Type='Storage', Request='AddToUnit', Version=2, Params=params)
16232 params['storages'] = storages
16233 reply = await self.rpc(msg)
16234 return reply
16235
16236
16237
16238 @ReturnMapping(None)
16239 async def CreatePool(self, attrs, name, provider):
16240 '''
16241 attrs : typing.Mapping[str, typing.Any]
16242 name : str
16243 provider : str
16244 Returns -> None
16245 '''
16246 # map input types to rpc msg
16247 params = dict()
16248 msg = dict(Type='Storage', Request='CreatePool', Version=2, Params=params)
16249 params['attrs'] = attrs
16250 params['name'] = name
16251 params['provider'] = provider
16252 reply = await self.rpc(msg)
16253 return reply
16254
16255
16256
16257 @ReturnMapping(FilesystemDetailsListResults)
16258 async def ListFilesystems(self, filters):
16259 '''
16260 filters : typing.Sequence[~FilesystemFilter]
16261 Returns -> typing.Sequence[~FilesystemDetailsListResult]
16262 '''
16263 # map input types to rpc msg
16264 params = dict()
16265 msg = dict(Type='Storage', Request='ListFilesystems', Version=2, Params=params)
16266 params['filters'] = filters
16267 reply = await self.rpc(msg)
16268 return reply
16269
16270
16271
16272 @ReturnMapping(StoragePoolsResults)
16273 async def ListPools(self, filters):
16274 '''
16275 filters : typing.Sequence[~StoragePoolFilter]
16276 Returns -> typing.Sequence[~StoragePoolsResult]
16277 '''
16278 # map input types to rpc msg
16279 params = dict()
16280 msg = dict(Type='Storage', Request='ListPools', Version=2, Params=params)
16281 params['filters'] = filters
16282 reply = await self.rpc(msg)
16283 return reply
16284
16285
16286
16287 @ReturnMapping(StorageDetailsListResults)
16288 async def ListStorageDetails(self, filters):
16289 '''
16290 filters : typing.Sequence[~StorageFilter]
16291 Returns -> typing.Sequence[~StorageDetailsListResult]
16292 '''
16293 # map input types to rpc msg
16294 params = dict()
16295 msg = dict(Type='Storage', Request='ListStorageDetails', Version=2, Params=params)
16296 params['filters'] = filters
16297 reply = await self.rpc(msg)
16298 return reply
16299
16300
16301
16302 @ReturnMapping(VolumeDetailsListResults)
16303 async def ListVolumes(self, filters):
16304 '''
16305 filters : typing.Sequence[~VolumeFilter]
16306 Returns -> typing.Sequence[~VolumeDetailsListResult]
16307 '''
16308 # map input types to rpc msg
16309 params = dict()
16310 msg = dict(Type='Storage', Request='ListVolumes', Version=2, Params=params)
16311 params['filters'] = filters
16312 reply = await self.rpc(msg)
16313 return reply
16314
16315
16316
16317 @ReturnMapping(StorageDetailsResults)
16318 async def StorageDetails(self, entities):
16319 '''
16320 entities : typing.Sequence[~Entity]
16321 Returns -> typing.Sequence[~StorageDetailsResult]
16322 '''
16323 # map input types to rpc msg
16324 params = dict()
16325 msg = dict(Type='Storage', Request='StorageDetails', Version=2, Params=params)
16326 params['Entities'] = entities
16327 reply = await self.rpc(msg)
16328 return reply
16329
16330
16331 class StorageProvisioner(Type):
16332 name = 'StorageProvisioner'
16333 version = 2
16334 schema = {'definitions': {'BlockDevice': {'additionalProperties': False,
16335 'properties': {'BusAddress': {'type': 'string'},
16336 'DeviceLinks': {'items': {'type': 'string'},
16337 'type': 'array'},
16338 'DeviceName': {'type': 'string'},
16339 'FilesystemType': {'type': 'string'},
16340 'HardwareId': {'type': 'string'},
16341 'InUse': {'type': 'boolean'},
16342 'Label': {'type': 'string'},
16343 'MountPoint': {'type': 'string'},
16344 'Size': {'type': 'integer'},
16345 'UUID': {'type': 'string'}},
16346 'required': ['DeviceName',
16347 'DeviceLinks',
16348 'Label',
16349 'UUID',
16350 'HardwareId',
16351 'BusAddress',
16352 'Size',
16353 'FilesystemType',
16354 'InUse',
16355 'MountPoint'],
16356 'type': 'object'},
16357 'BlockDeviceResult': {'additionalProperties': False,
16358 'properties': {'error': {'$ref': '#/definitions/Error'},
16359 'result': {'$ref': '#/definitions/BlockDevice'}},
16360 'required': ['result'],
16361 'type': 'object'},
16362 'BlockDeviceResults': {'additionalProperties': False,
16363 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'},
16364 'type': 'array'}},
16365 'type': 'object'},
16366 'Entities': {'additionalProperties': False,
16367 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
16368 'type': 'array'}},
16369 'required': ['Entities'],
16370 'type': 'object'},
16371 'Entity': {'additionalProperties': False,
16372 'properties': {'Tag': {'type': 'string'}},
16373 'required': ['Tag'],
16374 'type': 'object'},
16375 'EntityStatusArgs': {'additionalProperties': False,
16376 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
16377 'type': 'object'}},
16378 'type': 'object'},
16379 'Info': {'type': 'string'},
16380 'Status': {'type': 'string'},
16381 'Tag': {'type': 'string'}},
16382 'required': ['Tag',
16383 'Status',
16384 'Info',
16385 'Data'],
16386 'type': 'object'},
16387 'Error': {'additionalProperties': False,
16388 'properties': {'Code': {'type': 'string'},
16389 'Info': {'$ref': '#/definitions/ErrorInfo'},
16390 'Message': {'type': 'string'}},
16391 'required': ['Message', 'Code'],
16392 'type': 'object'},
16393 'ErrorInfo': {'additionalProperties': False,
16394 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
16395 'MacaroonPath': {'type': 'string'}},
16396 'type': 'object'},
16397 'ErrorResult': {'additionalProperties': False,
16398 'properties': {'Error': {'$ref': '#/definitions/Error'}},
16399 'required': ['Error'],
16400 'type': 'object'},
16401 'ErrorResults': {'additionalProperties': False,
16402 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
16403 'type': 'array'}},
16404 'required': ['Results'],
16405 'type': 'object'},
16406 'Filesystem': {'additionalProperties': False,
16407 'properties': {'filesystemtag': {'type': 'string'},
16408 'info': {'$ref': '#/definitions/FilesystemInfo'},
16409 'volumetag': {'type': 'string'}},
16410 'required': ['filesystemtag', 'info'],
16411 'type': 'object'},
16412 'FilesystemAttachment': {'additionalProperties': False,
16413 'properties': {'filesystemtag': {'type': 'string'},
16414 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'},
16415 'machinetag': {'type': 'string'}},
16416 'required': ['filesystemtag',
16417 'machinetag',
16418 'info'],
16419 'type': 'object'},
16420 'FilesystemAttachmentInfo': {'additionalProperties': False,
16421 'properties': {'mountpoint': {'type': 'string'},
16422 'read-only': {'type': 'boolean'}},
16423 'type': 'object'},
16424 'FilesystemAttachmentParams': {'additionalProperties': False,
16425 'properties': {'filesystemid': {'type': 'string'},
16426 'filesystemtag': {'type': 'string'},
16427 'instanceid': {'type': 'string'},
16428 'machinetag': {'type': 'string'},
16429 'mountpoint': {'type': 'string'},
16430 'provider': {'type': 'string'},
16431 'read-only': {'type': 'boolean'}},
16432 'required': ['filesystemtag',
16433 'machinetag',
16434 'provider'],
16435 'type': 'object'},
16436 'FilesystemAttachmentParamsResult': {'additionalProperties': False,
16437 'properties': {'error': {'$ref': '#/definitions/Error'},
16438 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}},
16439 'required': ['result'],
16440 'type': 'object'},
16441 'FilesystemAttachmentParamsResults': {'additionalProperties': False,
16442 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'},
16443 'type': 'array'}},
16444 'type': 'object'},
16445 'FilesystemAttachmentResult': {'additionalProperties': False,
16446 'properties': {'error': {'$ref': '#/definitions/Error'},
16447 'result': {'$ref': '#/definitions/FilesystemAttachment'}},
16448 'required': ['result'],
16449 'type': 'object'},
16450 'FilesystemAttachmentResults': {'additionalProperties': False,
16451 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'},
16452 'type': 'array'}},
16453 'type': 'object'},
16454 'FilesystemAttachments': {'additionalProperties': False,
16455 'properties': {'filesystemattachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'},
16456 'type': 'array'}},
16457 'required': ['filesystemattachments'],
16458 'type': 'object'},
16459 'FilesystemInfo': {'additionalProperties': False,
16460 'properties': {'filesystemid': {'type': 'string'},
16461 'size': {'type': 'integer'}},
16462 'required': ['filesystemid', 'size'],
16463 'type': 'object'},
16464 'FilesystemParams': {'additionalProperties': False,
16465 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'},
16466 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16467 'type': 'object'}},
16468 'type': 'object'},
16469 'filesystemtag': {'type': 'string'},
16470 'provider': {'type': 'string'},
16471 'size': {'type': 'integer'},
16472 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16473 'type': 'object'},
16474 'volumetag': {'type': 'string'}},
16475 'required': ['filesystemtag',
16476 'size',
16477 'provider'],
16478 'type': 'object'},
16479 'FilesystemParamsResult': {'additionalProperties': False,
16480 'properties': {'error': {'$ref': '#/definitions/Error'},
16481 'result': {'$ref': '#/definitions/FilesystemParams'}},
16482 'required': ['result'],
16483 'type': 'object'},
16484 'FilesystemParamsResults': {'additionalProperties': False,
16485 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'},
16486 'type': 'array'}},
16487 'type': 'object'},
16488 'FilesystemResult': {'additionalProperties': False,
16489 'properties': {'error': {'$ref': '#/definitions/Error'},
16490 'result': {'$ref': '#/definitions/Filesystem'}},
16491 'required': ['result'],
16492 'type': 'object'},
16493 'FilesystemResults': {'additionalProperties': False,
16494 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'},
16495 'type': 'array'}},
16496 'type': 'object'},
16497 'Filesystems': {'additionalProperties': False,
16498 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'},
16499 'type': 'array'}},
16500 'required': ['filesystems'],
16501 'type': 'object'},
16502 'LifeResult': {'additionalProperties': False,
16503 'properties': {'Error': {'$ref': '#/definitions/Error'},
16504 'Life': {'type': 'string'}},
16505 'required': ['Life', 'Error'],
16506 'type': 'object'},
16507 'LifeResults': {'additionalProperties': False,
16508 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
16509 'type': 'array'}},
16510 'required': ['Results'],
16511 'type': 'object'},
16512 'Macaroon': {'additionalProperties': False,
16513 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
16514 'type': 'array'},
16515 'data': {'items': {'type': 'integer'},
16516 'type': 'array'},
16517 'id': {'$ref': '#/definitions/packet'},
16518 'location': {'$ref': '#/definitions/packet'},
16519 'sig': {'items': {'type': 'integer'},
16520 'type': 'array'}},
16521 'required': ['data',
16522 'location',
16523 'id',
16524 'caveats',
16525 'sig'],
16526 'type': 'object'},
16527 'MachineStorageId': {'additionalProperties': False,
16528 'properties': {'attachmenttag': {'type': 'string'},
16529 'machinetag': {'type': 'string'}},
16530 'required': ['machinetag',
16531 'attachmenttag'],
16532 'type': 'object'},
16533 'MachineStorageIds': {'additionalProperties': False,
16534 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'},
16535 'type': 'array'}},
16536 'required': ['ids'],
16537 'type': 'object'},
16538 'MachineStorageIdsWatchResult': {'additionalProperties': False,
16539 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
16540 'type': 'array'},
16541 'Error': {'$ref': '#/definitions/Error'},
16542 'MachineStorageIdsWatcherId': {'type': 'string'}},
16543 'required': ['MachineStorageIdsWatcherId',
16544 'Changes',
16545 'Error'],
16546 'type': 'object'},
16547 'MachineStorageIdsWatchResults': {'additionalProperties': False,
16548 'properties': {'Results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'},
16549 'type': 'array'}},
16550 'required': ['Results'],
16551 'type': 'object'},
16552 'ModelConfigResult': {'additionalProperties': False,
16553 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
16554 'type': 'object'}},
16555 'type': 'object'}},
16556 'required': ['Config'],
16557 'type': 'object'},
16558 'NotifyWatchResult': {'additionalProperties': False,
16559 'properties': {'Error': {'$ref': '#/definitions/Error'},
16560 'NotifyWatcherId': {'type': 'string'}},
16561 'required': ['NotifyWatcherId', 'Error'],
16562 'type': 'object'},
16563 'NotifyWatchResults': {'additionalProperties': False,
16564 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
16565 'type': 'array'}},
16566 'required': ['Results'],
16567 'type': 'object'},
16568 'SetStatus': {'additionalProperties': False,
16569 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
16570 'type': 'array'}},
16571 'required': ['Entities'],
16572 'type': 'object'},
16573 'StringResult': {'additionalProperties': False,
16574 'properties': {'Error': {'$ref': '#/definitions/Error'},
16575 'Result': {'type': 'string'}},
16576 'required': ['Error', 'Result'],
16577 'type': 'object'},
16578 'StringResults': {'additionalProperties': False,
16579 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
16580 'type': 'array'}},
16581 'required': ['Results'],
16582 'type': 'object'},
16583 'StringsWatchResult': {'additionalProperties': False,
16584 'properties': {'Changes': {'items': {'type': 'string'},
16585 'type': 'array'},
16586 'Error': {'$ref': '#/definitions/Error'},
16587 'StringsWatcherId': {'type': 'string'}},
16588 'required': ['StringsWatcherId',
16589 'Changes',
16590 'Error'],
16591 'type': 'object'},
16592 'StringsWatchResults': {'additionalProperties': False,
16593 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
16594 'type': 'array'}},
16595 'required': ['Results'],
16596 'type': 'object'},
16597 'Volume': {'additionalProperties': False,
16598 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'},
16599 'volumetag': {'type': 'string'}},
16600 'required': ['volumetag', 'info'],
16601 'type': 'object'},
16602 'VolumeAttachment': {'additionalProperties': False,
16603 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'},
16604 'machinetag': {'type': 'string'},
16605 'volumetag': {'type': 'string'}},
16606 'required': ['volumetag',
16607 'machinetag',
16608 'info'],
16609 'type': 'object'},
16610 'VolumeAttachmentInfo': {'additionalProperties': False,
16611 'properties': {'busaddress': {'type': 'string'},
16612 'devicelink': {'type': 'string'},
16613 'devicename': {'type': 'string'},
16614 'read-only': {'type': 'boolean'}},
16615 'type': 'object'},
16616 'VolumeAttachmentParams': {'additionalProperties': False,
16617 'properties': {'instanceid': {'type': 'string'},
16618 'machinetag': {'type': 'string'},
16619 'provider': {'type': 'string'},
16620 'read-only': {'type': 'boolean'},
16621 'volumeid': {'type': 'string'},
16622 'volumetag': {'type': 'string'}},
16623 'required': ['volumetag',
16624 'machinetag',
16625 'provider'],
16626 'type': 'object'},
16627 'VolumeAttachmentParamsResult': {'additionalProperties': False,
16628 'properties': {'error': {'$ref': '#/definitions/Error'},
16629 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}},
16630 'required': ['result'],
16631 'type': 'object'},
16632 'VolumeAttachmentParamsResults': {'additionalProperties': False,
16633 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'},
16634 'type': 'array'}},
16635 'type': 'object'},
16636 'VolumeAttachmentResult': {'additionalProperties': False,
16637 'properties': {'error': {'$ref': '#/definitions/Error'},
16638 'result': {'$ref': '#/definitions/VolumeAttachment'}},
16639 'required': ['result'],
16640 'type': 'object'},
16641 'VolumeAttachmentResults': {'additionalProperties': False,
16642 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'},
16643 'type': 'array'}},
16644 'type': 'object'},
16645 'VolumeAttachments': {'additionalProperties': False,
16646 'properties': {'volumeattachments': {'items': {'$ref': '#/definitions/VolumeAttachment'},
16647 'type': 'array'}},
16648 'required': ['volumeattachments'],
16649 'type': 'object'},
16650 'VolumeInfo': {'additionalProperties': False,
16651 'properties': {'hardwareid': {'type': 'string'},
16652 'persistent': {'type': 'boolean'},
16653 'size': {'type': 'integer'},
16654 'volumeid': {'type': 'string'}},
16655 'required': ['volumeid', 'size', 'persistent'],
16656 'type': 'object'},
16657 'VolumeParams': {'additionalProperties': False,
16658 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'},
16659 'attributes': {'patternProperties': {'.*': {'additionalProperties': True,
16660 'type': 'object'}},
16661 'type': 'object'},
16662 'provider': {'type': 'string'},
16663 'size': {'type': 'integer'},
16664 'tags': {'patternProperties': {'.*': {'type': 'string'}},
16665 'type': 'object'},
16666 'volumetag': {'type': 'string'}},
16667 'required': ['volumetag', 'size', 'provider'],
16668 'type': 'object'},
16669 'VolumeParamsResult': {'additionalProperties': False,
16670 'properties': {'error': {'$ref': '#/definitions/Error'},
16671 'result': {'$ref': '#/definitions/VolumeParams'}},
16672 'required': ['result'],
16673 'type': 'object'},
16674 'VolumeParamsResults': {'additionalProperties': False,
16675 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'},
16676 'type': 'array'}},
16677 'type': 'object'},
16678 'VolumeResult': {'additionalProperties': False,
16679 'properties': {'error': {'$ref': '#/definitions/Error'},
16680 'result': {'$ref': '#/definitions/Volume'}},
16681 'required': ['result'],
16682 'type': 'object'},
16683 'VolumeResults': {'additionalProperties': False,
16684 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'},
16685 'type': 'array'}},
16686 'type': 'object'},
16687 'Volumes': {'additionalProperties': False,
16688 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'},
16689 'type': 'array'}},
16690 'required': ['volumes'],
16691 'type': 'object'},
16692 'caveat': {'additionalProperties': False,
16693 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
16694 'location': {'$ref': '#/definitions/packet'},
16695 'verificationId': {'$ref': '#/definitions/packet'}},
16696 'required': ['location',
16697 'caveatId',
16698 'verificationId'],
16699 'type': 'object'},
16700 'packet': {'additionalProperties': False,
16701 'properties': {'headerLen': {'type': 'integer'},
16702 'start': {'type': 'integer'},
16703 'totalLen': {'type': 'integer'}},
16704 'required': ['start', 'totalLen', 'headerLen'],
16705 'type': 'object'}},
16706 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16707 'Result': {'$ref': '#/definitions/LifeResults'}},
16708 'type': 'object'},
16709 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16710 'Result': {'$ref': '#/definitions/ErrorResults'}},
16711 'type': 'object'},
16712 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16713 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}},
16714 'type': 'object'},
16715 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16716 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}},
16717 'type': 'object'},
16718 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16719 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}},
16720 'type': 'object'},
16721 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16722 'Result': {'$ref': '#/definitions/FilesystemResults'}},
16723 'type': 'object'},
16724 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16725 'Result': {'$ref': '#/definitions/StringResults'}},
16726 'type': 'object'},
16727 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16728 'Result': {'$ref': '#/definitions/LifeResults'}},
16729 'type': 'object'},
16730 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
16731 'type': 'object'},
16732 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16733 'Result': {'$ref': '#/definitions/ErrorResults'}},
16734 'type': 'object'},
16735 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16736 'Result': {'$ref': '#/definitions/ErrorResults'}},
16737 'type': 'object'},
16738 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'},
16739 'Result': {'$ref': '#/definitions/ErrorResults'}},
16740 'type': 'object'},
16741 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'},
16742 'Result': {'$ref': '#/definitions/ErrorResults'}},
16743 'type': 'object'},
16744 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16745 'Result': {'$ref': '#/definitions/ErrorResults'}},
16746 'type': 'object'},
16747 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'},
16748 'Result': {'$ref': '#/definitions/ErrorResults'}},
16749 'type': 'object'},
16750 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'},
16751 'Result': {'$ref': '#/definitions/ErrorResults'}},
16752 'type': 'object'},
16753 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
16754 'Result': {'$ref': '#/definitions/ErrorResults'}},
16755 'type': 'object'},
16756 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16757 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}},
16758 'type': 'object'},
16759 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16760 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}},
16761 'type': 'object'},
16762 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'},
16763 'Result': {'$ref': '#/definitions/BlockDeviceResults'}},
16764 'type': 'object'},
16765 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16766 'Result': {'$ref': '#/definitions/VolumeParamsResults'}},
16767 'type': 'object'},
16768 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16769 'Result': {'$ref': '#/definitions/VolumeResults'}},
16770 'type': 'object'},
16771 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16772 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16773 'type': 'object'},
16774 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16775 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16776 'type': 'object'},
16777 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16778 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16779 'type': 'object'},
16780 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
16781 'type': 'object'},
16782 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16783 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
16784 'type': 'object'},
16785 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16786 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}},
16787 'type': 'object'},
16788 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
16789 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
16790 'type': 'object'}},
16791 'type': 'object'}
16792
16793
16794 @ReturnMapping(LifeResults)
16795 async def AttachmentLife(self, ids):
16796 '''
16797 ids : typing.Sequence[~MachineStorageId]
16798 Returns -> typing.Sequence[~LifeResult]
16799 '''
16800 # map input types to rpc msg
16801 params = dict()
16802 msg = dict(Type='StorageProvisioner', Request='AttachmentLife', Version=2, Params=params)
16803 params['ids'] = ids
16804 reply = await self.rpc(msg)
16805 return reply
16806
16807
16808
16809 @ReturnMapping(ErrorResults)
16810 async def EnsureDead(self, entities):
16811 '''
16812 entities : typing.Sequence[~Entity]
16813 Returns -> typing.Sequence[~ErrorResult]
16814 '''
16815 # map input types to rpc msg
16816 params = dict()
16817 msg = dict(Type='StorageProvisioner', Request='EnsureDead', Version=2, Params=params)
16818 params['Entities'] = entities
16819 reply = await self.rpc(msg)
16820 return reply
16821
16822
16823
16824 @ReturnMapping(FilesystemAttachmentParamsResults)
16825 async def FilesystemAttachmentParams(self, ids):
16826 '''
16827 ids : typing.Sequence[~MachineStorageId]
16828 Returns -> typing.Sequence[~FilesystemAttachmentParamsResult]
16829 '''
16830 # map input types to rpc msg
16831 params = dict()
16832 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachmentParams', Version=2, Params=params)
16833 params['ids'] = ids
16834 reply = await self.rpc(msg)
16835 return reply
16836
16837
16838
16839 @ReturnMapping(FilesystemAttachmentResults)
16840 async def FilesystemAttachments(self, ids):
16841 '''
16842 ids : typing.Sequence[~MachineStorageId]
16843 Returns -> typing.Sequence[~FilesystemAttachmentResult]
16844 '''
16845 # map input types to rpc msg
16846 params = dict()
16847 msg = dict(Type='StorageProvisioner', Request='FilesystemAttachments', Version=2, Params=params)
16848 params['ids'] = ids
16849 reply = await self.rpc(msg)
16850 return reply
16851
16852
16853
16854 @ReturnMapping(FilesystemParamsResults)
16855 async def FilesystemParams(self, entities):
16856 '''
16857 entities : typing.Sequence[~Entity]
16858 Returns -> typing.Sequence[~FilesystemParamsResult]
16859 '''
16860 # map input types to rpc msg
16861 params = dict()
16862 msg = dict(Type='StorageProvisioner', Request='FilesystemParams', Version=2, Params=params)
16863 params['Entities'] = entities
16864 reply = await self.rpc(msg)
16865 return reply
16866
16867
16868
16869 @ReturnMapping(FilesystemResults)
16870 async def Filesystems(self, entities):
16871 '''
16872 entities : typing.Sequence[~Entity]
16873 Returns -> typing.Sequence[~FilesystemResult]
16874 '''
16875 # map input types to rpc msg
16876 params = dict()
16877 msg = dict(Type='StorageProvisioner', Request='Filesystems', Version=2, Params=params)
16878 params['Entities'] = entities
16879 reply = await self.rpc(msg)
16880 return reply
16881
16882
16883
16884 @ReturnMapping(StringResults)
16885 async def InstanceId(self, entities):
16886 '''
16887 entities : typing.Sequence[~Entity]
16888 Returns -> typing.Sequence[~StringResult]
16889 '''
16890 # map input types to rpc msg
16891 params = dict()
16892 msg = dict(Type='StorageProvisioner', Request='InstanceId', Version=2, Params=params)
16893 params['Entities'] = entities
16894 reply = await self.rpc(msg)
16895 return reply
16896
16897
16898
16899 @ReturnMapping(LifeResults)
16900 async def Life(self, entities):
16901 '''
16902 entities : typing.Sequence[~Entity]
16903 Returns -> typing.Sequence[~LifeResult]
16904 '''
16905 # map input types to rpc msg
16906 params = dict()
16907 msg = dict(Type='StorageProvisioner', Request='Life', Version=2, Params=params)
16908 params['Entities'] = entities
16909 reply = await self.rpc(msg)
16910 return reply
16911
16912
16913
16914 @ReturnMapping(ModelConfigResult)
16915 async def ModelConfig(self):
16916 '''
16917
16918 Returns -> typing.Mapping[str, typing.Any]
16919 '''
16920 # map input types to rpc msg
16921 params = dict()
16922 msg = dict(Type='StorageProvisioner', Request='ModelConfig', Version=2, Params=params)
16923
16924 reply = await self.rpc(msg)
16925 return reply
16926
16927
16928
16929 @ReturnMapping(ErrorResults)
16930 async def Remove(self, entities):
16931 '''
16932 entities : typing.Sequence[~Entity]
16933 Returns -> typing.Sequence[~ErrorResult]
16934 '''
16935 # map input types to rpc msg
16936 params = dict()
16937 msg = dict(Type='StorageProvisioner', Request='Remove', Version=2, Params=params)
16938 params['Entities'] = entities
16939 reply = await self.rpc(msg)
16940 return reply
16941
16942
16943
16944 @ReturnMapping(ErrorResults)
16945 async def RemoveAttachment(self, ids):
16946 '''
16947 ids : typing.Sequence[~MachineStorageId]
16948 Returns -> typing.Sequence[~ErrorResult]
16949 '''
16950 # map input types to rpc msg
16951 params = dict()
16952 msg = dict(Type='StorageProvisioner', Request='RemoveAttachment', Version=2, Params=params)
16953 params['ids'] = ids
16954 reply = await self.rpc(msg)
16955 return reply
16956
16957
16958
16959 @ReturnMapping(ErrorResults)
16960 async def SetFilesystemAttachmentInfo(self, filesystemattachments):
16961 '''
16962 filesystemattachments : typing.Sequence[~FilesystemAttachment]
16963 Returns -> typing.Sequence[~ErrorResult]
16964 '''
16965 # map input types to rpc msg
16966 params = dict()
16967 msg = dict(Type='StorageProvisioner', Request='SetFilesystemAttachmentInfo', Version=2, Params=params)
16968 params['filesystemattachments'] = filesystemattachments
16969 reply = await self.rpc(msg)
16970 return reply
16971
16972
16973
16974 @ReturnMapping(ErrorResults)
16975 async def SetFilesystemInfo(self, filesystems):
16976 '''
16977 filesystems : typing.Sequence[~Filesystem]
16978 Returns -> typing.Sequence[~ErrorResult]
16979 '''
16980 # map input types to rpc msg
16981 params = dict()
16982 msg = dict(Type='StorageProvisioner', Request='SetFilesystemInfo', Version=2, Params=params)
16983 params['filesystems'] = filesystems
16984 reply = await self.rpc(msg)
16985 return reply
16986
16987
16988
16989 @ReturnMapping(ErrorResults)
16990 async def SetStatus(self, entities):
16991 '''
16992 entities : typing.Sequence[~EntityStatusArgs]
16993 Returns -> typing.Sequence[~ErrorResult]
16994 '''
16995 # map input types to rpc msg
16996 params = dict()
16997 msg = dict(Type='StorageProvisioner', Request='SetStatus', Version=2, Params=params)
16998 params['Entities'] = entities
16999 reply = await self.rpc(msg)
17000 return reply
17001
17002
17003
17004 @ReturnMapping(ErrorResults)
17005 async def SetVolumeAttachmentInfo(self, volumeattachments):
17006 '''
17007 volumeattachments : typing.Sequence[~VolumeAttachment]
17008 Returns -> typing.Sequence[~ErrorResult]
17009 '''
17010 # map input types to rpc msg
17011 params = dict()
17012 msg = dict(Type='StorageProvisioner', Request='SetVolumeAttachmentInfo', Version=2, Params=params)
17013 params['volumeattachments'] = volumeattachments
17014 reply = await self.rpc(msg)
17015 return reply
17016
17017
17018
17019 @ReturnMapping(ErrorResults)
17020 async def SetVolumeInfo(self, volumes):
17021 '''
17022 volumes : typing.Sequence[~Volume]
17023 Returns -> typing.Sequence[~ErrorResult]
17024 '''
17025 # map input types to rpc msg
17026 params = dict()
17027 msg = dict(Type='StorageProvisioner', Request='SetVolumeInfo', Version=2, Params=params)
17028 params['volumes'] = volumes
17029 reply = await self.rpc(msg)
17030 return reply
17031
17032
17033
17034 @ReturnMapping(ErrorResults)
17035 async def UpdateStatus(self, entities):
17036 '''
17037 entities : typing.Sequence[~EntityStatusArgs]
17038 Returns -> typing.Sequence[~ErrorResult]
17039 '''
17040 # map input types to rpc msg
17041 params = dict()
17042 msg = dict(Type='StorageProvisioner', Request='UpdateStatus', Version=2, Params=params)
17043 params['Entities'] = entities
17044 reply = await self.rpc(msg)
17045 return reply
17046
17047
17048
17049 @ReturnMapping(VolumeAttachmentParamsResults)
17050 async def VolumeAttachmentParams(self, ids):
17051 '''
17052 ids : typing.Sequence[~MachineStorageId]
17053 Returns -> typing.Sequence[~VolumeAttachmentParamsResult]
17054 '''
17055 # map input types to rpc msg
17056 params = dict()
17057 msg = dict(Type='StorageProvisioner', Request='VolumeAttachmentParams', Version=2, Params=params)
17058 params['ids'] = ids
17059 reply = await self.rpc(msg)
17060 return reply
17061
17062
17063
17064 @ReturnMapping(VolumeAttachmentResults)
17065 async def VolumeAttachments(self, ids):
17066 '''
17067 ids : typing.Sequence[~MachineStorageId]
17068 Returns -> typing.Sequence[~VolumeAttachmentResult]
17069 '''
17070 # map input types to rpc msg
17071 params = dict()
17072 msg = dict(Type='StorageProvisioner', Request='VolumeAttachments', Version=2, Params=params)
17073 params['ids'] = ids
17074 reply = await self.rpc(msg)
17075 return reply
17076
17077
17078
17079 @ReturnMapping(BlockDeviceResults)
17080 async def VolumeBlockDevices(self, ids):
17081 '''
17082 ids : typing.Sequence[~MachineStorageId]
17083 Returns -> typing.Sequence[~BlockDeviceResult]
17084 '''
17085 # map input types to rpc msg
17086 params = dict()
17087 msg = dict(Type='StorageProvisioner', Request='VolumeBlockDevices', Version=2, Params=params)
17088 params['ids'] = ids
17089 reply = await self.rpc(msg)
17090 return reply
17091
17092
17093
17094 @ReturnMapping(VolumeParamsResults)
17095 async def VolumeParams(self, entities):
17096 '''
17097 entities : typing.Sequence[~Entity]
17098 Returns -> typing.Sequence[~VolumeParamsResult]
17099 '''
17100 # map input types to rpc msg
17101 params = dict()
17102 msg = dict(Type='StorageProvisioner', Request='VolumeParams', Version=2, Params=params)
17103 params['Entities'] = entities
17104 reply = await self.rpc(msg)
17105 return reply
17106
17107
17108
17109 @ReturnMapping(VolumeResults)
17110 async def Volumes(self, entities):
17111 '''
17112 entities : typing.Sequence[~Entity]
17113 Returns -> typing.Sequence[~VolumeResult]
17114 '''
17115 # map input types to rpc msg
17116 params = dict()
17117 msg = dict(Type='StorageProvisioner', Request='Volumes', Version=2, Params=params)
17118 params['Entities'] = entities
17119 reply = await self.rpc(msg)
17120 return reply
17121
17122
17123
17124 @ReturnMapping(NotifyWatchResults)
17125 async def WatchBlockDevices(self, entities):
17126 '''
17127 entities : typing.Sequence[~Entity]
17128 Returns -> typing.Sequence[~NotifyWatchResult]
17129 '''
17130 # map input types to rpc msg
17131 params = dict()
17132 msg = dict(Type='StorageProvisioner', Request='WatchBlockDevices', Version=2, Params=params)
17133 params['Entities'] = entities
17134 reply = await self.rpc(msg)
17135 return reply
17136
17137
17138
17139 @ReturnMapping(MachineStorageIdsWatchResults)
17140 async def WatchFilesystemAttachments(self, entities):
17141 '''
17142 entities : typing.Sequence[~Entity]
17143 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17144 '''
17145 # map input types to rpc msg
17146 params = dict()
17147 msg = dict(Type='StorageProvisioner', Request='WatchFilesystemAttachments', Version=2, Params=params)
17148 params['Entities'] = entities
17149 reply = await self.rpc(msg)
17150 return reply
17151
17152
17153
17154 @ReturnMapping(StringsWatchResults)
17155 async def WatchFilesystems(self, entities):
17156 '''
17157 entities : typing.Sequence[~Entity]
17158 Returns -> typing.Sequence[~StringsWatchResult]
17159 '''
17160 # map input types to rpc msg
17161 params = dict()
17162 msg = dict(Type='StorageProvisioner', Request='WatchFilesystems', Version=2, Params=params)
17163 params['Entities'] = entities
17164 reply = await self.rpc(msg)
17165 return reply
17166
17167
17168
17169 @ReturnMapping(NotifyWatchResult)
17170 async def WatchForModelConfigChanges(self):
17171 '''
17172
17173 Returns -> typing.Union[_ForwardRef('Error'), str]
17174 '''
17175 # map input types to rpc msg
17176 params = dict()
17177 msg = dict(Type='StorageProvisioner', Request='WatchForModelConfigChanges', Version=2, Params=params)
17178
17179 reply = await self.rpc(msg)
17180 return reply
17181
17182
17183
17184 @ReturnMapping(NotifyWatchResults)
17185 async def WatchMachines(self, entities):
17186 '''
17187 entities : typing.Sequence[~Entity]
17188 Returns -> typing.Sequence[~NotifyWatchResult]
17189 '''
17190 # map input types to rpc msg
17191 params = dict()
17192 msg = dict(Type='StorageProvisioner', Request='WatchMachines', Version=2, Params=params)
17193 params['Entities'] = entities
17194 reply = await self.rpc(msg)
17195 return reply
17196
17197
17198
17199 @ReturnMapping(MachineStorageIdsWatchResults)
17200 async def WatchVolumeAttachments(self, entities):
17201 '''
17202 entities : typing.Sequence[~Entity]
17203 Returns -> typing.Sequence[~MachineStorageIdsWatchResult]
17204 '''
17205 # map input types to rpc msg
17206 params = dict()
17207 msg = dict(Type='StorageProvisioner', Request='WatchVolumeAttachments', Version=2, Params=params)
17208 params['Entities'] = entities
17209 reply = await self.rpc(msg)
17210 return reply
17211
17212
17213
17214 @ReturnMapping(StringsWatchResults)
17215 async def WatchVolumes(self, entities):
17216 '''
17217 entities : typing.Sequence[~Entity]
17218 Returns -> typing.Sequence[~StringsWatchResult]
17219 '''
17220 # map input types to rpc msg
17221 params = dict()
17222 msg = dict(Type='StorageProvisioner', Request='WatchVolumes', Version=2, Params=params)
17223 params['Entities'] = entities
17224 reply = await self.rpc(msg)
17225 return reply
17226
17227
17228 class StringsWatcher(Type):
17229 name = 'StringsWatcher'
17230 version = 1
17231 schema = {'definitions': {'Error': {'additionalProperties': False,
17232 'properties': {'Code': {'type': 'string'},
17233 'Info': {'$ref': '#/definitions/ErrorInfo'},
17234 'Message': {'type': 'string'}},
17235 'required': ['Message', 'Code'],
17236 'type': 'object'},
17237 'ErrorInfo': {'additionalProperties': False,
17238 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17239 'MacaroonPath': {'type': 'string'}},
17240 'type': 'object'},
17241 'Macaroon': {'additionalProperties': False,
17242 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17243 'type': 'array'},
17244 'data': {'items': {'type': 'integer'},
17245 'type': 'array'},
17246 'id': {'$ref': '#/definitions/packet'},
17247 'location': {'$ref': '#/definitions/packet'},
17248 'sig': {'items': {'type': 'integer'},
17249 'type': 'array'}},
17250 'required': ['data',
17251 'location',
17252 'id',
17253 'caveats',
17254 'sig'],
17255 'type': 'object'},
17256 'StringsWatchResult': {'additionalProperties': False,
17257 'properties': {'Changes': {'items': {'type': 'string'},
17258 'type': 'array'},
17259 'Error': {'$ref': '#/definitions/Error'},
17260 'StringsWatcherId': {'type': 'string'}},
17261 'required': ['StringsWatcherId',
17262 'Changes',
17263 'Error'],
17264 'type': 'object'},
17265 'caveat': {'additionalProperties': False,
17266 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17267 'location': {'$ref': '#/definitions/packet'},
17268 'verificationId': {'$ref': '#/definitions/packet'}},
17269 'required': ['location',
17270 'caveatId',
17271 'verificationId'],
17272 'type': 'object'},
17273 'packet': {'additionalProperties': False,
17274 'properties': {'headerLen': {'type': 'integer'},
17275 'start': {'type': 'integer'},
17276 'totalLen': {'type': 'integer'}},
17277 'required': ['start', 'totalLen', 'headerLen'],
17278 'type': 'object'}},
17279 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17280 'type': 'object'},
17281 'Stop': {'type': 'object'}},
17282 'type': 'object'}
17283
17284
17285 @ReturnMapping(StringsWatchResult)
17286 async def Next(self):
17287 '''
17288
17289 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17290 '''
17291 # map input types to rpc msg
17292 params = dict()
17293 msg = dict(Type='StringsWatcher', Request='Next', Version=1, Params=params)
17294
17295 reply = await self.rpc(msg)
17296 return reply
17297
17298
17299
17300 @ReturnMapping(None)
17301 async def Stop(self):
17302 '''
17303
17304 Returns -> None
17305 '''
17306 # map input types to rpc msg
17307 params = dict()
17308 msg = dict(Type='StringsWatcher', Request='Stop', Version=1, Params=params)
17309
17310 reply = await self.rpc(msg)
17311 return reply
17312
17313
17314 class Subnets(Type):
17315 name = 'Subnets'
17316 version = 2
17317 schema = {'definitions': {'AddSubnetParams': {'additionalProperties': False,
17318 'properties': {'SpaceTag': {'type': 'string'},
17319 'SubnetProviderId': {'type': 'string'},
17320 'SubnetTag': {'type': 'string'},
17321 'Zones': {'items': {'type': 'string'},
17322 'type': 'array'}},
17323 'required': ['SpaceTag'],
17324 'type': 'object'},
17325 'AddSubnetsParams': {'additionalProperties': False,
17326 'properties': {'Subnets': {'items': {'$ref': '#/definitions/AddSubnetParams'},
17327 'type': 'array'}},
17328 'required': ['Subnets'],
17329 'type': 'object'},
17330 'Error': {'additionalProperties': False,
17331 'properties': {'Code': {'type': 'string'},
17332 'Info': {'$ref': '#/definitions/ErrorInfo'},
17333 'Message': {'type': 'string'}},
17334 'required': ['Message', 'Code'],
17335 'type': 'object'},
17336 'ErrorInfo': {'additionalProperties': False,
17337 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17338 'MacaroonPath': {'type': 'string'}},
17339 'type': 'object'},
17340 'ErrorResult': {'additionalProperties': False,
17341 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17342 'required': ['Error'],
17343 'type': 'object'},
17344 'ErrorResults': {'additionalProperties': False,
17345 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17346 'type': 'array'}},
17347 'required': ['Results'],
17348 'type': 'object'},
17349 'ListSubnetsResults': {'additionalProperties': False,
17350 'properties': {'Results': {'items': {'$ref': '#/definitions/Subnet'},
17351 'type': 'array'}},
17352 'required': ['Results'],
17353 'type': 'object'},
17354 'Macaroon': {'additionalProperties': False,
17355 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17356 'type': 'array'},
17357 'data': {'items': {'type': 'integer'},
17358 'type': 'array'},
17359 'id': {'$ref': '#/definitions/packet'},
17360 'location': {'$ref': '#/definitions/packet'},
17361 'sig': {'items': {'type': 'integer'},
17362 'type': 'array'}},
17363 'required': ['data',
17364 'location',
17365 'id',
17366 'caveats',
17367 'sig'],
17368 'type': 'object'},
17369 'SpaceResult': {'additionalProperties': False,
17370 'properties': {'Error': {'$ref': '#/definitions/Error'},
17371 'Tag': {'type': 'string'}},
17372 'required': ['Error', 'Tag'],
17373 'type': 'object'},
17374 'SpaceResults': {'additionalProperties': False,
17375 'properties': {'Results': {'items': {'$ref': '#/definitions/SpaceResult'},
17376 'type': 'array'}},
17377 'required': ['Results'],
17378 'type': 'object'},
17379 'Subnet': {'additionalProperties': False,
17380 'properties': {'CIDR': {'type': 'string'},
17381 'Life': {'type': 'string'},
17382 'ProviderId': {'type': 'string'},
17383 'SpaceTag': {'type': 'string'},
17384 'StaticRangeHighIP': {'items': {'type': 'integer'},
17385 'type': 'array'},
17386 'StaticRangeLowIP': {'items': {'type': 'integer'},
17387 'type': 'array'},
17388 'Status': {'type': 'string'},
17389 'VLANTag': {'type': 'integer'},
17390 'Zones': {'items': {'type': 'string'},
17391 'type': 'array'}},
17392 'required': ['CIDR',
17393 'VLANTag',
17394 'Life',
17395 'SpaceTag',
17396 'Zones'],
17397 'type': 'object'},
17398 'SubnetsFilters': {'additionalProperties': False,
17399 'properties': {'SpaceTag': {'type': 'string'},
17400 'Zone': {'type': 'string'}},
17401 'type': 'object'},
17402 'ZoneResult': {'additionalProperties': False,
17403 'properties': {'Available': {'type': 'boolean'},
17404 'Error': {'$ref': '#/definitions/Error'},
17405 'Name': {'type': 'string'}},
17406 'required': ['Error', 'Name', 'Available'],
17407 'type': 'object'},
17408 'ZoneResults': {'additionalProperties': False,
17409 'properties': {'Results': {'items': {'$ref': '#/definitions/ZoneResult'},
17410 'type': 'array'}},
17411 'required': ['Results'],
17412 'type': 'object'},
17413 'caveat': {'additionalProperties': False,
17414 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17415 'location': {'$ref': '#/definitions/packet'},
17416 'verificationId': {'$ref': '#/definitions/packet'}},
17417 'required': ['location',
17418 'caveatId',
17419 'verificationId'],
17420 'type': 'object'},
17421 'packet': {'additionalProperties': False,
17422 'properties': {'headerLen': {'type': 'integer'},
17423 'start': {'type': 'integer'},
17424 'totalLen': {'type': 'integer'}},
17425 'required': ['start', 'totalLen', 'headerLen'],
17426 'type': 'object'}},
17427 'properties': {'AddSubnets': {'properties': {'Params': {'$ref': '#/definitions/AddSubnetsParams'},
17428 'Result': {'$ref': '#/definitions/ErrorResults'}},
17429 'type': 'object'},
17430 'AllSpaces': {'properties': {'Result': {'$ref': '#/definitions/SpaceResults'}},
17431 'type': 'object'},
17432 'AllZones': {'properties': {'Result': {'$ref': '#/definitions/ZoneResults'}},
17433 'type': 'object'},
17434 'ListSubnets': {'properties': {'Params': {'$ref': '#/definitions/SubnetsFilters'},
17435 'Result': {'$ref': '#/definitions/ListSubnetsResults'}},
17436 'type': 'object'}},
17437 'type': 'object'}
17438
17439
17440 @ReturnMapping(ErrorResults)
17441 async def AddSubnets(self, subnets):
17442 '''
17443 subnets : typing.Sequence[~AddSubnetParams]
17444 Returns -> typing.Sequence[~ErrorResult]
17445 '''
17446 # map input types to rpc msg
17447 params = dict()
17448 msg = dict(Type='Subnets', Request='AddSubnets', Version=2, Params=params)
17449 params['Subnets'] = subnets
17450 reply = await self.rpc(msg)
17451 return reply
17452
17453
17454
17455 @ReturnMapping(SpaceResults)
17456 async def AllSpaces(self):
17457 '''
17458
17459 Returns -> typing.Sequence[~SpaceResult]
17460 '''
17461 # map input types to rpc msg
17462 params = dict()
17463 msg = dict(Type='Subnets', Request='AllSpaces', Version=2, Params=params)
17464
17465 reply = await self.rpc(msg)
17466 return reply
17467
17468
17469
17470 @ReturnMapping(ZoneResults)
17471 async def AllZones(self):
17472 '''
17473
17474 Returns -> typing.Sequence[~ZoneResult]
17475 '''
17476 # map input types to rpc msg
17477 params = dict()
17478 msg = dict(Type='Subnets', Request='AllZones', Version=2, Params=params)
17479
17480 reply = await self.rpc(msg)
17481 return reply
17482
17483
17484
17485 @ReturnMapping(ListSubnetsResults)
17486 async def ListSubnets(self, spacetag, zone):
17487 '''
17488 spacetag : str
17489 zone : str
17490 Returns -> typing.Sequence[~Subnet]
17491 '''
17492 # map input types to rpc msg
17493 params = dict()
17494 msg = dict(Type='Subnets', Request='ListSubnets', Version=2, Params=params)
17495 params['SpaceTag'] = spacetag
17496 params['Zone'] = zone
17497 reply = await self.rpc(msg)
17498 return reply
17499
17500
17501 class Undertaker(Type):
17502 name = 'Undertaker'
17503 version = 1
17504 schema = {'definitions': {'EntityStatusArgs': {'additionalProperties': False,
17505 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17506 'type': 'object'}},
17507 'type': 'object'},
17508 'Info': {'type': 'string'},
17509 'Status': {'type': 'string'},
17510 'Tag': {'type': 'string'}},
17511 'required': ['Tag',
17512 'Status',
17513 'Info',
17514 'Data'],
17515 'type': 'object'},
17516 'Error': {'additionalProperties': False,
17517 'properties': {'Code': {'type': 'string'},
17518 'Info': {'$ref': '#/definitions/ErrorInfo'},
17519 'Message': {'type': 'string'}},
17520 'required': ['Message', 'Code'],
17521 'type': 'object'},
17522 'ErrorInfo': {'additionalProperties': False,
17523 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17524 'MacaroonPath': {'type': 'string'}},
17525 'type': 'object'},
17526 'ErrorResult': {'additionalProperties': False,
17527 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17528 'required': ['Error'],
17529 'type': 'object'},
17530 'ErrorResults': {'additionalProperties': False,
17531 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17532 'type': 'array'}},
17533 'required': ['Results'],
17534 'type': 'object'},
17535 'Macaroon': {'additionalProperties': False,
17536 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17537 'type': 'array'},
17538 'data': {'items': {'type': 'integer'},
17539 'type': 'array'},
17540 'id': {'$ref': '#/definitions/packet'},
17541 'location': {'$ref': '#/definitions/packet'},
17542 'sig': {'items': {'type': 'integer'},
17543 'type': 'array'}},
17544 'required': ['data',
17545 'location',
17546 'id',
17547 'caveats',
17548 'sig'],
17549 'type': 'object'},
17550 'ModelConfigResult': {'additionalProperties': False,
17551 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
17552 'type': 'object'}},
17553 'type': 'object'}},
17554 'required': ['Config'],
17555 'type': 'object'},
17556 'NotifyWatchResult': {'additionalProperties': False,
17557 'properties': {'Error': {'$ref': '#/definitions/Error'},
17558 'NotifyWatcherId': {'type': 'string'}},
17559 'required': ['NotifyWatcherId', 'Error'],
17560 'type': 'object'},
17561 'NotifyWatchResults': {'additionalProperties': False,
17562 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
17563 'type': 'array'}},
17564 'required': ['Results'],
17565 'type': 'object'},
17566 'SetStatus': {'additionalProperties': False,
17567 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17568 'type': 'array'}},
17569 'required': ['Entities'],
17570 'type': 'object'},
17571 'UndertakerModelInfo': {'additionalProperties': False,
17572 'properties': {'GlobalName': {'type': 'string'},
17573 'IsSystem': {'type': 'boolean'},
17574 'Life': {'type': 'string'},
17575 'Name': {'type': 'string'},
17576 'UUID': {'type': 'string'}},
17577 'required': ['UUID',
17578 'Name',
17579 'GlobalName',
17580 'IsSystem',
17581 'Life'],
17582 'type': 'object'},
17583 'UndertakerModelInfoResult': {'additionalProperties': False,
17584 'properties': {'Error': {'$ref': '#/definitions/Error'},
17585 'Result': {'$ref': '#/definitions/UndertakerModelInfo'}},
17586 'required': ['Error', 'Result'],
17587 'type': 'object'},
17588 'caveat': {'additionalProperties': False,
17589 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17590 'location': {'$ref': '#/definitions/packet'},
17591 'verificationId': {'$ref': '#/definitions/packet'}},
17592 'required': ['location',
17593 'caveatId',
17594 'verificationId'],
17595 'type': 'object'},
17596 'packet': {'additionalProperties': False,
17597 'properties': {'headerLen': {'type': 'integer'},
17598 'start': {'type': 'integer'},
17599 'totalLen': {'type': 'integer'}},
17600 'required': ['start', 'totalLen', 'headerLen'],
17601 'type': 'object'}},
17602 'properties': {'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
17603 'type': 'object'},
17604 'ModelInfo': {'properties': {'Result': {'$ref': '#/definitions/UndertakerModelInfoResult'}},
17605 'type': 'object'},
17606 'ProcessDyingModel': {'type': 'object'},
17607 'RemoveModel': {'type': 'object'},
17608 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17609 'Result': {'$ref': '#/definitions/ErrorResults'}},
17610 'type': 'object'},
17611 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17612 'Result': {'$ref': '#/definitions/ErrorResults'}},
17613 'type': 'object'},
17614 'WatchModelResources': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
17615 'type': 'object'}},
17616 'type': 'object'}
17617
17618
17619 @ReturnMapping(ModelConfigResult)
17620 async def ModelConfig(self):
17621 '''
17622
17623 Returns -> typing.Mapping[str, typing.Any]
17624 '''
17625 # map input types to rpc msg
17626 params = dict()
17627 msg = dict(Type='Undertaker', Request='ModelConfig', Version=1, Params=params)
17628
17629 reply = await self.rpc(msg)
17630 return reply
17631
17632
17633
17634 @ReturnMapping(UndertakerModelInfoResult)
17635 async def ModelInfo(self):
17636 '''
17637
17638 Returns -> typing.Union[_ForwardRef('Error'), _ForwardRef('UndertakerModelInfo')]
17639 '''
17640 # map input types to rpc msg
17641 params = dict()
17642 msg = dict(Type='Undertaker', Request='ModelInfo', Version=1, Params=params)
17643
17644 reply = await self.rpc(msg)
17645 return reply
17646
17647
17648
17649 @ReturnMapping(None)
17650 async def ProcessDyingModel(self):
17651 '''
17652
17653 Returns -> None
17654 '''
17655 # map input types to rpc msg
17656 params = dict()
17657 msg = dict(Type='Undertaker', Request='ProcessDyingModel', Version=1, Params=params)
17658
17659 reply = await self.rpc(msg)
17660 return reply
17661
17662
17663
17664 @ReturnMapping(None)
17665 async def RemoveModel(self):
17666 '''
17667
17668 Returns -> None
17669 '''
17670 # map input types to rpc msg
17671 params = dict()
17672 msg = dict(Type='Undertaker', Request='RemoveModel', Version=1, Params=params)
17673
17674 reply = await self.rpc(msg)
17675 return reply
17676
17677
17678
17679 @ReturnMapping(ErrorResults)
17680 async def SetStatus(self, entities):
17681 '''
17682 entities : typing.Sequence[~EntityStatusArgs]
17683 Returns -> typing.Sequence[~ErrorResult]
17684 '''
17685 # map input types to rpc msg
17686 params = dict()
17687 msg = dict(Type='Undertaker', Request='SetStatus', Version=1, Params=params)
17688 params['Entities'] = entities
17689 reply = await self.rpc(msg)
17690 return reply
17691
17692
17693
17694 @ReturnMapping(ErrorResults)
17695 async def UpdateStatus(self, entities):
17696 '''
17697 entities : typing.Sequence[~EntityStatusArgs]
17698 Returns -> typing.Sequence[~ErrorResult]
17699 '''
17700 # map input types to rpc msg
17701 params = dict()
17702 msg = dict(Type='Undertaker', Request='UpdateStatus', Version=1, Params=params)
17703 params['Entities'] = entities
17704 reply = await self.rpc(msg)
17705 return reply
17706
17707
17708
17709 @ReturnMapping(NotifyWatchResults)
17710 async def WatchModelResources(self):
17711 '''
17712
17713 Returns -> typing.Sequence[~NotifyWatchResult]
17714 '''
17715 # map input types to rpc msg
17716 params = dict()
17717 msg = dict(Type='Undertaker', Request='WatchModelResources', Version=1, Params=params)
17718
17719 reply = await self.rpc(msg)
17720 return reply
17721
17722
17723 class UnitAssigner(Type):
17724 name = 'UnitAssigner'
17725 version = 1
17726 schema = {'definitions': {'Entities': {'additionalProperties': False,
17727 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17728 'type': 'array'}},
17729 'required': ['Entities'],
17730 'type': 'object'},
17731 'Entity': {'additionalProperties': False,
17732 'properties': {'Tag': {'type': 'string'}},
17733 'required': ['Tag'],
17734 'type': 'object'},
17735 'EntityStatusArgs': {'additionalProperties': False,
17736 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17737 'type': 'object'}},
17738 'type': 'object'},
17739 'Info': {'type': 'string'},
17740 'Status': {'type': 'string'},
17741 'Tag': {'type': 'string'}},
17742 'required': ['Tag',
17743 'Status',
17744 'Info',
17745 'Data'],
17746 'type': 'object'},
17747 'Error': {'additionalProperties': False,
17748 'properties': {'Code': {'type': 'string'},
17749 'Info': {'$ref': '#/definitions/ErrorInfo'},
17750 'Message': {'type': 'string'}},
17751 'required': ['Message', 'Code'],
17752 'type': 'object'},
17753 'ErrorInfo': {'additionalProperties': False,
17754 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
17755 'MacaroonPath': {'type': 'string'}},
17756 'type': 'object'},
17757 'ErrorResult': {'additionalProperties': False,
17758 'properties': {'Error': {'$ref': '#/definitions/Error'}},
17759 'required': ['Error'],
17760 'type': 'object'},
17761 'ErrorResults': {'additionalProperties': False,
17762 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
17763 'type': 'array'}},
17764 'required': ['Results'],
17765 'type': 'object'},
17766 'Macaroon': {'additionalProperties': False,
17767 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
17768 'type': 'array'},
17769 'data': {'items': {'type': 'integer'},
17770 'type': 'array'},
17771 'id': {'$ref': '#/definitions/packet'},
17772 'location': {'$ref': '#/definitions/packet'},
17773 'sig': {'items': {'type': 'integer'},
17774 'type': 'array'}},
17775 'required': ['data',
17776 'location',
17777 'id',
17778 'caveats',
17779 'sig'],
17780 'type': 'object'},
17781 'SetStatus': {'additionalProperties': False,
17782 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
17783 'type': 'array'}},
17784 'required': ['Entities'],
17785 'type': 'object'},
17786 'StringsWatchResult': {'additionalProperties': False,
17787 'properties': {'Changes': {'items': {'type': 'string'},
17788 'type': 'array'},
17789 'Error': {'$ref': '#/definitions/Error'},
17790 'StringsWatcherId': {'type': 'string'}},
17791 'required': ['StringsWatcherId',
17792 'Changes',
17793 'Error'],
17794 'type': 'object'},
17795 'caveat': {'additionalProperties': False,
17796 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
17797 'location': {'$ref': '#/definitions/packet'},
17798 'verificationId': {'$ref': '#/definitions/packet'}},
17799 'required': ['location',
17800 'caveatId',
17801 'verificationId'],
17802 'type': 'object'},
17803 'packet': {'additionalProperties': False,
17804 'properties': {'headerLen': {'type': 'integer'},
17805 'start': {'type': 'integer'},
17806 'totalLen': {'type': 'integer'}},
17807 'required': ['start', 'totalLen', 'headerLen'],
17808 'type': 'object'}},
17809 'properties': {'AssignUnits': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
17810 'Result': {'$ref': '#/definitions/ErrorResults'}},
17811 'type': 'object'},
17812 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
17813 'Result': {'$ref': '#/definitions/ErrorResults'}},
17814 'type': 'object'},
17815 'WatchUnitAssignments': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}},
17816 'type': 'object'}},
17817 'type': 'object'}
17818
17819
17820 @ReturnMapping(ErrorResults)
17821 async def AssignUnits(self, entities):
17822 '''
17823 entities : typing.Sequence[~Entity]
17824 Returns -> typing.Sequence[~ErrorResult]
17825 '''
17826 # map input types to rpc msg
17827 params = dict()
17828 msg = dict(Type='UnitAssigner', Request='AssignUnits', Version=1, Params=params)
17829 params['Entities'] = entities
17830 reply = await self.rpc(msg)
17831 return reply
17832
17833
17834
17835 @ReturnMapping(ErrorResults)
17836 async def SetAgentStatus(self, entities):
17837 '''
17838 entities : typing.Sequence[~EntityStatusArgs]
17839 Returns -> typing.Sequence[~ErrorResult]
17840 '''
17841 # map input types to rpc msg
17842 params = dict()
17843 msg = dict(Type='UnitAssigner', Request='SetAgentStatus', Version=1, Params=params)
17844 params['Entities'] = entities
17845 reply = await self.rpc(msg)
17846 return reply
17847
17848
17849
17850 @ReturnMapping(StringsWatchResult)
17851 async def WatchUnitAssignments(self):
17852 '''
17853
17854 Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error')]
17855 '''
17856 # map input types to rpc msg
17857 params = dict()
17858 msg = dict(Type='UnitAssigner', Request='WatchUnitAssignments', Version=1, Params=params)
17859
17860 reply = await self.rpc(msg)
17861 return reply
17862
17863
17864 class Uniter(Type):
17865 name = 'Uniter'
17866 version = 3
17867 schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False,
17868 'properties': {'Servers': {'items': {'items': {'$ref': '#/definitions/HostPort'},
17869 'type': 'array'},
17870 'type': 'array'}},
17871 'required': ['Servers'],
17872 'type': 'object'},
17873 'Action': {'additionalProperties': False,
17874 'properties': {'name': {'type': 'string'},
17875 'parameters': {'patternProperties': {'.*': {'additionalProperties': True,
17876 'type': 'object'}},
17877 'type': 'object'},
17878 'receiver': {'type': 'string'},
17879 'tag': {'type': 'string'}},
17880 'required': ['tag', 'receiver', 'name'],
17881 'type': 'object'},
17882 'ActionExecutionResult': {'additionalProperties': False,
17883 'properties': {'actiontag': {'type': 'string'},
17884 'message': {'type': 'string'},
17885 'results': {'patternProperties': {'.*': {'additionalProperties': True,
17886 'type': 'object'}},
17887 'type': 'object'},
17888 'status': {'type': 'string'}},
17889 'required': ['actiontag', 'status'],
17890 'type': 'object'},
17891 'ActionExecutionResults': {'additionalProperties': False,
17892 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'},
17893 'type': 'array'}},
17894 'type': 'object'},
17895 'ActionResult': {'additionalProperties': False,
17896 'properties': {'action': {'$ref': '#/definitions/Action'},
17897 'completed': {'format': 'date-time',
17898 'type': 'string'},
17899 'enqueued': {'format': 'date-time',
17900 'type': 'string'},
17901 'error': {'$ref': '#/definitions/Error'},
17902 'message': {'type': 'string'},
17903 'output': {'patternProperties': {'.*': {'additionalProperties': True,
17904 'type': 'object'}},
17905 'type': 'object'},
17906 'started': {'format': 'date-time',
17907 'type': 'string'},
17908 'status': {'type': 'string'}},
17909 'type': 'object'},
17910 'ActionResults': {'additionalProperties': False,
17911 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'},
17912 'type': 'array'}},
17913 'type': 'object'},
17914 'Address': {'additionalProperties': False,
17915 'properties': {'Scope': {'type': 'string'},
17916 'SpaceName': {'type': 'string'},
17917 'Type': {'type': 'string'},
17918 'Value': {'type': 'string'}},
17919 'required': ['Value', 'Type', 'Scope'],
17920 'type': 'object'},
17921 'BoolResult': {'additionalProperties': False,
17922 'properties': {'Error': {'$ref': '#/definitions/Error'},
17923 'Result': {'type': 'boolean'}},
17924 'required': ['Error', 'Result'],
17925 'type': 'object'},
17926 'BoolResults': {'additionalProperties': False,
17927 'properties': {'Results': {'items': {'$ref': '#/definitions/BoolResult'},
17928 'type': 'array'}},
17929 'required': ['Results'],
17930 'type': 'object'},
17931 'BytesResult': {'additionalProperties': False,
17932 'properties': {'Result': {'items': {'type': 'integer'},
17933 'type': 'array'}},
17934 'required': ['Result'],
17935 'type': 'object'},
17936 'CharmURL': {'additionalProperties': False,
17937 'properties': {'URL': {'type': 'string'}},
17938 'required': ['URL'],
17939 'type': 'object'},
17940 'CharmURLs': {'additionalProperties': False,
17941 'properties': {'URLs': {'items': {'$ref': '#/definitions/CharmURL'},
17942 'type': 'array'}},
17943 'required': ['URLs'],
17944 'type': 'object'},
17945 'ConfigSettingsResult': {'additionalProperties': False,
17946 'properties': {'Error': {'$ref': '#/definitions/Error'},
17947 'Settings': {'patternProperties': {'.*': {'additionalProperties': True,
17948 'type': 'object'}},
17949 'type': 'object'}},
17950 'required': ['Error', 'Settings'],
17951 'type': 'object'},
17952 'ConfigSettingsResults': {'additionalProperties': False,
17953 'properties': {'Results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'},
17954 'type': 'array'}},
17955 'required': ['Results'],
17956 'type': 'object'},
17957 'Endpoint': {'additionalProperties': False,
17958 'properties': {'Relation': {'$ref': '#/definitions/Relation'},
17959 'ServiceName': {'type': 'string'}},
17960 'required': ['ServiceName', 'Relation'],
17961 'type': 'object'},
17962 'Entities': {'additionalProperties': False,
17963 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
17964 'type': 'array'}},
17965 'required': ['Entities'],
17966 'type': 'object'},
17967 'EntitiesCharmURL': {'additionalProperties': False,
17968 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityCharmURL'},
17969 'type': 'array'}},
17970 'required': ['Entities'],
17971 'type': 'object'},
17972 'EntitiesPortRanges': {'additionalProperties': False,
17973 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityPortRange'},
17974 'type': 'array'}},
17975 'required': ['Entities'],
17976 'type': 'object'},
17977 'Entity': {'additionalProperties': False,
17978 'properties': {'Tag': {'type': 'string'}},
17979 'required': ['Tag'],
17980 'type': 'object'},
17981 'EntityCharmURL': {'additionalProperties': False,
17982 'properties': {'CharmURL': {'type': 'string'},
17983 'Tag': {'type': 'string'}},
17984 'required': ['Tag', 'CharmURL'],
17985 'type': 'object'},
17986 'EntityPortRange': {'additionalProperties': False,
17987 'properties': {'FromPort': {'type': 'integer'},
17988 'Protocol': {'type': 'string'},
17989 'Tag': {'type': 'string'},
17990 'ToPort': {'type': 'integer'}},
17991 'required': ['Tag',
17992 'Protocol',
17993 'FromPort',
17994 'ToPort'],
17995 'type': 'object'},
17996 'EntityStatusArgs': {'additionalProperties': False,
17997 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
17998 'type': 'object'}},
17999 'type': 'object'},
18000 'Info': {'type': 'string'},
18001 'Status': {'type': 'string'},
18002 'Tag': {'type': 'string'}},
18003 'required': ['Tag',
18004 'Status',
18005 'Info',
18006 'Data'],
18007 'type': 'object'},
18008 'Error': {'additionalProperties': False,
18009 'properties': {'Code': {'type': 'string'},
18010 'Info': {'$ref': '#/definitions/ErrorInfo'},
18011 'Message': {'type': 'string'}},
18012 'required': ['Message', 'Code'],
18013 'type': 'object'},
18014 'ErrorInfo': {'additionalProperties': False,
18015 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
18016 'MacaroonPath': {'type': 'string'}},
18017 'type': 'object'},
18018 'ErrorResult': {'additionalProperties': False,
18019 'properties': {'Error': {'$ref': '#/definitions/Error'}},
18020 'required': ['Error'],
18021 'type': 'object'},
18022 'ErrorResults': {'additionalProperties': False,
18023 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
18024 'type': 'array'}},
18025 'required': ['Results'],
18026 'type': 'object'},
18027 'GetLeadershipSettingsBulkResults': {'additionalProperties': False,
18028 'properties': {'Results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'},
18029 'type': 'array'}},
18030 'required': ['Results'],
18031 'type': 'object'},
18032 'GetLeadershipSettingsResult': {'additionalProperties': False,
18033 'properties': {'Error': {'$ref': '#/definitions/Error'},
18034 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18035 'type': 'object'}},
18036 'required': ['Settings',
18037 'Error'],
18038 'type': 'object'},
18039 'HostPort': {'additionalProperties': False,
18040 'properties': {'Address': {'$ref': '#/definitions/Address'},
18041 'Port': {'type': 'integer'}},
18042 'required': ['Address', 'Port'],
18043 'type': 'object'},
18044 'IntResult': {'additionalProperties': False,
18045 'properties': {'Error': {'$ref': '#/definitions/Error'},
18046 'Result': {'type': 'integer'}},
18047 'required': ['Error', 'Result'],
18048 'type': 'object'},
18049 'IntResults': {'additionalProperties': False,
18050 'properties': {'Results': {'items': {'$ref': '#/definitions/IntResult'},
18051 'type': 'array'}},
18052 'required': ['Results'],
18053 'type': 'object'},
18054 'LifeResult': {'additionalProperties': False,
18055 'properties': {'Error': {'$ref': '#/definitions/Error'},
18056 'Life': {'type': 'string'}},
18057 'required': ['Life', 'Error'],
18058 'type': 'object'},
18059 'LifeResults': {'additionalProperties': False,
18060 'properties': {'Results': {'items': {'$ref': '#/definitions/LifeResult'},
18061 'type': 'array'}},
18062 'required': ['Results'],
18063 'type': 'object'},
18064 'Macaroon': {'additionalProperties': False,
18065 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
18066 'type': 'array'},
18067 'data': {'items': {'type': 'integer'},
18068 'type': 'array'},
18069 'id': {'$ref': '#/definitions/packet'},
18070 'location': {'$ref': '#/definitions/packet'},
18071 'sig': {'items': {'type': 'integer'},
18072 'type': 'array'}},
18073 'required': ['data',
18074 'location',
18075 'id',
18076 'caveats',
18077 'sig'],
18078 'type': 'object'},
18079 'MachinePortRange': {'additionalProperties': False,
18080 'properties': {'PortRange': {'$ref': '#/definitions/PortRange'},
18081 'RelationTag': {'type': 'string'},
18082 'UnitTag': {'type': 'string'}},
18083 'required': ['UnitTag',
18084 'RelationTag',
18085 'PortRange'],
18086 'type': 'object'},
18087 'MachinePortsResult': {'additionalProperties': False,
18088 'properties': {'Error': {'$ref': '#/definitions/Error'},
18089 'Ports': {'items': {'$ref': '#/definitions/MachinePortRange'},
18090 'type': 'array'}},
18091 'required': ['Error', 'Ports'],
18092 'type': 'object'},
18093 'MachinePortsResults': {'additionalProperties': False,
18094 'properties': {'Results': {'items': {'$ref': '#/definitions/MachinePortsResult'},
18095 'type': 'array'}},
18096 'required': ['Results'],
18097 'type': 'object'},
18098 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False,
18099 'properties': {'Params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'},
18100 'type': 'array'}},
18101 'required': ['Params'],
18102 'type': 'object'},
18103 'MergeLeadershipSettingsParam': {'additionalProperties': False,
18104 'properties': {'ServiceTag': {'type': 'string'},
18105 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18106 'type': 'object'}},
18107 'required': ['ServiceTag',
18108 'Settings'],
18109 'type': 'object'},
18110 'MeterStatusResult': {'additionalProperties': False,
18111 'properties': {'Code': {'type': 'string'},
18112 'Error': {'$ref': '#/definitions/Error'},
18113 'Info': {'type': 'string'}},
18114 'required': ['Code', 'Info', 'Error'],
18115 'type': 'object'},
18116 'MeterStatusResults': {'additionalProperties': False,
18117 'properties': {'Results': {'items': {'$ref': '#/definitions/MeterStatusResult'},
18118 'type': 'array'}},
18119 'required': ['Results'],
18120 'type': 'object'},
18121 'Metric': {'additionalProperties': False,
18122 'properties': {'Key': {'type': 'string'},
18123 'Time': {'format': 'date-time',
18124 'type': 'string'},
18125 'Value': {'type': 'string'}},
18126 'required': ['Key', 'Value', 'Time'],
18127 'type': 'object'},
18128 'MetricBatch': {'additionalProperties': False,
18129 'properties': {'CharmURL': {'type': 'string'},
18130 'Created': {'format': 'date-time',
18131 'type': 'string'},
18132 'Metrics': {'items': {'$ref': '#/definitions/Metric'},
18133 'type': 'array'},
18134 'UUID': {'type': 'string'}},
18135 'required': ['UUID',
18136 'CharmURL',
18137 'Created',
18138 'Metrics'],
18139 'type': 'object'},
18140 'MetricBatchParam': {'additionalProperties': False,
18141 'properties': {'Batch': {'$ref': '#/definitions/MetricBatch'},
18142 'Tag': {'type': 'string'}},
18143 'required': ['Tag', 'Batch'],
18144 'type': 'object'},
18145 'MetricBatchParams': {'additionalProperties': False,
18146 'properties': {'Batches': {'items': {'$ref': '#/definitions/MetricBatchParam'},
18147 'type': 'array'}},
18148 'required': ['Batches'],
18149 'type': 'object'},
18150 'ModelConfigResult': {'additionalProperties': False,
18151 'properties': {'Config': {'patternProperties': {'.*': {'additionalProperties': True,
18152 'type': 'object'}},
18153 'type': 'object'}},
18154 'required': ['Config'],
18155 'type': 'object'},
18156 'ModelResult': {'additionalProperties': False,
18157 'properties': {'Error': {'$ref': '#/definitions/Error'},
18158 'Name': {'type': 'string'},
18159 'UUID': {'type': 'string'}},
18160 'required': ['Error', 'Name', 'UUID'],
18161 'type': 'object'},
18162 'NetworkConfig': {'additionalProperties': False,
18163 'properties': {'Address': {'type': 'string'},
18164 'CIDR': {'type': 'string'},
18165 'ConfigType': {'type': 'string'},
18166 'DNSSearchDomains': {'items': {'type': 'string'},
18167 'type': 'array'},
18168 'DNSServers': {'items': {'type': 'string'},
18169 'type': 'array'},
18170 'DeviceIndex': {'type': 'integer'},
18171 'Disabled': {'type': 'boolean'},
18172 'GatewayAddress': {'type': 'string'},
18173 'InterfaceName': {'type': 'string'},
18174 'InterfaceType': {'type': 'string'},
18175 'MACAddress': {'type': 'string'},
18176 'MTU': {'type': 'integer'},
18177 'NoAutoStart': {'type': 'boolean'},
18178 'ParentInterfaceName': {'type': 'string'},
18179 'ProviderAddressId': {'type': 'string'},
18180 'ProviderId': {'type': 'string'},
18181 'ProviderSpaceId': {'type': 'string'},
18182 'ProviderSubnetId': {'type': 'string'},
18183 'ProviderVLANId': {'type': 'string'},
18184 'VLANTag': {'type': 'integer'}},
18185 'required': ['DeviceIndex',
18186 'MACAddress',
18187 'CIDR',
18188 'MTU',
18189 'ProviderId',
18190 'ProviderSubnetId',
18191 'ProviderSpaceId',
18192 'ProviderAddressId',
18193 'ProviderVLANId',
18194 'VLANTag',
18195 'InterfaceName',
18196 'ParentInterfaceName',
18197 'InterfaceType',
18198 'Disabled'],
18199 'type': 'object'},
18200 'NotifyWatchResult': {'additionalProperties': False,
18201 'properties': {'Error': {'$ref': '#/definitions/Error'},
18202 'NotifyWatcherId': {'type': 'string'}},
18203 'required': ['NotifyWatcherId', 'Error'],
18204 'type': 'object'},
18205 'NotifyWatchResults': {'additionalProperties': False,
18206 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
18207 'type': 'array'}},
18208 'required': ['Results'],
18209 'type': 'object'},
18210 'PortRange': {'additionalProperties': False,
18211 'properties': {'FromPort': {'type': 'integer'},
18212 'Protocol': {'type': 'string'},
18213 'ToPort': {'type': 'integer'}},
18214 'required': ['FromPort', 'ToPort', 'Protocol'],
18215 'type': 'object'},
18216 'Relation': {'additionalProperties': False,
18217 'properties': {'Interface': {'type': 'string'},
18218 'Limit': {'type': 'integer'},
18219 'Name': {'type': 'string'},
18220 'Optional': {'type': 'boolean'},
18221 'Role': {'type': 'string'},
18222 'Scope': {'type': 'string'}},
18223 'required': ['Name',
18224 'Role',
18225 'Interface',
18226 'Optional',
18227 'Limit',
18228 'Scope'],
18229 'type': 'object'},
18230 'RelationIds': {'additionalProperties': False,
18231 'properties': {'RelationIds': {'items': {'type': 'integer'},
18232 'type': 'array'}},
18233 'required': ['RelationIds'],
18234 'type': 'object'},
18235 'RelationResult': {'additionalProperties': False,
18236 'properties': {'Endpoint': {'$ref': '#/definitions/Endpoint'},
18237 'Error': {'$ref': '#/definitions/Error'},
18238 'Id': {'type': 'integer'},
18239 'Key': {'type': 'string'},
18240 'Life': {'type': 'string'}},
18241 'required': ['Error',
18242 'Life',
18243 'Id',
18244 'Key',
18245 'Endpoint'],
18246 'type': 'object'},
18247 'RelationResults': {'additionalProperties': False,
18248 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationResult'},
18249 'type': 'array'}},
18250 'required': ['Results'],
18251 'type': 'object'},
18252 'RelationUnit': {'additionalProperties': False,
18253 'properties': {'Relation': {'type': 'string'},
18254 'Unit': {'type': 'string'}},
18255 'required': ['Relation', 'Unit'],
18256 'type': 'object'},
18257 'RelationUnitPair': {'additionalProperties': False,
18258 'properties': {'LocalUnit': {'type': 'string'},
18259 'Relation': {'type': 'string'},
18260 'RemoteUnit': {'type': 'string'}},
18261 'required': ['Relation',
18262 'LocalUnit',
18263 'RemoteUnit'],
18264 'type': 'object'},
18265 'RelationUnitPairs': {'additionalProperties': False,
18266 'properties': {'RelationUnitPairs': {'items': {'$ref': '#/definitions/RelationUnitPair'},
18267 'type': 'array'}},
18268 'required': ['RelationUnitPairs'],
18269 'type': 'object'},
18270 'RelationUnitSettings': {'additionalProperties': False,
18271 'properties': {'Relation': {'type': 'string'},
18272 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18273 'type': 'object'},
18274 'Unit': {'type': 'string'}},
18275 'required': ['Relation',
18276 'Unit',
18277 'Settings'],
18278 'type': 'object'},
18279 'RelationUnits': {'additionalProperties': False,
18280 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnit'},
18281 'type': 'array'}},
18282 'required': ['RelationUnits'],
18283 'type': 'object'},
18284 'RelationUnitsChange': {'additionalProperties': False,
18285 'properties': {'Changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}},
18286 'type': 'object'},
18287 'Departed': {'items': {'type': 'string'},
18288 'type': 'array'}},
18289 'required': ['Changed', 'Departed'],
18290 'type': 'object'},
18291 'RelationUnitsSettings': {'additionalProperties': False,
18292 'properties': {'RelationUnits': {'items': {'$ref': '#/definitions/RelationUnitSettings'},
18293 'type': 'array'}},
18294 'required': ['RelationUnits'],
18295 'type': 'object'},
18296 'RelationUnitsWatchResult': {'additionalProperties': False,
18297 'properties': {'Changes': {'$ref': '#/definitions/RelationUnitsChange'},
18298 'Error': {'$ref': '#/definitions/Error'},
18299 'RelationUnitsWatcherId': {'type': 'string'}},
18300 'required': ['RelationUnitsWatcherId',
18301 'Changes',
18302 'Error'],
18303 'type': 'object'},
18304 'RelationUnitsWatchResults': {'additionalProperties': False,
18305 'properties': {'Results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'},
18306 'type': 'array'}},
18307 'required': ['Results'],
18308 'type': 'object'},
18309 'ResolvedModeResult': {'additionalProperties': False,
18310 'properties': {'Error': {'$ref': '#/definitions/Error'},
18311 'Mode': {'type': 'string'}},
18312 'required': ['Error', 'Mode'],
18313 'type': 'object'},
18314 'ResolvedModeResults': {'additionalProperties': False,
18315 'properties': {'Results': {'items': {'$ref': '#/definitions/ResolvedModeResult'},
18316 'type': 'array'}},
18317 'required': ['Results'],
18318 'type': 'object'},
18319 'ServiceStatusResult': {'additionalProperties': False,
18320 'properties': {'Error': {'$ref': '#/definitions/Error'},
18321 'Service': {'$ref': '#/definitions/StatusResult'},
18322 'Units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}},
18323 'type': 'object'}},
18324 'required': ['Service',
18325 'Units',
18326 'Error'],
18327 'type': 'object'},
18328 'ServiceStatusResults': {'additionalProperties': False,
18329 'properties': {'Results': {'items': {'$ref': '#/definitions/ServiceStatusResult'},
18330 'type': 'array'}},
18331 'required': ['Results'],
18332 'type': 'object'},
18333 'SetStatus': {'additionalProperties': False,
18334 'properties': {'Entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'},
18335 'type': 'array'}},
18336 'required': ['Entities'],
18337 'type': 'object'},
18338 'SettingsResult': {'additionalProperties': False,
18339 'properties': {'Error': {'$ref': '#/definitions/Error'},
18340 'Settings': {'patternProperties': {'.*': {'type': 'string'}},
18341 'type': 'object'}},
18342 'required': ['Error', 'Settings'],
18343 'type': 'object'},
18344 'SettingsResults': {'additionalProperties': False,
18345 'properties': {'Results': {'items': {'$ref': '#/definitions/SettingsResult'},
18346 'type': 'array'}},
18347 'required': ['Results'],
18348 'type': 'object'},
18349 'StatusResult': {'additionalProperties': False,
18350 'properties': {'Data': {'patternProperties': {'.*': {'additionalProperties': True,
18351 'type': 'object'}},
18352 'type': 'object'},
18353 'Error': {'$ref': '#/definitions/Error'},
18354 'Id': {'type': 'string'},
18355 'Info': {'type': 'string'},
18356 'Life': {'type': 'string'},
18357 'Since': {'format': 'date-time',
18358 'type': 'string'},
18359 'Status': {'type': 'string'}},
18360 'required': ['Error',
18361 'Id',
18362 'Life',
18363 'Status',
18364 'Info',
18365 'Data',
18366 'Since'],
18367 'type': 'object'},
18368 'StatusResults': {'additionalProperties': False,
18369 'properties': {'Results': {'items': {'$ref': '#/definitions/StatusResult'},
18370 'type': 'array'}},
18371 'required': ['Results'],
18372 'type': 'object'},
18373 'StorageAddParams': {'additionalProperties': False,
18374 'properties': {'StorageName': {'type': 'string'},
18375 'storage': {'$ref': '#/definitions/StorageConstraints'},
18376 'unit': {'type': 'string'}},
18377 'required': ['unit',
18378 'StorageName',
18379 'storage'],
18380 'type': 'object'},
18381 'StorageAttachment': {'additionalProperties': False,
18382 'properties': {'Kind': {'type': 'integer'},
18383 'Life': {'type': 'string'},
18384 'Location': {'type': 'string'},
18385 'OwnerTag': {'type': 'string'},
18386 'StorageTag': {'type': 'string'},
18387 'UnitTag': {'type': 'string'}},
18388 'required': ['StorageTag',
18389 'OwnerTag',
18390 'UnitTag',
18391 'Kind',
18392 'Location',
18393 'Life'],
18394 'type': 'object'},
18395 'StorageAttachmentId': {'additionalProperties': False,
18396 'properties': {'storagetag': {'type': 'string'},
18397 'unittag': {'type': 'string'}},
18398 'required': ['storagetag', 'unittag'],
18399 'type': 'object'},
18400 'StorageAttachmentIds': {'additionalProperties': False,
18401 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'},
18402 'type': 'array'}},
18403 'required': ['ids'],
18404 'type': 'object'},
18405 'StorageAttachmentIdsResult': {'additionalProperties': False,
18406 'properties': {'error': {'$ref': '#/definitions/Error'},
18407 'result': {'$ref': '#/definitions/StorageAttachmentIds'}},
18408 'required': ['result'],
18409 'type': 'object'},
18410 'StorageAttachmentIdsResults': {'additionalProperties': False,
18411 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'},
18412 'type': 'array'}},
18413 'type': 'object'},
18414 'StorageAttachmentResult': {'additionalProperties': False,
18415 'properties': {'error': {'$ref': '#/definitions/Error'},
18416 'result': {'$ref': '#/definitions/StorageAttachment'}},
18417 'required': ['result'],
18418 'type': 'object'},
18419 'StorageAttachmentResults': {'additionalProperties': False,
18420 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'},
18421 'type': 'array'}},
18422 'type': 'object'},
18423 'StorageConstraints': {'additionalProperties': False,
18424 'properties': {'Count': {'type': 'integer'},
18425 'Pool': {'type': 'string'},
18426 'Size': {'type': 'integer'}},
18427 'required': ['Pool', 'Size', 'Count'],
18428 'type': 'object'},
18429 'StoragesAddParams': {'additionalProperties': False,
18430 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'},
18431 'type': 'array'}},
18432 'required': ['storages'],
18433 'type': 'object'},
18434 'StringBoolResult': {'additionalProperties': False,
18435 'properties': {'Error': {'$ref': '#/definitions/Error'},
18436 'Ok': {'type': 'boolean'},
18437 'Result': {'type': 'string'}},
18438 'required': ['Error', 'Result', 'Ok'],
18439 'type': 'object'},
18440 'StringBoolResults': {'additionalProperties': False,
18441 'properties': {'Results': {'items': {'$ref': '#/definitions/StringBoolResult'},
18442 'type': 'array'}},
18443 'required': ['Results'],
18444 'type': 'object'},
18445 'StringResult': {'additionalProperties': False,
18446 'properties': {'Error': {'$ref': '#/definitions/Error'},
18447 'Result': {'type': 'string'}},
18448 'required': ['Error', 'Result'],
18449 'type': 'object'},
18450 'StringResults': {'additionalProperties': False,
18451 'properties': {'Results': {'items': {'$ref': '#/definitions/StringResult'},
18452 'type': 'array'}},
18453 'required': ['Results'],
18454 'type': 'object'},
18455 'StringsResult': {'additionalProperties': False,
18456 'properties': {'Error': {'$ref': '#/definitions/Error'},
18457 'Result': {'items': {'type': 'string'},
18458 'type': 'array'}},
18459 'required': ['Error', 'Result'],
18460 'type': 'object'},
18461 'StringsResults': {'additionalProperties': False,
18462 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsResult'},
18463 'type': 'array'}},
18464 'required': ['Results'],
18465 'type': 'object'},
18466 'StringsWatchResult': {'additionalProperties': False,
18467 'properties': {'Changes': {'items': {'type': 'string'},
18468 'type': 'array'},
18469 'Error': {'$ref': '#/definitions/Error'},
18470 'StringsWatcherId': {'type': 'string'}},
18471 'required': ['StringsWatcherId',
18472 'Changes',
18473 'Error'],
18474 'type': 'object'},
18475 'StringsWatchResults': {'additionalProperties': False,
18476 'properties': {'Results': {'items': {'$ref': '#/definitions/StringsWatchResult'},
18477 'type': 'array'}},
18478 'required': ['Results'],
18479 'type': 'object'},
18480 'UnitNetworkConfig': {'additionalProperties': False,
18481 'properties': {'BindingName': {'type': 'string'},
18482 'UnitTag': {'type': 'string'}},
18483 'required': ['UnitTag', 'BindingName'],
18484 'type': 'object'},
18485 'UnitNetworkConfigResult': {'additionalProperties': False,
18486 'properties': {'Error': {'$ref': '#/definitions/Error'},
18487 'Info': {'items': {'$ref': '#/definitions/NetworkConfig'},
18488 'type': 'array'}},
18489 'required': ['Error', 'Info'],
18490 'type': 'object'},
18491 'UnitNetworkConfigResults': {'additionalProperties': False,
18492 'properties': {'Results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'},
18493 'type': 'array'}},
18494 'required': ['Results'],
18495 'type': 'object'},
18496 'UnitSettings': {'additionalProperties': False,
18497 'properties': {'Version': {'type': 'integer'}},
18498 'required': ['Version'],
18499 'type': 'object'},
18500 'UnitsNetworkConfig': {'additionalProperties': False,
18501 'properties': {'Args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'},
18502 'type': 'array'}},
18503 'required': ['Args'],
18504 'type': 'object'},
18505 'caveat': {'additionalProperties': False,
18506 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
18507 'location': {'$ref': '#/definitions/packet'},
18508 'verificationId': {'$ref': '#/definitions/packet'}},
18509 'required': ['location',
18510 'caveatId',
18511 'verificationId'],
18512 'type': 'object'},
18513 'packet': {'additionalProperties': False,
18514 'properties': {'headerLen': {'type': 'integer'},
18515 'start': {'type': 'integer'},
18516 'totalLen': {'type': 'integer'}},
18517 'required': ['start', 'totalLen', 'headerLen'],
18518 'type': 'object'}},
18519 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}},
18520 'type': 'object'},
18521 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}},
18522 'type': 'object'},
18523 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18524 'Result': {'$ref': '#/definitions/ActionResults'}},
18525 'type': 'object'},
18526 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'},
18527 'Result': {'$ref': '#/definitions/ErrorResults'}},
18528 'type': 'object'},
18529 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'},
18530 'Result': {'$ref': '#/definitions/ErrorResults'}},
18531 'type': 'object'},
18532 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18533 'Result': {'$ref': '#/definitions/MachinePortsResults'}},
18534 'type': 'object'},
18535 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18536 'Result': {'$ref': '#/definitions/StringResults'}},
18537 'type': 'object'},
18538 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18539 'Result': {'$ref': '#/definitions/StringResults'}},
18540 'type': 'object'},
18541 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18542 'Result': {'$ref': '#/definitions/ErrorResults'}},
18543 'type': 'object'},
18544 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}},
18545 'type': 'object'},
18546 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'},
18547 'Result': {'$ref': '#/definitions/StringResults'}},
18548 'type': 'object'},
18549 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18550 'Result': {'$ref': '#/definitions/IntResults'}},
18551 'type': 'object'},
18552 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18553 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18554 'type': 'object'},
18555 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18556 'Result': {'$ref': '#/definitions/ErrorResults'}},
18557 'type': 'object'},
18558 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18559 'Result': {'$ref': '#/definitions/ErrorResults'}},
18560 'type': 'object'},
18561 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18562 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}},
18563 'type': 'object'},
18564 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}},
18565 'type': 'object'},
18566 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18567 'Result': {'$ref': '#/definitions/ErrorResults'}},
18568 'type': 'object'},
18569 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18570 'Result': {'$ref': '#/definitions/ErrorResults'}},
18571 'type': 'object'},
18572 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18573 'Result': {'$ref': '#/definitions/ErrorResults'}},
18574 'type': 'object'},
18575 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18576 'Result': {'$ref': '#/definitions/ErrorResults'}},
18577 'type': 'object'},
18578 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18579 'Result': {'$ref': '#/definitions/ErrorResults'}},
18580 'type': 'object'},
18581 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'},
18582 'Result': {'$ref': '#/definitions/ErrorResults'}},
18583 'type': 'object'},
18584 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18585 'Result': {'$ref': '#/definitions/MeterStatusResults'}},
18586 'type': 'object'},
18587 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18588 'Result': {'$ref': '#/definitions/StringBoolResults'}},
18589 'type': 'object'},
18590 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18591 'Result': {'$ref': '#/definitions/BoolResults'}},
18592 'type': 'object'},
18593 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18594 'Result': {'$ref': '#/definitions/StringsResults'}},
18595 'type': 'object'},
18596 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18597 'Result': {'$ref': '#/definitions/ErrorResults'}},
18598 'type': 'object'},
18599 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18600 'Result': {'$ref': '#/definitions/LifeResults'}},
18601 'type': 'object'},
18602 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'},
18603 'Result': {'$ref': '#/definitions/ErrorResults'}},
18604 'type': 'object'},
18605 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18606 'type': 'object'},
18607 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18608 'type': 'object'},
18609 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'},
18610 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}},
18611 'type': 'object'},
18612 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'},
18613 'Result': {'$ref': '#/definitions/ErrorResults'}},
18614 'type': 'object'},
18615 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18616 'Result': {'$ref': '#/definitions/StringResults'}},
18617 'type': 'object'},
18618 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}},
18619 'type': 'object'},
18620 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18621 'Result': {'$ref': '#/definitions/StringResults'}},
18622 'type': 'object'},
18623 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18624 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}},
18625 'type': 'object'},
18626 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'},
18627 'Result': {'$ref': '#/definitions/SettingsResults'}},
18628 'type': 'object'},
18629 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18630 'Result': {'$ref': '#/definitions/SettingsResults'}},
18631 'type': 'object'},
18632 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18633 'Result': {'$ref': '#/definitions/RelationResults'}},
18634 'type': 'object'},
18635 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'},
18636 'Result': {'$ref': '#/definitions/RelationResults'}},
18637 'type': 'object'},
18638 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18639 'Result': {'$ref': '#/definitions/ErrorResults'}},
18640 'type': 'object'},
18641 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18642 'Result': {'$ref': '#/definitions/ErrorResults'}},
18643 'type': 'object'},
18644 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18645 'Result': {'$ref': '#/definitions/ResolvedModeResults'}},
18646 'type': 'object'},
18647 'ServiceOwner': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18648 'Result': {'$ref': '#/definitions/StringResults'}},
18649 'type': 'object'},
18650 'ServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18651 'Result': {'$ref': '#/definitions/ServiceStatusResults'}},
18652 'type': 'object'},
18653 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18654 'Result': {'$ref': '#/definitions/ErrorResults'}},
18655 'type': 'object'},
18656 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'},
18657 'Result': {'$ref': '#/definitions/ErrorResults'}},
18658 'type': 'object'},
18659 'SetServiceStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18660 'Result': {'$ref': '#/definitions/ErrorResults'}},
18661 'type': 'object'},
18662 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18663 'Result': {'$ref': '#/definitions/ErrorResults'}},
18664 'type': 'object'},
18665 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'},
18666 'Result': {'$ref': '#/definitions/ErrorResults'}},
18667 'type': 'object'},
18668 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18669 'Result': {'$ref': '#/definitions/LifeResults'}},
18670 'type': 'object'},
18671 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18672 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}},
18673 'type': 'object'},
18674 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18675 'Result': {'$ref': '#/definitions/StatusResults'}},
18676 'type': 'object'},
18677 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18678 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}},
18679 'type': 'object'},
18680 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'},
18681 'Result': {'$ref': '#/definitions/ErrorResults'}},
18682 'type': 'object'},
18683 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18684 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18685 'type': 'object'},
18686 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18687 'type': 'object'},
18688 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18689 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18690 'type': 'object'},
18691 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18692 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18693 'type': 'object'},
18694 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
18695 'type': 'object'},
18696 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18697 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18698 'type': 'object'},
18699 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18700 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18701 'type': 'object'},
18702 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'},
18703 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}},
18704 'type': 'object'},
18705 'WatchServiceRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18706 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18707 'type': 'object'},
18708 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'},
18709 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18710 'type': 'object'},
18711 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18712 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
18713 'type': 'object'},
18714 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
18715 'Result': {'$ref': '#/definitions/StringsWatchResults'}},
18716 'type': 'object'}},
18717 'type': 'object'}
18718
18719
18720 @ReturnMapping(StringsResult)
18721 async def APIAddresses(self):
18722 '''
18723
18724 Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]]
18725 '''
18726 # map input types to rpc msg
18727 params = dict()
18728 msg = dict(Type='Uniter', Request='APIAddresses', Version=3, Params=params)
18729
18730 reply = await self.rpc(msg)
18731 return reply
18732
18733
18734
18735 @ReturnMapping(APIHostPortsResult)
18736 async def APIHostPorts(self):
18737 '''
18738
18739 Returns -> typing.Sequence[~HostPort]
18740 '''
18741 # map input types to rpc msg
18742 params = dict()
18743 msg = dict(Type='Uniter', Request='APIHostPorts', Version=3, Params=params)
18744
18745 reply = await self.rpc(msg)
18746 return reply
18747
18748
18749
18750 @ReturnMapping(ActionResults)
18751 async def Actions(self, entities):
18752 '''
18753 entities : typing.Sequence[~Entity]
18754 Returns -> typing.Sequence[~ActionResult]
18755 '''
18756 # map input types to rpc msg
18757 params = dict()
18758 msg = dict(Type='Uniter', Request='Actions', Version=3, Params=params)
18759 params['Entities'] = entities
18760 reply = await self.rpc(msg)
18761 return reply
18762
18763
18764
18765 @ReturnMapping(ErrorResults)
18766 async def AddMetricBatches(self, batches):
18767 '''
18768 batches : typing.Sequence[~MetricBatchParam]
18769 Returns -> typing.Sequence[~ErrorResult]
18770 '''
18771 # map input types to rpc msg
18772 params = dict()
18773 msg = dict(Type='Uniter', Request='AddMetricBatches', Version=3, Params=params)
18774 params['Batches'] = batches
18775 reply = await self.rpc(msg)
18776 return reply
18777
18778
18779
18780 @ReturnMapping(ErrorResults)
18781 async def AddUnitStorage(self, storages):
18782 '''
18783 storages : typing.Sequence[~StorageAddParams]
18784 Returns -> typing.Sequence[~ErrorResult]
18785 '''
18786 # map input types to rpc msg
18787 params = dict()
18788 msg = dict(Type='Uniter', Request='AddUnitStorage', Version=3, Params=params)
18789 params['storages'] = storages
18790 reply = await self.rpc(msg)
18791 return reply
18792
18793
18794
18795 @ReturnMapping(MachinePortsResults)
18796 async def AllMachinePorts(self, entities):
18797 '''
18798 entities : typing.Sequence[~Entity]
18799 Returns -> typing.Sequence[~MachinePortsResult]
18800 '''
18801 # map input types to rpc msg
18802 params = dict()
18803 msg = dict(Type='Uniter', Request='AllMachinePorts', Version=3, Params=params)
18804 params['Entities'] = entities
18805 reply = await self.rpc(msg)
18806 return reply
18807
18808
18809
18810 @ReturnMapping(StringResults)
18811 async def AssignedMachine(self, entities):
18812 '''
18813 entities : typing.Sequence[~Entity]
18814 Returns -> typing.Sequence[~StringResult]
18815 '''
18816 # map input types to rpc msg
18817 params = dict()
18818 msg = dict(Type='Uniter', Request='AssignedMachine', Version=3, Params=params)
18819 params['Entities'] = entities
18820 reply = await self.rpc(msg)
18821 return reply
18822
18823
18824
18825 @ReturnMapping(StringResults)
18826 async def AvailabilityZone(self, entities):
18827 '''
18828 entities : typing.Sequence[~Entity]
18829 Returns -> typing.Sequence[~StringResult]
18830 '''
18831 # map input types to rpc msg
18832 params = dict()
18833 msg = dict(Type='Uniter', Request='AvailabilityZone', Version=3, Params=params)
18834 params['Entities'] = entities
18835 reply = await self.rpc(msg)
18836 return reply
18837
18838
18839
18840 @ReturnMapping(ErrorResults)
18841 async def BeginActions(self, entities):
18842 '''
18843 entities : typing.Sequence[~Entity]
18844 Returns -> typing.Sequence[~ErrorResult]
18845 '''
18846 # map input types to rpc msg
18847 params = dict()
18848 msg = dict(Type='Uniter', Request='BeginActions', Version=3, Params=params)
18849 params['Entities'] = entities
18850 reply = await self.rpc(msg)
18851 return reply
18852
18853
18854
18855 @ReturnMapping(BytesResult)
18856 async def CACert(self):
18857 '''
18858
18859 Returns -> typing.Sequence[int]
18860 '''
18861 # map input types to rpc msg
18862 params = dict()
18863 msg = dict(Type='Uniter', Request='CACert', Version=3, Params=params)
18864
18865 reply = await self.rpc(msg)
18866 return reply
18867
18868
18869
18870 @ReturnMapping(StringResults)
18871 async def CharmArchiveSha256(self, urls):
18872 '''
18873 urls : typing.Sequence[~CharmURL]
18874 Returns -> typing.Sequence[~StringResult]
18875 '''
18876 # map input types to rpc msg
18877 params = dict()
18878 msg = dict(Type='Uniter', Request='CharmArchiveSha256', Version=3, Params=params)
18879 params['URLs'] = urls
18880 reply = await self.rpc(msg)
18881 return reply
18882
18883
18884
18885 @ReturnMapping(IntResults)
18886 async def CharmModifiedVersion(self, entities):
18887 '''
18888 entities : typing.Sequence[~Entity]
18889 Returns -> typing.Sequence[~IntResult]
18890 '''
18891 # map input types to rpc msg
18892 params = dict()
18893 msg = dict(Type='Uniter', Request='CharmModifiedVersion', Version=3, Params=params)
18894 params['Entities'] = entities
18895 reply = await self.rpc(msg)
18896 return reply
18897
18898
18899
18900 @ReturnMapping(StringBoolResults)
18901 async def CharmURL(self, entities):
18902 '''
18903 entities : typing.Sequence[~Entity]
18904 Returns -> typing.Sequence[~StringBoolResult]
18905 '''
18906 # map input types to rpc msg
18907 params = dict()
18908 msg = dict(Type='Uniter', Request='CharmURL', Version=3, Params=params)
18909 params['Entities'] = entities
18910 reply = await self.rpc(msg)
18911 return reply
18912
18913
18914
18915 @ReturnMapping(ErrorResults)
18916 async def ClearResolved(self, entities):
18917 '''
18918 entities : typing.Sequence[~Entity]
18919 Returns -> typing.Sequence[~ErrorResult]
18920 '''
18921 # map input types to rpc msg
18922 params = dict()
18923 msg = dict(Type='Uniter', Request='ClearResolved', Version=3, Params=params)
18924 params['Entities'] = entities
18925 reply = await self.rpc(msg)
18926 return reply
18927
18928
18929
18930 @ReturnMapping(ErrorResults)
18931 async def ClosePorts(self, entities):
18932 '''
18933 entities : typing.Sequence[~EntityPortRange]
18934 Returns -> typing.Sequence[~ErrorResult]
18935 '''
18936 # map input types to rpc msg
18937 params = dict()
18938 msg = dict(Type='Uniter', Request='ClosePorts', Version=3, Params=params)
18939 params['Entities'] = entities
18940 reply = await self.rpc(msg)
18941 return reply
18942
18943
18944
18945 @ReturnMapping(ConfigSettingsResults)
18946 async def ConfigSettings(self, entities):
18947 '''
18948 entities : typing.Sequence[~Entity]
18949 Returns -> typing.Sequence[~ConfigSettingsResult]
18950 '''
18951 # map input types to rpc msg
18952 params = dict()
18953 msg = dict(Type='Uniter', Request='ConfigSettings', Version=3, Params=params)
18954 params['Entities'] = entities
18955 reply = await self.rpc(msg)
18956 return reply
18957
18958
18959
18960 @ReturnMapping(ModelResult)
18961 async def CurrentModel(self):
18962 '''
18963
18964 Returns -> typing.Union[_ForwardRef('Error'), str]
18965 '''
18966 # map input types to rpc msg
18967 params = dict()
18968 msg = dict(Type='Uniter', Request='CurrentModel', Version=3, Params=params)
18969
18970 reply = await self.rpc(msg)
18971 return reply
18972
18973
18974
18975 @ReturnMapping(ErrorResults)
18976 async def Destroy(self, entities):
18977 '''
18978 entities : typing.Sequence[~Entity]
18979 Returns -> typing.Sequence[~ErrorResult]
18980 '''
18981 # map input types to rpc msg
18982 params = dict()
18983 msg = dict(Type='Uniter', Request='Destroy', Version=3, Params=params)
18984 params['Entities'] = entities
18985 reply = await self.rpc(msg)
18986 return reply
18987
18988
18989
18990 @ReturnMapping(ErrorResults)
18991 async def DestroyAllSubordinates(self, entities):
18992 '''
18993 entities : typing.Sequence[~Entity]
18994 Returns -> typing.Sequence[~ErrorResult]
18995 '''
18996 # map input types to rpc msg
18997 params = dict()
18998 msg = dict(Type='Uniter', Request='DestroyAllSubordinates', Version=3, Params=params)
18999 params['Entities'] = entities
19000 reply = await self.rpc(msg)
19001 return reply
19002
19003
19004
19005 @ReturnMapping(ErrorResults)
19006 async def DestroyUnitStorageAttachments(self, entities):
19007 '''
19008 entities : typing.Sequence[~Entity]
19009 Returns -> typing.Sequence[~ErrorResult]
19010 '''
19011 # map input types to rpc msg
19012 params = dict()
19013 msg = dict(Type='Uniter', Request='DestroyUnitStorageAttachments', Version=3, Params=params)
19014 params['Entities'] = entities
19015 reply = await self.rpc(msg)
19016 return reply
19017
19018
19019
19020 @ReturnMapping(ErrorResults)
19021 async def EnsureDead(self, entities):
19022 '''
19023 entities : typing.Sequence[~Entity]
19024 Returns -> typing.Sequence[~ErrorResult]
19025 '''
19026 # map input types to rpc msg
19027 params = dict()
19028 msg = dict(Type='Uniter', Request='EnsureDead', Version=3, Params=params)
19029 params['Entities'] = entities
19030 reply = await self.rpc(msg)
19031 return reply
19032
19033
19034
19035 @ReturnMapping(ErrorResults)
19036 async def EnterScope(self, relationunits):
19037 '''
19038 relationunits : typing.Sequence[~RelationUnit]
19039 Returns -> typing.Sequence[~ErrorResult]
19040 '''
19041 # map input types to rpc msg
19042 params = dict()
19043 msg = dict(Type='Uniter', Request='EnterScope', Version=3, Params=params)
19044 params['RelationUnits'] = relationunits
19045 reply = await self.rpc(msg)
19046 return reply
19047
19048
19049
19050 @ReturnMapping(ErrorResults)
19051 async def FinishActions(self, results):
19052 '''
19053 results : typing.Sequence[~ActionExecutionResult]
19054 Returns -> typing.Sequence[~ErrorResult]
19055 '''
19056 # map input types to rpc msg
19057 params = dict()
19058 msg = dict(Type='Uniter', Request='FinishActions', Version=3, Params=params)
19059 params['results'] = results
19060 reply = await self.rpc(msg)
19061 return reply
19062
19063
19064
19065 @ReturnMapping(MeterStatusResults)
19066 async def GetMeterStatus(self, entities):
19067 '''
19068 entities : typing.Sequence[~Entity]
19069 Returns -> typing.Sequence[~MeterStatusResult]
19070 '''
19071 # map input types to rpc msg
19072 params = dict()
19073 msg = dict(Type='Uniter', Request='GetMeterStatus', Version=3, Params=params)
19074 params['Entities'] = entities
19075 reply = await self.rpc(msg)
19076 return reply
19077
19078
19079
19080 @ReturnMapping(StringBoolResults)
19081 async def GetPrincipal(self, entities):
19082 '''
19083 entities : typing.Sequence[~Entity]
19084 Returns -> typing.Sequence[~StringBoolResult]
19085 '''
19086 # map input types to rpc msg
19087 params = dict()
19088 msg = dict(Type='Uniter', Request='GetPrincipal', Version=3, Params=params)
19089 params['Entities'] = entities
19090 reply = await self.rpc(msg)
19091 return reply
19092
19093
19094
19095 @ReturnMapping(BoolResults)
19096 async def HasSubordinates(self, entities):
19097 '''
19098 entities : typing.Sequence[~Entity]
19099 Returns -> typing.Sequence[~BoolResult]
19100 '''
19101 # map input types to rpc msg
19102 params = dict()
19103 msg = dict(Type='Uniter', Request='HasSubordinates', Version=3, Params=params)
19104 params['Entities'] = entities
19105 reply = await self.rpc(msg)
19106 return reply
19107
19108
19109
19110 @ReturnMapping(StringsResults)
19111 async def JoinedRelations(self, entities):
19112 '''
19113 entities : typing.Sequence[~Entity]
19114 Returns -> typing.Sequence[~StringsResult]
19115 '''
19116 # map input types to rpc msg
19117 params = dict()
19118 msg = dict(Type='Uniter', Request='JoinedRelations', Version=3, Params=params)
19119 params['Entities'] = entities
19120 reply = await self.rpc(msg)
19121 return reply
19122
19123
19124
19125 @ReturnMapping(ErrorResults)
19126 async def LeaveScope(self, relationunits):
19127 '''
19128 relationunits : typing.Sequence[~RelationUnit]
19129 Returns -> typing.Sequence[~ErrorResult]
19130 '''
19131 # map input types to rpc msg
19132 params = dict()
19133 msg = dict(Type='Uniter', Request='LeaveScope', Version=3, Params=params)
19134 params['RelationUnits'] = relationunits
19135 reply = await self.rpc(msg)
19136 return reply
19137
19138
19139
19140 @ReturnMapping(LifeResults)
19141 async def Life(self, entities):
19142 '''
19143 entities : typing.Sequence[~Entity]
19144 Returns -> typing.Sequence[~LifeResult]
19145 '''
19146 # map input types to rpc msg
19147 params = dict()
19148 msg = dict(Type='Uniter', Request='Life', Version=3, Params=params)
19149 params['Entities'] = entities
19150 reply = await self.rpc(msg)
19151 return reply
19152
19153
19154
19155 @ReturnMapping(ErrorResults)
19156 async def Merge(self, params):
19157 '''
19158 params : typing.Sequence[~MergeLeadershipSettingsParam]
19159 Returns -> typing.Sequence[~ErrorResult]
19160 '''
19161 # map input types to rpc msg
19162 params = dict()
19163 msg = dict(Type='Uniter', Request='Merge', Version=3, Params=params)
19164 params['Params'] = params
19165 reply = await self.rpc(msg)
19166 return reply
19167
19168
19169
19170 @ReturnMapping(ModelConfigResult)
19171 async def ModelConfig(self):
19172 '''
19173
19174 Returns -> typing.Mapping[str, typing.Any]
19175 '''
19176 # map input types to rpc msg
19177 params = dict()
19178 msg = dict(Type='Uniter', Request='ModelConfig', Version=3, Params=params)
19179
19180 reply = await self.rpc(msg)
19181 return reply
19182
19183
19184
19185 @ReturnMapping(StringResult)
19186 async def ModelUUID(self):
19187 '''
19188
19189 Returns -> typing.Union[_ForwardRef('Error'), str]
19190 '''
19191 # map input types to rpc msg
19192 params = dict()
19193 msg = dict(Type='Uniter', Request='ModelUUID', Version=3, Params=params)
19194
19195 reply = await self.rpc(msg)
19196 return reply
19197
19198
19199
19200 @ReturnMapping(UnitNetworkConfigResults)
19201 async def NetworkConfig(self, args):
19202 '''
19203 args : typing.Sequence[~UnitNetworkConfig]
19204 Returns -> typing.Sequence[~UnitNetworkConfigResult]
19205 '''
19206 # map input types to rpc msg
19207 params = dict()
19208 msg = dict(Type='Uniter', Request='NetworkConfig', Version=3, Params=params)
19209 params['Args'] = args
19210 reply = await self.rpc(msg)
19211 return reply
19212
19213
19214
19215 @ReturnMapping(ErrorResults)
19216 async def OpenPorts(self, entities):
19217 '''
19218 entities : typing.Sequence[~EntityPortRange]
19219 Returns -> typing.Sequence[~ErrorResult]
19220 '''
19221 # map input types to rpc msg
19222 params = dict()
19223 msg = dict(Type='Uniter', Request='OpenPorts', Version=3, Params=params)
19224 params['Entities'] = entities
19225 reply = await self.rpc(msg)
19226 return reply
19227
19228
19229
19230 @ReturnMapping(StringResults)
19231 async def PrivateAddress(self, entities):
19232 '''
19233 entities : typing.Sequence[~Entity]
19234 Returns -> typing.Sequence[~StringResult]
19235 '''
19236 # map input types to rpc msg
19237 params = dict()
19238 msg = dict(Type='Uniter', Request='PrivateAddress', Version=3, Params=params)
19239 params['Entities'] = entities
19240 reply = await self.rpc(msg)
19241 return reply
19242
19243
19244
19245 @ReturnMapping(StringResult)
19246 async def ProviderType(self):
19247 '''
19248
19249 Returns -> typing.Union[_ForwardRef('Error'), str]
19250 '''
19251 # map input types to rpc msg
19252 params = dict()
19253 msg = dict(Type='Uniter', Request='ProviderType', Version=3, Params=params)
19254
19255 reply = await self.rpc(msg)
19256 return reply
19257
19258
19259
19260 @ReturnMapping(StringResults)
19261 async def PublicAddress(self, entities):
19262 '''
19263 entities : typing.Sequence[~Entity]
19264 Returns -> typing.Sequence[~StringResult]
19265 '''
19266 # map input types to rpc msg
19267 params = dict()
19268 msg = dict(Type='Uniter', Request='PublicAddress', Version=3, Params=params)
19269 params['Entities'] = entities
19270 reply = await self.rpc(msg)
19271 return reply
19272
19273
19274
19275 @ReturnMapping(GetLeadershipSettingsBulkResults)
19276 async def Read(self, entities):
19277 '''
19278 entities : typing.Sequence[~Entity]
19279 Returns -> typing.Sequence[~GetLeadershipSettingsResult]
19280 '''
19281 # map input types to rpc msg
19282 params = dict()
19283 msg = dict(Type='Uniter', Request='Read', Version=3, Params=params)
19284 params['Entities'] = entities
19285 reply = await self.rpc(msg)
19286 return reply
19287
19288
19289
19290 @ReturnMapping(SettingsResults)
19291 async def ReadRemoteSettings(self, relationunitpairs):
19292 '''
19293 relationunitpairs : typing.Sequence[~RelationUnitPair]
19294 Returns -> typing.Sequence[~SettingsResult]
19295 '''
19296 # map input types to rpc msg
19297 params = dict()
19298 msg = dict(Type='Uniter', Request='ReadRemoteSettings', Version=3, Params=params)
19299 params['RelationUnitPairs'] = relationunitpairs
19300 reply = await self.rpc(msg)
19301 return reply
19302
19303
19304
19305 @ReturnMapping(SettingsResults)
19306 async def ReadSettings(self, relationunits):
19307 '''
19308 relationunits : typing.Sequence[~RelationUnit]
19309 Returns -> typing.Sequence[~SettingsResult]
19310 '''
19311 # map input types to rpc msg
19312 params = dict()
19313 msg = dict(Type='Uniter', Request='ReadSettings', Version=3, Params=params)
19314 params['RelationUnits'] = relationunits
19315 reply = await self.rpc(msg)
19316 return reply
19317
19318
19319
19320 @ReturnMapping(RelationResults)
19321 async def Relation(self, relationunits):
19322 '''
19323 relationunits : typing.Sequence[~RelationUnit]
19324 Returns -> typing.Sequence[~RelationResult]
19325 '''
19326 # map input types to rpc msg
19327 params = dict()
19328 msg = dict(Type='Uniter', Request='Relation', Version=3, Params=params)
19329 params['RelationUnits'] = relationunits
19330 reply = await self.rpc(msg)
19331 return reply
19332
19333
19334
19335 @ReturnMapping(RelationResults)
19336 async def RelationById(self, relationids):
19337 '''
19338 relationids : typing.Sequence[int]
19339 Returns -> typing.Sequence[~RelationResult]
19340 '''
19341 # map input types to rpc msg
19342 params = dict()
19343 msg = dict(Type='Uniter', Request='RelationById', Version=3, Params=params)
19344 params['RelationIds'] = relationids
19345 reply = await self.rpc(msg)
19346 return reply
19347
19348
19349
19350 @ReturnMapping(ErrorResults)
19351 async def RemoveStorageAttachments(self, ids):
19352 '''
19353 ids : typing.Sequence[~StorageAttachmentId]
19354 Returns -> typing.Sequence[~ErrorResult]
19355 '''
19356 # map input types to rpc msg
19357 params = dict()
19358 msg = dict(Type='Uniter', Request='RemoveStorageAttachments', Version=3, Params=params)
19359 params['ids'] = ids
19360 reply = await self.rpc(msg)
19361 return reply
19362
19363
19364
19365 @ReturnMapping(ErrorResults)
19366 async def RequestReboot(self, entities):
19367 '''
19368 entities : typing.Sequence[~Entity]
19369 Returns -> typing.Sequence[~ErrorResult]
19370 '''
19371 # map input types to rpc msg
19372 params = dict()
19373 msg = dict(Type='Uniter', Request='RequestReboot', Version=3, Params=params)
19374 params['Entities'] = entities
19375 reply = await self.rpc(msg)
19376 return reply
19377
19378
19379
19380 @ReturnMapping(ResolvedModeResults)
19381 async def Resolved(self, entities):
19382 '''
19383 entities : typing.Sequence[~Entity]
19384 Returns -> typing.Sequence[~ResolvedModeResult]
19385 '''
19386 # map input types to rpc msg
19387 params = dict()
19388 msg = dict(Type='Uniter', Request='Resolved', Version=3, Params=params)
19389 params['Entities'] = entities
19390 reply = await self.rpc(msg)
19391 return reply
19392
19393
19394
19395 @ReturnMapping(StringResults)
19396 async def ServiceOwner(self, entities):
19397 '''
19398 entities : typing.Sequence[~Entity]
19399 Returns -> typing.Sequence[~StringResult]
19400 '''
19401 # map input types to rpc msg
19402 params = dict()
19403 msg = dict(Type='Uniter', Request='ServiceOwner', Version=3, Params=params)
19404 params['Entities'] = entities
19405 reply = await self.rpc(msg)
19406 return reply
19407
19408
19409
19410 @ReturnMapping(ServiceStatusResults)
19411 async def ServiceStatus(self, entities):
19412 '''
19413 entities : typing.Sequence[~Entity]
19414 Returns -> typing.Sequence[~ServiceStatusResult]
19415 '''
19416 # map input types to rpc msg
19417 params = dict()
19418 msg = dict(Type='Uniter', Request='ServiceStatus', Version=3, Params=params)
19419 params['Entities'] = entities
19420 reply = await self.rpc(msg)
19421 return reply
19422
19423
19424
19425 @ReturnMapping(ErrorResults)
19426 async def SetAgentStatus(self, entities):
19427 '''
19428 entities : typing.Sequence[~EntityStatusArgs]
19429 Returns -> typing.Sequence[~ErrorResult]
19430 '''
19431 # map input types to rpc msg
19432 params = dict()
19433 msg = dict(Type='Uniter', Request='SetAgentStatus', Version=3, Params=params)
19434 params['Entities'] = entities
19435 reply = await self.rpc(msg)
19436 return reply
19437
19438
19439
19440 @ReturnMapping(ErrorResults)
19441 async def SetCharmURL(self, entities):
19442 '''
19443 entities : typing.Sequence[~EntityCharmURL]
19444 Returns -> typing.Sequence[~ErrorResult]
19445 '''
19446 # map input types to rpc msg
19447 params = dict()
19448 msg = dict(Type='Uniter', Request='SetCharmURL', Version=3, Params=params)
19449 params['Entities'] = entities
19450 reply = await self.rpc(msg)
19451 return reply
19452
19453
19454
19455 @ReturnMapping(ErrorResults)
19456 async def SetServiceStatus(self, entities):
19457 '''
19458 entities : typing.Sequence[~EntityStatusArgs]
19459 Returns -> typing.Sequence[~ErrorResult]
19460 '''
19461 # map input types to rpc msg
19462 params = dict()
19463 msg = dict(Type='Uniter', Request='SetServiceStatus', Version=3, Params=params)
19464 params['Entities'] = entities
19465 reply = await self.rpc(msg)
19466 return reply
19467
19468
19469
19470 @ReturnMapping(ErrorResults)
19471 async def SetStatus(self, entities):
19472 '''
19473 entities : typing.Sequence[~EntityStatusArgs]
19474 Returns -> typing.Sequence[~ErrorResult]
19475 '''
19476 # map input types to rpc msg
19477 params = dict()
19478 msg = dict(Type='Uniter', Request='SetStatus', Version=3, Params=params)
19479 params['Entities'] = entities
19480 reply = await self.rpc(msg)
19481 return reply
19482
19483
19484
19485 @ReturnMapping(ErrorResults)
19486 async def SetUnitStatus(self, entities):
19487 '''
19488 entities : typing.Sequence[~EntityStatusArgs]
19489 Returns -> typing.Sequence[~ErrorResult]
19490 '''
19491 # map input types to rpc msg
19492 params = dict()
19493 msg = dict(Type='Uniter', Request='SetUnitStatus', Version=3, Params=params)
19494 params['Entities'] = entities
19495 reply = await self.rpc(msg)
19496 return reply
19497
19498
19499
19500 @ReturnMapping(LifeResults)
19501 async def StorageAttachmentLife(self, ids):
19502 '''
19503 ids : typing.Sequence[~StorageAttachmentId]
19504 Returns -> typing.Sequence[~LifeResult]
19505 '''
19506 # map input types to rpc msg
19507 params = dict()
19508 msg = dict(Type='Uniter', Request='StorageAttachmentLife', Version=3, Params=params)
19509 params['ids'] = ids
19510 reply = await self.rpc(msg)
19511 return reply
19512
19513
19514
19515 @ReturnMapping(StorageAttachmentResults)
19516 async def StorageAttachments(self, ids):
19517 '''
19518 ids : typing.Sequence[~StorageAttachmentId]
19519 Returns -> typing.Sequence[~StorageAttachmentResult]
19520 '''
19521 # map input types to rpc msg
19522 params = dict()
19523 msg = dict(Type='Uniter', Request='StorageAttachments', Version=3, Params=params)
19524 params['ids'] = ids
19525 reply = await self.rpc(msg)
19526 return reply
19527
19528
19529
19530 @ReturnMapping(StatusResults)
19531 async def UnitStatus(self, entities):
19532 '''
19533 entities : typing.Sequence[~Entity]
19534 Returns -> typing.Sequence[~StatusResult]
19535 '''
19536 # map input types to rpc msg
19537 params = dict()
19538 msg = dict(Type='Uniter', Request='UnitStatus', Version=3, Params=params)
19539 params['Entities'] = entities
19540 reply = await self.rpc(msg)
19541 return reply
19542
19543
19544
19545 @ReturnMapping(StorageAttachmentIdsResults)
19546 async def UnitStorageAttachments(self, entities):
19547 '''
19548 entities : typing.Sequence[~Entity]
19549 Returns -> typing.Sequence[~StorageAttachmentIdsResult]
19550 '''
19551 # map input types to rpc msg
19552 params = dict()
19553 msg = dict(Type='Uniter', Request='UnitStorageAttachments', Version=3, Params=params)
19554 params['Entities'] = entities
19555 reply = await self.rpc(msg)
19556 return reply
19557
19558
19559
19560 @ReturnMapping(ErrorResults)
19561 async def UpdateSettings(self, relationunits):
19562 '''
19563 relationunits : typing.Sequence[~RelationUnitSettings]
19564 Returns -> typing.Sequence[~ErrorResult]
19565 '''
19566 # map input types to rpc msg
19567 params = dict()
19568 msg = dict(Type='Uniter', Request='UpdateSettings', Version=3, Params=params)
19569 params['RelationUnits'] = relationunits
19570 reply = await self.rpc(msg)
19571 return reply
19572
19573
19574
19575 @ReturnMapping(NotifyWatchResults)
19576 async def Watch(self, entities):
19577 '''
19578 entities : typing.Sequence[~Entity]
19579 Returns -> typing.Sequence[~NotifyWatchResult]
19580 '''
19581 # map input types to rpc msg
19582 params = dict()
19583 msg = dict(Type='Uniter', Request='Watch', Version=3, Params=params)
19584 params['Entities'] = entities
19585 reply = await self.rpc(msg)
19586 return reply
19587
19588
19589
19590 @ReturnMapping(NotifyWatchResult)
19591 async def WatchAPIHostPorts(self):
19592 '''
19593
19594 Returns -> typing.Union[_ForwardRef('Error'), str]
19595 '''
19596 # map input types to rpc msg
19597 params = dict()
19598 msg = dict(Type='Uniter', Request='WatchAPIHostPorts', Version=3, Params=params)
19599
19600 reply = await self.rpc(msg)
19601 return reply
19602
19603
19604
19605 @ReturnMapping(StringsWatchResults)
19606 async def WatchActionNotifications(self, entities):
19607 '''
19608 entities : typing.Sequence[~Entity]
19609 Returns -> typing.Sequence[~StringsWatchResult]
19610 '''
19611 # map input types to rpc msg
19612 params = dict()
19613 msg = dict(Type='Uniter', Request='WatchActionNotifications', Version=3, Params=params)
19614 params['Entities'] = entities
19615 reply = await self.rpc(msg)
19616 return reply
19617
19618
19619
19620 @ReturnMapping(NotifyWatchResults)
19621 async def WatchConfigSettings(self, entities):
19622 '''
19623 entities : typing.Sequence[~Entity]
19624 Returns -> typing.Sequence[~NotifyWatchResult]
19625 '''
19626 # map input types to rpc msg
19627 params = dict()
19628 msg = dict(Type='Uniter', Request='WatchConfigSettings', Version=3, Params=params)
19629 params['Entities'] = entities
19630 reply = await self.rpc(msg)
19631 return reply
19632
19633
19634
19635 @ReturnMapping(NotifyWatchResult)
19636 async def WatchForModelConfigChanges(self):
19637 '''
19638
19639 Returns -> typing.Union[_ForwardRef('Error'), str]
19640 '''
19641 # map input types to rpc msg
19642 params = dict()
19643 msg = dict(Type='Uniter', Request='WatchForModelConfigChanges', Version=3, Params=params)
19644
19645 reply = await self.rpc(msg)
19646 return reply
19647
19648
19649
19650 @ReturnMapping(NotifyWatchResults)
19651 async def WatchLeadershipSettings(self, entities):
19652 '''
19653 entities : typing.Sequence[~Entity]
19654 Returns -> typing.Sequence[~NotifyWatchResult]
19655 '''
19656 # map input types to rpc msg
19657 params = dict()
19658 msg = dict(Type='Uniter', Request='WatchLeadershipSettings', Version=3, Params=params)
19659 params['Entities'] = entities
19660 reply = await self.rpc(msg)
19661 return reply
19662
19663
19664
19665 @ReturnMapping(NotifyWatchResults)
19666 async def WatchMeterStatus(self, entities):
19667 '''
19668 entities : typing.Sequence[~Entity]
19669 Returns -> typing.Sequence[~NotifyWatchResult]
19670 '''
19671 # map input types to rpc msg
19672 params = dict()
19673 msg = dict(Type='Uniter', Request='WatchMeterStatus', Version=3, Params=params)
19674 params['Entities'] = entities
19675 reply = await self.rpc(msg)
19676 return reply
19677
19678
19679
19680 @ReturnMapping(RelationUnitsWatchResults)
19681 async def WatchRelationUnits(self, relationunits):
19682 '''
19683 relationunits : typing.Sequence[~RelationUnit]
19684 Returns -> typing.Sequence[~RelationUnitsWatchResult]
19685 '''
19686 # map input types to rpc msg
19687 params = dict()
19688 msg = dict(Type='Uniter', Request='WatchRelationUnits', Version=3, Params=params)
19689 params['RelationUnits'] = relationunits
19690 reply = await self.rpc(msg)
19691 return reply
19692
19693
19694
19695 @ReturnMapping(StringsWatchResults)
19696 async def WatchServiceRelations(self, entities):
19697 '''
19698 entities : typing.Sequence[~Entity]
19699 Returns -> typing.Sequence[~StringsWatchResult]
19700 '''
19701 # map input types to rpc msg
19702 params = dict()
19703 msg = dict(Type='Uniter', Request='WatchServiceRelations', Version=3, Params=params)
19704 params['Entities'] = entities
19705 reply = await self.rpc(msg)
19706 return reply
19707
19708
19709
19710 @ReturnMapping(NotifyWatchResults)
19711 async def WatchStorageAttachments(self, ids):
19712 '''
19713 ids : typing.Sequence[~StorageAttachmentId]
19714 Returns -> typing.Sequence[~NotifyWatchResult]
19715 '''
19716 # map input types to rpc msg
19717 params = dict()
19718 msg = dict(Type='Uniter', Request='WatchStorageAttachments', Version=3, Params=params)
19719 params['ids'] = ids
19720 reply = await self.rpc(msg)
19721 return reply
19722
19723
19724
19725 @ReturnMapping(NotifyWatchResults)
19726 async def WatchUnitAddresses(self, entities):
19727 '''
19728 entities : typing.Sequence[~Entity]
19729 Returns -> typing.Sequence[~NotifyWatchResult]
19730 '''
19731 # map input types to rpc msg
19732 params = dict()
19733 msg = dict(Type='Uniter', Request='WatchUnitAddresses', Version=3, Params=params)
19734 params['Entities'] = entities
19735 reply = await self.rpc(msg)
19736 return reply
19737
19738
19739
19740 @ReturnMapping(StringsWatchResults)
19741 async def WatchUnitStorageAttachments(self, entities):
19742 '''
19743 entities : typing.Sequence[~Entity]
19744 Returns -> typing.Sequence[~StringsWatchResult]
19745 '''
19746 # map input types to rpc msg
19747 params = dict()
19748 msg = dict(Type='Uniter', Request='WatchUnitStorageAttachments', Version=3, Params=params)
19749 params['Entities'] = entities
19750 reply = await self.rpc(msg)
19751 return reply
19752
19753
19754 class Upgrader(Type):
19755 name = 'Upgrader'
19756 version = 1
19757 schema = {'definitions': {'Binary': {'additionalProperties': False,
19758 'properties': {'Arch': {'type': 'string'},
19759 'Number': {'$ref': '#/definitions/Number'},
19760 'Series': {'type': 'string'}},
19761 'required': ['Number', 'Series', 'Arch'],
19762 'type': 'object'},
19763 'Entities': {'additionalProperties': False,
19764 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
19765 'type': 'array'}},
19766 'required': ['Entities'],
19767 'type': 'object'},
19768 'EntitiesVersion': {'additionalProperties': False,
19769 'properties': {'AgentTools': {'items': {'$ref': '#/definitions/EntityVersion'},
19770 'type': 'array'}},
19771 'required': ['AgentTools'],
19772 'type': 'object'},
19773 'Entity': {'additionalProperties': False,
19774 'properties': {'Tag': {'type': 'string'}},
19775 'required': ['Tag'],
19776 'type': 'object'},
19777 'EntityVersion': {'additionalProperties': False,
19778 'properties': {'Tag': {'type': 'string'},
19779 'Tools': {'$ref': '#/definitions/Version'}},
19780 'required': ['Tag', 'Tools'],
19781 'type': 'object'},
19782 'Error': {'additionalProperties': False,
19783 'properties': {'Code': {'type': 'string'},
19784 'Info': {'$ref': '#/definitions/ErrorInfo'},
19785 'Message': {'type': 'string'}},
19786 'required': ['Message', 'Code'],
19787 'type': 'object'},
19788 'ErrorInfo': {'additionalProperties': False,
19789 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
19790 'MacaroonPath': {'type': 'string'}},
19791 'type': 'object'},
19792 'ErrorResult': {'additionalProperties': False,
19793 'properties': {'Error': {'$ref': '#/definitions/Error'}},
19794 'required': ['Error'],
19795 'type': 'object'},
19796 'ErrorResults': {'additionalProperties': False,
19797 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
19798 'type': 'array'}},
19799 'required': ['Results'],
19800 'type': 'object'},
19801 'Macaroon': {'additionalProperties': False,
19802 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
19803 'type': 'array'},
19804 'data': {'items': {'type': 'integer'},
19805 'type': 'array'},
19806 'id': {'$ref': '#/definitions/packet'},
19807 'location': {'$ref': '#/definitions/packet'},
19808 'sig': {'items': {'type': 'integer'},
19809 'type': 'array'}},
19810 'required': ['data',
19811 'location',
19812 'id',
19813 'caveats',
19814 'sig'],
19815 'type': 'object'},
19816 'NotifyWatchResult': {'additionalProperties': False,
19817 'properties': {'Error': {'$ref': '#/definitions/Error'},
19818 'NotifyWatcherId': {'type': 'string'}},
19819 'required': ['NotifyWatcherId', 'Error'],
19820 'type': 'object'},
19821 'NotifyWatchResults': {'additionalProperties': False,
19822 'properties': {'Results': {'items': {'$ref': '#/definitions/NotifyWatchResult'},
19823 'type': 'array'}},
19824 'required': ['Results'],
19825 'type': 'object'},
19826 'Number': {'additionalProperties': False,
19827 'properties': {'Build': {'type': 'integer'},
19828 'Major': {'type': 'integer'},
19829 'Minor': {'type': 'integer'},
19830 'Patch': {'type': 'integer'},
19831 'Tag': {'type': 'string'}},
19832 'required': ['Major',
19833 'Minor',
19834 'Tag',
19835 'Patch',
19836 'Build'],
19837 'type': 'object'},
19838 'Tools': {'additionalProperties': False,
19839 'properties': {'sha256': {'type': 'string'},
19840 'size': {'type': 'integer'},
19841 'url': {'type': 'string'},
19842 'version': {'$ref': '#/definitions/Binary'}},
19843 'required': ['version', 'url', 'size'],
19844 'type': 'object'},
19845 'ToolsResult': {'additionalProperties': False,
19846 'properties': {'DisableSSLHostnameVerification': {'type': 'boolean'},
19847 'Error': {'$ref': '#/definitions/Error'},
19848 'ToolsList': {'items': {'$ref': '#/definitions/Tools'},
19849 'type': 'array'}},
19850 'required': ['ToolsList',
19851 'DisableSSLHostnameVerification',
19852 'Error'],
19853 'type': 'object'},
19854 'ToolsResults': {'additionalProperties': False,
19855 'properties': {'Results': {'items': {'$ref': '#/definitions/ToolsResult'},
19856 'type': 'array'}},
19857 'required': ['Results'],
19858 'type': 'object'},
19859 'Version': {'additionalProperties': False,
19860 'properties': {'Version': {'$ref': '#/definitions/Binary'}},
19861 'required': ['Version'],
19862 'type': 'object'},
19863 'VersionResult': {'additionalProperties': False,
19864 'properties': {'Error': {'$ref': '#/definitions/Error'},
19865 'Version': {'$ref': '#/definitions/Number'}},
19866 'required': ['Version', 'Error'],
19867 'type': 'object'},
19868 'VersionResults': {'additionalProperties': False,
19869 'properties': {'Results': {'items': {'$ref': '#/definitions/VersionResult'},
19870 'type': 'array'}},
19871 'required': ['Results'],
19872 'type': 'object'},
19873 'caveat': {'additionalProperties': False,
19874 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
19875 'location': {'$ref': '#/definitions/packet'},
19876 'verificationId': {'$ref': '#/definitions/packet'}},
19877 'required': ['location',
19878 'caveatId',
19879 'verificationId'],
19880 'type': 'object'},
19881 'packet': {'additionalProperties': False,
19882 'properties': {'headerLen': {'type': 'integer'},
19883 'start': {'type': 'integer'},
19884 'totalLen': {'type': 'integer'}},
19885 'required': ['start', 'totalLen', 'headerLen'],
19886 'type': 'object'}},
19887 'properties': {'DesiredVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19888 'Result': {'$ref': '#/definitions/VersionResults'}},
19889 'type': 'object'},
19890 'SetTools': {'properties': {'Params': {'$ref': '#/definitions/EntitiesVersion'},
19891 'Result': {'$ref': '#/definitions/ErrorResults'}},
19892 'type': 'object'},
19893 'Tools': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19894 'Result': {'$ref': '#/definitions/ToolsResults'}},
19895 'type': 'object'},
19896 'WatchAPIVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
19897 'Result': {'$ref': '#/definitions/NotifyWatchResults'}},
19898 'type': 'object'}},
19899 'type': 'object'}
19900
19901
19902 @ReturnMapping(VersionResults)
19903 async def DesiredVersion(self, entities):
19904 '''
19905 entities : typing.Sequence[~Entity]
19906 Returns -> typing.Sequence[~VersionResult]
19907 '''
19908 # map input types to rpc msg
19909 params = dict()
19910 msg = dict(Type='Upgrader', Request='DesiredVersion', Version=1, Params=params)
19911 params['Entities'] = entities
19912 reply = await self.rpc(msg)
19913 return reply
19914
19915
19916
19917 @ReturnMapping(ErrorResults)
19918 async def SetTools(self, agenttools):
19919 '''
19920 agenttools : typing.Sequence[~EntityVersion]
19921 Returns -> typing.Sequence[~ErrorResult]
19922 '''
19923 # map input types to rpc msg
19924 params = dict()
19925 msg = dict(Type='Upgrader', Request='SetTools', Version=1, Params=params)
19926 params['AgentTools'] = agenttools
19927 reply = await self.rpc(msg)
19928 return reply
19929
19930
19931
19932 @ReturnMapping(ToolsResults)
19933 async def Tools(self, entities):
19934 '''
19935 entities : typing.Sequence[~Entity]
19936 Returns -> typing.Sequence[~ToolsResult]
19937 '''
19938 # map input types to rpc msg
19939 params = dict()
19940 msg = dict(Type='Upgrader', Request='Tools', Version=1, Params=params)
19941 params['Entities'] = entities
19942 reply = await self.rpc(msg)
19943 return reply
19944
19945
19946
19947 @ReturnMapping(NotifyWatchResults)
19948 async def WatchAPIVersion(self, entities):
19949 '''
19950 entities : typing.Sequence[~Entity]
19951 Returns -> typing.Sequence[~NotifyWatchResult]
19952 '''
19953 # map input types to rpc msg
19954 params = dict()
19955 msg = dict(Type='Upgrader', Request='WatchAPIVersion', Version=1, Params=params)
19956 params['Entities'] = entities
19957 reply = await self.rpc(msg)
19958 return reply
19959
19960
19961 class UserManager(Type):
19962 name = 'UserManager'
19963 version = 1
19964 schema = {'definitions': {'AddUser': {'additionalProperties': False,
19965 'properties': {'display-name': {'type': 'string'},
19966 'model-access-permission': {'type': 'string'},
19967 'password': {'type': 'string'},
19968 'shared-model-tags': {'items': {'type': 'string'},
19969 'type': 'array'},
19970 'username': {'type': 'string'}},
19971 'required': ['username',
19972 'display-name',
19973 'shared-model-tags'],
19974 'type': 'object'},
19975 'AddUserResult': {'additionalProperties': False,
19976 'properties': {'error': {'$ref': '#/definitions/Error'},
19977 'secret-key': {'items': {'type': 'integer'},
19978 'type': 'array'},
19979 'tag': {'type': 'string'}},
19980 'type': 'object'},
19981 'AddUserResults': {'additionalProperties': False,
19982 'properties': {'results': {'items': {'$ref': '#/definitions/AddUserResult'},
19983 'type': 'array'}},
19984 'required': ['results'],
19985 'type': 'object'},
19986 'AddUsers': {'additionalProperties': False,
19987 'properties': {'users': {'items': {'$ref': '#/definitions/AddUser'},
19988 'type': 'array'}},
19989 'required': ['users'],
19990 'type': 'object'},
19991 'Entities': {'additionalProperties': False,
19992 'properties': {'Entities': {'items': {'$ref': '#/definitions/Entity'},
19993 'type': 'array'}},
19994 'required': ['Entities'],
19995 'type': 'object'},
19996 'Entity': {'additionalProperties': False,
19997 'properties': {'Tag': {'type': 'string'}},
19998 'required': ['Tag'],
19999 'type': 'object'},
20000 'EntityPassword': {'additionalProperties': False,
20001 'properties': {'Password': {'type': 'string'},
20002 'Tag': {'type': 'string'}},
20003 'required': ['Tag', 'Password'],
20004 'type': 'object'},
20005 'EntityPasswords': {'additionalProperties': False,
20006 'properties': {'Changes': {'items': {'$ref': '#/definitions/EntityPassword'},
20007 'type': 'array'}},
20008 'required': ['Changes'],
20009 'type': 'object'},
20010 'Error': {'additionalProperties': False,
20011 'properties': {'Code': {'type': 'string'},
20012 'Info': {'$ref': '#/definitions/ErrorInfo'},
20013 'Message': {'type': 'string'}},
20014 'required': ['Message', 'Code'],
20015 'type': 'object'},
20016 'ErrorInfo': {'additionalProperties': False,
20017 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20018 'MacaroonPath': {'type': 'string'}},
20019 'type': 'object'},
20020 'ErrorResult': {'additionalProperties': False,
20021 'properties': {'Error': {'$ref': '#/definitions/Error'}},
20022 'required': ['Error'],
20023 'type': 'object'},
20024 'ErrorResults': {'additionalProperties': False,
20025 'properties': {'Results': {'items': {'$ref': '#/definitions/ErrorResult'},
20026 'type': 'array'}},
20027 'required': ['Results'],
20028 'type': 'object'},
20029 'Macaroon': {'additionalProperties': False,
20030 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20031 'type': 'array'},
20032 'data': {'items': {'type': 'integer'},
20033 'type': 'array'},
20034 'id': {'$ref': '#/definitions/packet'},
20035 'location': {'$ref': '#/definitions/packet'},
20036 'sig': {'items': {'type': 'integer'},
20037 'type': 'array'}},
20038 'required': ['data',
20039 'location',
20040 'id',
20041 'caveats',
20042 'sig'],
20043 'type': 'object'},
20044 'MacaroonResult': {'additionalProperties': False,
20045 'properties': {'error': {'$ref': '#/definitions/Error'},
20046 'result': {'$ref': '#/definitions/Macaroon'}},
20047 'type': 'object'},
20048 'MacaroonResults': {'additionalProperties': False,
20049 'properties': {'results': {'items': {'$ref': '#/definitions/MacaroonResult'},
20050 'type': 'array'}},
20051 'required': ['results'],
20052 'type': 'object'},
20053 'UserInfo': {'additionalProperties': False,
20054 'properties': {'created-by': {'type': 'string'},
20055 'date-created': {'format': 'date-time',
20056 'type': 'string'},
20057 'disabled': {'type': 'boolean'},
20058 'display-name': {'type': 'string'},
20059 'last-connection': {'format': 'date-time',
20060 'type': 'string'},
20061 'username': {'type': 'string'}},
20062 'required': ['username',
20063 'display-name',
20064 'created-by',
20065 'date-created',
20066 'disabled'],
20067 'type': 'object'},
20068 'UserInfoRequest': {'additionalProperties': False,
20069 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'},
20070 'type': 'array'},
20071 'include-disabled': {'type': 'boolean'}},
20072 'required': ['entities',
20073 'include-disabled'],
20074 'type': 'object'},
20075 'UserInfoResult': {'additionalProperties': False,
20076 'properties': {'error': {'$ref': '#/definitions/Error'},
20077 'result': {'$ref': '#/definitions/UserInfo'}},
20078 'type': 'object'},
20079 'UserInfoResults': {'additionalProperties': False,
20080 'properties': {'results': {'items': {'$ref': '#/definitions/UserInfoResult'},
20081 'type': 'array'}},
20082 'required': ['results'],
20083 'type': 'object'},
20084 'caveat': {'additionalProperties': False,
20085 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20086 'location': {'$ref': '#/definitions/packet'},
20087 'verificationId': {'$ref': '#/definitions/packet'}},
20088 'required': ['location',
20089 'caveatId',
20090 'verificationId'],
20091 'type': 'object'},
20092 'packet': {'additionalProperties': False,
20093 'properties': {'headerLen': {'type': 'integer'},
20094 'start': {'type': 'integer'},
20095 'totalLen': {'type': 'integer'}},
20096 'required': ['start', 'totalLen', 'headerLen'],
20097 'type': 'object'}},
20098 'properties': {'AddUser': {'properties': {'Params': {'$ref': '#/definitions/AddUsers'},
20099 'Result': {'$ref': '#/definitions/AddUserResults'}},
20100 'type': 'object'},
20101 'CreateLocalLoginMacaroon': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20102 'Result': {'$ref': '#/definitions/MacaroonResults'}},
20103 'type': 'object'},
20104 'DisableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20105 'Result': {'$ref': '#/definitions/ErrorResults'}},
20106 'type': 'object'},
20107 'EnableUser': {'properties': {'Params': {'$ref': '#/definitions/Entities'},
20108 'Result': {'$ref': '#/definitions/ErrorResults'}},
20109 'type': 'object'},
20110 'SetPassword': {'properties': {'Params': {'$ref': '#/definitions/EntityPasswords'},
20111 'Result': {'$ref': '#/definitions/ErrorResults'}},
20112 'type': 'object'},
20113 'UserInfo': {'properties': {'Params': {'$ref': '#/definitions/UserInfoRequest'},
20114 'Result': {'$ref': '#/definitions/UserInfoResults'}},
20115 'type': 'object'}},
20116 'type': 'object'}
20117
20118
20119 @ReturnMapping(AddUserResults)
20120 async def AddUser(self, users):
20121 '''
20122 users : typing.Sequence[~AddUser]
20123 Returns -> typing.Sequence[~AddUserResult]
20124 '''
20125 # map input types to rpc msg
20126 params = dict()
20127 msg = dict(Type='UserManager', Request='AddUser', Version=1, Params=params)
20128 params['users'] = users
20129 reply = await self.rpc(msg)
20130 return reply
20131
20132
20133
20134 @ReturnMapping(MacaroonResults)
20135 async def CreateLocalLoginMacaroon(self, entities):
20136 '''
20137 entities : typing.Sequence[~Entity]
20138 Returns -> typing.Sequence[~MacaroonResult]
20139 '''
20140 # map input types to rpc msg
20141 params = dict()
20142 msg = dict(Type='UserManager', Request='CreateLocalLoginMacaroon', Version=1, Params=params)
20143 params['Entities'] = entities
20144 reply = await self.rpc(msg)
20145 return reply
20146
20147
20148
20149 @ReturnMapping(ErrorResults)
20150 async def DisableUser(self, entities):
20151 '''
20152 entities : typing.Sequence[~Entity]
20153 Returns -> typing.Sequence[~ErrorResult]
20154 '''
20155 # map input types to rpc msg
20156 params = dict()
20157 msg = dict(Type='UserManager', Request='DisableUser', Version=1, Params=params)
20158 params['Entities'] = entities
20159 reply = await self.rpc(msg)
20160 return reply
20161
20162
20163
20164 @ReturnMapping(ErrorResults)
20165 async def EnableUser(self, entities):
20166 '''
20167 entities : typing.Sequence[~Entity]
20168 Returns -> typing.Sequence[~ErrorResult]
20169 '''
20170 # map input types to rpc msg
20171 params = dict()
20172 msg = dict(Type='UserManager', Request='EnableUser', Version=1, Params=params)
20173 params['Entities'] = entities
20174 reply = await self.rpc(msg)
20175 return reply
20176
20177
20178
20179 @ReturnMapping(ErrorResults)
20180 async def SetPassword(self, changes):
20181 '''
20182 changes : typing.Sequence[~EntityPassword]
20183 Returns -> typing.Sequence[~ErrorResult]
20184 '''
20185 # map input types to rpc msg
20186 params = dict()
20187 msg = dict(Type='UserManager', Request='SetPassword', Version=1, Params=params)
20188 params['Changes'] = changes
20189 reply = await self.rpc(msg)
20190 return reply
20191
20192
20193
20194 @ReturnMapping(UserInfoResults)
20195 async def UserInfo(self, entities, include_disabled):
20196 '''
20197 entities : typing.Sequence[~Entity]
20198 include_disabled : bool
20199 Returns -> typing.Sequence[~UserInfoResult]
20200 '''
20201 # map input types to rpc msg
20202 params = dict()
20203 msg = dict(Type='UserManager', Request='UserInfo', Version=1, Params=params)
20204 params['entities'] = entities
20205 params['include-disabled'] = include_disabled
20206 reply = await self.rpc(msg)
20207 return reply
20208
20209
20210 class VolumeAttachmentsWatcher(Type):
20211 name = 'VolumeAttachmentsWatcher'
20212 version = 2
20213 schema = {'definitions': {'Error': {'additionalProperties': False,
20214 'properties': {'Code': {'type': 'string'},
20215 'Info': {'$ref': '#/definitions/ErrorInfo'},
20216 'Message': {'type': 'string'}},
20217 'required': ['Message', 'Code'],
20218 'type': 'object'},
20219 'ErrorInfo': {'additionalProperties': False,
20220 'properties': {'Macaroon': {'$ref': '#/definitions/Macaroon'},
20221 'MacaroonPath': {'type': 'string'}},
20222 'type': 'object'},
20223 'Macaroon': {'additionalProperties': False,
20224 'properties': {'caveats': {'items': {'$ref': '#/definitions/caveat'},
20225 'type': 'array'},
20226 'data': {'items': {'type': 'integer'},
20227 'type': 'array'},
20228 'id': {'$ref': '#/definitions/packet'},
20229 'location': {'$ref': '#/definitions/packet'},
20230 'sig': {'items': {'type': 'integer'},
20231 'type': 'array'}},
20232 'required': ['data',
20233 'location',
20234 'id',
20235 'caveats',
20236 'sig'],
20237 'type': 'object'},
20238 'MachineStorageId': {'additionalProperties': False,
20239 'properties': {'attachmenttag': {'type': 'string'},
20240 'machinetag': {'type': 'string'}},
20241 'required': ['machinetag',
20242 'attachmenttag'],
20243 'type': 'object'},
20244 'MachineStorageIdsWatchResult': {'additionalProperties': False,
20245 'properties': {'Changes': {'items': {'$ref': '#/definitions/MachineStorageId'},
20246 'type': 'array'},
20247 'Error': {'$ref': '#/definitions/Error'},
20248 'MachineStorageIdsWatcherId': {'type': 'string'}},
20249 'required': ['MachineStorageIdsWatcherId',
20250 'Changes',
20251 'Error'],
20252 'type': 'object'},
20253 'caveat': {'additionalProperties': False,
20254 'properties': {'caveatId': {'$ref': '#/definitions/packet'},
20255 'location': {'$ref': '#/definitions/packet'},
20256 'verificationId': {'$ref': '#/definitions/packet'}},
20257 'required': ['location',
20258 'caveatId',
20259 'verificationId'],
20260 'type': 'object'},
20261 'packet': {'additionalProperties': False,
20262 'properties': {'headerLen': {'type': 'integer'},
20263 'start': {'type': 'integer'},
20264 'totalLen': {'type': 'integer'}},
20265 'required': ['start', 'totalLen', 'headerLen'],
20266 'type': 'object'}},
20267 'properties': {'Next': {'properties': {'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}},
20268 'type': 'object'},
20269 'Stop': {'type': 'object'}},
20270 'type': 'object'}
20271
20272
20273 @ReturnMapping(MachineStorageIdsWatchResult)
20274 async def Next(self):
20275 '''
20276
20277 Returns -> typing.Union[typing.Sequence[~MachineStorageId], _ForwardRef('Error')]
20278 '''
20279 # map input types to rpc msg
20280 params = dict()
20281 msg = dict(Type='VolumeAttachmentsWatcher', Request='Next', Version=2, Params=params)
20282
20283 reply = await self.rpc(msg)
20284 return reply
20285
20286
20287
20288 @ReturnMapping(None)
20289 async def Stop(self):
20290 '''
20291
20292 Returns -> None
20293 '''
20294 # map input types to rpc msg
20295 params = dict()
20296 msg = dict(Type='VolumeAttachmentsWatcher', Request='Stop', Version=2, Params=params)
20297
20298 reply = await self.rpc(msg)
20299 return reply
20300
20301