| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 1 | # DO NOT CHANGE THIS FILE! This file is auto-generated by facade.py. |
| 2 | # Changes will be overwritten/lost when the file is regenerated. |
| 3 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4 | from juju.client._definitions import * |
| Adam Israel | c3e6c2e | 2018-03-01 09:31:50 -0500 | [diff] [blame] | 5 | from juju.client.facade import ReturnMapping, Type |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 6 | |
| 7 | |
| 8 | class ApplicationFacade(Type): |
| 9 | name = 'Application' |
| 10 | version = 4 |
| 11 | schema = {'definitions': {'AddApplicationUnits': {'additionalProperties': False, |
| 12 | 'properties': {'application': {'type': 'string'}, |
| 13 | 'num-units': {'type': 'integer'}, |
| 14 | 'placement': {'items': {'$ref': '#/definitions/Placement'}, |
| 15 | 'type': 'array'}}, |
| 16 | 'required': ['application', |
| 17 | 'num-units', |
| 18 | 'placement'], |
| 19 | 'type': 'object'}, |
| 20 | 'AddApplicationUnitsResults': {'additionalProperties': False, |
| 21 | 'properties': {'units': {'items': {'type': 'string'}, |
| 22 | 'type': 'array'}}, |
| 23 | 'required': ['units'], |
| 24 | 'type': 'object'}, |
| 25 | 'AddRelation': {'additionalProperties': False, |
| 26 | 'properties': {'endpoints': {'items': {'type': 'string'}, |
| 27 | 'type': 'array'}}, |
| 28 | 'required': ['endpoints'], |
| 29 | 'type': 'object'}, |
| 30 | 'AddRelationResults': {'additionalProperties': False, |
| 31 | 'properties': {'endpoints': {'patternProperties': {'.*': {'$ref': '#/definitions/CharmRelation'}}, |
| 32 | 'type': 'object'}}, |
| 33 | 'required': ['endpoints'], |
| 34 | 'type': 'object'}, |
| 35 | 'ApplicationCharmRelations': {'additionalProperties': False, |
| 36 | 'properties': {'application': {'type': 'string'}}, |
| 37 | 'required': ['application'], |
| 38 | 'type': 'object'}, |
| 39 | 'ApplicationCharmRelationsResults': {'additionalProperties': False, |
| 40 | 'properties': {'charm-relations': {'items': {'type': 'string'}, |
| 41 | 'type': 'array'}}, |
| 42 | 'required': ['charm-relations'], |
| 43 | 'type': 'object'}, |
| 44 | 'ApplicationDeploy': {'additionalProperties': False, |
| 45 | 'properties': {'application': {'type': 'string'}, |
| 46 | 'channel': {'type': 'string'}, |
| 47 | 'charm-url': {'type': 'string'}, |
| 48 | 'config': {'patternProperties': {'.*': {'type': 'string'}}, |
| 49 | 'type': 'object'}, |
| 50 | 'config-yaml': {'type': 'string'}, |
| 51 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 52 | 'endpoint-bindings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 53 | 'type': 'object'}, |
| 54 | 'num-units': {'type': 'integer'}, |
| 55 | 'placement': {'items': {'$ref': '#/definitions/Placement'}, |
| 56 | 'type': 'array'}, |
| 57 | 'resources': {'patternProperties': {'.*': {'type': 'string'}}, |
| 58 | 'type': 'object'}, |
| 59 | 'series': {'type': 'string'}, |
| 60 | 'storage': {'patternProperties': {'.*': {'$ref': '#/definitions/Constraints'}}, |
| 61 | 'type': 'object'}}, |
| 62 | 'required': ['application', |
| 63 | 'series', |
| 64 | 'charm-url', |
| 65 | 'channel', |
| 66 | 'num-units', |
| 67 | 'config-yaml', |
| 68 | 'constraints'], |
| 69 | 'type': 'object'}, |
| 70 | 'ApplicationDestroy': {'additionalProperties': False, |
| 71 | 'properties': {'application': {'type': 'string'}}, |
| 72 | 'required': ['application'], |
| 73 | 'type': 'object'}, |
| 74 | 'ApplicationExpose': {'additionalProperties': False, |
| 75 | 'properties': {'application': {'type': 'string'}}, |
| 76 | 'required': ['application'], |
| 77 | 'type': 'object'}, |
| 78 | 'ApplicationGet': {'additionalProperties': False, |
| 79 | 'properties': {'application': {'type': 'string'}}, |
| 80 | 'required': ['application'], |
| 81 | 'type': 'object'}, |
| 82 | 'ApplicationGetResults': {'additionalProperties': False, |
| 83 | 'properties': {'application': {'type': 'string'}, |
| 84 | 'charm': {'type': 'string'}, |
| 85 | 'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 86 | 'type': 'object'}}, |
| 87 | 'type': 'object'}, |
| 88 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 89 | 'series': {'type': 'string'}}, |
| 90 | 'required': ['application', |
| 91 | 'charm', |
| 92 | 'config', |
| 93 | 'constraints', |
| 94 | 'series'], |
| 95 | 'type': 'object'}, |
| 96 | 'ApplicationMetricCredential': {'additionalProperties': False, |
| 97 | 'properties': {'application': {'type': 'string'}, |
| 98 | 'metrics-credentials': {'items': {'type': 'integer'}, |
| 99 | 'type': 'array'}}, |
| 100 | 'required': ['application', |
| 101 | 'metrics-credentials'], |
| 102 | 'type': 'object'}, |
| 103 | 'ApplicationMetricCredentials': {'additionalProperties': False, |
| 104 | 'properties': {'creds': {'items': {'$ref': '#/definitions/ApplicationMetricCredential'}, |
| 105 | 'type': 'array'}}, |
| 106 | 'required': ['creds'], |
| 107 | 'type': 'object'}, |
| 108 | 'ApplicationSet': {'additionalProperties': False, |
| 109 | 'properties': {'application': {'type': 'string'}, |
| 110 | 'options': {'patternProperties': {'.*': {'type': 'string'}}, |
| 111 | 'type': 'object'}}, |
| 112 | 'required': ['application', 'options'], |
| 113 | 'type': 'object'}, |
| 114 | 'ApplicationSetCharm': {'additionalProperties': False, |
| 115 | 'properties': {'application': {'type': 'string'}, |
| 116 | 'channel': {'type': 'string'}, |
| 117 | 'charm-url': {'type': 'string'}, |
| 118 | 'config-settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 119 | 'type': 'object'}, |
| 120 | 'config-settings-yaml': {'type': 'string'}, |
| 121 | 'force-series': {'type': 'boolean'}, |
| 122 | 'force-units': {'type': 'boolean'}, |
| 123 | 'resource-ids': {'patternProperties': {'.*': {'type': 'string'}}, |
| 124 | 'type': 'object'}, |
| 125 | 'storage-constraints': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageConstraints'}}, |
| 126 | 'type': 'object'}}, |
| 127 | 'required': ['application', |
| 128 | 'charm-url', |
| 129 | 'channel', |
| 130 | 'force-units', |
| 131 | 'force-series'], |
| 132 | 'type': 'object'}, |
| 133 | 'ApplicationURLs': {'additionalProperties': False, |
| 134 | 'properties': {'application-urls': {'items': {'type': 'string'}, |
| 135 | 'type': 'array'}}, |
| 136 | 'type': 'object'}, |
| 137 | 'ApplicationUnexpose': {'additionalProperties': False, |
| 138 | 'properties': {'application': {'type': 'string'}}, |
| 139 | 'required': ['application'], |
| 140 | 'type': 'object'}, |
| 141 | 'ApplicationUnset': {'additionalProperties': False, |
| 142 | 'properties': {'application': {'type': 'string'}, |
| 143 | 'options': {'items': {'type': 'string'}, |
| 144 | 'type': 'array'}}, |
| 145 | 'required': ['application', 'options'], |
| 146 | 'type': 'object'}, |
| 147 | 'ApplicationUpdate': {'additionalProperties': False, |
| 148 | 'properties': {'application': {'type': 'string'}, |
| 149 | 'charm-url': {'type': 'string'}, |
| 150 | 'constraints': {'$ref': '#/definitions/Value'}, |
| 151 | 'force-charm-url': {'type': 'boolean'}, |
| 152 | 'force-series': {'type': 'boolean'}, |
| 153 | 'min-units': {'type': 'integer'}, |
| 154 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 155 | 'type': 'object'}, |
| 156 | 'settings-yaml': {'type': 'string'}}, |
| 157 | 'required': ['application', |
| 158 | 'charm-url', |
| 159 | 'force-charm-url', |
| 160 | 'force-series', |
| 161 | 'settings-yaml'], |
| 162 | 'type': 'object'}, |
| 163 | 'ApplicationsDeploy': {'additionalProperties': False, |
| 164 | 'properties': {'applications': {'items': {'$ref': '#/definitions/ApplicationDeploy'}, |
| 165 | 'type': 'array'}}, |
| 166 | 'required': ['applications'], |
| 167 | 'type': 'object'}, |
| 168 | 'CharmRelation': {'additionalProperties': False, |
| 169 | 'properties': {'interface': {'type': 'string'}, |
| 170 | 'limit': {'type': 'integer'}, |
| 171 | 'name': {'type': 'string'}, |
| 172 | 'optional': {'type': 'boolean'}, |
| 173 | 'role': {'type': 'string'}, |
| 174 | 'scope': {'type': 'string'}}, |
| 175 | 'required': ['name', |
| 176 | 'role', |
| 177 | 'interface', |
| 178 | 'optional', |
| 179 | 'limit', |
| 180 | 'scope'], |
| 181 | 'type': 'object'}, |
| 182 | 'Constraints': {'additionalProperties': False, |
| 183 | 'properties': {'Count': {'type': 'integer'}, |
| 184 | 'Pool': {'type': 'string'}, |
| 185 | 'Size': {'type': 'integer'}}, |
| 186 | 'required': ['Pool', 'Size', 'Count'], |
| 187 | 'type': 'object'}, |
| 188 | 'ConsumeApplicationArg': {'additionalProperties': False, |
| 189 | 'properties': {'application-alias': {'type': 'string'}, |
| 190 | 'application-url': {'type': 'string'}}, |
| 191 | 'required': ['application-url'], |
| 192 | 'type': 'object'}, |
| 193 | 'ConsumeApplicationArgs': {'additionalProperties': False, |
| 194 | 'properties': {'args': {'items': {'$ref': '#/definitions/ConsumeApplicationArg'}, |
| 195 | 'type': 'array'}}, |
| 196 | 'type': 'object'}, |
| 197 | 'ConsumeApplicationResult': {'additionalProperties': False, |
| 198 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 199 | 'local-name': {'type': 'string'}}, |
| 200 | 'type': 'object'}, |
| 201 | 'ConsumeApplicationResults': {'additionalProperties': False, |
| 202 | 'properties': {'results': {'items': {'$ref': '#/definitions/ConsumeApplicationResult'}, |
| 203 | 'type': 'array'}}, |
| 204 | 'required': ['results'], |
| 205 | 'type': 'object'}, |
| 206 | 'DestroyApplicationInfo': {'additionalProperties': False, |
| 207 | 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 208 | 'type': 'array'}, |
| 209 | 'destroyed-units': {'items': {'$ref': '#/definitions/Entity'}, |
| 210 | 'type': 'array'}, |
| 211 | 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 212 | 'type': 'array'}}, |
| 213 | 'type': 'object'}, |
| 214 | 'DestroyApplicationResult': {'additionalProperties': False, |
| 215 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 216 | 'info': {'$ref': '#/definitions/DestroyApplicationInfo'}}, |
| 217 | 'type': 'object'}, |
| 218 | 'DestroyApplicationResults': {'additionalProperties': False, |
| 219 | 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyApplicationResult'}, |
| 220 | 'type': 'array'}}, |
| 221 | 'type': 'object'}, |
| 222 | 'DestroyApplicationUnits': {'additionalProperties': False, |
| 223 | 'properties': {'unit-names': {'items': {'type': 'string'}, |
| 224 | 'type': 'array'}}, |
| 225 | 'required': ['unit-names'], |
| 226 | 'type': 'object'}, |
| 227 | 'DestroyRelation': {'additionalProperties': False, |
| 228 | 'properties': {'endpoints': {'items': {'type': 'string'}, |
| 229 | 'type': 'array'}}, |
| 230 | 'required': ['endpoints'], |
| 231 | 'type': 'object'}, |
| 232 | 'DestroyUnitInfo': {'additionalProperties': False, |
| 233 | 'properties': {'destroyed-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 234 | 'type': 'array'}, |
| 235 | 'detached-storage': {'items': {'$ref': '#/definitions/Entity'}, |
| 236 | 'type': 'array'}}, |
| 237 | 'type': 'object'}, |
| 238 | 'DestroyUnitResult': {'additionalProperties': False, |
| 239 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 240 | 'info': {'$ref': '#/definitions/DestroyUnitInfo'}}, |
| 241 | 'type': 'object'}, |
| 242 | 'DestroyUnitResults': {'additionalProperties': False, |
| 243 | 'properties': {'results': {'items': {'$ref': '#/definitions/DestroyUnitResult'}, |
| 244 | 'type': 'array'}}, |
| 245 | 'type': 'object'}, |
| 246 | 'Entities': {'additionalProperties': False, |
| 247 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 248 | 'type': 'array'}}, |
| 249 | 'required': ['entities'], |
| 250 | 'type': 'object'}, |
| 251 | 'Entity': {'additionalProperties': False, |
| 252 | 'properties': {'tag': {'type': 'string'}}, |
| 253 | 'required': ['tag'], |
| 254 | 'type': 'object'}, |
| 255 | 'Error': {'additionalProperties': False, |
| 256 | 'properties': {'code': {'type': 'string'}, |
| 257 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 258 | 'message': {'type': 'string'}}, |
| 259 | 'required': ['message', 'code'], |
| 260 | 'type': 'object'}, |
| 261 | 'ErrorInfo': {'additionalProperties': False, |
| 262 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 263 | 'macaroon-path': {'type': 'string'}}, |
| 264 | 'type': 'object'}, |
| 265 | 'ErrorResult': {'additionalProperties': False, |
| 266 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 267 | 'type': 'object'}, |
| 268 | 'ErrorResults': {'additionalProperties': False, |
| 269 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 270 | 'type': 'array'}}, |
| 271 | 'required': ['results'], |
| 272 | 'type': 'object'}, |
| 273 | 'GetApplicationConstraints': {'additionalProperties': False, |
| 274 | 'properties': {'application': {'type': 'string'}}, |
| 275 | 'required': ['application'], |
| 276 | 'type': 'object'}, |
| 277 | 'GetConstraintsResults': {'additionalProperties': False, |
| 278 | 'properties': {'constraints': {'$ref': '#/definitions/Value'}}, |
| 279 | 'required': ['constraints'], |
| 280 | 'type': 'object'}, |
| 281 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 282 | 'Placement': {'additionalProperties': False, |
| 283 | 'properties': {'directive': {'type': 'string'}, |
| 284 | 'scope': {'type': 'string'}}, |
| 285 | 'required': ['scope', 'directive'], |
| 286 | 'type': 'object'}, |
| 287 | 'RemoteApplicationInfo': {'additionalProperties': False, |
| 288 | 'properties': {'application-url': {'type': 'string'}, |
| 289 | 'description': {'type': 'string'}, |
| 290 | 'endpoints': {'items': {'$ref': '#/definitions/RemoteEndpoint'}, |
| 291 | 'type': 'array'}, |
| 292 | 'icon-url-path': {'type': 'string'}, |
| 293 | 'model-tag': {'type': 'string'}, |
| 294 | 'name': {'type': 'string'}, |
| 295 | 'source-model-label': {'type': 'string'}}, |
| 296 | 'required': ['model-tag', |
| 297 | 'name', |
| 298 | 'description', |
| 299 | 'application-url', |
| 300 | 'endpoints', |
| 301 | 'icon-url-path'], |
| 302 | 'type': 'object'}, |
| 303 | 'RemoteApplicationInfoResult': {'additionalProperties': False, |
| 304 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 305 | 'result': {'$ref': '#/definitions/RemoteApplicationInfo'}}, |
| 306 | 'type': 'object'}, |
| 307 | 'RemoteApplicationInfoResults': {'additionalProperties': False, |
| 308 | 'properties': {'results': {'items': {'$ref': '#/definitions/RemoteApplicationInfoResult'}, |
| 309 | 'type': 'array'}}, |
| 310 | 'required': ['results'], |
| 311 | 'type': 'object'}, |
| 312 | 'RemoteEndpoint': {'additionalProperties': False, |
| 313 | 'properties': {'interface': {'type': 'string'}, |
| 314 | 'limit': {'type': 'integer'}, |
| 315 | 'name': {'type': 'string'}, |
| 316 | 'role': {'type': 'string'}, |
| 317 | 'scope': {'type': 'string'}}, |
| 318 | 'required': ['name', |
| 319 | 'role', |
| 320 | 'interface', |
| 321 | 'limit', |
| 322 | 'scope'], |
| 323 | 'type': 'object'}, |
| 324 | 'SetConstraints': {'additionalProperties': False, |
| 325 | 'properties': {'application': {'type': 'string'}, |
| 326 | 'constraints': {'$ref': '#/definitions/Value'}}, |
| 327 | 'required': ['application', 'constraints'], |
| 328 | 'type': 'object'}, |
| 329 | 'StorageConstraints': {'additionalProperties': False, |
| 330 | 'properties': {'count': {'type': 'integer'}, |
| 331 | 'pool': {'type': 'string'}, |
| 332 | 'size': {'type': 'integer'}}, |
| 333 | 'type': 'object'}, |
| 334 | 'StringResult': {'additionalProperties': False, |
| 335 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 336 | 'result': {'type': 'string'}}, |
| 337 | 'required': ['result'], |
| 338 | 'type': 'object'}, |
| 339 | 'Value': {'additionalProperties': False, |
| 340 | 'properties': {'arch': {'type': 'string'}, |
| 341 | 'container': {'type': 'string'}, |
| 342 | 'cores': {'type': 'integer'}, |
| 343 | 'cpu-power': {'type': 'integer'}, |
| 344 | 'instance-type': {'type': 'string'}, |
| 345 | 'mem': {'type': 'integer'}, |
| 346 | 'root-disk': {'type': 'integer'}, |
| 347 | 'spaces': {'items': {'type': 'string'}, |
| 348 | 'type': 'array'}, |
| 349 | 'tags': {'items': {'type': 'string'}, |
| 350 | 'type': 'array'}, |
| 351 | 'virt-type': {'type': 'string'}}, |
| 352 | 'type': 'object'}}, |
| 353 | 'properties': {'AddRelation': {'properties': {'Params': {'$ref': '#/definitions/AddRelation'}, |
| 354 | 'Result': {'$ref': '#/definitions/AddRelationResults'}}, |
| 355 | 'type': 'object'}, |
| 356 | 'AddUnits': {'properties': {'Params': {'$ref': '#/definitions/AddApplicationUnits'}, |
| 357 | 'Result': {'$ref': '#/definitions/AddApplicationUnitsResults'}}, |
| 358 | 'type': 'object'}, |
| 359 | 'CharmRelations': {'properties': {'Params': {'$ref': '#/definitions/ApplicationCharmRelations'}, |
| 360 | 'Result': {'$ref': '#/definitions/ApplicationCharmRelationsResults'}}, |
| 361 | 'type': 'object'}, |
| 362 | 'Consume': {'properties': {'Params': {'$ref': '#/definitions/ConsumeApplicationArgs'}, |
| 363 | 'Result': {'$ref': '#/definitions/ConsumeApplicationResults'}}, |
| 364 | 'type': 'object'}, |
| 365 | 'Deploy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationsDeploy'}, |
| 366 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 367 | 'type': 'object'}, |
| 368 | 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/ApplicationDestroy'}}, |
| 369 | 'type': 'object'}, |
| 370 | 'DestroyApplication': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 371 | 'Result': {'$ref': '#/definitions/DestroyApplicationResults'}}, |
| 372 | 'type': 'object'}, |
| 373 | 'DestroyRelation': {'properties': {'Params': {'$ref': '#/definitions/DestroyRelation'}}, |
| 374 | 'type': 'object'}, |
| 375 | 'DestroyUnit': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 376 | 'Result': {'$ref': '#/definitions/DestroyUnitResults'}}, |
| 377 | 'type': 'object'}, |
| 378 | 'DestroyUnits': {'properties': {'Params': {'$ref': '#/definitions/DestroyApplicationUnits'}}, |
| 379 | 'type': 'object'}, |
| 380 | 'Expose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationExpose'}}, |
| 381 | 'type': 'object'}, |
| 382 | 'Get': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, |
| 383 | 'Result': {'$ref': '#/definitions/ApplicationGetResults'}}, |
| 384 | 'type': 'object'}, |
| 385 | 'GetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/ApplicationGet'}, |
| 386 | 'Result': {'$ref': '#/definitions/StringResult'}}, |
| 387 | 'type': 'object'}, |
| 388 | 'GetConstraints': {'properties': {'Params': {'$ref': '#/definitions/GetApplicationConstraints'}, |
| 389 | 'Result': {'$ref': '#/definitions/GetConstraintsResults'}}, |
| 390 | 'type': 'object'}, |
| 391 | 'RemoteApplicationInfo': {'properties': {'Params': {'$ref': '#/definitions/ApplicationURLs'}, |
| 392 | 'Result': {'$ref': '#/definitions/RemoteApplicationInfoResults'}}, |
| 393 | 'type': 'object'}, |
| 394 | 'Set': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSet'}}, |
| 395 | 'type': 'object'}, |
| 396 | 'SetCharm': {'properties': {'Params': {'$ref': '#/definitions/ApplicationSetCharm'}}, |
| 397 | 'type': 'object'}, |
| 398 | 'SetConstraints': {'properties': {'Params': {'$ref': '#/definitions/SetConstraints'}}, |
| 399 | 'type': 'object'}, |
| 400 | 'SetMetricCredentials': {'properties': {'Params': {'$ref': '#/definitions/ApplicationMetricCredentials'}, |
| 401 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 402 | 'type': 'object'}, |
| 403 | 'Unexpose': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnexpose'}}, |
| 404 | 'type': 'object'}, |
| 405 | 'Unset': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUnset'}}, |
| 406 | 'type': 'object'}, |
| 407 | 'Update': {'properties': {'Params': {'$ref': '#/definitions/ApplicationUpdate'}}, |
| 408 | 'type': 'object'}}, |
| 409 | 'type': 'object'} |
| 410 | |
| 411 | |
| 412 | @ReturnMapping(AddRelationResults) |
| 413 | async def AddRelation(self, endpoints): |
| 414 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 415 | endpoints : typing.Sequence[str] |
| 416 | Returns -> typing.Mapping[str, ~CharmRelation] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 417 | ''' |
| 418 | # map input types to rpc msg |
| 419 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 420 | msg = dict(type='Application', |
| 421 | request='AddRelation', |
| 422 | version=4, |
| 423 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 424 | _params['endpoints'] = endpoints |
| 425 | reply = await self.rpc(msg) |
| 426 | return reply |
| 427 | |
| 428 | |
| 429 | |
| 430 | @ReturnMapping(AddApplicationUnitsResults) |
| 431 | async def AddUnits(self, application, num_units, placement): |
| 432 | ''' |
| 433 | application : str |
| 434 | num_units : int |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 435 | placement : typing.Sequence[~Placement] |
| 436 | Returns -> typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 437 | ''' |
| 438 | # map input types to rpc msg |
| 439 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 440 | msg = dict(type='Application', |
| 441 | request='AddUnits', |
| 442 | version=4, |
| 443 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 444 | _params['application'] = application |
| 445 | _params['num-units'] = num_units |
| 446 | _params['placement'] = placement |
| 447 | reply = await self.rpc(msg) |
| 448 | return reply |
| 449 | |
| 450 | |
| 451 | |
| 452 | @ReturnMapping(ApplicationCharmRelationsResults) |
| 453 | async def CharmRelations(self, application): |
| 454 | ''' |
| 455 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 456 | Returns -> typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 457 | ''' |
| 458 | # map input types to rpc msg |
| 459 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 460 | msg = dict(type='Application', |
| 461 | request='CharmRelations', |
| 462 | version=4, |
| 463 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 464 | _params['application'] = application |
| 465 | reply = await self.rpc(msg) |
| 466 | return reply |
| 467 | |
| 468 | |
| 469 | |
| 470 | @ReturnMapping(ConsumeApplicationResults) |
| 471 | async def Consume(self, args): |
| 472 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 473 | args : typing.Sequence[~ConsumeApplicationArg] |
| 474 | Returns -> typing.Sequence[~ConsumeApplicationResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 475 | ''' |
| 476 | # map input types to rpc msg |
| 477 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 478 | msg = dict(type='Application', |
| 479 | request='Consume', |
| 480 | version=4, |
| 481 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 482 | _params['args'] = args |
| 483 | reply = await self.rpc(msg) |
| 484 | return reply |
| 485 | |
| 486 | |
| 487 | |
| 488 | @ReturnMapping(ErrorResults) |
| 489 | async def Deploy(self, applications): |
| 490 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 491 | applications : typing.Sequence[~ApplicationDeploy] |
| 492 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 493 | ''' |
| 494 | # map input types to rpc msg |
| 495 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 496 | msg = dict(type='Application', |
| 497 | request='Deploy', |
| 498 | version=4, |
| 499 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 500 | _params['applications'] = applications |
| 501 | reply = await self.rpc(msg) |
| 502 | return reply |
| 503 | |
| 504 | |
| 505 | |
| 506 | @ReturnMapping(None) |
| 507 | async def Destroy(self, application): |
| 508 | ''' |
| 509 | application : str |
| 510 | Returns -> None |
| 511 | ''' |
| 512 | # map input types to rpc msg |
| 513 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 514 | msg = dict(type='Application', |
| 515 | request='Destroy', |
| 516 | version=4, |
| 517 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 518 | _params['application'] = application |
| 519 | reply = await self.rpc(msg) |
| 520 | return reply |
| 521 | |
| 522 | |
| 523 | |
| 524 | @ReturnMapping(DestroyApplicationResults) |
| 525 | async def DestroyApplication(self, entities): |
| 526 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 527 | entities : typing.Sequence[~Entity] |
| 528 | Returns -> typing.Sequence[~DestroyApplicationResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 529 | ''' |
| 530 | # map input types to rpc msg |
| 531 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 532 | msg = dict(type='Application', |
| 533 | request='DestroyApplication', |
| 534 | version=4, |
| 535 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 536 | _params['entities'] = entities |
| 537 | reply = await self.rpc(msg) |
| 538 | return reply |
| 539 | |
| 540 | |
| 541 | |
| 542 | @ReturnMapping(None) |
| 543 | async def DestroyRelation(self, endpoints): |
| 544 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 545 | endpoints : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 546 | Returns -> None |
| 547 | ''' |
| 548 | # map input types to rpc msg |
| 549 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 550 | msg = dict(type='Application', |
| 551 | request='DestroyRelation', |
| 552 | version=4, |
| 553 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 554 | _params['endpoints'] = endpoints |
| 555 | reply = await self.rpc(msg) |
| 556 | return reply |
| 557 | |
| 558 | |
| 559 | |
| 560 | @ReturnMapping(DestroyUnitResults) |
| 561 | async def DestroyUnit(self, entities): |
| 562 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 563 | entities : typing.Sequence[~Entity] |
| 564 | Returns -> typing.Sequence[~DestroyUnitResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 565 | ''' |
| 566 | # map input types to rpc msg |
| 567 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 568 | msg = dict(type='Application', |
| 569 | request='DestroyUnit', |
| 570 | version=4, |
| 571 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 572 | _params['entities'] = entities |
| 573 | reply = await self.rpc(msg) |
| 574 | return reply |
| 575 | |
| 576 | |
| 577 | |
| 578 | @ReturnMapping(None) |
| 579 | async def DestroyUnits(self, unit_names): |
| 580 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 581 | unit_names : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 582 | Returns -> None |
| 583 | ''' |
| 584 | # map input types to rpc msg |
| 585 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 586 | msg = dict(type='Application', |
| 587 | request='DestroyUnits', |
| 588 | version=4, |
| 589 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 590 | _params['unit-names'] = unit_names |
| 591 | reply = await self.rpc(msg) |
| 592 | return reply |
| 593 | |
| 594 | |
| 595 | |
| 596 | @ReturnMapping(None) |
| 597 | async def Expose(self, application): |
| 598 | ''' |
| 599 | application : str |
| 600 | Returns -> None |
| 601 | ''' |
| 602 | # map input types to rpc msg |
| 603 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 604 | msg = dict(type='Application', |
| 605 | request='Expose', |
| 606 | version=4, |
| 607 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 608 | _params['application'] = application |
| 609 | reply = await self.rpc(msg) |
| 610 | return reply |
| 611 | |
| 612 | |
| 613 | |
| 614 | @ReturnMapping(ApplicationGetResults) |
| 615 | async def Get(self, application): |
| 616 | ''' |
| 617 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 618 | Returns -> typing.Union[str, typing.Mapping[str, typing.Any], _ForwardRef('Value')] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 619 | ''' |
| 620 | # map input types to rpc msg |
| 621 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 622 | msg = dict(type='Application', |
| 623 | request='Get', |
| 624 | version=4, |
| 625 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 626 | _params['application'] = application |
| 627 | reply = await self.rpc(msg) |
| 628 | return reply |
| 629 | |
| 630 | |
| 631 | |
| 632 | @ReturnMapping(StringResult) |
| 633 | async def GetCharmURL(self, application): |
| 634 | ''' |
| 635 | application : str |
| 636 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 637 | ''' |
| 638 | # map input types to rpc msg |
| 639 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 640 | msg = dict(type='Application', |
| 641 | request='GetCharmURL', |
| 642 | version=4, |
| 643 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 644 | _params['application'] = application |
| 645 | reply = await self.rpc(msg) |
| 646 | return reply |
| 647 | |
| 648 | |
| 649 | |
| 650 | @ReturnMapping(GetConstraintsResults) |
| 651 | async def GetConstraints(self, application): |
| 652 | ''' |
| 653 | application : str |
| 654 | Returns -> Value |
| 655 | ''' |
| 656 | # map input types to rpc msg |
| 657 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 658 | msg = dict(type='Application', |
| 659 | request='GetConstraints', |
| 660 | version=4, |
| 661 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 662 | _params['application'] = application |
| 663 | reply = await self.rpc(msg) |
| 664 | return reply |
| 665 | |
| 666 | |
| 667 | |
| 668 | @ReturnMapping(RemoteApplicationInfoResults) |
| 669 | async def RemoteApplicationInfo(self, application_urls): |
| 670 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 671 | application_urls : typing.Sequence[str] |
| 672 | Returns -> typing.Sequence[~RemoteApplicationInfoResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 673 | ''' |
| 674 | # map input types to rpc msg |
| 675 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 676 | msg = dict(type='Application', |
| 677 | request='RemoteApplicationInfo', |
| 678 | version=4, |
| 679 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 680 | _params['application-urls'] = application_urls |
| 681 | reply = await self.rpc(msg) |
| 682 | return reply |
| 683 | |
| 684 | |
| 685 | |
| 686 | @ReturnMapping(None) |
| 687 | async def Set(self, application, options): |
| 688 | ''' |
| 689 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 690 | options : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 691 | Returns -> None |
| 692 | ''' |
| 693 | # map input types to rpc msg |
| 694 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 695 | msg = dict(type='Application', |
| 696 | request='Set', |
| 697 | version=4, |
| 698 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 699 | _params['application'] = application |
| 700 | _params['options'] = options |
| 701 | reply = await self.rpc(msg) |
| 702 | return reply |
| 703 | |
| 704 | |
| 705 | |
| 706 | @ReturnMapping(None) |
| 707 | async def SetCharm(self, application, channel, charm_url, config_settings, config_settings_yaml, force_series, force_units, resource_ids, storage_constraints): |
| 708 | ''' |
| 709 | application : str |
| 710 | channel : str |
| 711 | charm_url : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 712 | config_settings : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 713 | config_settings_yaml : str |
| 714 | force_series : bool |
| 715 | force_units : bool |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 716 | resource_ids : typing.Mapping[str, str] |
| 717 | storage_constraints : typing.Mapping[str, ~StorageConstraints] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 718 | Returns -> None |
| 719 | ''' |
| 720 | # map input types to rpc msg |
| 721 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 722 | msg = dict(type='Application', |
| 723 | request='SetCharm', |
| 724 | version=4, |
| 725 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 726 | _params['application'] = application |
| 727 | _params['channel'] = channel |
| 728 | _params['charm-url'] = charm_url |
| 729 | _params['config-settings'] = config_settings |
| 730 | _params['config-settings-yaml'] = config_settings_yaml |
| 731 | _params['force-series'] = force_series |
| 732 | _params['force-units'] = force_units |
| 733 | _params['resource-ids'] = resource_ids |
| 734 | _params['storage-constraints'] = storage_constraints |
| 735 | reply = await self.rpc(msg) |
| 736 | return reply |
| 737 | |
| 738 | |
| 739 | |
| 740 | @ReturnMapping(None) |
| 741 | async def SetConstraints(self, application, constraints): |
| 742 | ''' |
| 743 | application : str |
| 744 | constraints : Value |
| 745 | Returns -> None |
| 746 | ''' |
| 747 | # map input types to rpc msg |
| 748 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 749 | msg = dict(type='Application', |
| 750 | request='SetConstraints', |
| 751 | version=4, |
| 752 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 753 | _params['application'] = application |
| 754 | _params['constraints'] = constraints |
| 755 | reply = await self.rpc(msg) |
| 756 | return reply |
| 757 | |
| 758 | |
| 759 | |
| 760 | @ReturnMapping(ErrorResults) |
| 761 | async def SetMetricCredentials(self, creds): |
| 762 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 763 | creds : typing.Sequence[~ApplicationMetricCredential] |
| 764 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 765 | ''' |
| 766 | # map input types to rpc msg |
| 767 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 768 | msg = dict(type='Application', |
| 769 | request='SetMetricCredentials', |
| 770 | version=4, |
| 771 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 772 | _params['creds'] = creds |
| 773 | reply = await self.rpc(msg) |
| 774 | return reply |
| 775 | |
| 776 | |
| 777 | |
| 778 | @ReturnMapping(None) |
| 779 | async def Unexpose(self, application): |
| 780 | ''' |
| 781 | application : str |
| 782 | Returns -> None |
| 783 | ''' |
| 784 | # map input types to rpc msg |
| 785 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 786 | msg = dict(type='Application', |
| 787 | request='Unexpose', |
| 788 | version=4, |
| 789 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 790 | _params['application'] = application |
| 791 | reply = await self.rpc(msg) |
| 792 | return reply |
| 793 | |
| 794 | |
| 795 | |
| 796 | @ReturnMapping(None) |
| 797 | async def Unset(self, application, options): |
| 798 | ''' |
| 799 | application : str |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 800 | options : typing.Sequence[str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 801 | Returns -> None |
| 802 | ''' |
| 803 | # map input types to rpc msg |
| 804 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 805 | msg = dict(type='Application', |
| 806 | request='Unset', |
| 807 | version=4, |
| 808 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 809 | _params['application'] = application |
| 810 | _params['options'] = options |
| 811 | reply = await self.rpc(msg) |
| 812 | return reply |
| 813 | |
| 814 | |
| 815 | |
| 816 | @ReturnMapping(None) |
| 817 | async def Update(self, application, charm_url, constraints, force_charm_url, force_series, min_units, settings, settings_yaml): |
| 818 | ''' |
| 819 | application : str |
| 820 | charm_url : str |
| 821 | constraints : Value |
| 822 | force_charm_url : bool |
| 823 | force_series : bool |
| 824 | min_units : int |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 825 | settings : typing.Mapping[str, str] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 826 | settings_yaml : str |
| 827 | Returns -> None |
| 828 | ''' |
| 829 | # map input types to rpc msg |
| 830 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 831 | msg = dict(type='Application', |
| 832 | request='Update', |
| 833 | version=4, |
| 834 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 835 | _params['application'] = application |
| 836 | _params['charm-url'] = charm_url |
| 837 | _params['constraints'] = constraints |
| 838 | _params['force-charm-url'] = force_charm_url |
| 839 | _params['force-series'] = force_series |
| 840 | _params['min-units'] = min_units |
| 841 | _params['settings'] = settings |
| 842 | _params['settings-yaml'] = settings_yaml |
| 843 | reply = await self.rpc(msg) |
| 844 | return reply |
| 845 | |
| 846 | |
| 847 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 848 | class StorageFacade(Type): |
| 849 | name = 'Storage' |
| 850 | version = 4 |
| 851 | schema = {'definitions': {'AddStorageDetails': {'additionalProperties': False, |
| 852 | 'properties': {'storage-tags': {'items': {'type': 'string'}, |
| 853 | 'type': 'array'}}, |
| 854 | 'required': ['storage-tags'], |
| 855 | 'type': 'object'}, |
| 856 | 'AddStorageResult': {'additionalProperties': False, |
| 857 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 858 | 'result': {'$ref': '#/definitions/AddStorageDetails'}}, |
| 859 | 'type': 'object'}, |
| 860 | 'AddStorageResults': {'additionalProperties': False, |
| 861 | 'properties': {'results': {'items': {'$ref': '#/definitions/AddStorageResult'}, |
| 862 | 'type': 'array'}}, |
| 863 | 'required': ['results'], |
| 864 | 'type': 'object'}, |
| 865 | 'BulkImportStorageParams': {'additionalProperties': False, |
| 866 | 'properties': {'storage': {'items': {'$ref': '#/definitions/ImportStorageParams'}, |
| 867 | 'type': 'array'}}, |
| 868 | 'required': ['storage'], |
| 869 | 'type': 'object'}, |
| 870 | 'Entities': {'additionalProperties': False, |
| 871 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 872 | 'type': 'array'}}, |
| 873 | 'required': ['entities'], |
| 874 | 'type': 'object'}, |
| 875 | 'Entity': {'additionalProperties': False, |
| 876 | 'properties': {'tag': {'type': 'string'}}, |
| 877 | 'required': ['tag'], |
| 878 | 'type': 'object'}, |
| 879 | 'EntityStatus': {'additionalProperties': False, |
| 880 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 881 | 'type': 'object'}}, |
| 882 | 'type': 'object'}, |
| 883 | 'info': {'type': 'string'}, |
| 884 | 'since': {'format': 'date-time', |
| 885 | 'type': 'string'}, |
| 886 | 'status': {'type': 'string'}}, |
| 887 | 'required': ['status', 'info', 'since'], |
| 888 | 'type': 'object'}, |
| 889 | 'Error': {'additionalProperties': False, |
| 890 | 'properties': {'code': {'type': 'string'}, |
| 891 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 892 | 'message': {'type': 'string'}}, |
| 893 | 'required': ['message', 'code'], |
| 894 | 'type': 'object'}, |
| 895 | 'ErrorInfo': {'additionalProperties': False, |
| 896 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 897 | 'macaroon-path': {'type': 'string'}}, |
| 898 | 'type': 'object'}, |
| 899 | 'ErrorResult': {'additionalProperties': False, |
| 900 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 901 | 'type': 'object'}, |
| 902 | 'ErrorResults': {'additionalProperties': False, |
| 903 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 904 | 'type': 'array'}}, |
| 905 | 'required': ['results'], |
| 906 | 'type': 'object'}, |
| 907 | 'FilesystemAttachmentDetails': {'additionalProperties': False, |
| 908 | 'properties': {'FilesystemAttachmentInfo': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, |
| 909 | 'life': {'type': 'string'}}, |
| 910 | 'required': ['FilesystemAttachmentInfo'], |
| 911 | 'type': 'object'}, |
| 912 | 'FilesystemAttachmentInfo': {'additionalProperties': False, |
| 913 | 'properties': {'mount-point': {'type': 'string'}, |
| 914 | 'read-only': {'type': 'boolean'}}, |
| 915 | 'type': 'object'}, |
| 916 | 'FilesystemDetails': {'additionalProperties': False, |
| 917 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 918 | 'info': {'$ref': '#/definitions/FilesystemInfo'}, |
| 919 | 'life': {'type': 'string'}, |
| 920 | 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}}, |
| 921 | 'type': 'object'}, |
| 922 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 923 | 'storage': {'$ref': '#/definitions/StorageDetails'}, |
| 924 | 'unit-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/FilesystemAttachmentDetails'}}, |
| 925 | 'type': 'object'}, |
| 926 | 'volume-tag': {'type': 'string'}}, |
| 927 | 'required': ['filesystem-tag', |
| 928 | 'info', |
| 929 | 'status'], |
| 930 | 'type': 'object'}, |
| 931 | 'FilesystemDetailsListResult': {'additionalProperties': False, |
| 932 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 933 | 'result': {'items': {'$ref': '#/definitions/FilesystemDetails'}, |
| 934 | 'type': 'array'}}, |
| 935 | 'type': 'object'}, |
| 936 | 'FilesystemDetailsListResults': {'additionalProperties': False, |
| 937 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemDetailsListResult'}, |
| 938 | 'type': 'array'}}, |
| 939 | 'type': 'object'}, |
| 940 | 'FilesystemFilter': {'additionalProperties': False, |
| 941 | 'properties': {'machines': {'items': {'type': 'string'}, |
| 942 | 'type': 'array'}}, |
| 943 | 'type': 'object'}, |
| 944 | 'FilesystemFilters': {'additionalProperties': False, |
| 945 | 'properties': {'filters': {'items': {'$ref': '#/definitions/FilesystemFilter'}, |
| 946 | 'type': 'array'}}, |
| 947 | 'type': 'object'}, |
| 948 | 'FilesystemInfo': {'additionalProperties': False, |
| 949 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 950 | 'pool': {'type': 'string'}, |
| 951 | 'size': {'type': 'integer'}}, |
| 952 | 'required': ['filesystem-id', |
| 953 | 'pool', |
| 954 | 'size'], |
| 955 | 'type': 'object'}, |
| 956 | 'ImportStorageDetails': {'additionalProperties': False, |
| 957 | 'properties': {'storage-tag': {'type': 'string'}}, |
| 958 | 'required': ['storage-tag'], |
| 959 | 'type': 'object'}, |
| 960 | 'ImportStorageParams': {'additionalProperties': False, |
| 961 | 'properties': {'kind': {'type': 'integer'}, |
| 962 | 'pool': {'type': 'string'}, |
| 963 | 'provider-id': {'type': 'string'}, |
| 964 | 'storage-name': {'type': 'string'}}, |
| 965 | 'required': ['kind', |
| 966 | 'pool', |
| 967 | 'provider-id', |
| 968 | 'storage-name'], |
| 969 | 'type': 'object'}, |
| 970 | 'ImportStorageResult': {'additionalProperties': False, |
| 971 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 972 | 'result': {'$ref': '#/definitions/ImportStorageDetails'}}, |
| 973 | 'type': 'object'}, |
| 974 | 'ImportStorageResults': {'additionalProperties': False, |
| 975 | 'properties': {'results': {'items': {'$ref': '#/definitions/ImportStorageResult'}, |
| 976 | 'type': 'array'}}, |
| 977 | 'required': ['results'], |
| 978 | 'type': 'object'}, |
| 979 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 980 | 'RemoveStorage': {'additionalProperties': False, |
| 981 | 'properties': {'storage': {'items': {'$ref': '#/definitions/RemoveStorageInstance'}, |
| 982 | 'type': 'array'}}, |
| 983 | 'required': ['storage'], |
| 984 | 'type': 'object'}, |
| 985 | 'RemoveStorageInstance': {'additionalProperties': False, |
| 986 | 'properties': {'destroy-attachments': {'type': 'boolean'}, |
| 987 | 'destroy-storage': {'type': 'boolean'}, |
| 988 | 'tag': {'type': 'string'}}, |
| 989 | 'required': ['tag'], |
| 990 | 'type': 'object'}, |
| 991 | 'StorageAddParams': {'additionalProperties': False, |
| 992 | 'properties': {'name': {'type': 'string'}, |
| 993 | 'storage': {'$ref': '#/definitions/StorageConstraints'}, |
| 994 | 'unit': {'type': 'string'}}, |
| 995 | 'required': ['unit', 'name', 'storage'], |
| 996 | 'type': 'object'}, |
| 997 | 'StorageAttachmentDetails': {'additionalProperties': False, |
| 998 | 'properties': {'life': {'type': 'string'}, |
| 999 | 'location': {'type': 'string'}, |
| 1000 | 'machine-tag': {'type': 'string'}, |
| 1001 | 'storage-tag': {'type': 'string'}, |
| 1002 | 'unit-tag': {'type': 'string'}}, |
| 1003 | 'required': ['storage-tag', |
| 1004 | 'unit-tag', |
| 1005 | 'machine-tag'], |
| 1006 | 'type': 'object'}, |
| 1007 | 'StorageAttachmentId': {'additionalProperties': False, |
| 1008 | 'properties': {'storage-tag': {'type': 'string'}, |
| 1009 | 'unit-tag': {'type': 'string'}}, |
| 1010 | 'required': ['storage-tag', |
| 1011 | 'unit-tag'], |
| 1012 | 'type': 'object'}, |
| 1013 | 'StorageAttachmentIds': {'additionalProperties': False, |
| 1014 | 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, |
| 1015 | 'type': 'array'}}, |
| 1016 | 'required': ['ids'], |
| 1017 | 'type': 'object'}, |
| 1018 | 'StorageConstraints': {'additionalProperties': False, |
| 1019 | 'properties': {'count': {'type': 'integer'}, |
| 1020 | 'pool': {'type': 'string'}, |
| 1021 | 'size': {'type': 'integer'}}, |
| 1022 | 'type': 'object'}, |
| 1023 | 'StorageDetails': {'additionalProperties': False, |
| 1024 | 'properties': {'attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/StorageAttachmentDetails'}}, |
| 1025 | 'type': 'object'}, |
| 1026 | 'kind': {'type': 'integer'}, |
| 1027 | 'life': {'type': 'string'}, |
| 1028 | 'owner-tag': {'type': 'string'}, |
| 1029 | 'persistent': {'type': 'boolean'}, |
| 1030 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 1031 | 'storage-tag': {'type': 'string'}}, |
| 1032 | 'required': ['storage-tag', |
| 1033 | 'owner-tag', |
| 1034 | 'kind', |
| 1035 | 'status', |
| 1036 | 'persistent'], |
| 1037 | 'type': 'object'}, |
| 1038 | 'StorageDetailsListResult': {'additionalProperties': False, |
| 1039 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1040 | 'result': {'items': {'$ref': '#/definitions/StorageDetails'}, |
| 1041 | 'type': 'array'}}, |
| 1042 | 'type': 'object'}, |
| 1043 | 'StorageDetailsListResults': {'additionalProperties': False, |
| 1044 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsListResult'}, |
| 1045 | 'type': 'array'}}, |
| 1046 | 'type': 'object'}, |
| 1047 | 'StorageDetailsResult': {'additionalProperties': False, |
| 1048 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1049 | 'result': {'$ref': '#/definitions/StorageDetails'}}, |
| 1050 | 'type': 'object'}, |
| 1051 | 'StorageDetailsResults': {'additionalProperties': False, |
| 1052 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageDetailsResult'}, |
| 1053 | 'type': 'array'}}, |
| 1054 | 'type': 'object'}, |
| 1055 | 'StorageFilter': {'additionalProperties': False, |
| 1056 | 'type': 'object'}, |
| 1057 | 'StorageFilters': {'additionalProperties': False, |
| 1058 | 'properties': {'filters': {'items': {'$ref': '#/definitions/StorageFilter'}, |
| 1059 | 'type': 'array'}}, |
| 1060 | 'type': 'object'}, |
| 1061 | 'StoragePool': {'additionalProperties': False, |
| 1062 | 'properties': {'attrs': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1063 | 'type': 'object'}}, |
| 1064 | 'type': 'object'}, |
| 1065 | 'name': {'type': 'string'}, |
| 1066 | 'provider': {'type': 'string'}}, |
| 1067 | 'required': ['name', 'provider', 'attrs'], |
| 1068 | 'type': 'object'}, |
| 1069 | 'StoragePoolFilter': {'additionalProperties': False, |
| 1070 | 'properties': {'names': {'items': {'type': 'string'}, |
| 1071 | 'type': 'array'}, |
| 1072 | 'providers': {'items': {'type': 'string'}, |
| 1073 | 'type': 'array'}}, |
| 1074 | 'type': 'object'}, |
| 1075 | 'StoragePoolFilters': {'additionalProperties': False, |
| 1076 | 'properties': {'filters': {'items': {'$ref': '#/definitions/StoragePoolFilter'}, |
| 1077 | 'type': 'array'}}, |
| 1078 | 'type': 'object'}, |
| 1079 | 'StoragePoolsResult': {'additionalProperties': False, |
| 1080 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1081 | 'storage-pools': {'items': {'$ref': '#/definitions/StoragePool'}, |
| 1082 | 'type': 'array'}}, |
| 1083 | 'type': 'object'}, |
| 1084 | 'StoragePoolsResults': {'additionalProperties': False, |
| 1085 | 'properties': {'results': {'items': {'$ref': '#/definitions/StoragePoolsResult'}, |
| 1086 | 'type': 'array'}}, |
| 1087 | 'type': 'object'}, |
| 1088 | 'StoragesAddParams': {'additionalProperties': False, |
| 1089 | 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, |
| 1090 | 'type': 'array'}}, |
| 1091 | 'required': ['storages'], |
| 1092 | 'type': 'object'}, |
| 1093 | 'VolumeAttachmentDetails': {'additionalProperties': False, |
| 1094 | 'properties': {'VolumeAttachmentInfo': {'$ref': '#/definitions/VolumeAttachmentInfo'}, |
| 1095 | 'life': {'type': 'string'}}, |
| 1096 | 'required': ['VolumeAttachmentInfo'], |
| 1097 | 'type': 'object'}, |
| 1098 | 'VolumeAttachmentInfo': {'additionalProperties': False, |
| 1099 | 'properties': {'bus-address': {'type': 'string'}, |
| 1100 | 'device-link': {'type': 'string'}, |
| 1101 | 'device-name': {'type': 'string'}, |
| 1102 | 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, |
| 1103 | 'read-only': {'type': 'boolean'}}, |
| 1104 | 'type': 'object'}, |
| 1105 | 'VolumeAttachmentPlanInfo': {'additionalProperties': False, |
| 1106 | 'properties': {'device-attributes': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1107 | 'type': 'object'}, |
| 1108 | 'device-type': {'type': 'string'}}, |
| 1109 | 'type': 'object'}, |
| 1110 | 'VolumeDetails': {'additionalProperties': False, |
| 1111 | 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, |
| 1112 | 'life': {'type': 'string'}, |
| 1113 | 'machine-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}}, |
| 1114 | 'type': 'object'}, |
| 1115 | 'status': {'$ref': '#/definitions/EntityStatus'}, |
| 1116 | 'storage': {'$ref': '#/definitions/StorageDetails'}, |
| 1117 | 'unit-attachments': {'patternProperties': {'.*': {'$ref': '#/definitions/VolumeAttachmentDetails'}}, |
| 1118 | 'type': 'object'}, |
| 1119 | 'volume-tag': {'type': 'string'}}, |
| 1120 | 'required': ['volume-tag', 'info', 'status'], |
| 1121 | 'type': 'object'}, |
| 1122 | 'VolumeDetailsListResult': {'additionalProperties': False, |
| 1123 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1124 | 'result': {'items': {'$ref': '#/definitions/VolumeDetails'}, |
| 1125 | 'type': 'array'}}, |
| 1126 | 'type': 'object'}, |
| 1127 | 'VolumeDetailsListResults': {'additionalProperties': False, |
| 1128 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeDetailsListResult'}, |
| 1129 | 'type': 'array'}}, |
| 1130 | 'type': 'object'}, |
| 1131 | 'VolumeFilter': {'additionalProperties': False, |
| 1132 | 'properties': {'machines': {'items': {'type': 'string'}, |
| 1133 | 'type': 'array'}}, |
| 1134 | 'type': 'object'}, |
| 1135 | 'VolumeFilters': {'additionalProperties': False, |
| 1136 | 'properties': {'filters': {'items': {'$ref': '#/definitions/VolumeFilter'}, |
| 1137 | 'type': 'array'}}, |
| 1138 | 'type': 'object'}, |
| 1139 | 'VolumeInfo': {'additionalProperties': False, |
| 1140 | 'properties': {'hardware-id': {'type': 'string'}, |
| 1141 | 'persistent': {'type': 'boolean'}, |
| 1142 | 'pool': {'type': 'string'}, |
| 1143 | 'size': {'type': 'integer'}, |
| 1144 | 'volume-id': {'type': 'string'}, |
| 1145 | 'wwn': {'type': 'string'}}, |
| 1146 | 'required': ['volume-id', 'size', 'persistent'], |
| 1147 | 'type': 'object'}}, |
| 1148 | 'properties': {'AddToUnit': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, |
| 1149 | 'Result': {'$ref': '#/definitions/AddStorageResults'}}, |
| 1150 | 'type': 'object'}, |
| 1151 | 'Attach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 1152 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1153 | 'type': 'object'}, |
| 1154 | 'CreatePool': {'properties': {'Params': {'$ref': '#/definitions/StoragePool'}}, |
| 1155 | 'type': 'object'}, |
| 1156 | 'Detach': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 1157 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1158 | 'type': 'object'}, |
| 1159 | 'Import': {'properties': {'Params': {'$ref': '#/definitions/BulkImportStorageParams'}, |
| 1160 | 'Result': {'$ref': '#/definitions/ImportStorageResults'}}, |
| 1161 | 'type': 'object'}, |
| 1162 | 'ListFilesystems': {'properties': {'Params': {'$ref': '#/definitions/FilesystemFilters'}, |
| 1163 | 'Result': {'$ref': '#/definitions/FilesystemDetailsListResults'}}, |
| 1164 | 'type': 'object'}, |
| 1165 | 'ListPools': {'properties': {'Params': {'$ref': '#/definitions/StoragePoolFilters'}, |
| 1166 | 'Result': {'$ref': '#/definitions/StoragePoolsResults'}}, |
| 1167 | 'type': 'object'}, |
| 1168 | 'ListStorageDetails': {'properties': {'Params': {'$ref': '#/definitions/StorageFilters'}, |
| 1169 | 'Result': {'$ref': '#/definitions/StorageDetailsListResults'}}, |
| 1170 | 'type': 'object'}, |
| 1171 | 'ListVolumes': {'properties': {'Params': {'$ref': '#/definitions/VolumeFilters'}, |
| 1172 | 'Result': {'$ref': '#/definitions/VolumeDetailsListResults'}}, |
| 1173 | 'type': 'object'}, |
| 1174 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/RemoveStorage'}, |
| 1175 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1176 | 'type': 'object'}, |
| 1177 | 'StorageDetails': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1178 | 'Result': {'$ref': '#/definitions/StorageDetailsResults'}}, |
| 1179 | 'type': 'object'}}, |
| 1180 | 'type': 'object'} |
| 1181 | |
| 1182 | |
| 1183 | @ReturnMapping(AddStorageResults) |
| 1184 | async def AddToUnit(self, storages): |
| 1185 | ''' |
| 1186 | storages : typing.Sequence[~StorageAddParams] |
| 1187 | Returns -> typing.Sequence[~AddStorageResult] |
| 1188 | ''' |
| 1189 | # map input types to rpc msg |
| 1190 | _params = dict() |
| 1191 | msg = dict(type='Storage', |
| 1192 | request='AddToUnit', |
| 1193 | version=4, |
| 1194 | params=_params) |
| 1195 | _params['storages'] = storages |
| 1196 | reply = await self.rpc(msg) |
| 1197 | return reply |
| 1198 | |
| 1199 | |
| 1200 | |
| 1201 | @ReturnMapping(ErrorResults) |
| 1202 | async def Attach(self, ids): |
| 1203 | ''' |
| 1204 | ids : typing.Sequence[~StorageAttachmentId] |
| 1205 | Returns -> typing.Sequence[~ErrorResult] |
| 1206 | ''' |
| 1207 | # map input types to rpc msg |
| 1208 | _params = dict() |
| 1209 | msg = dict(type='Storage', |
| 1210 | request='Attach', |
| 1211 | version=4, |
| 1212 | params=_params) |
| 1213 | _params['ids'] = ids |
| 1214 | reply = await self.rpc(msg) |
| 1215 | return reply |
| 1216 | |
| 1217 | |
| 1218 | |
| 1219 | @ReturnMapping(None) |
| 1220 | async def CreatePool(self, attrs, name, provider): |
| 1221 | ''' |
| 1222 | attrs : typing.Mapping[str, typing.Any] |
| 1223 | name : str |
| 1224 | provider : str |
| 1225 | Returns -> None |
| 1226 | ''' |
| 1227 | # map input types to rpc msg |
| 1228 | _params = dict() |
| 1229 | msg = dict(type='Storage', |
| 1230 | request='CreatePool', |
| 1231 | version=4, |
| 1232 | params=_params) |
| 1233 | _params['attrs'] = attrs |
| 1234 | _params['name'] = name |
| 1235 | _params['provider'] = provider |
| 1236 | reply = await self.rpc(msg) |
| 1237 | return reply |
| 1238 | |
| 1239 | |
| 1240 | |
| 1241 | @ReturnMapping(ErrorResults) |
| 1242 | async def Detach(self, ids): |
| 1243 | ''' |
| 1244 | ids : typing.Sequence[~StorageAttachmentId] |
| 1245 | Returns -> typing.Sequence[~ErrorResult] |
| 1246 | ''' |
| 1247 | # map input types to rpc msg |
| 1248 | _params = dict() |
| 1249 | msg = dict(type='Storage', |
| 1250 | request='Detach', |
| 1251 | version=4, |
| 1252 | params=_params) |
| 1253 | _params['ids'] = ids |
| 1254 | reply = await self.rpc(msg) |
| 1255 | return reply |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | @ReturnMapping(ImportStorageResults) |
| 1260 | async def Import(self, storage): |
| 1261 | ''' |
| 1262 | storage : typing.Sequence[~ImportStorageParams] |
| 1263 | Returns -> typing.Sequence[~ImportStorageResult] |
| 1264 | ''' |
| 1265 | # map input types to rpc msg |
| 1266 | _params = dict() |
| 1267 | msg = dict(type='Storage', |
| 1268 | request='Import', |
| 1269 | version=4, |
| 1270 | params=_params) |
| 1271 | _params['storage'] = storage |
| 1272 | reply = await self.rpc(msg) |
| 1273 | return reply |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | @ReturnMapping(FilesystemDetailsListResults) |
| 1278 | async def ListFilesystems(self, filters): |
| 1279 | ''' |
| 1280 | filters : typing.Sequence[~FilesystemFilter] |
| 1281 | Returns -> typing.Sequence[~FilesystemDetailsListResult] |
| 1282 | ''' |
| 1283 | # map input types to rpc msg |
| 1284 | _params = dict() |
| 1285 | msg = dict(type='Storage', |
| 1286 | request='ListFilesystems', |
| 1287 | version=4, |
| 1288 | params=_params) |
| 1289 | _params['filters'] = filters |
| 1290 | reply = await self.rpc(msg) |
| 1291 | return reply |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | @ReturnMapping(StoragePoolsResults) |
| 1296 | async def ListPools(self, filters): |
| 1297 | ''' |
| 1298 | filters : typing.Sequence[~StoragePoolFilter] |
| 1299 | Returns -> typing.Sequence[~StoragePoolsResult] |
| 1300 | ''' |
| 1301 | # map input types to rpc msg |
| 1302 | _params = dict() |
| 1303 | msg = dict(type='Storage', |
| 1304 | request='ListPools', |
| 1305 | version=4, |
| 1306 | params=_params) |
| 1307 | _params['filters'] = filters |
| 1308 | reply = await self.rpc(msg) |
| 1309 | return reply |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | @ReturnMapping(StorageDetailsListResults) |
| 1314 | async def ListStorageDetails(self, filters): |
| 1315 | ''' |
| 1316 | filters : typing.Sequence[~StorageFilter] |
| 1317 | Returns -> typing.Sequence[~StorageDetailsListResult] |
| 1318 | ''' |
| 1319 | # map input types to rpc msg |
| 1320 | _params = dict() |
| 1321 | msg = dict(type='Storage', |
| 1322 | request='ListStorageDetails', |
| 1323 | version=4, |
| 1324 | params=_params) |
| 1325 | _params['filters'] = filters |
| 1326 | reply = await self.rpc(msg) |
| 1327 | return reply |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | @ReturnMapping(VolumeDetailsListResults) |
| 1332 | async def ListVolumes(self, filters): |
| 1333 | ''' |
| 1334 | filters : typing.Sequence[~VolumeFilter] |
| 1335 | Returns -> typing.Sequence[~VolumeDetailsListResult] |
| 1336 | ''' |
| 1337 | # map input types to rpc msg |
| 1338 | _params = dict() |
| 1339 | msg = dict(type='Storage', |
| 1340 | request='ListVolumes', |
| 1341 | version=4, |
| 1342 | params=_params) |
| 1343 | _params['filters'] = filters |
| 1344 | reply = await self.rpc(msg) |
| 1345 | return reply |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | @ReturnMapping(ErrorResults) |
| 1350 | async def Remove(self, storage): |
| 1351 | ''' |
| 1352 | storage : typing.Sequence[~RemoveStorageInstance] |
| 1353 | Returns -> typing.Sequence[~ErrorResult] |
| 1354 | ''' |
| 1355 | # map input types to rpc msg |
| 1356 | _params = dict() |
| 1357 | msg = dict(type='Storage', |
| 1358 | request='Remove', |
| 1359 | version=4, |
| 1360 | params=_params) |
| 1361 | _params['storage'] = storage |
| 1362 | reply = await self.rpc(msg) |
| 1363 | return reply |
| 1364 | |
| 1365 | |
| 1366 | |
| 1367 | @ReturnMapping(StorageDetailsResults) |
| 1368 | async def StorageDetails(self, entities): |
| 1369 | ''' |
| 1370 | entities : typing.Sequence[~Entity] |
| 1371 | Returns -> typing.Sequence[~StorageDetailsResult] |
| 1372 | ''' |
| 1373 | # map input types to rpc msg |
| 1374 | _params = dict() |
| 1375 | msg = dict(type='Storage', |
| 1376 | request='StorageDetails', |
| 1377 | version=4, |
| 1378 | params=_params) |
| 1379 | _params['entities'] = entities |
| 1380 | reply = await self.rpc(msg) |
| 1381 | return reply |
| 1382 | |
| 1383 | |
| 1384 | |
| 1385 | class StorageProvisionerFacade(Type): |
| 1386 | name = 'StorageProvisioner' |
| 1387 | version = 4 |
| 1388 | schema = {'definitions': {'BlockDevice': {'additionalProperties': False, |
| 1389 | 'properties': {'BusAddress': {'type': 'string'}, |
| 1390 | 'DeviceLinks': {'items': {'type': 'string'}, |
| 1391 | 'type': 'array'}, |
| 1392 | 'DeviceName': {'type': 'string'}, |
| 1393 | 'FilesystemType': {'type': 'string'}, |
| 1394 | 'HardwareId': {'type': 'string'}, |
| 1395 | 'InUse': {'type': 'boolean'}, |
| 1396 | 'Label': {'type': 'string'}, |
| 1397 | 'MountPoint': {'type': 'string'}, |
| 1398 | 'Size': {'type': 'integer'}, |
| 1399 | 'UUID': {'type': 'string'}, |
| 1400 | 'WWN': {'type': 'string'}}, |
| 1401 | 'required': ['DeviceName', |
| 1402 | 'DeviceLinks', |
| 1403 | 'Label', |
| 1404 | 'UUID', |
| 1405 | 'HardwareId', |
| 1406 | 'WWN', |
| 1407 | 'BusAddress', |
| 1408 | 'Size', |
| 1409 | 'FilesystemType', |
| 1410 | 'InUse', |
| 1411 | 'MountPoint'], |
| 1412 | 'type': 'object'}, |
| 1413 | 'BlockDeviceResult': {'additionalProperties': False, |
| 1414 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1415 | 'result': {'$ref': '#/definitions/BlockDevice'}}, |
| 1416 | 'required': ['result'], |
| 1417 | 'type': 'object'}, |
| 1418 | 'BlockDeviceResults': {'additionalProperties': False, |
| 1419 | 'properties': {'results': {'items': {'$ref': '#/definitions/BlockDeviceResult'}, |
| 1420 | 'type': 'array'}}, |
| 1421 | 'type': 'object'}, |
| 1422 | 'Entities': {'additionalProperties': False, |
| 1423 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 1424 | 'type': 'array'}}, |
| 1425 | 'required': ['entities'], |
| 1426 | 'type': 'object'}, |
| 1427 | 'Entity': {'additionalProperties': False, |
| 1428 | 'properties': {'tag': {'type': 'string'}}, |
| 1429 | 'required': ['tag'], |
| 1430 | 'type': 'object'}, |
| 1431 | 'EntityStatusArgs': {'additionalProperties': False, |
| 1432 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1433 | 'type': 'object'}}, |
| 1434 | 'type': 'object'}, |
| 1435 | 'info': {'type': 'string'}, |
| 1436 | 'status': {'type': 'string'}, |
| 1437 | 'tag': {'type': 'string'}}, |
| 1438 | 'required': ['tag', |
| 1439 | 'status', |
| 1440 | 'info', |
| 1441 | 'data'], |
| 1442 | 'type': 'object'}, |
| 1443 | 'Error': {'additionalProperties': False, |
| 1444 | 'properties': {'code': {'type': 'string'}, |
| 1445 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 1446 | 'message': {'type': 'string'}}, |
| 1447 | 'required': ['message', 'code'], |
| 1448 | 'type': 'object'}, |
| 1449 | 'ErrorInfo': {'additionalProperties': False, |
| 1450 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 1451 | 'macaroon-path': {'type': 'string'}}, |
| 1452 | 'type': 'object'}, |
| 1453 | 'ErrorResult': {'additionalProperties': False, |
| 1454 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 1455 | 'type': 'object'}, |
| 1456 | 'ErrorResults': {'additionalProperties': False, |
| 1457 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 1458 | 'type': 'array'}}, |
| 1459 | 'required': ['results'], |
| 1460 | 'type': 'object'}, |
| 1461 | 'Filesystem': {'additionalProperties': False, |
| 1462 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 1463 | 'info': {'$ref': '#/definitions/FilesystemInfo'}, |
| 1464 | 'volume-tag': {'type': 'string'}}, |
| 1465 | 'required': ['filesystem-tag', 'info'], |
| 1466 | 'type': 'object'}, |
| 1467 | 'FilesystemAttachment': {'additionalProperties': False, |
| 1468 | 'properties': {'filesystem-tag': {'type': 'string'}, |
| 1469 | 'info': {'$ref': '#/definitions/FilesystemAttachmentInfo'}, |
| 1470 | 'machine-tag': {'type': 'string'}}, |
| 1471 | 'required': ['filesystem-tag', |
| 1472 | 'machine-tag', |
| 1473 | 'info'], |
| 1474 | 'type': 'object'}, |
| 1475 | 'FilesystemAttachmentInfo': {'additionalProperties': False, |
| 1476 | 'properties': {'mount-point': {'type': 'string'}, |
| 1477 | 'read-only': {'type': 'boolean'}}, |
| 1478 | 'type': 'object'}, |
| 1479 | 'FilesystemAttachmentParams': {'additionalProperties': False, |
| 1480 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 1481 | 'filesystem-tag': {'type': 'string'}, |
| 1482 | 'instance-id': {'type': 'string'}, |
| 1483 | 'machine-tag': {'type': 'string'}, |
| 1484 | 'mount-point': {'type': 'string'}, |
| 1485 | 'provider': {'type': 'string'}, |
| 1486 | 'read-only': {'type': 'boolean'}}, |
| 1487 | 'required': ['filesystem-tag', |
| 1488 | 'machine-tag', |
| 1489 | 'provider'], |
| 1490 | 'type': 'object'}, |
| 1491 | 'FilesystemAttachmentParamsResult': {'additionalProperties': False, |
| 1492 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1493 | 'result': {'$ref': '#/definitions/FilesystemAttachmentParams'}}, |
| 1494 | 'required': ['result'], |
| 1495 | 'type': 'object'}, |
| 1496 | 'FilesystemAttachmentParamsResults': {'additionalProperties': False, |
| 1497 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentParamsResult'}, |
| 1498 | 'type': 'array'}}, |
| 1499 | 'type': 'object'}, |
| 1500 | 'FilesystemAttachmentResult': {'additionalProperties': False, |
| 1501 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1502 | 'result': {'$ref': '#/definitions/FilesystemAttachment'}}, |
| 1503 | 'required': ['result'], |
| 1504 | 'type': 'object'}, |
| 1505 | 'FilesystemAttachmentResults': {'additionalProperties': False, |
| 1506 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemAttachmentResult'}, |
| 1507 | 'type': 'array'}}, |
| 1508 | 'type': 'object'}, |
| 1509 | 'FilesystemAttachments': {'additionalProperties': False, |
| 1510 | 'properties': {'filesystem-attachments': {'items': {'$ref': '#/definitions/FilesystemAttachment'}, |
| 1511 | 'type': 'array'}}, |
| 1512 | 'required': ['filesystem-attachments'], |
| 1513 | 'type': 'object'}, |
| 1514 | 'FilesystemInfo': {'additionalProperties': False, |
| 1515 | 'properties': {'filesystem-id': {'type': 'string'}, |
| 1516 | 'pool': {'type': 'string'}, |
| 1517 | 'size': {'type': 'integer'}}, |
| 1518 | 'required': ['filesystem-id', |
| 1519 | 'pool', |
| 1520 | 'size'], |
| 1521 | 'type': 'object'}, |
| 1522 | 'FilesystemParams': {'additionalProperties': False, |
| 1523 | 'properties': {'attachment': {'$ref': '#/definitions/FilesystemAttachmentParams'}, |
| 1524 | 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1525 | 'type': 'object'}}, |
| 1526 | 'type': 'object'}, |
| 1527 | 'filesystem-tag': {'type': 'string'}, |
| 1528 | 'provider': {'type': 'string'}, |
| 1529 | 'size': {'type': 'integer'}, |
| 1530 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1531 | 'type': 'object'}, |
| 1532 | 'volume-tag': {'type': 'string'}}, |
| 1533 | 'required': ['filesystem-tag', |
| 1534 | 'size', |
| 1535 | 'provider'], |
| 1536 | 'type': 'object'}, |
| 1537 | 'FilesystemParamsResult': {'additionalProperties': False, |
| 1538 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1539 | 'result': {'$ref': '#/definitions/FilesystemParams'}}, |
| 1540 | 'required': ['result'], |
| 1541 | 'type': 'object'}, |
| 1542 | 'FilesystemParamsResults': {'additionalProperties': False, |
| 1543 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemParamsResult'}, |
| 1544 | 'type': 'array'}}, |
| 1545 | 'type': 'object'}, |
| 1546 | 'FilesystemResult': {'additionalProperties': False, |
| 1547 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1548 | 'result': {'$ref': '#/definitions/Filesystem'}}, |
| 1549 | 'required': ['result'], |
| 1550 | 'type': 'object'}, |
| 1551 | 'FilesystemResults': {'additionalProperties': False, |
| 1552 | 'properties': {'results': {'items': {'$ref': '#/definitions/FilesystemResult'}, |
| 1553 | 'type': 'array'}}, |
| 1554 | 'type': 'object'}, |
| 1555 | 'Filesystems': {'additionalProperties': False, |
| 1556 | 'properties': {'filesystems': {'items': {'$ref': '#/definitions/Filesystem'}, |
| 1557 | 'type': 'array'}}, |
| 1558 | 'required': ['filesystems'], |
| 1559 | 'type': 'object'}, |
| 1560 | 'LifeResult': {'additionalProperties': False, |
| 1561 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1562 | 'life': {'type': 'string'}}, |
| 1563 | 'required': ['life'], |
| 1564 | 'type': 'object'}, |
| 1565 | 'LifeResults': {'additionalProperties': False, |
| 1566 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 1567 | 'type': 'array'}}, |
| 1568 | 'required': ['results'], |
| 1569 | 'type': 'object'}, |
| 1570 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 1571 | 'MachineStorageId': {'additionalProperties': False, |
| 1572 | 'properties': {'attachment-tag': {'type': 'string'}, |
| 1573 | 'machine-tag': {'type': 'string'}}, |
| 1574 | 'required': ['machine-tag', |
| 1575 | 'attachment-tag'], |
| 1576 | 'type': 'object'}, |
| 1577 | 'MachineStorageIds': {'additionalProperties': False, |
| 1578 | 'properties': {'ids': {'items': {'$ref': '#/definitions/MachineStorageId'}, |
| 1579 | 'type': 'array'}}, |
| 1580 | 'required': ['ids'], |
| 1581 | 'type': 'object'}, |
| 1582 | 'MachineStorageIdsWatchResult': {'additionalProperties': False, |
| 1583 | 'properties': {'changes': {'items': {'$ref': '#/definitions/MachineStorageId'}, |
| 1584 | 'type': 'array'}, |
| 1585 | 'error': {'$ref': '#/definitions/Error'}, |
| 1586 | 'watcher-id': {'type': 'string'}}, |
| 1587 | 'required': ['watcher-id', |
| 1588 | 'changes'], |
| 1589 | 'type': 'object'}, |
| 1590 | 'MachineStorageIdsWatchResults': {'additionalProperties': False, |
| 1591 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachineStorageIdsWatchResult'}, |
| 1592 | 'type': 'array'}}, |
| 1593 | 'required': ['results'], |
| 1594 | 'type': 'object'}, |
| 1595 | 'NotifyWatchResult': {'additionalProperties': False, |
| 1596 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 1597 | 'error': {'$ref': '#/definitions/Error'}}, |
| 1598 | 'required': ['NotifyWatcherId'], |
| 1599 | 'type': 'object'}, |
| 1600 | 'NotifyWatchResults': {'additionalProperties': False, |
| 1601 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 1602 | 'type': 'array'}}, |
| 1603 | 'required': ['results'], |
| 1604 | 'type': 'object'}, |
| 1605 | 'RemoveFilesystemParams': {'additionalProperties': False, |
| 1606 | 'properties': {'destroy': {'type': 'boolean'}, |
| 1607 | 'filesystem-id': {'type': 'string'}, |
| 1608 | 'provider': {'type': 'string'}}, |
| 1609 | 'required': ['provider', |
| 1610 | 'filesystem-id'], |
| 1611 | 'type': 'object'}, |
| 1612 | 'RemoveFilesystemParamsResult': {'additionalProperties': False, |
| 1613 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1614 | 'result': {'$ref': '#/definitions/RemoveFilesystemParams'}}, |
| 1615 | 'required': ['result'], |
| 1616 | 'type': 'object'}, |
| 1617 | 'RemoveFilesystemParamsResults': {'additionalProperties': False, |
| 1618 | 'properties': {'results': {'items': {'$ref': '#/definitions/RemoveFilesystemParamsResult'}, |
| 1619 | 'type': 'array'}}, |
| 1620 | 'type': 'object'}, |
| 1621 | 'RemoveVolumeParams': {'additionalProperties': False, |
| 1622 | 'properties': {'destroy': {'type': 'boolean'}, |
| 1623 | 'provider': {'type': 'string'}, |
| 1624 | 'volume-id': {'type': 'string'}}, |
| 1625 | 'required': ['provider', 'volume-id'], |
| 1626 | 'type': 'object'}, |
| 1627 | 'RemoveVolumeParamsResult': {'additionalProperties': False, |
| 1628 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1629 | 'result': {'$ref': '#/definitions/RemoveVolumeParams'}}, |
| 1630 | 'required': ['result'], |
| 1631 | 'type': 'object'}, |
| 1632 | 'RemoveVolumeParamsResults': {'additionalProperties': False, |
| 1633 | 'properties': {'results': {'items': {'$ref': '#/definitions/RemoveVolumeParamsResult'}, |
| 1634 | 'type': 'array'}}, |
| 1635 | 'type': 'object'}, |
| 1636 | 'SetStatus': {'additionalProperties': False, |
| 1637 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 1638 | 'type': 'array'}}, |
| 1639 | 'required': ['entities'], |
| 1640 | 'type': 'object'}, |
| 1641 | 'StringResult': {'additionalProperties': False, |
| 1642 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1643 | 'result': {'type': 'string'}}, |
| 1644 | 'required': ['result'], |
| 1645 | 'type': 'object'}, |
| 1646 | 'StringResults': {'additionalProperties': False, |
| 1647 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 1648 | 'type': 'array'}}, |
| 1649 | 'required': ['results'], |
| 1650 | 'type': 'object'}, |
| 1651 | 'StringsWatchResult': {'additionalProperties': False, |
| 1652 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 1653 | 'type': 'array'}, |
| 1654 | 'error': {'$ref': '#/definitions/Error'}, |
| 1655 | 'watcher-id': {'type': 'string'}}, |
| 1656 | 'required': ['watcher-id'], |
| 1657 | 'type': 'object'}, |
| 1658 | 'StringsWatchResults': {'additionalProperties': False, |
| 1659 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 1660 | 'type': 'array'}}, |
| 1661 | 'required': ['results'], |
| 1662 | 'type': 'object'}, |
| 1663 | 'Volume': {'additionalProperties': False, |
| 1664 | 'properties': {'info': {'$ref': '#/definitions/VolumeInfo'}, |
| 1665 | 'volume-tag': {'type': 'string'}}, |
| 1666 | 'required': ['volume-tag', 'info'], |
| 1667 | 'type': 'object'}, |
| 1668 | 'VolumeAttachment': {'additionalProperties': False, |
| 1669 | 'properties': {'info': {'$ref': '#/definitions/VolumeAttachmentInfo'}, |
| 1670 | 'machine-tag': {'type': 'string'}, |
| 1671 | 'volume-tag': {'type': 'string'}}, |
| 1672 | 'required': ['volume-tag', |
| 1673 | 'machine-tag', |
| 1674 | 'info'], |
| 1675 | 'type': 'object'}, |
| 1676 | 'VolumeAttachmentInfo': {'additionalProperties': False, |
| 1677 | 'properties': {'bus-address': {'type': 'string'}, |
| 1678 | 'device-link': {'type': 'string'}, |
| 1679 | 'device-name': {'type': 'string'}, |
| 1680 | 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, |
| 1681 | 'read-only': {'type': 'boolean'}}, |
| 1682 | 'type': 'object'}, |
| 1683 | 'VolumeAttachmentParams': {'additionalProperties': False, |
| 1684 | 'properties': {'instance-id': {'type': 'string'}, |
| 1685 | 'machine-tag': {'type': 'string'}, |
| 1686 | 'provider': {'type': 'string'}, |
| 1687 | 'read-only': {'type': 'boolean'}, |
| 1688 | 'volume-id': {'type': 'string'}, |
| 1689 | 'volume-tag': {'type': 'string'}}, |
| 1690 | 'required': ['volume-tag', |
| 1691 | 'machine-tag', |
| 1692 | 'provider'], |
| 1693 | 'type': 'object'}, |
| 1694 | 'VolumeAttachmentParamsResult': {'additionalProperties': False, |
| 1695 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1696 | 'result': {'$ref': '#/definitions/VolumeAttachmentParams'}}, |
| 1697 | 'required': ['result'], |
| 1698 | 'type': 'object'}, |
| 1699 | 'VolumeAttachmentParamsResults': {'additionalProperties': False, |
| 1700 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentParamsResult'}, |
| 1701 | 'type': 'array'}}, |
| 1702 | 'type': 'object'}, |
| 1703 | 'VolumeAttachmentPlan': {'additionalProperties': False, |
| 1704 | 'properties': {'block-device': {'$ref': '#/definitions/BlockDevice'}, |
| 1705 | 'life': {'type': 'string'}, |
| 1706 | 'machine-tag': {'type': 'string'}, |
| 1707 | 'plan-info': {'$ref': '#/definitions/VolumeAttachmentPlanInfo'}, |
| 1708 | 'volume-tag': {'type': 'string'}}, |
| 1709 | 'required': ['volume-tag', |
| 1710 | 'machine-tag', |
| 1711 | 'plan-info'], |
| 1712 | 'type': 'object'}, |
| 1713 | 'VolumeAttachmentPlanInfo': {'additionalProperties': False, |
| 1714 | 'properties': {'device-attributes': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1715 | 'type': 'object'}, |
| 1716 | 'device-type': {'type': 'string'}}, |
| 1717 | 'type': 'object'}, |
| 1718 | 'VolumeAttachmentPlanResult': {'additionalProperties': False, |
| 1719 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1720 | 'result': {'$ref': '#/definitions/VolumeAttachmentPlan'}}, |
| 1721 | 'required': ['result'], |
| 1722 | 'type': 'object'}, |
| 1723 | 'VolumeAttachmentPlanResults': {'additionalProperties': False, |
| 1724 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentPlanResult'}, |
| 1725 | 'type': 'array'}}, |
| 1726 | 'type': 'object'}, |
| 1727 | 'VolumeAttachmentPlans': {'additionalProperties': False, |
| 1728 | 'properties': {'volume-plans': {'items': {'$ref': '#/definitions/VolumeAttachmentPlan'}, |
| 1729 | 'type': 'array'}}, |
| 1730 | 'required': ['volume-plans'], |
| 1731 | 'type': 'object'}, |
| 1732 | 'VolumeAttachmentResult': {'additionalProperties': False, |
| 1733 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1734 | 'result': {'$ref': '#/definitions/VolumeAttachment'}}, |
| 1735 | 'required': ['result'], |
| 1736 | 'type': 'object'}, |
| 1737 | 'VolumeAttachmentResults': {'additionalProperties': False, |
| 1738 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeAttachmentResult'}, |
| 1739 | 'type': 'array'}}, |
| 1740 | 'type': 'object'}, |
| 1741 | 'VolumeAttachments': {'additionalProperties': False, |
| 1742 | 'properties': {'volume-attachments': {'items': {'$ref': '#/definitions/VolumeAttachment'}, |
| 1743 | 'type': 'array'}}, |
| 1744 | 'required': ['volume-attachments'], |
| 1745 | 'type': 'object'}, |
| 1746 | 'VolumeInfo': {'additionalProperties': False, |
| 1747 | 'properties': {'hardware-id': {'type': 'string'}, |
| 1748 | 'persistent': {'type': 'boolean'}, |
| 1749 | 'pool': {'type': 'string'}, |
| 1750 | 'size': {'type': 'integer'}, |
| 1751 | 'volume-id': {'type': 'string'}, |
| 1752 | 'wwn': {'type': 'string'}}, |
| 1753 | 'required': ['volume-id', 'size', 'persistent'], |
| 1754 | 'type': 'object'}, |
| 1755 | 'VolumeParams': {'additionalProperties': False, |
| 1756 | 'properties': {'attachment': {'$ref': '#/definitions/VolumeAttachmentParams'}, |
| 1757 | 'attributes': {'patternProperties': {'.*': {'additionalProperties': True, |
| 1758 | 'type': 'object'}}, |
| 1759 | 'type': 'object'}, |
| 1760 | 'provider': {'type': 'string'}, |
| 1761 | 'size': {'type': 'integer'}, |
| 1762 | 'tags': {'patternProperties': {'.*': {'type': 'string'}}, |
| 1763 | 'type': 'object'}, |
| 1764 | 'volume-tag': {'type': 'string'}}, |
| 1765 | 'required': ['volume-tag', |
| 1766 | 'size', |
| 1767 | 'provider'], |
| 1768 | 'type': 'object'}, |
| 1769 | 'VolumeParamsResult': {'additionalProperties': False, |
| 1770 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1771 | 'result': {'$ref': '#/definitions/VolumeParams'}}, |
| 1772 | 'required': ['result'], |
| 1773 | 'type': 'object'}, |
| 1774 | 'VolumeParamsResults': {'additionalProperties': False, |
| 1775 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeParamsResult'}, |
| 1776 | 'type': 'array'}}, |
| 1777 | 'type': 'object'}, |
| 1778 | 'VolumeResult': {'additionalProperties': False, |
| 1779 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 1780 | 'result': {'$ref': '#/definitions/Volume'}}, |
| 1781 | 'required': ['result'], |
| 1782 | 'type': 'object'}, |
| 1783 | 'VolumeResults': {'additionalProperties': False, |
| 1784 | 'properties': {'results': {'items': {'$ref': '#/definitions/VolumeResult'}, |
| 1785 | 'type': 'array'}}, |
| 1786 | 'type': 'object'}, |
| 1787 | 'Volumes': {'additionalProperties': False, |
| 1788 | 'properties': {'volumes': {'items': {'$ref': '#/definitions/Volume'}, |
| 1789 | 'type': 'array'}}, |
| 1790 | 'required': ['volumes'], |
| 1791 | 'type': 'object'}}, |
| 1792 | 'properties': {'AttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1793 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 1794 | 'type': 'object'}, |
| 1795 | 'CreateVolumeAttachmentPlans': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachmentPlans'}, |
| 1796 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1797 | 'type': 'object'}, |
| 1798 | 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1799 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1800 | 'type': 'object'}, |
| 1801 | 'FilesystemAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1802 | 'Result': {'$ref': '#/definitions/FilesystemAttachmentParamsResults'}}, |
| 1803 | 'type': 'object'}, |
| 1804 | 'FilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1805 | 'Result': {'$ref': '#/definitions/FilesystemAttachmentResults'}}, |
| 1806 | 'type': 'object'}, |
| 1807 | 'FilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1808 | 'Result': {'$ref': '#/definitions/FilesystemParamsResults'}}, |
| 1809 | 'type': 'object'}, |
| 1810 | 'Filesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1811 | 'Result': {'$ref': '#/definitions/FilesystemResults'}}, |
| 1812 | 'type': 'object'}, |
| 1813 | 'InstanceId': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1814 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 1815 | 'type': 'object'}, |
| 1816 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1817 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 1818 | 'type': 'object'}, |
| 1819 | 'Remove': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1820 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1821 | 'type': 'object'}, |
| 1822 | 'RemoveAttachment': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1823 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1824 | 'type': 'object'}, |
| 1825 | 'RemoveFilesystemParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1826 | 'Result': {'$ref': '#/definitions/RemoveFilesystemParamsResults'}}, |
| 1827 | 'type': 'object'}, |
| 1828 | 'RemoveVolumeAttachmentPlan': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1829 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1830 | 'type': 'object'}, |
| 1831 | 'RemoveVolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1832 | 'Result': {'$ref': '#/definitions/RemoveVolumeParamsResults'}}, |
| 1833 | 'type': 'object'}, |
| 1834 | 'SetFilesystemAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/FilesystemAttachments'}, |
| 1835 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1836 | 'type': 'object'}, |
| 1837 | 'SetFilesystemInfo': {'properties': {'Params': {'$ref': '#/definitions/Filesystems'}, |
| 1838 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1839 | 'type': 'object'}, |
| 1840 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 1841 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1842 | 'type': 'object'}, |
| 1843 | 'SetVolumeAttachmentInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachments'}, |
| 1844 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1845 | 'type': 'object'}, |
| 1846 | 'SetVolumeAttachmentPlanBlockInfo': {'properties': {'Params': {'$ref': '#/definitions/VolumeAttachmentPlans'}, |
| 1847 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1848 | 'type': 'object'}, |
| 1849 | 'SetVolumeInfo': {'properties': {'Params': {'$ref': '#/definitions/Volumes'}, |
| 1850 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1851 | 'type': 'object'}, |
| 1852 | 'UpdateStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 1853 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 1854 | 'type': 'object'}, |
| 1855 | 'VolumeAttachmentParams': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1856 | 'Result': {'$ref': '#/definitions/VolumeAttachmentParamsResults'}}, |
| 1857 | 'type': 'object'}, |
| 1858 | 'VolumeAttachmentPlans': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1859 | 'Result': {'$ref': '#/definitions/VolumeAttachmentPlanResults'}}, |
| 1860 | 'type': 'object'}, |
| 1861 | 'VolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1862 | 'Result': {'$ref': '#/definitions/VolumeAttachmentResults'}}, |
| 1863 | 'type': 'object'}, |
| 1864 | 'VolumeBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/MachineStorageIds'}, |
| 1865 | 'Result': {'$ref': '#/definitions/BlockDeviceResults'}}, |
| 1866 | 'type': 'object'}, |
| 1867 | 'VolumeParams': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1868 | 'Result': {'$ref': '#/definitions/VolumeParamsResults'}}, |
| 1869 | 'type': 'object'}, |
| 1870 | 'Volumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1871 | 'Result': {'$ref': '#/definitions/VolumeResults'}}, |
| 1872 | 'type': 'object'}, |
| 1873 | 'WatchApplications': {'properties': {'Result': {'$ref': '#/definitions/StringsWatchResult'}}, |
| 1874 | 'type': 'object'}, |
| 1875 | 'WatchBlockDevices': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1876 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 1877 | 'type': 'object'}, |
| 1878 | 'WatchFilesystemAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1879 | 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, |
| 1880 | 'type': 'object'}, |
| 1881 | 'WatchFilesystems': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1882 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 1883 | 'type': 'object'}, |
| 1884 | 'WatchMachines': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1885 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 1886 | 'type': 'object'}, |
| 1887 | 'WatchVolumeAttachmentPlans': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1888 | 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, |
| 1889 | 'type': 'object'}, |
| 1890 | 'WatchVolumeAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1891 | 'Result': {'$ref': '#/definitions/MachineStorageIdsWatchResults'}}, |
| 1892 | 'type': 'object'}, |
| 1893 | 'WatchVolumes': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 1894 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 1895 | 'type': 'object'}}, |
| 1896 | 'type': 'object'} |
| 1897 | |
| 1898 | |
| 1899 | @ReturnMapping(LifeResults) |
| 1900 | async def AttachmentLife(self, ids): |
| 1901 | ''' |
| 1902 | ids : typing.Sequence[~MachineStorageId] |
| 1903 | Returns -> typing.Sequence[~LifeResult] |
| 1904 | ''' |
| 1905 | # map input types to rpc msg |
| 1906 | _params = dict() |
| 1907 | msg = dict(type='StorageProvisioner', |
| 1908 | request='AttachmentLife', |
| 1909 | version=4, |
| 1910 | params=_params) |
| 1911 | _params['ids'] = ids |
| 1912 | reply = await self.rpc(msg) |
| 1913 | return reply |
| 1914 | |
| 1915 | |
| 1916 | |
| 1917 | @ReturnMapping(ErrorResults) |
| 1918 | async def CreateVolumeAttachmentPlans(self, volume_plans): |
| 1919 | ''' |
| 1920 | volume_plans : typing.Sequence[~VolumeAttachmentPlan] |
| 1921 | Returns -> typing.Sequence[~ErrorResult] |
| 1922 | ''' |
| 1923 | # map input types to rpc msg |
| 1924 | _params = dict() |
| 1925 | msg = dict(type='StorageProvisioner', |
| 1926 | request='CreateVolumeAttachmentPlans', |
| 1927 | version=4, |
| 1928 | params=_params) |
| 1929 | _params['volume-plans'] = volume_plans |
| 1930 | reply = await self.rpc(msg) |
| 1931 | return reply |
| 1932 | |
| 1933 | |
| 1934 | |
| 1935 | @ReturnMapping(ErrorResults) |
| 1936 | async def EnsureDead(self, entities): |
| 1937 | ''' |
| 1938 | entities : typing.Sequence[~Entity] |
| 1939 | Returns -> typing.Sequence[~ErrorResult] |
| 1940 | ''' |
| 1941 | # map input types to rpc msg |
| 1942 | _params = dict() |
| 1943 | msg = dict(type='StorageProvisioner', |
| 1944 | request='EnsureDead', |
| 1945 | version=4, |
| 1946 | params=_params) |
| 1947 | _params['entities'] = entities |
| 1948 | reply = await self.rpc(msg) |
| 1949 | return reply |
| 1950 | |
| 1951 | |
| 1952 | |
| 1953 | @ReturnMapping(FilesystemAttachmentParamsResults) |
| 1954 | async def FilesystemAttachmentParams(self, ids): |
| 1955 | ''' |
| 1956 | ids : typing.Sequence[~MachineStorageId] |
| 1957 | Returns -> typing.Sequence[~FilesystemAttachmentParamsResult] |
| 1958 | ''' |
| 1959 | # map input types to rpc msg |
| 1960 | _params = dict() |
| 1961 | msg = dict(type='StorageProvisioner', |
| 1962 | request='FilesystemAttachmentParams', |
| 1963 | version=4, |
| 1964 | params=_params) |
| 1965 | _params['ids'] = ids |
| 1966 | reply = await self.rpc(msg) |
| 1967 | return reply |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | @ReturnMapping(FilesystemAttachmentResults) |
| 1972 | async def FilesystemAttachments(self, ids): |
| 1973 | ''' |
| 1974 | ids : typing.Sequence[~MachineStorageId] |
| 1975 | Returns -> typing.Sequence[~FilesystemAttachmentResult] |
| 1976 | ''' |
| 1977 | # map input types to rpc msg |
| 1978 | _params = dict() |
| 1979 | msg = dict(type='StorageProvisioner', |
| 1980 | request='FilesystemAttachments', |
| 1981 | version=4, |
| 1982 | params=_params) |
| 1983 | _params['ids'] = ids |
| 1984 | reply = await self.rpc(msg) |
| 1985 | return reply |
| 1986 | |
| 1987 | |
| 1988 | |
| 1989 | @ReturnMapping(FilesystemParamsResults) |
| 1990 | async def FilesystemParams(self, entities): |
| 1991 | ''' |
| 1992 | entities : typing.Sequence[~Entity] |
| 1993 | Returns -> typing.Sequence[~FilesystemParamsResult] |
| 1994 | ''' |
| 1995 | # map input types to rpc msg |
| 1996 | _params = dict() |
| 1997 | msg = dict(type='StorageProvisioner', |
| 1998 | request='FilesystemParams', |
| 1999 | version=4, |
| 2000 | params=_params) |
| 2001 | _params['entities'] = entities |
| 2002 | reply = await self.rpc(msg) |
| 2003 | return reply |
| 2004 | |
| 2005 | |
| 2006 | |
| 2007 | @ReturnMapping(FilesystemResults) |
| 2008 | async def Filesystems(self, entities): |
| 2009 | ''' |
| 2010 | entities : typing.Sequence[~Entity] |
| 2011 | Returns -> typing.Sequence[~FilesystemResult] |
| 2012 | ''' |
| 2013 | # map input types to rpc msg |
| 2014 | _params = dict() |
| 2015 | msg = dict(type='StorageProvisioner', |
| 2016 | request='Filesystems', |
| 2017 | version=4, |
| 2018 | params=_params) |
| 2019 | _params['entities'] = entities |
| 2020 | reply = await self.rpc(msg) |
| 2021 | return reply |
| 2022 | |
| 2023 | |
| 2024 | |
| 2025 | @ReturnMapping(StringResults) |
| 2026 | async def InstanceId(self, entities): |
| 2027 | ''' |
| 2028 | entities : typing.Sequence[~Entity] |
| 2029 | Returns -> typing.Sequence[~StringResult] |
| 2030 | ''' |
| 2031 | # map input types to rpc msg |
| 2032 | _params = dict() |
| 2033 | msg = dict(type='StorageProvisioner', |
| 2034 | request='InstanceId', |
| 2035 | version=4, |
| 2036 | params=_params) |
| 2037 | _params['entities'] = entities |
| 2038 | reply = await self.rpc(msg) |
| 2039 | return reply |
| 2040 | |
| 2041 | |
| 2042 | |
| 2043 | @ReturnMapping(LifeResults) |
| 2044 | async def Life(self, entities): |
| 2045 | ''' |
| 2046 | entities : typing.Sequence[~Entity] |
| 2047 | Returns -> typing.Sequence[~LifeResult] |
| 2048 | ''' |
| 2049 | # map input types to rpc msg |
| 2050 | _params = dict() |
| 2051 | msg = dict(type='StorageProvisioner', |
| 2052 | request='Life', |
| 2053 | version=4, |
| 2054 | params=_params) |
| 2055 | _params['entities'] = entities |
| 2056 | reply = await self.rpc(msg) |
| 2057 | return reply |
| 2058 | |
| 2059 | |
| 2060 | |
| 2061 | @ReturnMapping(ErrorResults) |
| 2062 | async def Remove(self, entities): |
| 2063 | ''' |
| 2064 | entities : typing.Sequence[~Entity] |
| 2065 | Returns -> typing.Sequence[~ErrorResult] |
| 2066 | ''' |
| 2067 | # map input types to rpc msg |
| 2068 | _params = dict() |
| 2069 | msg = dict(type='StorageProvisioner', |
| 2070 | request='Remove', |
| 2071 | version=4, |
| 2072 | params=_params) |
| 2073 | _params['entities'] = entities |
| 2074 | reply = await self.rpc(msg) |
| 2075 | return reply |
| 2076 | |
| 2077 | |
| 2078 | |
| 2079 | @ReturnMapping(ErrorResults) |
| 2080 | async def RemoveAttachment(self, ids): |
| 2081 | ''' |
| 2082 | ids : typing.Sequence[~MachineStorageId] |
| 2083 | Returns -> typing.Sequence[~ErrorResult] |
| 2084 | ''' |
| 2085 | # map input types to rpc msg |
| 2086 | _params = dict() |
| 2087 | msg = dict(type='StorageProvisioner', |
| 2088 | request='RemoveAttachment', |
| 2089 | version=4, |
| 2090 | params=_params) |
| 2091 | _params['ids'] = ids |
| 2092 | reply = await self.rpc(msg) |
| 2093 | return reply |
| 2094 | |
| 2095 | |
| 2096 | |
| 2097 | @ReturnMapping(RemoveFilesystemParamsResults) |
| 2098 | async def RemoveFilesystemParams(self, entities): |
| 2099 | ''' |
| 2100 | entities : typing.Sequence[~Entity] |
| 2101 | Returns -> typing.Sequence[~RemoveFilesystemParamsResult] |
| 2102 | ''' |
| 2103 | # map input types to rpc msg |
| 2104 | _params = dict() |
| 2105 | msg = dict(type='StorageProvisioner', |
| 2106 | request='RemoveFilesystemParams', |
| 2107 | version=4, |
| 2108 | params=_params) |
| 2109 | _params['entities'] = entities |
| 2110 | reply = await self.rpc(msg) |
| 2111 | return reply |
| 2112 | |
| 2113 | |
| 2114 | |
| 2115 | @ReturnMapping(ErrorResults) |
| 2116 | async def RemoveVolumeAttachmentPlan(self, ids): |
| 2117 | ''' |
| 2118 | ids : typing.Sequence[~MachineStorageId] |
| 2119 | Returns -> typing.Sequence[~ErrorResult] |
| 2120 | ''' |
| 2121 | # map input types to rpc msg |
| 2122 | _params = dict() |
| 2123 | msg = dict(type='StorageProvisioner', |
| 2124 | request='RemoveVolumeAttachmentPlan', |
| 2125 | version=4, |
| 2126 | params=_params) |
| 2127 | _params['ids'] = ids |
| 2128 | reply = await self.rpc(msg) |
| 2129 | return reply |
| 2130 | |
| 2131 | |
| 2132 | |
| 2133 | @ReturnMapping(RemoveVolumeParamsResults) |
| 2134 | async def RemoveVolumeParams(self, entities): |
| 2135 | ''' |
| 2136 | entities : typing.Sequence[~Entity] |
| 2137 | Returns -> typing.Sequence[~RemoveVolumeParamsResult] |
| 2138 | ''' |
| 2139 | # map input types to rpc msg |
| 2140 | _params = dict() |
| 2141 | msg = dict(type='StorageProvisioner', |
| 2142 | request='RemoveVolumeParams', |
| 2143 | version=4, |
| 2144 | params=_params) |
| 2145 | _params['entities'] = entities |
| 2146 | reply = await self.rpc(msg) |
| 2147 | return reply |
| 2148 | |
| 2149 | |
| 2150 | |
| 2151 | @ReturnMapping(ErrorResults) |
| 2152 | async def SetFilesystemAttachmentInfo(self, filesystem_attachments): |
| 2153 | ''' |
| 2154 | filesystem_attachments : typing.Sequence[~FilesystemAttachment] |
| 2155 | Returns -> typing.Sequence[~ErrorResult] |
| 2156 | ''' |
| 2157 | # map input types to rpc msg |
| 2158 | _params = dict() |
| 2159 | msg = dict(type='StorageProvisioner', |
| 2160 | request='SetFilesystemAttachmentInfo', |
| 2161 | version=4, |
| 2162 | params=_params) |
| 2163 | _params['filesystem-attachments'] = filesystem_attachments |
| 2164 | reply = await self.rpc(msg) |
| 2165 | return reply |
| 2166 | |
| 2167 | |
| 2168 | |
| 2169 | @ReturnMapping(ErrorResults) |
| 2170 | async def SetFilesystemInfo(self, filesystems): |
| 2171 | ''' |
| 2172 | filesystems : typing.Sequence[~Filesystem] |
| 2173 | Returns -> typing.Sequence[~ErrorResult] |
| 2174 | ''' |
| 2175 | # map input types to rpc msg |
| 2176 | _params = dict() |
| 2177 | msg = dict(type='StorageProvisioner', |
| 2178 | request='SetFilesystemInfo', |
| 2179 | version=4, |
| 2180 | params=_params) |
| 2181 | _params['filesystems'] = filesystems |
| 2182 | reply = await self.rpc(msg) |
| 2183 | return reply |
| 2184 | |
| 2185 | |
| 2186 | |
| 2187 | @ReturnMapping(ErrorResults) |
| 2188 | async def SetStatus(self, entities): |
| 2189 | ''' |
| 2190 | entities : typing.Sequence[~EntityStatusArgs] |
| 2191 | Returns -> typing.Sequence[~ErrorResult] |
| 2192 | ''' |
| 2193 | # map input types to rpc msg |
| 2194 | _params = dict() |
| 2195 | msg = dict(type='StorageProvisioner', |
| 2196 | request='SetStatus', |
| 2197 | version=4, |
| 2198 | params=_params) |
| 2199 | _params['entities'] = entities |
| 2200 | reply = await self.rpc(msg) |
| 2201 | return reply |
| 2202 | |
| 2203 | |
| 2204 | |
| 2205 | @ReturnMapping(ErrorResults) |
| 2206 | async def SetVolumeAttachmentInfo(self, volume_attachments): |
| 2207 | ''' |
| 2208 | volume_attachments : typing.Sequence[~VolumeAttachment] |
| 2209 | Returns -> typing.Sequence[~ErrorResult] |
| 2210 | ''' |
| 2211 | # map input types to rpc msg |
| 2212 | _params = dict() |
| 2213 | msg = dict(type='StorageProvisioner', |
| 2214 | request='SetVolumeAttachmentInfo', |
| 2215 | version=4, |
| 2216 | params=_params) |
| 2217 | _params['volume-attachments'] = volume_attachments |
| 2218 | reply = await self.rpc(msg) |
| 2219 | return reply |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | @ReturnMapping(ErrorResults) |
| 2224 | async def SetVolumeAttachmentPlanBlockInfo(self, volume_plans): |
| 2225 | ''' |
| 2226 | volume_plans : typing.Sequence[~VolumeAttachmentPlan] |
| 2227 | Returns -> typing.Sequence[~ErrorResult] |
| 2228 | ''' |
| 2229 | # map input types to rpc msg |
| 2230 | _params = dict() |
| 2231 | msg = dict(type='StorageProvisioner', |
| 2232 | request='SetVolumeAttachmentPlanBlockInfo', |
| 2233 | version=4, |
| 2234 | params=_params) |
| 2235 | _params['volume-plans'] = volume_plans |
| 2236 | reply = await self.rpc(msg) |
| 2237 | return reply |
| 2238 | |
| 2239 | |
| 2240 | |
| 2241 | @ReturnMapping(ErrorResults) |
| 2242 | async def SetVolumeInfo(self, volumes): |
| 2243 | ''' |
| 2244 | volumes : typing.Sequence[~Volume] |
| 2245 | Returns -> typing.Sequence[~ErrorResult] |
| 2246 | ''' |
| 2247 | # map input types to rpc msg |
| 2248 | _params = dict() |
| 2249 | msg = dict(type='StorageProvisioner', |
| 2250 | request='SetVolumeInfo', |
| 2251 | version=4, |
| 2252 | params=_params) |
| 2253 | _params['volumes'] = volumes |
| 2254 | reply = await self.rpc(msg) |
| 2255 | return reply |
| 2256 | |
| 2257 | |
| 2258 | |
| 2259 | @ReturnMapping(ErrorResults) |
| 2260 | async def UpdateStatus(self, entities): |
| 2261 | ''' |
| 2262 | entities : typing.Sequence[~EntityStatusArgs] |
| 2263 | Returns -> typing.Sequence[~ErrorResult] |
| 2264 | ''' |
| 2265 | # map input types to rpc msg |
| 2266 | _params = dict() |
| 2267 | msg = dict(type='StorageProvisioner', |
| 2268 | request='UpdateStatus', |
| 2269 | version=4, |
| 2270 | params=_params) |
| 2271 | _params['entities'] = entities |
| 2272 | reply = await self.rpc(msg) |
| 2273 | return reply |
| 2274 | |
| 2275 | |
| 2276 | |
| 2277 | @ReturnMapping(VolumeAttachmentParamsResults) |
| 2278 | async def VolumeAttachmentParams(self, ids): |
| 2279 | ''' |
| 2280 | ids : typing.Sequence[~MachineStorageId] |
| 2281 | Returns -> typing.Sequence[~VolumeAttachmentParamsResult] |
| 2282 | ''' |
| 2283 | # map input types to rpc msg |
| 2284 | _params = dict() |
| 2285 | msg = dict(type='StorageProvisioner', |
| 2286 | request='VolumeAttachmentParams', |
| 2287 | version=4, |
| 2288 | params=_params) |
| 2289 | _params['ids'] = ids |
| 2290 | reply = await self.rpc(msg) |
| 2291 | return reply |
| 2292 | |
| 2293 | |
| 2294 | |
| 2295 | @ReturnMapping(VolumeAttachmentPlanResults) |
| 2296 | async def VolumeAttachmentPlans(self, ids): |
| 2297 | ''' |
| 2298 | ids : typing.Sequence[~MachineStorageId] |
| 2299 | Returns -> typing.Sequence[~VolumeAttachmentPlanResult] |
| 2300 | ''' |
| 2301 | # map input types to rpc msg |
| 2302 | _params = dict() |
| 2303 | msg = dict(type='StorageProvisioner', |
| 2304 | request='VolumeAttachmentPlans', |
| 2305 | version=4, |
| 2306 | params=_params) |
| 2307 | _params['ids'] = ids |
| 2308 | reply = await self.rpc(msg) |
| 2309 | return reply |
| 2310 | |
| 2311 | |
| 2312 | |
| 2313 | @ReturnMapping(VolumeAttachmentResults) |
| 2314 | async def VolumeAttachments(self, ids): |
| 2315 | ''' |
| 2316 | ids : typing.Sequence[~MachineStorageId] |
| 2317 | Returns -> typing.Sequence[~VolumeAttachmentResult] |
| 2318 | ''' |
| 2319 | # map input types to rpc msg |
| 2320 | _params = dict() |
| 2321 | msg = dict(type='StorageProvisioner', |
| 2322 | request='VolumeAttachments', |
| 2323 | version=4, |
| 2324 | params=_params) |
| 2325 | _params['ids'] = ids |
| 2326 | reply = await self.rpc(msg) |
| 2327 | return reply |
| 2328 | |
| 2329 | |
| 2330 | |
| 2331 | @ReturnMapping(BlockDeviceResults) |
| 2332 | async def VolumeBlockDevices(self, ids): |
| 2333 | ''' |
| 2334 | ids : typing.Sequence[~MachineStorageId] |
| 2335 | Returns -> typing.Sequence[~BlockDeviceResult] |
| 2336 | ''' |
| 2337 | # map input types to rpc msg |
| 2338 | _params = dict() |
| 2339 | msg = dict(type='StorageProvisioner', |
| 2340 | request='VolumeBlockDevices', |
| 2341 | version=4, |
| 2342 | params=_params) |
| 2343 | _params['ids'] = ids |
| 2344 | reply = await self.rpc(msg) |
| 2345 | return reply |
| 2346 | |
| 2347 | |
| 2348 | |
| 2349 | @ReturnMapping(VolumeParamsResults) |
| 2350 | async def VolumeParams(self, entities): |
| 2351 | ''' |
| 2352 | entities : typing.Sequence[~Entity] |
| 2353 | Returns -> typing.Sequence[~VolumeParamsResult] |
| 2354 | ''' |
| 2355 | # map input types to rpc msg |
| 2356 | _params = dict() |
| 2357 | msg = dict(type='StorageProvisioner', |
| 2358 | request='VolumeParams', |
| 2359 | version=4, |
| 2360 | params=_params) |
| 2361 | _params['entities'] = entities |
| 2362 | reply = await self.rpc(msg) |
| 2363 | return reply |
| 2364 | |
| 2365 | |
| 2366 | |
| 2367 | @ReturnMapping(VolumeResults) |
| 2368 | async def Volumes(self, entities): |
| 2369 | ''' |
| 2370 | entities : typing.Sequence[~Entity] |
| 2371 | Returns -> typing.Sequence[~VolumeResult] |
| 2372 | ''' |
| 2373 | # map input types to rpc msg |
| 2374 | _params = dict() |
| 2375 | msg = dict(type='StorageProvisioner', |
| 2376 | request='Volumes', |
| 2377 | version=4, |
| 2378 | params=_params) |
| 2379 | _params['entities'] = entities |
| 2380 | reply = await self.rpc(msg) |
| 2381 | return reply |
| 2382 | |
| 2383 | |
| 2384 | |
| 2385 | @ReturnMapping(StringsWatchResult) |
| 2386 | async def WatchApplications(self): |
| 2387 | ''' |
| 2388 | |
| 2389 | Returns -> typing.Union[typing.Sequence[str], _ForwardRef('Error'), str] |
| 2390 | ''' |
| 2391 | # map input types to rpc msg |
| 2392 | _params = dict() |
| 2393 | msg = dict(type='StorageProvisioner', |
| 2394 | request='WatchApplications', |
| 2395 | version=4, |
| 2396 | params=_params) |
| 2397 | |
| 2398 | reply = await self.rpc(msg) |
| 2399 | return reply |
| 2400 | |
| 2401 | |
| 2402 | |
| 2403 | @ReturnMapping(NotifyWatchResults) |
| 2404 | async def WatchBlockDevices(self, entities): |
| 2405 | ''' |
| 2406 | entities : typing.Sequence[~Entity] |
| 2407 | Returns -> typing.Sequence[~NotifyWatchResult] |
| 2408 | ''' |
| 2409 | # map input types to rpc msg |
| 2410 | _params = dict() |
| 2411 | msg = dict(type='StorageProvisioner', |
| 2412 | request='WatchBlockDevices', |
| 2413 | version=4, |
| 2414 | params=_params) |
| 2415 | _params['entities'] = entities |
| 2416 | reply = await self.rpc(msg) |
| 2417 | return reply |
| 2418 | |
| 2419 | |
| 2420 | |
| 2421 | @ReturnMapping(MachineStorageIdsWatchResults) |
| 2422 | async def WatchFilesystemAttachments(self, entities): |
| 2423 | ''' |
| 2424 | entities : typing.Sequence[~Entity] |
| 2425 | Returns -> typing.Sequence[~MachineStorageIdsWatchResult] |
| 2426 | ''' |
| 2427 | # map input types to rpc msg |
| 2428 | _params = dict() |
| 2429 | msg = dict(type='StorageProvisioner', |
| 2430 | request='WatchFilesystemAttachments', |
| 2431 | version=4, |
| 2432 | params=_params) |
| 2433 | _params['entities'] = entities |
| 2434 | reply = await self.rpc(msg) |
| 2435 | return reply |
| 2436 | |
| 2437 | |
| 2438 | |
| 2439 | @ReturnMapping(StringsWatchResults) |
| 2440 | async def WatchFilesystems(self, entities): |
| 2441 | ''' |
| 2442 | entities : typing.Sequence[~Entity] |
| 2443 | Returns -> typing.Sequence[~StringsWatchResult] |
| 2444 | ''' |
| 2445 | # map input types to rpc msg |
| 2446 | _params = dict() |
| 2447 | msg = dict(type='StorageProvisioner', |
| 2448 | request='WatchFilesystems', |
| 2449 | version=4, |
| 2450 | params=_params) |
| 2451 | _params['entities'] = entities |
| 2452 | reply = await self.rpc(msg) |
| 2453 | return reply |
| 2454 | |
| 2455 | |
| 2456 | |
| 2457 | @ReturnMapping(NotifyWatchResults) |
| 2458 | async def WatchMachines(self, entities): |
| 2459 | ''' |
| 2460 | entities : typing.Sequence[~Entity] |
| 2461 | Returns -> typing.Sequence[~NotifyWatchResult] |
| 2462 | ''' |
| 2463 | # map input types to rpc msg |
| 2464 | _params = dict() |
| 2465 | msg = dict(type='StorageProvisioner', |
| 2466 | request='WatchMachines', |
| 2467 | version=4, |
| 2468 | params=_params) |
| 2469 | _params['entities'] = entities |
| 2470 | reply = await self.rpc(msg) |
| 2471 | return reply |
| 2472 | |
| 2473 | |
| 2474 | |
| 2475 | @ReturnMapping(MachineStorageIdsWatchResults) |
| 2476 | async def WatchVolumeAttachmentPlans(self, entities): |
| 2477 | ''' |
| 2478 | entities : typing.Sequence[~Entity] |
| 2479 | Returns -> typing.Sequence[~MachineStorageIdsWatchResult] |
| 2480 | ''' |
| 2481 | # map input types to rpc msg |
| 2482 | _params = dict() |
| 2483 | msg = dict(type='StorageProvisioner', |
| 2484 | request='WatchVolumeAttachmentPlans', |
| 2485 | version=4, |
| 2486 | params=_params) |
| 2487 | _params['entities'] = entities |
| 2488 | reply = await self.rpc(msg) |
| 2489 | return reply |
| 2490 | |
| 2491 | |
| 2492 | |
| 2493 | @ReturnMapping(MachineStorageIdsWatchResults) |
| 2494 | async def WatchVolumeAttachments(self, entities): |
| 2495 | ''' |
| 2496 | entities : typing.Sequence[~Entity] |
| 2497 | Returns -> typing.Sequence[~MachineStorageIdsWatchResult] |
| 2498 | ''' |
| 2499 | # map input types to rpc msg |
| 2500 | _params = dict() |
| 2501 | msg = dict(type='StorageProvisioner', |
| 2502 | request='WatchVolumeAttachments', |
| 2503 | version=4, |
| 2504 | params=_params) |
| 2505 | _params['entities'] = entities |
| 2506 | reply = await self.rpc(msg) |
| 2507 | return reply |
| 2508 | |
| 2509 | |
| 2510 | |
| 2511 | @ReturnMapping(StringsWatchResults) |
| 2512 | async def WatchVolumes(self, entities): |
| 2513 | ''' |
| 2514 | entities : typing.Sequence[~Entity] |
| 2515 | Returns -> typing.Sequence[~StringsWatchResult] |
| 2516 | ''' |
| 2517 | # map input types to rpc msg |
| 2518 | _params = dict() |
| 2519 | msg = dict(type='StorageProvisioner', |
| 2520 | request='WatchVolumes', |
| 2521 | version=4, |
| 2522 | params=_params) |
| 2523 | _params['entities'] = entities |
| 2524 | reply = await self.rpc(msg) |
| 2525 | return reply |
| 2526 | |
| 2527 | |
| 2528 | |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 2529 | class UniterFacade(Type): |
| 2530 | name = 'Uniter' |
| 2531 | version = 4 |
| 2532 | schema = {'definitions': {'APIHostPortsResult': {'additionalProperties': False, |
| 2533 | 'properties': {'servers': {'items': {'items': {'$ref': '#/definitions/HostPort'}, |
| 2534 | 'type': 'array'}, |
| 2535 | 'type': 'array'}}, |
| 2536 | 'required': ['servers'], |
| 2537 | 'type': 'object'}, |
| 2538 | 'Action': {'additionalProperties': False, |
| 2539 | 'properties': {'name': {'type': 'string'}, |
| 2540 | 'parameters': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2541 | 'type': 'object'}}, |
| 2542 | 'type': 'object'}, |
| 2543 | 'receiver': {'type': 'string'}, |
| 2544 | 'tag': {'type': 'string'}}, |
| 2545 | 'required': ['tag', 'receiver', 'name'], |
| 2546 | 'type': 'object'}, |
| 2547 | 'ActionExecutionResult': {'additionalProperties': False, |
| 2548 | 'properties': {'action-tag': {'type': 'string'}, |
| 2549 | 'message': {'type': 'string'}, |
| 2550 | 'results': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2551 | 'type': 'object'}}, |
| 2552 | 'type': 'object'}, |
| 2553 | 'status': {'type': 'string'}}, |
| 2554 | 'required': ['action-tag', 'status'], |
| 2555 | 'type': 'object'}, |
| 2556 | 'ActionExecutionResults': {'additionalProperties': False, |
| 2557 | 'properties': {'results': {'items': {'$ref': '#/definitions/ActionExecutionResult'}, |
| 2558 | 'type': 'array'}}, |
| 2559 | 'type': 'object'}, |
| 2560 | 'ActionResult': {'additionalProperties': False, |
| 2561 | 'properties': {'action': {'$ref': '#/definitions/Action'}, |
| 2562 | 'completed': {'format': 'date-time', |
| 2563 | 'type': 'string'}, |
| 2564 | 'enqueued': {'format': 'date-time', |
| 2565 | 'type': 'string'}, |
| 2566 | 'error': {'$ref': '#/definitions/Error'}, |
| 2567 | 'message': {'type': 'string'}, |
| 2568 | 'output': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2569 | 'type': 'object'}}, |
| 2570 | 'type': 'object'}, |
| 2571 | 'started': {'format': 'date-time', |
| 2572 | 'type': 'string'}, |
| 2573 | 'status': {'type': 'string'}}, |
| 2574 | 'type': 'object'}, |
| 2575 | 'ActionResults': {'additionalProperties': False, |
| 2576 | 'properties': {'results': {'items': {'$ref': '#/definitions/ActionResult'}, |
| 2577 | 'type': 'array'}}, |
| 2578 | 'type': 'object'}, |
| 2579 | 'Address': {'additionalProperties': False, |
| 2580 | 'properties': {'scope': {'type': 'string'}, |
| 2581 | 'space-name': {'type': 'string'}, |
| 2582 | 'type': {'type': 'string'}, |
| 2583 | 'value': {'type': 'string'}}, |
| 2584 | 'required': ['value', 'type', 'scope'], |
| 2585 | 'type': 'object'}, |
| 2586 | 'ApplicationStatusResult': {'additionalProperties': False, |
| 2587 | 'properties': {'application': {'$ref': '#/definitions/StatusResult'}, |
| 2588 | 'error': {'$ref': '#/definitions/Error'}, |
| 2589 | 'units': {'patternProperties': {'.*': {'$ref': '#/definitions/StatusResult'}}, |
| 2590 | 'type': 'object'}}, |
| 2591 | 'required': ['application', |
| 2592 | 'units'], |
| 2593 | 'type': 'object'}, |
| 2594 | 'ApplicationStatusResults': {'additionalProperties': False, |
| 2595 | 'properties': {'results': {'items': {'$ref': '#/definitions/ApplicationStatusResult'}, |
| 2596 | 'type': 'array'}}, |
| 2597 | 'required': ['results'], |
| 2598 | 'type': 'object'}, |
| 2599 | 'BoolResult': {'additionalProperties': False, |
| 2600 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2601 | 'result': {'type': 'boolean'}}, |
| 2602 | 'required': ['result'], |
| 2603 | 'type': 'object'}, |
| 2604 | 'BoolResults': {'additionalProperties': False, |
| 2605 | 'properties': {'results': {'items': {'$ref': '#/definitions/BoolResult'}, |
| 2606 | 'type': 'array'}}, |
| 2607 | 'required': ['results'], |
| 2608 | 'type': 'object'}, |
| 2609 | 'BytesResult': {'additionalProperties': False, |
| 2610 | 'properties': {'result': {'items': {'type': 'integer'}, |
| 2611 | 'type': 'array'}}, |
| 2612 | 'required': ['result'], |
| 2613 | 'type': 'object'}, |
| 2614 | 'CharmRelation': {'additionalProperties': False, |
| 2615 | 'properties': {'interface': {'type': 'string'}, |
| 2616 | 'limit': {'type': 'integer'}, |
| 2617 | 'name': {'type': 'string'}, |
| 2618 | 'optional': {'type': 'boolean'}, |
| 2619 | 'role': {'type': 'string'}, |
| 2620 | 'scope': {'type': 'string'}}, |
| 2621 | 'required': ['name', |
| 2622 | 'role', |
| 2623 | 'interface', |
| 2624 | 'optional', |
| 2625 | 'limit', |
| 2626 | 'scope'], |
| 2627 | 'type': 'object'}, |
| 2628 | 'CharmURL': {'additionalProperties': False, |
| 2629 | 'properties': {'url': {'type': 'string'}}, |
| 2630 | 'required': ['url'], |
| 2631 | 'type': 'object'}, |
| 2632 | 'CharmURLs': {'additionalProperties': False, |
| 2633 | 'properties': {'urls': {'items': {'$ref': '#/definitions/CharmURL'}, |
| 2634 | 'type': 'array'}}, |
| 2635 | 'required': ['urls'], |
| 2636 | 'type': 'object'}, |
| 2637 | 'ConfigSettingsResult': {'additionalProperties': False, |
| 2638 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2639 | 'settings': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2640 | 'type': 'object'}}, |
| 2641 | 'type': 'object'}}, |
| 2642 | 'required': ['settings'], |
| 2643 | 'type': 'object'}, |
| 2644 | 'ConfigSettingsResults': {'additionalProperties': False, |
| 2645 | 'properties': {'results': {'items': {'$ref': '#/definitions/ConfigSettingsResult'}, |
| 2646 | 'type': 'array'}}, |
| 2647 | 'required': ['results'], |
| 2648 | 'type': 'object'}, |
| 2649 | 'Endpoint': {'additionalProperties': False, |
| 2650 | 'properties': {'application-name': {'type': 'string'}, |
| 2651 | 'relation': {'$ref': '#/definitions/CharmRelation'}}, |
| 2652 | 'required': ['application-name', 'relation'], |
| 2653 | 'type': 'object'}, |
| 2654 | 'Entities': {'additionalProperties': False, |
| 2655 | 'properties': {'entities': {'items': {'$ref': '#/definitions/Entity'}, |
| 2656 | 'type': 'array'}}, |
| 2657 | 'required': ['entities'], |
| 2658 | 'type': 'object'}, |
| 2659 | 'EntitiesCharmURL': {'additionalProperties': False, |
| 2660 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityCharmURL'}, |
| 2661 | 'type': 'array'}}, |
| 2662 | 'required': ['entities'], |
| 2663 | 'type': 'object'}, |
| 2664 | 'EntitiesPortRanges': {'additionalProperties': False, |
| 2665 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityPortRange'}, |
| 2666 | 'type': 'array'}}, |
| 2667 | 'required': ['entities'], |
| 2668 | 'type': 'object'}, |
| 2669 | 'Entity': {'additionalProperties': False, |
| 2670 | 'properties': {'tag': {'type': 'string'}}, |
| 2671 | 'required': ['tag'], |
| 2672 | 'type': 'object'}, |
| 2673 | 'EntityCharmURL': {'additionalProperties': False, |
| 2674 | 'properties': {'charm-url': {'type': 'string'}, |
| 2675 | 'tag': {'type': 'string'}}, |
| 2676 | 'required': ['tag', 'charm-url'], |
| 2677 | 'type': 'object'}, |
| 2678 | 'EntityPortRange': {'additionalProperties': False, |
| 2679 | 'properties': {'from-port': {'type': 'integer'}, |
| 2680 | 'protocol': {'type': 'string'}, |
| 2681 | 'tag': {'type': 'string'}, |
| 2682 | 'to-port': {'type': 'integer'}}, |
| 2683 | 'required': ['tag', |
| 2684 | 'protocol', |
| 2685 | 'from-port', |
| 2686 | 'to-port'], |
| 2687 | 'type': 'object'}, |
| 2688 | 'EntityStatusArgs': {'additionalProperties': False, |
| 2689 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2690 | 'type': 'object'}}, |
| 2691 | 'type': 'object'}, |
| 2692 | 'info': {'type': 'string'}, |
| 2693 | 'status': {'type': 'string'}, |
| 2694 | 'tag': {'type': 'string'}}, |
| 2695 | 'required': ['tag', |
| 2696 | 'status', |
| 2697 | 'info', |
| 2698 | 'data'], |
| 2699 | 'type': 'object'}, |
| 2700 | 'EntityWorkloadVersion': {'additionalProperties': False, |
| 2701 | 'properties': {'tag': {'type': 'string'}, |
| 2702 | 'workload-version': {'type': 'string'}}, |
| 2703 | 'required': ['tag', |
| 2704 | 'workload-version'], |
| 2705 | 'type': 'object'}, |
| 2706 | 'EntityWorkloadVersions': {'additionalProperties': False, |
| 2707 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityWorkloadVersion'}, |
| 2708 | 'type': 'array'}}, |
| 2709 | 'required': ['entities'], |
| 2710 | 'type': 'object'}, |
| 2711 | 'Error': {'additionalProperties': False, |
| 2712 | 'properties': {'code': {'type': 'string'}, |
| 2713 | 'info': {'$ref': '#/definitions/ErrorInfo'}, |
| 2714 | 'message': {'type': 'string'}}, |
| 2715 | 'required': ['message', 'code'], |
| 2716 | 'type': 'object'}, |
| 2717 | 'ErrorInfo': {'additionalProperties': False, |
| 2718 | 'properties': {'macaroon': {'$ref': '#/definitions/Macaroon'}, |
| 2719 | 'macaroon-path': {'type': 'string'}}, |
| 2720 | 'type': 'object'}, |
| 2721 | 'ErrorResult': {'additionalProperties': False, |
| 2722 | 'properties': {'error': {'$ref': '#/definitions/Error'}}, |
| 2723 | 'type': 'object'}, |
| 2724 | 'ErrorResults': {'additionalProperties': False, |
| 2725 | 'properties': {'results': {'items': {'$ref': '#/definitions/ErrorResult'}, |
| 2726 | 'type': 'array'}}, |
| 2727 | 'required': ['results'], |
| 2728 | 'type': 'object'}, |
| 2729 | 'GetLeadershipSettingsBulkResults': {'additionalProperties': False, |
| 2730 | 'properties': {'results': {'items': {'$ref': '#/definitions/GetLeadershipSettingsResult'}, |
| 2731 | 'type': 'array'}}, |
| 2732 | 'required': ['results'], |
| 2733 | 'type': 'object'}, |
| 2734 | 'GetLeadershipSettingsResult': {'additionalProperties': False, |
| 2735 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2736 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 2737 | 'type': 'object'}}, |
| 2738 | 'required': ['settings'], |
| 2739 | 'type': 'object'}, |
| 2740 | 'HostPort': {'additionalProperties': False, |
| 2741 | 'properties': {'Address': {'$ref': '#/definitions/Address'}, |
| 2742 | 'port': {'type': 'integer'}}, |
| 2743 | 'required': ['Address', 'port'], |
| 2744 | 'type': 'object'}, |
| 2745 | 'IntResult': {'additionalProperties': False, |
| 2746 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2747 | 'result': {'type': 'integer'}}, |
| 2748 | 'required': ['result'], |
| 2749 | 'type': 'object'}, |
| 2750 | 'IntResults': {'additionalProperties': False, |
| 2751 | 'properties': {'results': {'items': {'$ref': '#/definitions/IntResult'}, |
| 2752 | 'type': 'array'}}, |
| 2753 | 'required': ['results'], |
| 2754 | 'type': 'object'}, |
| 2755 | 'LifeResult': {'additionalProperties': False, |
| 2756 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2757 | 'life': {'type': 'string'}}, |
| 2758 | 'required': ['life'], |
| 2759 | 'type': 'object'}, |
| 2760 | 'LifeResults': {'additionalProperties': False, |
| 2761 | 'properties': {'results': {'items': {'$ref': '#/definitions/LifeResult'}, |
| 2762 | 'type': 'array'}}, |
| 2763 | 'required': ['results'], |
| 2764 | 'type': 'object'}, |
| 2765 | 'Macaroon': {'additionalProperties': False, 'type': 'object'}, |
| 2766 | 'MachinePortRange': {'additionalProperties': False, |
| 2767 | 'properties': {'port-range': {'$ref': '#/definitions/PortRange'}, |
| 2768 | 'relation-tag': {'type': 'string'}, |
| 2769 | 'unit-tag': {'type': 'string'}}, |
| 2770 | 'required': ['unit-tag', |
| 2771 | 'relation-tag', |
| 2772 | 'port-range'], |
| 2773 | 'type': 'object'}, |
| 2774 | 'MachinePortsResult': {'additionalProperties': False, |
| 2775 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2776 | 'ports': {'items': {'$ref': '#/definitions/MachinePortRange'}, |
| 2777 | 'type': 'array'}}, |
| 2778 | 'required': ['ports'], |
| 2779 | 'type': 'object'}, |
| 2780 | 'MachinePortsResults': {'additionalProperties': False, |
| 2781 | 'properties': {'results': {'items': {'$ref': '#/definitions/MachinePortsResult'}, |
| 2782 | 'type': 'array'}}, |
| 2783 | 'required': ['results'], |
| 2784 | 'type': 'object'}, |
| 2785 | 'MergeLeadershipSettingsBulkParams': {'additionalProperties': False, |
| 2786 | 'properties': {'params': {'items': {'$ref': '#/definitions/MergeLeadershipSettingsParam'}, |
| 2787 | 'type': 'array'}}, |
| 2788 | 'required': ['params'], |
| 2789 | 'type': 'object'}, |
| 2790 | 'MergeLeadershipSettingsParam': {'additionalProperties': False, |
| 2791 | 'properties': {'application-tag': {'type': 'string'}, |
| 2792 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 2793 | 'type': 'object'}}, |
| 2794 | 'required': ['application-tag', |
| 2795 | 'settings'], |
| 2796 | 'type': 'object'}, |
| 2797 | 'MeterStatusResult': {'additionalProperties': False, |
| 2798 | 'properties': {'code': {'type': 'string'}, |
| 2799 | 'error': {'$ref': '#/definitions/Error'}, |
| 2800 | 'info': {'type': 'string'}}, |
| 2801 | 'required': ['code', 'info'], |
| 2802 | 'type': 'object'}, |
| 2803 | 'MeterStatusResults': {'additionalProperties': False, |
| 2804 | 'properties': {'results': {'items': {'$ref': '#/definitions/MeterStatusResult'}, |
| 2805 | 'type': 'array'}}, |
| 2806 | 'required': ['results'], |
| 2807 | 'type': 'object'}, |
| 2808 | 'Metric': {'additionalProperties': False, |
| 2809 | 'properties': {'key': {'type': 'string'}, |
| 2810 | 'time': {'format': 'date-time', |
| 2811 | 'type': 'string'}, |
| 2812 | 'value': {'type': 'string'}}, |
| 2813 | 'required': ['key', 'value', 'time'], |
| 2814 | 'type': 'object'}, |
| 2815 | 'MetricBatch': {'additionalProperties': False, |
| 2816 | 'properties': {'charm-url': {'type': 'string'}, |
| 2817 | 'created': {'format': 'date-time', |
| 2818 | 'type': 'string'}, |
| 2819 | 'metrics': {'items': {'$ref': '#/definitions/Metric'}, |
| 2820 | 'type': 'array'}, |
| 2821 | 'uuid': {'type': 'string'}}, |
| 2822 | 'required': ['uuid', |
| 2823 | 'charm-url', |
| 2824 | 'created', |
| 2825 | 'metrics'], |
| 2826 | 'type': 'object'}, |
| 2827 | 'MetricBatchParam': {'additionalProperties': False, |
| 2828 | 'properties': {'batch': {'$ref': '#/definitions/MetricBatch'}, |
| 2829 | 'tag': {'type': 'string'}}, |
| 2830 | 'required': ['tag', 'batch'], |
| 2831 | 'type': 'object'}, |
| 2832 | 'MetricBatchParams': {'additionalProperties': False, |
| 2833 | 'properties': {'batches': {'items': {'$ref': '#/definitions/MetricBatchParam'}, |
| 2834 | 'type': 'array'}}, |
| 2835 | 'required': ['batches'], |
| 2836 | 'type': 'object'}, |
| 2837 | 'ModelConfigResult': {'additionalProperties': False, |
| 2838 | 'properties': {'config': {'patternProperties': {'.*': {'additionalProperties': True, |
| 2839 | 'type': 'object'}}, |
| 2840 | 'type': 'object'}}, |
| 2841 | 'required': ['config'], |
| 2842 | 'type': 'object'}, |
| 2843 | 'ModelResult': {'additionalProperties': False, |
| 2844 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2845 | 'name': {'type': 'string'}, |
| 2846 | 'uuid': {'type': 'string'}}, |
| 2847 | 'required': ['name', 'uuid'], |
| 2848 | 'type': 'object'}, |
| 2849 | 'NetworkConfig': {'additionalProperties': False, |
| 2850 | 'properties': {'address': {'type': 'string'}, |
| 2851 | 'cidr': {'type': 'string'}, |
| 2852 | 'config-type': {'type': 'string'}, |
| 2853 | 'device-index': {'type': 'integer'}, |
| 2854 | 'disabled': {'type': 'boolean'}, |
| 2855 | 'dns-search-domains': {'items': {'type': 'string'}, |
| 2856 | 'type': 'array'}, |
| 2857 | 'dns-servers': {'items': {'type': 'string'}, |
| 2858 | 'type': 'array'}, |
| 2859 | 'gateway-address': {'type': 'string'}, |
| 2860 | 'interface-name': {'type': 'string'}, |
| 2861 | 'interface-type': {'type': 'string'}, |
| 2862 | 'mac-address': {'type': 'string'}, |
| 2863 | 'mtu': {'type': 'integer'}, |
| 2864 | 'no-auto-start': {'type': 'boolean'}, |
| 2865 | 'parent-interface-name': {'type': 'string'}, |
| 2866 | 'provider-address-id': {'type': 'string'}, |
| 2867 | 'provider-id': {'type': 'string'}, |
| 2868 | 'provider-space-id': {'type': 'string'}, |
| 2869 | 'provider-subnet-id': {'type': 'string'}, |
| 2870 | 'provider-vlan-id': {'type': 'string'}, |
| 2871 | 'routes': {'items': {'$ref': '#/definitions/NetworkRoute'}, |
| 2872 | 'type': 'array'}, |
| 2873 | 'vlan-tag': {'type': 'integer'}}, |
| 2874 | 'required': ['device-index', |
| 2875 | 'mac-address', |
| 2876 | 'cidr', |
| 2877 | 'mtu', |
| 2878 | 'provider-id', |
| 2879 | 'provider-subnet-id', |
| 2880 | 'provider-space-id', |
| 2881 | 'provider-address-id', |
| 2882 | 'provider-vlan-id', |
| 2883 | 'vlan-tag', |
| 2884 | 'interface-name', |
| 2885 | 'parent-interface-name', |
| 2886 | 'interface-type', |
| 2887 | 'disabled'], |
| 2888 | 'type': 'object'}, |
| 2889 | 'NetworkRoute': {'additionalProperties': False, |
| 2890 | 'properties': {'destination-cidr': {'type': 'string'}, |
| 2891 | 'gateway-ip': {'type': 'string'}, |
| 2892 | 'metric': {'type': 'integer'}}, |
| 2893 | 'required': ['destination-cidr', |
| 2894 | 'gateway-ip', |
| 2895 | 'metric'], |
| 2896 | 'type': 'object'}, |
| 2897 | 'NotifyWatchResult': {'additionalProperties': False, |
| 2898 | 'properties': {'NotifyWatcherId': {'type': 'string'}, |
| 2899 | 'error': {'$ref': '#/definitions/Error'}}, |
| 2900 | 'required': ['NotifyWatcherId'], |
| 2901 | 'type': 'object'}, |
| 2902 | 'NotifyWatchResults': {'additionalProperties': False, |
| 2903 | 'properties': {'results': {'items': {'$ref': '#/definitions/NotifyWatchResult'}, |
| 2904 | 'type': 'array'}}, |
| 2905 | 'required': ['results'], |
| 2906 | 'type': 'object'}, |
| 2907 | 'PortRange': {'additionalProperties': False, |
| 2908 | 'properties': {'from-port': {'type': 'integer'}, |
| 2909 | 'protocol': {'type': 'string'}, |
| 2910 | 'to-port': {'type': 'integer'}}, |
| 2911 | 'required': ['from-port', 'to-port', 'protocol'], |
| 2912 | 'type': 'object'}, |
| 2913 | 'RelationIds': {'additionalProperties': False, |
| 2914 | 'properties': {'relation-ids': {'items': {'type': 'integer'}, |
| 2915 | 'type': 'array'}}, |
| 2916 | 'required': ['relation-ids'], |
| 2917 | 'type': 'object'}, |
| 2918 | 'RelationResult': {'additionalProperties': False, |
| 2919 | 'properties': {'endpoint': {'$ref': '#/definitions/Endpoint'}, |
| 2920 | 'error': {'$ref': '#/definitions/Error'}, |
| 2921 | 'id': {'type': 'integer'}, |
| 2922 | 'key': {'type': 'string'}, |
| 2923 | 'life': {'type': 'string'}}, |
| 2924 | 'required': ['life', |
| 2925 | 'id', |
| 2926 | 'key', |
| 2927 | 'endpoint'], |
| 2928 | 'type': 'object'}, |
| 2929 | 'RelationResults': {'additionalProperties': False, |
| 2930 | 'properties': {'results': {'items': {'$ref': '#/definitions/RelationResult'}, |
| 2931 | 'type': 'array'}}, |
| 2932 | 'required': ['results'], |
| 2933 | 'type': 'object'}, |
| 2934 | 'RelationUnit': {'additionalProperties': False, |
| 2935 | 'properties': {'relation': {'type': 'string'}, |
| 2936 | 'unit': {'type': 'string'}}, |
| 2937 | 'required': ['relation', 'unit'], |
| 2938 | 'type': 'object'}, |
| 2939 | 'RelationUnitPair': {'additionalProperties': False, |
| 2940 | 'properties': {'local-unit': {'type': 'string'}, |
| 2941 | 'relation': {'type': 'string'}, |
| 2942 | 'remote-unit': {'type': 'string'}}, |
| 2943 | 'required': ['relation', |
| 2944 | 'local-unit', |
| 2945 | 'remote-unit'], |
| 2946 | 'type': 'object'}, |
| 2947 | 'RelationUnitPairs': {'additionalProperties': False, |
| 2948 | 'properties': {'relation-unit-pairs': {'items': {'$ref': '#/definitions/RelationUnitPair'}, |
| 2949 | 'type': 'array'}}, |
| 2950 | 'required': ['relation-unit-pairs'], |
| 2951 | 'type': 'object'}, |
| 2952 | 'RelationUnitSettings': {'additionalProperties': False, |
| 2953 | 'properties': {'relation': {'type': 'string'}, |
| 2954 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 2955 | 'type': 'object'}, |
| 2956 | 'unit': {'type': 'string'}}, |
| 2957 | 'required': ['relation', |
| 2958 | 'unit', |
| 2959 | 'settings'], |
| 2960 | 'type': 'object'}, |
| 2961 | 'RelationUnits': {'additionalProperties': False, |
| 2962 | 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnit'}, |
| 2963 | 'type': 'array'}}, |
| 2964 | 'required': ['relation-units'], |
| 2965 | 'type': 'object'}, |
| 2966 | 'RelationUnitsChange': {'additionalProperties': False, |
| 2967 | 'properties': {'changed': {'patternProperties': {'.*': {'$ref': '#/definitions/UnitSettings'}}, |
| 2968 | 'type': 'object'}, |
| 2969 | 'departed': {'items': {'type': 'string'}, |
| 2970 | 'type': 'array'}}, |
| 2971 | 'required': ['changed'], |
| 2972 | 'type': 'object'}, |
| 2973 | 'RelationUnitsSettings': {'additionalProperties': False, |
| 2974 | 'properties': {'relation-units': {'items': {'$ref': '#/definitions/RelationUnitSettings'}, |
| 2975 | 'type': 'array'}}, |
| 2976 | 'required': ['relation-units'], |
| 2977 | 'type': 'object'}, |
| 2978 | 'RelationUnitsWatchResult': {'additionalProperties': False, |
| 2979 | 'properties': {'changes': {'$ref': '#/definitions/RelationUnitsChange'}, |
| 2980 | 'error': {'$ref': '#/definitions/Error'}, |
| 2981 | 'watcher-id': {'type': 'string'}}, |
| 2982 | 'required': ['watcher-id', |
| 2983 | 'changes'], |
| 2984 | 'type': 'object'}, |
| 2985 | 'RelationUnitsWatchResults': {'additionalProperties': False, |
| 2986 | 'properties': {'results': {'items': {'$ref': '#/definitions/RelationUnitsWatchResult'}, |
| 2987 | 'type': 'array'}}, |
| 2988 | 'required': ['results'], |
| 2989 | 'type': 'object'}, |
| 2990 | 'ResolvedModeResult': {'additionalProperties': False, |
| 2991 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 2992 | 'mode': {'type': 'string'}}, |
| 2993 | 'required': ['mode'], |
| 2994 | 'type': 'object'}, |
| 2995 | 'ResolvedModeResults': {'additionalProperties': False, |
| 2996 | 'properties': {'results': {'items': {'$ref': '#/definitions/ResolvedModeResult'}, |
| 2997 | 'type': 'array'}}, |
| 2998 | 'required': ['results'], |
| 2999 | 'type': 'object'}, |
| 3000 | 'SetStatus': {'additionalProperties': False, |
| 3001 | 'properties': {'entities': {'items': {'$ref': '#/definitions/EntityStatusArgs'}, |
| 3002 | 'type': 'array'}}, |
| 3003 | 'required': ['entities'], |
| 3004 | 'type': 'object'}, |
| 3005 | 'SettingsResult': {'additionalProperties': False, |
| 3006 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3007 | 'settings': {'patternProperties': {'.*': {'type': 'string'}}, |
| 3008 | 'type': 'object'}}, |
| 3009 | 'required': ['settings'], |
| 3010 | 'type': 'object'}, |
| 3011 | 'SettingsResults': {'additionalProperties': False, |
| 3012 | 'properties': {'results': {'items': {'$ref': '#/definitions/SettingsResult'}, |
| 3013 | 'type': 'array'}}, |
| 3014 | 'required': ['results'], |
| 3015 | 'type': 'object'}, |
| 3016 | 'StatusResult': {'additionalProperties': False, |
| 3017 | 'properties': {'data': {'patternProperties': {'.*': {'additionalProperties': True, |
| 3018 | 'type': 'object'}}, |
| 3019 | 'type': 'object'}, |
| 3020 | 'error': {'$ref': '#/definitions/Error'}, |
| 3021 | 'id': {'type': 'string'}, |
| 3022 | 'info': {'type': 'string'}, |
| 3023 | 'life': {'type': 'string'}, |
| 3024 | 'since': {'format': 'date-time', |
| 3025 | 'type': 'string'}, |
| 3026 | 'status': {'type': 'string'}}, |
| 3027 | 'required': ['id', |
| 3028 | 'life', |
| 3029 | 'status', |
| 3030 | 'info', |
| 3031 | 'data', |
| 3032 | 'since'], |
| 3033 | 'type': 'object'}, |
| 3034 | 'StatusResults': {'additionalProperties': False, |
| 3035 | 'properties': {'results': {'items': {'$ref': '#/definitions/StatusResult'}, |
| 3036 | 'type': 'array'}}, |
| 3037 | 'required': ['results'], |
| 3038 | 'type': 'object'}, |
| 3039 | 'StorageAddParams': {'additionalProperties': False, |
| 3040 | 'properties': {'name': {'type': 'string'}, |
| 3041 | 'storage': {'$ref': '#/definitions/StorageConstraints'}, |
| 3042 | 'unit': {'type': 'string'}}, |
| 3043 | 'required': ['unit', 'name', 'storage'], |
| 3044 | 'type': 'object'}, |
| 3045 | 'StorageAttachment': {'additionalProperties': False, |
| 3046 | 'properties': {'kind': {'type': 'integer'}, |
| 3047 | 'life': {'type': 'string'}, |
| 3048 | 'location': {'type': 'string'}, |
| 3049 | 'owner-tag': {'type': 'string'}, |
| 3050 | 'storage-tag': {'type': 'string'}, |
| 3051 | 'unit-tag': {'type': 'string'}}, |
| 3052 | 'required': ['storage-tag', |
| 3053 | 'owner-tag', |
| 3054 | 'unit-tag', |
| 3055 | 'kind', |
| 3056 | 'location', |
| 3057 | 'life'], |
| 3058 | 'type': 'object'}, |
| 3059 | 'StorageAttachmentId': {'additionalProperties': False, |
| 3060 | 'properties': {'storage-tag': {'type': 'string'}, |
| 3061 | 'unit-tag': {'type': 'string'}}, |
| 3062 | 'required': ['storage-tag', |
| 3063 | 'unit-tag'], |
| 3064 | 'type': 'object'}, |
| 3065 | 'StorageAttachmentIds': {'additionalProperties': False, |
| 3066 | 'properties': {'ids': {'items': {'$ref': '#/definitions/StorageAttachmentId'}, |
| 3067 | 'type': 'array'}}, |
| 3068 | 'required': ['ids'], |
| 3069 | 'type': 'object'}, |
| 3070 | 'StorageAttachmentIdsResult': {'additionalProperties': False, |
| 3071 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3072 | 'result': {'$ref': '#/definitions/StorageAttachmentIds'}}, |
| 3073 | 'required': ['result'], |
| 3074 | 'type': 'object'}, |
| 3075 | 'StorageAttachmentIdsResults': {'additionalProperties': False, |
| 3076 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentIdsResult'}, |
| 3077 | 'type': 'array'}}, |
| 3078 | 'type': 'object'}, |
| 3079 | 'StorageAttachmentResult': {'additionalProperties': False, |
| 3080 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3081 | 'result': {'$ref': '#/definitions/StorageAttachment'}}, |
| 3082 | 'required': ['result'], |
| 3083 | 'type': 'object'}, |
| 3084 | 'StorageAttachmentResults': {'additionalProperties': False, |
| 3085 | 'properties': {'results': {'items': {'$ref': '#/definitions/StorageAttachmentResult'}, |
| 3086 | 'type': 'array'}}, |
| 3087 | 'type': 'object'}, |
| 3088 | 'StorageConstraints': {'additionalProperties': False, |
| 3089 | 'properties': {'count': {'type': 'integer'}, |
| 3090 | 'pool': {'type': 'string'}, |
| 3091 | 'size': {'type': 'integer'}}, |
| 3092 | 'type': 'object'}, |
| 3093 | 'StoragesAddParams': {'additionalProperties': False, |
| 3094 | 'properties': {'storages': {'items': {'$ref': '#/definitions/StorageAddParams'}, |
| 3095 | 'type': 'array'}}, |
| 3096 | 'required': ['storages'], |
| 3097 | 'type': 'object'}, |
| 3098 | 'StringBoolResult': {'additionalProperties': False, |
| 3099 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3100 | 'ok': {'type': 'boolean'}, |
| 3101 | 'result': {'type': 'string'}}, |
| 3102 | 'required': ['result', 'ok'], |
| 3103 | 'type': 'object'}, |
| 3104 | 'StringBoolResults': {'additionalProperties': False, |
| 3105 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringBoolResult'}, |
| 3106 | 'type': 'array'}}, |
| 3107 | 'required': ['results'], |
| 3108 | 'type': 'object'}, |
| 3109 | 'StringResult': {'additionalProperties': False, |
| 3110 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3111 | 'result': {'type': 'string'}}, |
| 3112 | 'required': ['result'], |
| 3113 | 'type': 'object'}, |
| 3114 | 'StringResults': {'additionalProperties': False, |
| 3115 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringResult'}, |
| 3116 | 'type': 'array'}}, |
| 3117 | 'required': ['results'], |
| 3118 | 'type': 'object'}, |
| 3119 | 'StringsResult': {'additionalProperties': False, |
| 3120 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3121 | 'result': {'items': {'type': 'string'}, |
| 3122 | 'type': 'array'}}, |
| 3123 | 'type': 'object'}, |
| 3124 | 'StringsResults': {'additionalProperties': False, |
| 3125 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsResult'}, |
| 3126 | 'type': 'array'}}, |
| 3127 | 'required': ['results'], |
| 3128 | 'type': 'object'}, |
| 3129 | 'StringsWatchResult': {'additionalProperties': False, |
| 3130 | 'properties': {'changes': {'items': {'type': 'string'}, |
| 3131 | 'type': 'array'}, |
| 3132 | 'error': {'$ref': '#/definitions/Error'}, |
| 3133 | 'watcher-id': {'type': 'string'}}, |
| 3134 | 'required': ['watcher-id'], |
| 3135 | 'type': 'object'}, |
| 3136 | 'StringsWatchResults': {'additionalProperties': False, |
| 3137 | 'properties': {'results': {'items': {'$ref': '#/definitions/StringsWatchResult'}, |
| 3138 | 'type': 'array'}}, |
| 3139 | 'required': ['results'], |
| 3140 | 'type': 'object'}, |
| 3141 | 'UnitNetworkConfig': {'additionalProperties': False, |
| 3142 | 'properties': {'binding-name': {'type': 'string'}, |
| 3143 | 'unit-tag': {'type': 'string'}}, |
| 3144 | 'required': ['unit-tag', 'binding-name'], |
| 3145 | 'type': 'object'}, |
| 3146 | 'UnitNetworkConfigResult': {'additionalProperties': False, |
| 3147 | 'properties': {'error': {'$ref': '#/definitions/Error'}, |
| 3148 | 'info': {'items': {'$ref': '#/definitions/NetworkConfig'}, |
| 3149 | 'type': 'array'}}, |
| 3150 | 'required': ['info'], |
| 3151 | 'type': 'object'}, |
| 3152 | 'UnitNetworkConfigResults': {'additionalProperties': False, |
| 3153 | 'properties': {'results': {'items': {'$ref': '#/definitions/UnitNetworkConfigResult'}, |
| 3154 | 'type': 'array'}}, |
| 3155 | 'required': ['results'], |
| 3156 | 'type': 'object'}, |
| 3157 | 'UnitSettings': {'additionalProperties': False, |
| 3158 | 'properties': {'version': {'type': 'integer'}}, |
| 3159 | 'required': ['version'], |
| 3160 | 'type': 'object'}, |
| 3161 | 'UnitsNetworkConfig': {'additionalProperties': False, |
| 3162 | 'properties': {'args': {'items': {'$ref': '#/definitions/UnitNetworkConfig'}, |
| 3163 | 'type': 'array'}}, |
| 3164 | 'required': ['args'], |
| 3165 | 'type': 'object'}}, |
| 3166 | 'properties': {'APIAddresses': {'properties': {'Result': {'$ref': '#/definitions/StringsResult'}}, |
| 3167 | 'type': 'object'}, |
| 3168 | 'APIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/APIHostPortsResult'}}, |
| 3169 | 'type': 'object'}, |
| 3170 | 'Actions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3171 | 'Result': {'$ref': '#/definitions/ActionResults'}}, |
| 3172 | 'type': 'object'}, |
| 3173 | 'AddMetricBatches': {'properties': {'Params': {'$ref': '#/definitions/MetricBatchParams'}, |
| 3174 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3175 | 'type': 'object'}, |
| 3176 | 'AddUnitStorage': {'properties': {'Params': {'$ref': '#/definitions/StoragesAddParams'}, |
| 3177 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3178 | 'type': 'object'}, |
| 3179 | 'AllMachinePorts': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3180 | 'Result': {'$ref': '#/definitions/MachinePortsResults'}}, |
| 3181 | 'type': 'object'}, |
| 3182 | 'ApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3183 | 'Result': {'$ref': '#/definitions/ApplicationStatusResults'}}, |
| 3184 | 'type': 'object'}, |
| 3185 | 'AssignedMachine': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3186 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3187 | 'type': 'object'}, |
| 3188 | 'AvailabilityZone': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3189 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3190 | 'type': 'object'}, |
| 3191 | 'BeginActions': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3192 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3193 | 'type': 'object'}, |
| 3194 | 'CACert': {'properties': {'Result': {'$ref': '#/definitions/BytesResult'}}, |
| 3195 | 'type': 'object'}, |
| 3196 | 'CharmArchiveSha256': {'properties': {'Params': {'$ref': '#/definitions/CharmURLs'}, |
| 3197 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3198 | 'type': 'object'}, |
| 3199 | 'CharmModifiedVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3200 | 'Result': {'$ref': '#/definitions/IntResults'}}, |
| 3201 | 'type': 'object'}, |
| 3202 | 'CharmURL': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3203 | 'Result': {'$ref': '#/definitions/StringBoolResults'}}, |
| 3204 | 'type': 'object'}, |
| 3205 | 'ClearResolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3206 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3207 | 'type': 'object'}, |
| 3208 | 'ClosePorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, |
| 3209 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3210 | 'type': 'object'}, |
| 3211 | 'ConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3212 | 'Result': {'$ref': '#/definitions/ConfigSettingsResults'}}, |
| 3213 | 'type': 'object'}, |
| 3214 | 'CurrentModel': {'properties': {'Result': {'$ref': '#/definitions/ModelResult'}}, |
| 3215 | 'type': 'object'}, |
| 3216 | 'Destroy': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3217 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3218 | 'type': 'object'}, |
| 3219 | 'DestroyAllSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3220 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3221 | 'type': 'object'}, |
| 3222 | 'DestroyUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3223 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3224 | 'type': 'object'}, |
| 3225 | 'EnsureDead': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3226 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3227 | 'type': 'object'}, |
| 3228 | 'EnterScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, |
| 3229 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3230 | 'type': 'object'}, |
| 3231 | 'FinishActions': {'properties': {'Params': {'$ref': '#/definitions/ActionExecutionResults'}, |
| 3232 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3233 | 'type': 'object'}, |
| 3234 | 'GetMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3235 | 'Result': {'$ref': '#/definitions/MeterStatusResults'}}, |
| 3236 | 'type': 'object'}, |
| 3237 | 'GetPrincipal': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3238 | 'Result': {'$ref': '#/definitions/StringBoolResults'}}, |
| 3239 | 'type': 'object'}, |
| 3240 | 'HasSubordinates': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3241 | 'Result': {'$ref': '#/definitions/BoolResults'}}, |
| 3242 | 'type': 'object'}, |
| 3243 | 'JoinedRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3244 | 'Result': {'$ref': '#/definitions/StringsResults'}}, |
| 3245 | 'type': 'object'}, |
| 3246 | 'LeaveScope': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, |
| 3247 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3248 | 'type': 'object'}, |
| 3249 | 'Life': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3250 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 3251 | 'type': 'object'}, |
| 3252 | 'Merge': {'properties': {'Params': {'$ref': '#/definitions/MergeLeadershipSettingsBulkParams'}, |
| 3253 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3254 | 'type': 'object'}, |
| 3255 | 'ModelConfig': {'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}}, |
| 3256 | 'type': 'object'}, |
| 3257 | 'ModelUUID': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 3258 | 'type': 'object'}, |
| 3259 | 'NetworkConfig': {'properties': {'Params': {'$ref': '#/definitions/UnitsNetworkConfig'}, |
| 3260 | 'Result': {'$ref': '#/definitions/UnitNetworkConfigResults'}}, |
| 3261 | 'type': 'object'}, |
| 3262 | 'OpenPorts': {'properties': {'Params': {'$ref': '#/definitions/EntitiesPortRanges'}, |
| 3263 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3264 | 'type': 'object'}, |
| 3265 | 'PrivateAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3266 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3267 | 'type': 'object'}, |
| 3268 | 'ProviderType': {'properties': {'Result': {'$ref': '#/definitions/StringResult'}}, |
| 3269 | 'type': 'object'}, |
| 3270 | 'PublicAddress': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3271 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3272 | 'type': 'object'}, |
| 3273 | 'Read': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3274 | 'Result': {'$ref': '#/definitions/GetLeadershipSettingsBulkResults'}}, |
| 3275 | 'type': 'object'}, |
| 3276 | 'ReadRemoteSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitPairs'}, |
| 3277 | 'Result': {'$ref': '#/definitions/SettingsResults'}}, |
| 3278 | 'type': 'object'}, |
| 3279 | 'ReadSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, |
| 3280 | 'Result': {'$ref': '#/definitions/SettingsResults'}}, |
| 3281 | 'type': 'object'}, |
| 3282 | 'Relation': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, |
| 3283 | 'Result': {'$ref': '#/definitions/RelationResults'}}, |
| 3284 | 'type': 'object'}, |
| 3285 | 'RelationById': {'properties': {'Params': {'$ref': '#/definitions/RelationIds'}, |
| 3286 | 'Result': {'$ref': '#/definitions/RelationResults'}}, |
| 3287 | 'type': 'object'}, |
| 3288 | 'RemoveStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 3289 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3290 | 'type': 'object'}, |
| 3291 | 'RequestReboot': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3292 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3293 | 'type': 'object'}, |
| 3294 | 'Resolved': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3295 | 'Result': {'$ref': '#/definitions/ResolvedModeResults'}}, |
| 3296 | 'type': 'object'}, |
| 3297 | 'SetAgentStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3298 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3299 | 'type': 'object'}, |
| 3300 | 'SetApplicationStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3301 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3302 | 'type': 'object'}, |
| 3303 | 'SetCharmURL': {'properties': {'Params': {'$ref': '#/definitions/EntitiesCharmURL'}, |
| 3304 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3305 | 'type': 'object'}, |
| 3306 | 'SetStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3307 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3308 | 'type': 'object'}, |
| 3309 | 'SetUnitStatus': {'properties': {'Params': {'$ref': '#/definitions/SetStatus'}, |
| 3310 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3311 | 'type': 'object'}, |
| 3312 | 'SetWorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/EntityWorkloadVersions'}, |
| 3313 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3314 | 'type': 'object'}, |
| 3315 | 'StorageAttachmentLife': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 3316 | 'Result': {'$ref': '#/definitions/LifeResults'}}, |
| 3317 | 'type': 'object'}, |
| 3318 | 'StorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 3319 | 'Result': {'$ref': '#/definitions/StorageAttachmentResults'}}, |
| 3320 | 'type': 'object'}, |
| 3321 | 'UnitStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3322 | 'Result': {'$ref': '#/definitions/StatusResults'}}, |
| 3323 | 'type': 'object'}, |
| 3324 | 'UnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3325 | 'Result': {'$ref': '#/definitions/StorageAttachmentIdsResults'}}, |
| 3326 | 'type': 'object'}, |
| 3327 | 'UpdateSettings': {'properties': {'Params': {'$ref': '#/definitions/RelationUnitsSettings'}, |
| 3328 | 'Result': {'$ref': '#/definitions/ErrorResults'}}, |
| 3329 | 'type': 'object'}, |
| 3330 | 'Watch': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3331 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3332 | 'type': 'object'}, |
| 3333 | 'WatchAPIHostPorts': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 3334 | 'type': 'object'}, |
| 3335 | 'WatchActionNotifications': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3336 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 3337 | 'type': 'object'}, |
| 3338 | 'WatchApplicationRelations': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3339 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 3340 | 'type': 'object'}, |
| 3341 | 'WatchConfigSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3342 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3343 | 'type': 'object'}, |
| 3344 | 'WatchForModelConfigChanges': {'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}}, |
| 3345 | 'type': 'object'}, |
| 3346 | 'WatchLeadershipSettings': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3347 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3348 | 'type': 'object'}, |
| 3349 | 'WatchMeterStatus': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3350 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3351 | 'type': 'object'}, |
| 3352 | 'WatchRelationUnits': {'properties': {'Params': {'$ref': '#/definitions/RelationUnits'}, |
| 3353 | 'Result': {'$ref': '#/definitions/RelationUnitsWatchResults'}}, |
| 3354 | 'type': 'object'}, |
| 3355 | 'WatchStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/StorageAttachmentIds'}, |
| 3356 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3357 | 'type': 'object'}, |
| 3358 | 'WatchUnitAddresses': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3359 | 'Result': {'$ref': '#/definitions/NotifyWatchResults'}}, |
| 3360 | 'type': 'object'}, |
| 3361 | 'WatchUnitStorageAttachments': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3362 | 'Result': {'$ref': '#/definitions/StringsWatchResults'}}, |
| 3363 | 'type': 'object'}, |
| 3364 | 'WorkloadVersion': {'properties': {'Params': {'$ref': '#/definitions/Entities'}, |
| 3365 | 'Result': {'$ref': '#/definitions/StringResults'}}, |
| 3366 | 'type': 'object'}}, |
| 3367 | 'type': 'object'} |
| 3368 | |
| 3369 | |
| 3370 | @ReturnMapping(StringsResult) |
| 3371 | async def APIAddresses(self): |
| 3372 | ''' |
| 3373 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3374 | Returns -> typing.Union[_ForwardRef('Error'), typing.Sequence[str]] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3375 | ''' |
| 3376 | # map input types to rpc msg |
| 3377 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3378 | msg = dict(type='Uniter', |
| 3379 | request='APIAddresses', |
| 3380 | version=4, |
| 3381 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3382 | |
| 3383 | reply = await self.rpc(msg) |
| 3384 | return reply |
| 3385 | |
| 3386 | |
| 3387 | |
| 3388 | @ReturnMapping(APIHostPortsResult) |
| 3389 | async def APIHostPorts(self): |
| 3390 | ''' |
| 3391 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3392 | Returns -> typing.Sequence[~HostPort] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3393 | ''' |
| 3394 | # map input types to rpc msg |
| 3395 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3396 | msg = dict(type='Uniter', |
| 3397 | request='APIHostPorts', |
| 3398 | version=4, |
| 3399 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3400 | |
| 3401 | reply = await self.rpc(msg) |
| 3402 | return reply |
| 3403 | |
| 3404 | |
| 3405 | |
| 3406 | @ReturnMapping(ActionResults) |
| 3407 | async def Actions(self, entities): |
| 3408 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3409 | entities : typing.Sequence[~Entity] |
| 3410 | Returns -> typing.Sequence[~ActionResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3411 | ''' |
| 3412 | # map input types to rpc msg |
| 3413 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3414 | msg = dict(type='Uniter', |
| 3415 | request='Actions', |
| 3416 | version=4, |
| 3417 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3418 | _params['entities'] = entities |
| 3419 | reply = await self.rpc(msg) |
| 3420 | return reply |
| 3421 | |
| 3422 | |
| 3423 | |
| 3424 | @ReturnMapping(ErrorResults) |
| 3425 | async def AddMetricBatches(self, batches): |
| 3426 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3427 | batches : typing.Sequence[~MetricBatchParam] |
| 3428 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3429 | ''' |
| 3430 | # map input types to rpc msg |
| 3431 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3432 | msg = dict(type='Uniter', |
| 3433 | request='AddMetricBatches', |
| 3434 | version=4, |
| 3435 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3436 | _params['batches'] = batches |
| 3437 | reply = await self.rpc(msg) |
| 3438 | return reply |
| 3439 | |
| 3440 | |
| 3441 | |
| 3442 | @ReturnMapping(ErrorResults) |
| 3443 | async def AddUnitStorage(self, storages): |
| 3444 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3445 | storages : typing.Sequence[~StorageAddParams] |
| 3446 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3447 | ''' |
| 3448 | # map input types to rpc msg |
| 3449 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3450 | msg = dict(type='Uniter', |
| 3451 | request='AddUnitStorage', |
| 3452 | version=4, |
| 3453 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3454 | _params['storages'] = storages |
| 3455 | reply = await self.rpc(msg) |
| 3456 | return reply |
| 3457 | |
| 3458 | |
| 3459 | |
| 3460 | @ReturnMapping(MachinePortsResults) |
| 3461 | async def AllMachinePorts(self, entities): |
| 3462 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3463 | entities : typing.Sequence[~Entity] |
| 3464 | Returns -> typing.Sequence[~MachinePortsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3465 | ''' |
| 3466 | # map input types to rpc msg |
| 3467 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3468 | msg = dict(type='Uniter', |
| 3469 | request='AllMachinePorts', |
| 3470 | version=4, |
| 3471 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3472 | _params['entities'] = entities |
| 3473 | reply = await self.rpc(msg) |
| 3474 | return reply |
| 3475 | |
| 3476 | |
| 3477 | |
| 3478 | @ReturnMapping(ApplicationStatusResults) |
| 3479 | async def ApplicationStatus(self, entities): |
| 3480 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3481 | entities : typing.Sequence[~Entity] |
| 3482 | Returns -> typing.Sequence[~ApplicationStatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3483 | ''' |
| 3484 | # map input types to rpc msg |
| 3485 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3486 | msg = dict(type='Uniter', |
| 3487 | request='ApplicationStatus', |
| 3488 | version=4, |
| 3489 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3490 | _params['entities'] = entities |
| 3491 | reply = await self.rpc(msg) |
| 3492 | return reply |
| 3493 | |
| 3494 | |
| 3495 | |
| 3496 | @ReturnMapping(StringResults) |
| 3497 | async def AssignedMachine(self, entities): |
| 3498 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3499 | entities : typing.Sequence[~Entity] |
| 3500 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3501 | ''' |
| 3502 | # map input types to rpc msg |
| 3503 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3504 | msg = dict(type='Uniter', |
| 3505 | request='AssignedMachine', |
| 3506 | version=4, |
| 3507 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3508 | _params['entities'] = entities |
| 3509 | reply = await self.rpc(msg) |
| 3510 | return reply |
| 3511 | |
| 3512 | |
| 3513 | |
| 3514 | @ReturnMapping(StringResults) |
| 3515 | async def AvailabilityZone(self, entities): |
| 3516 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3517 | entities : typing.Sequence[~Entity] |
| 3518 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3519 | ''' |
| 3520 | # map input types to rpc msg |
| 3521 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3522 | msg = dict(type='Uniter', |
| 3523 | request='AvailabilityZone', |
| 3524 | version=4, |
| 3525 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3526 | _params['entities'] = entities |
| 3527 | reply = await self.rpc(msg) |
| 3528 | return reply |
| 3529 | |
| 3530 | |
| 3531 | |
| 3532 | @ReturnMapping(ErrorResults) |
| 3533 | async def BeginActions(self, entities): |
| 3534 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3535 | entities : typing.Sequence[~Entity] |
| 3536 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3537 | ''' |
| 3538 | # map input types to rpc msg |
| 3539 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3540 | msg = dict(type='Uniter', |
| 3541 | request='BeginActions', |
| 3542 | version=4, |
| 3543 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3544 | _params['entities'] = entities |
| 3545 | reply = await self.rpc(msg) |
| 3546 | return reply |
| 3547 | |
| 3548 | |
| 3549 | |
| 3550 | @ReturnMapping(BytesResult) |
| 3551 | async def CACert(self): |
| 3552 | ''' |
| 3553 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3554 | Returns -> typing.Sequence[int] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3555 | ''' |
| 3556 | # map input types to rpc msg |
| 3557 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3558 | msg = dict(type='Uniter', |
| 3559 | request='CACert', |
| 3560 | version=4, |
| 3561 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3562 | |
| 3563 | reply = await self.rpc(msg) |
| 3564 | return reply |
| 3565 | |
| 3566 | |
| 3567 | |
| 3568 | @ReturnMapping(StringResults) |
| 3569 | async def CharmArchiveSha256(self, urls): |
| 3570 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3571 | urls : typing.Sequence[~CharmURL] |
| 3572 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3573 | ''' |
| 3574 | # map input types to rpc msg |
| 3575 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3576 | msg = dict(type='Uniter', |
| 3577 | request='CharmArchiveSha256', |
| 3578 | version=4, |
| 3579 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3580 | _params['urls'] = urls |
| 3581 | reply = await self.rpc(msg) |
| 3582 | return reply |
| 3583 | |
| 3584 | |
| 3585 | |
| 3586 | @ReturnMapping(IntResults) |
| 3587 | async def CharmModifiedVersion(self, entities): |
| 3588 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3589 | entities : typing.Sequence[~Entity] |
| 3590 | Returns -> typing.Sequence[~IntResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3591 | ''' |
| 3592 | # map input types to rpc msg |
| 3593 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3594 | msg = dict(type='Uniter', |
| 3595 | request='CharmModifiedVersion', |
| 3596 | version=4, |
| 3597 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3598 | _params['entities'] = entities |
| 3599 | reply = await self.rpc(msg) |
| 3600 | return reply |
| 3601 | |
| 3602 | |
| 3603 | |
| 3604 | @ReturnMapping(StringBoolResults) |
| 3605 | async def CharmURL(self, entities): |
| 3606 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3607 | entities : typing.Sequence[~Entity] |
| 3608 | Returns -> typing.Sequence[~StringBoolResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3609 | ''' |
| 3610 | # map input types to rpc msg |
| 3611 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3612 | msg = dict(type='Uniter', |
| 3613 | request='CharmURL', |
| 3614 | version=4, |
| 3615 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3616 | _params['entities'] = entities |
| 3617 | reply = await self.rpc(msg) |
| 3618 | return reply |
| 3619 | |
| 3620 | |
| 3621 | |
| 3622 | @ReturnMapping(ErrorResults) |
| 3623 | async def ClearResolved(self, entities): |
| 3624 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3625 | entities : typing.Sequence[~Entity] |
| 3626 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3627 | ''' |
| 3628 | # map input types to rpc msg |
| 3629 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3630 | msg = dict(type='Uniter', |
| 3631 | request='ClearResolved', |
| 3632 | version=4, |
| 3633 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3634 | _params['entities'] = entities |
| 3635 | reply = await self.rpc(msg) |
| 3636 | return reply |
| 3637 | |
| 3638 | |
| 3639 | |
| 3640 | @ReturnMapping(ErrorResults) |
| 3641 | async def ClosePorts(self, entities): |
| 3642 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3643 | entities : typing.Sequence[~EntityPortRange] |
| 3644 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3645 | ''' |
| 3646 | # map input types to rpc msg |
| 3647 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3648 | msg = dict(type='Uniter', |
| 3649 | request='ClosePorts', |
| 3650 | version=4, |
| 3651 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3652 | _params['entities'] = entities |
| 3653 | reply = await self.rpc(msg) |
| 3654 | return reply |
| 3655 | |
| 3656 | |
| 3657 | |
| 3658 | @ReturnMapping(ConfigSettingsResults) |
| 3659 | async def ConfigSettings(self, entities): |
| 3660 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3661 | entities : typing.Sequence[~Entity] |
| 3662 | Returns -> typing.Sequence[~ConfigSettingsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3663 | ''' |
| 3664 | # map input types to rpc msg |
| 3665 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3666 | msg = dict(type='Uniter', |
| 3667 | request='ConfigSettings', |
| 3668 | version=4, |
| 3669 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3670 | _params['entities'] = entities |
| 3671 | reply = await self.rpc(msg) |
| 3672 | return reply |
| 3673 | |
| 3674 | |
| 3675 | |
| 3676 | @ReturnMapping(ModelResult) |
| 3677 | async def CurrentModel(self): |
| 3678 | ''' |
| 3679 | |
| 3680 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 3681 | ''' |
| 3682 | # map input types to rpc msg |
| 3683 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3684 | msg = dict(type='Uniter', |
| 3685 | request='CurrentModel', |
| 3686 | version=4, |
| 3687 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3688 | |
| 3689 | reply = await self.rpc(msg) |
| 3690 | return reply |
| 3691 | |
| 3692 | |
| 3693 | |
| 3694 | @ReturnMapping(ErrorResults) |
| 3695 | async def Destroy(self, entities): |
| 3696 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3697 | entities : typing.Sequence[~Entity] |
| 3698 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3699 | ''' |
| 3700 | # map input types to rpc msg |
| 3701 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3702 | msg = dict(type='Uniter', |
| 3703 | request='Destroy', |
| 3704 | version=4, |
| 3705 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3706 | _params['entities'] = entities |
| 3707 | reply = await self.rpc(msg) |
| 3708 | return reply |
| 3709 | |
| 3710 | |
| 3711 | |
| 3712 | @ReturnMapping(ErrorResults) |
| 3713 | async def DestroyAllSubordinates(self, entities): |
| 3714 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3715 | entities : typing.Sequence[~Entity] |
| 3716 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3717 | ''' |
| 3718 | # map input types to rpc msg |
| 3719 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3720 | msg = dict(type='Uniter', |
| 3721 | request='DestroyAllSubordinates', |
| 3722 | version=4, |
| 3723 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3724 | _params['entities'] = entities |
| 3725 | reply = await self.rpc(msg) |
| 3726 | return reply |
| 3727 | |
| 3728 | |
| 3729 | |
| 3730 | @ReturnMapping(ErrorResults) |
| 3731 | async def DestroyUnitStorageAttachments(self, entities): |
| 3732 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3733 | entities : typing.Sequence[~Entity] |
| 3734 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3735 | ''' |
| 3736 | # map input types to rpc msg |
| 3737 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3738 | msg = dict(type='Uniter', |
| 3739 | request='DestroyUnitStorageAttachments', |
| 3740 | version=4, |
| 3741 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3742 | _params['entities'] = entities |
| 3743 | reply = await self.rpc(msg) |
| 3744 | return reply |
| 3745 | |
| 3746 | |
| 3747 | |
| 3748 | @ReturnMapping(ErrorResults) |
| 3749 | async def EnsureDead(self, entities): |
| 3750 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3751 | entities : typing.Sequence[~Entity] |
| 3752 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3753 | ''' |
| 3754 | # map input types to rpc msg |
| 3755 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3756 | msg = dict(type='Uniter', |
| 3757 | request='EnsureDead', |
| 3758 | version=4, |
| 3759 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3760 | _params['entities'] = entities |
| 3761 | reply = await self.rpc(msg) |
| 3762 | return reply |
| 3763 | |
| 3764 | |
| 3765 | |
| 3766 | @ReturnMapping(ErrorResults) |
| 3767 | async def EnterScope(self, relation_units): |
| 3768 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3769 | relation_units : typing.Sequence[~RelationUnit] |
| 3770 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3771 | ''' |
| 3772 | # map input types to rpc msg |
| 3773 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3774 | msg = dict(type='Uniter', |
| 3775 | request='EnterScope', |
| 3776 | version=4, |
| 3777 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3778 | _params['relation-units'] = relation_units |
| 3779 | reply = await self.rpc(msg) |
| 3780 | return reply |
| 3781 | |
| 3782 | |
| 3783 | |
| 3784 | @ReturnMapping(ErrorResults) |
| 3785 | async def FinishActions(self, results): |
| 3786 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3787 | results : typing.Sequence[~ActionExecutionResult] |
| 3788 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3789 | ''' |
| 3790 | # map input types to rpc msg |
| 3791 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3792 | msg = dict(type='Uniter', |
| 3793 | request='FinishActions', |
| 3794 | version=4, |
| 3795 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3796 | _params['results'] = results |
| 3797 | reply = await self.rpc(msg) |
| 3798 | return reply |
| 3799 | |
| 3800 | |
| 3801 | |
| 3802 | @ReturnMapping(MeterStatusResults) |
| 3803 | async def GetMeterStatus(self, entities): |
| 3804 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3805 | entities : typing.Sequence[~Entity] |
| 3806 | Returns -> typing.Sequence[~MeterStatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3807 | ''' |
| 3808 | # map input types to rpc msg |
| 3809 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3810 | msg = dict(type='Uniter', |
| 3811 | request='GetMeterStatus', |
| 3812 | version=4, |
| 3813 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3814 | _params['entities'] = entities |
| 3815 | reply = await self.rpc(msg) |
| 3816 | return reply |
| 3817 | |
| 3818 | |
| 3819 | |
| 3820 | @ReturnMapping(StringBoolResults) |
| 3821 | async def GetPrincipal(self, entities): |
| 3822 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3823 | entities : typing.Sequence[~Entity] |
| 3824 | Returns -> typing.Sequence[~StringBoolResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3825 | ''' |
| 3826 | # map input types to rpc msg |
| 3827 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3828 | msg = dict(type='Uniter', |
| 3829 | request='GetPrincipal', |
| 3830 | version=4, |
| 3831 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3832 | _params['entities'] = entities |
| 3833 | reply = await self.rpc(msg) |
| 3834 | return reply |
| 3835 | |
| 3836 | |
| 3837 | |
| 3838 | @ReturnMapping(BoolResults) |
| 3839 | async def HasSubordinates(self, entities): |
| 3840 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3841 | entities : typing.Sequence[~Entity] |
| 3842 | Returns -> typing.Sequence[~BoolResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3843 | ''' |
| 3844 | # map input types to rpc msg |
| 3845 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3846 | msg = dict(type='Uniter', |
| 3847 | request='HasSubordinates', |
| 3848 | version=4, |
| 3849 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3850 | _params['entities'] = entities |
| 3851 | reply = await self.rpc(msg) |
| 3852 | return reply |
| 3853 | |
| 3854 | |
| 3855 | |
| 3856 | @ReturnMapping(StringsResults) |
| 3857 | async def JoinedRelations(self, entities): |
| 3858 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3859 | entities : typing.Sequence[~Entity] |
| 3860 | Returns -> typing.Sequence[~StringsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3861 | ''' |
| 3862 | # map input types to rpc msg |
| 3863 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3864 | msg = dict(type='Uniter', |
| 3865 | request='JoinedRelations', |
| 3866 | version=4, |
| 3867 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3868 | _params['entities'] = entities |
| 3869 | reply = await self.rpc(msg) |
| 3870 | return reply |
| 3871 | |
| 3872 | |
| 3873 | |
| 3874 | @ReturnMapping(ErrorResults) |
| 3875 | async def LeaveScope(self, relation_units): |
| 3876 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3877 | relation_units : typing.Sequence[~RelationUnit] |
| 3878 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3879 | ''' |
| 3880 | # map input types to rpc msg |
| 3881 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3882 | msg = dict(type='Uniter', |
| 3883 | request='LeaveScope', |
| 3884 | version=4, |
| 3885 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3886 | _params['relation-units'] = relation_units |
| 3887 | reply = await self.rpc(msg) |
| 3888 | return reply |
| 3889 | |
| 3890 | |
| 3891 | |
| 3892 | @ReturnMapping(LifeResults) |
| 3893 | async def Life(self, entities): |
| 3894 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3895 | entities : typing.Sequence[~Entity] |
| 3896 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3897 | ''' |
| 3898 | # map input types to rpc msg |
| 3899 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3900 | msg = dict(type='Uniter', |
| 3901 | request='Life', |
| 3902 | version=4, |
| 3903 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3904 | _params['entities'] = entities |
| 3905 | reply = await self.rpc(msg) |
| 3906 | return reply |
| 3907 | |
| 3908 | |
| 3909 | |
| 3910 | @ReturnMapping(ErrorResults) |
| 3911 | async def Merge(self, params): |
| 3912 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3913 | params : typing.Sequence[~MergeLeadershipSettingsParam] |
| 3914 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3915 | ''' |
| 3916 | # map input types to rpc msg |
| 3917 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3918 | msg = dict(type='Uniter', |
| 3919 | request='Merge', |
| 3920 | version=4, |
| 3921 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3922 | _params['params'] = params |
| 3923 | reply = await self.rpc(msg) |
| 3924 | return reply |
| 3925 | |
| 3926 | |
| 3927 | |
| 3928 | @ReturnMapping(ModelConfigResult) |
| 3929 | async def ModelConfig(self): |
| 3930 | ''' |
| 3931 | |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3932 | Returns -> typing.Mapping[str, typing.Any] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3933 | ''' |
| 3934 | # map input types to rpc msg |
| 3935 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3936 | msg = dict(type='Uniter', |
| 3937 | request='ModelConfig', |
| 3938 | version=4, |
| 3939 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3940 | |
| 3941 | reply = await self.rpc(msg) |
| 3942 | return reply |
| 3943 | |
| 3944 | |
| 3945 | |
| 3946 | @ReturnMapping(StringResult) |
| 3947 | async def ModelUUID(self): |
| 3948 | ''' |
| 3949 | |
| 3950 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 3951 | ''' |
| 3952 | # map input types to rpc msg |
| 3953 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3954 | msg = dict(type='Uniter', |
| 3955 | request='ModelUUID', |
| 3956 | version=4, |
| 3957 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3958 | |
| 3959 | reply = await self.rpc(msg) |
| 3960 | return reply |
| 3961 | |
| 3962 | |
| 3963 | |
| 3964 | @ReturnMapping(UnitNetworkConfigResults) |
| 3965 | async def NetworkConfig(self, args): |
| 3966 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3967 | args : typing.Sequence[~UnitNetworkConfig] |
| 3968 | Returns -> typing.Sequence[~UnitNetworkConfigResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3969 | ''' |
| 3970 | # map input types to rpc msg |
| 3971 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3972 | msg = dict(type='Uniter', |
| 3973 | request='NetworkConfig', |
| 3974 | version=4, |
| 3975 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3976 | _params['args'] = args |
| 3977 | reply = await self.rpc(msg) |
| 3978 | return reply |
| 3979 | |
| 3980 | |
| 3981 | |
| 3982 | @ReturnMapping(ErrorResults) |
| 3983 | async def OpenPorts(self, entities): |
| 3984 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3985 | entities : typing.Sequence[~EntityPortRange] |
| 3986 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3987 | ''' |
| 3988 | # map input types to rpc msg |
| 3989 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 3990 | msg = dict(type='Uniter', |
| 3991 | request='OpenPorts', |
| 3992 | version=4, |
| 3993 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 3994 | _params['entities'] = entities |
| 3995 | reply = await self.rpc(msg) |
| 3996 | return reply |
| 3997 | |
| 3998 | |
| 3999 | |
| 4000 | @ReturnMapping(StringResults) |
| 4001 | async def PrivateAddress(self, entities): |
| 4002 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4003 | entities : typing.Sequence[~Entity] |
| 4004 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4005 | ''' |
| 4006 | # map input types to rpc msg |
| 4007 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4008 | msg = dict(type='Uniter', |
| 4009 | request='PrivateAddress', |
| 4010 | version=4, |
| 4011 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4012 | _params['entities'] = entities |
| 4013 | reply = await self.rpc(msg) |
| 4014 | return reply |
| 4015 | |
| 4016 | |
| 4017 | |
| 4018 | @ReturnMapping(StringResult) |
| 4019 | async def ProviderType(self): |
| 4020 | ''' |
| 4021 | |
| 4022 | Returns -> typing.Union[_ForwardRef('Error'), str] |
| 4023 | ''' |
| 4024 | # map input types to rpc msg |
| 4025 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4026 | msg = dict(type='Uniter', |
| 4027 | request='ProviderType', |
| 4028 | version=4, |
| 4029 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4030 | |
| 4031 | reply = await self.rpc(msg) |
| 4032 | return reply |
| 4033 | |
| 4034 | |
| 4035 | |
| 4036 | @ReturnMapping(StringResults) |
| 4037 | async def PublicAddress(self, entities): |
| 4038 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4039 | entities : typing.Sequence[~Entity] |
| 4040 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4041 | ''' |
| 4042 | # map input types to rpc msg |
| 4043 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4044 | msg = dict(type='Uniter', |
| 4045 | request='PublicAddress', |
| 4046 | version=4, |
| 4047 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4048 | _params['entities'] = entities |
| 4049 | reply = await self.rpc(msg) |
| 4050 | return reply |
| 4051 | |
| 4052 | |
| 4053 | |
| 4054 | @ReturnMapping(GetLeadershipSettingsBulkResults) |
| 4055 | async def Read(self, entities): |
| 4056 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4057 | entities : typing.Sequence[~Entity] |
| 4058 | Returns -> typing.Sequence[~GetLeadershipSettingsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4059 | ''' |
| 4060 | # map input types to rpc msg |
| 4061 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4062 | msg = dict(type='Uniter', |
| 4063 | request='Read', |
| 4064 | version=4, |
| 4065 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4066 | _params['entities'] = entities |
| 4067 | reply = await self.rpc(msg) |
| 4068 | return reply |
| 4069 | |
| 4070 | |
| 4071 | |
| 4072 | @ReturnMapping(SettingsResults) |
| 4073 | async def ReadRemoteSettings(self, relation_unit_pairs): |
| 4074 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4075 | relation_unit_pairs : typing.Sequence[~RelationUnitPair] |
| 4076 | Returns -> typing.Sequence[~SettingsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4077 | ''' |
| 4078 | # map input types to rpc msg |
| 4079 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4080 | msg = dict(type='Uniter', |
| 4081 | request='ReadRemoteSettings', |
| 4082 | version=4, |
| 4083 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4084 | _params['relation-unit-pairs'] = relation_unit_pairs |
| 4085 | reply = await self.rpc(msg) |
| 4086 | return reply |
| 4087 | |
| 4088 | |
| 4089 | |
| 4090 | @ReturnMapping(SettingsResults) |
| 4091 | async def ReadSettings(self, relation_units): |
| 4092 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4093 | relation_units : typing.Sequence[~RelationUnit] |
| 4094 | Returns -> typing.Sequence[~SettingsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4095 | ''' |
| 4096 | # map input types to rpc msg |
| 4097 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4098 | msg = dict(type='Uniter', |
| 4099 | request='ReadSettings', |
| 4100 | version=4, |
| 4101 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4102 | _params['relation-units'] = relation_units |
| 4103 | reply = await self.rpc(msg) |
| 4104 | return reply |
| 4105 | |
| 4106 | |
| 4107 | |
| 4108 | @ReturnMapping(RelationResults) |
| 4109 | async def Relation(self, relation_units): |
| 4110 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4111 | relation_units : typing.Sequence[~RelationUnit] |
| 4112 | Returns -> typing.Sequence[~RelationResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4113 | ''' |
| 4114 | # map input types to rpc msg |
| 4115 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4116 | msg = dict(type='Uniter', |
| 4117 | request='Relation', |
| 4118 | version=4, |
| 4119 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4120 | _params['relation-units'] = relation_units |
| 4121 | reply = await self.rpc(msg) |
| 4122 | return reply |
| 4123 | |
| 4124 | |
| 4125 | |
| 4126 | @ReturnMapping(RelationResults) |
| 4127 | async def RelationById(self, relation_ids): |
| 4128 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4129 | relation_ids : typing.Sequence[int] |
| 4130 | Returns -> typing.Sequence[~RelationResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4131 | ''' |
| 4132 | # map input types to rpc msg |
| 4133 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4134 | msg = dict(type='Uniter', |
| 4135 | request='RelationById', |
| 4136 | version=4, |
| 4137 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4138 | _params['relation-ids'] = relation_ids |
| 4139 | reply = await self.rpc(msg) |
| 4140 | return reply |
| 4141 | |
| 4142 | |
| 4143 | |
| 4144 | @ReturnMapping(ErrorResults) |
| 4145 | async def RemoveStorageAttachments(self, ids): |
| 4146 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4147 | ids : typing.Sequence[~StorageAttachmentId] |
| 4148 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4149 | ''' |
| 4150 | # map input types to rpc msg |
| 4151 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4152 | msg = dict(type='Uniter', |
| 4153 | request='RemoveStorageAttachments', |
| 4154 | version=4, |
| 4155 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4156 | _params['ids'] = ids |
| 4157 | reply = await self.rpc(msg) |
| 4158 | return reply |
| 4159 | |
| 4160 | |
| 4161 | |
| 4162 | @ReturnMapping(ErrorResults) |
| 4163 | async def RequestReboot(self, entities): |
| 4164 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4165 | entities : typing.Sequence[~Entity] |
| 4166 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4167 | ''' |
| 4168 | # map input types to rpc msg |
| 4169 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4170 | msg = dict(type='Uniter', |
| 4171 | request='RequestReboot', |
| 4172 | version=4, |
| 4173 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4174 | _params['entities'] = entities |
| 4175 | reply = await self.rpc(msg) |
| 4176 | return reply |
| 4177 | |
| 4178 | |
| 4179 | |
| 4180 | @ReturnMapping(ResolvedModeResults) |
| 4181 | async def Resolved(self, entities): |
| 4182 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4183 | entities : typing.Sequence[~Entity] |
| 4184 | Returns -> typing.Sequence[~ResolvedModeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4185 | ''' |
| 4186 | # map input types to rpc msg |
| 4187 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4188 | msg = dict(type='Uniter', |
| 4189 | request='Resolved', |
| 4190 | version=4, |
| 4191 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4192 | _params['entities'] = entities |
| 4193 | reply = await self.rpc(msg) |
| 4194 | return reply |
| 4195 | |
| 4196 | |
| 4197 | |
| 4198 | @ReturnMapping(ErrorResults) |
| 4199 | async def SetAgentStatus(self, entities): |
| 4200 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4201 | entities : typing.Sequence[~EntityStatusArgs] |
| 4202 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4203 | ''' |
| 4204 | # map input types to rpc msg |
| 4205 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4206 | msg = dict(type='Uniter', |
| 4207 | request='SetAgentStatus', |
| 4208 | version=4, |
| 4209 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4210 | _params['entities'] = entities |
| 4211 | reply = await self.rpc(msg) |
| 4212 | return reply |
| 4213 | |
| 4214 | |
| 4215 | |
| 4216 | @ReturnMapping(ErrorResults) |
| 4217 | async def SetApplicationStatus(self, entities): |
| 4218 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4219 | entities : typing.Sequence[~EntityStatusArgs] |
| 4220 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4221 | ''' |
| 4222 | # map input types to rpc msg |
| 4223 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4224 | msg = dict(type='Uniter', |
| 4225 | request='SetApplicationStatus', |
| 4226 | version=4, |
| 4227 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4228 | _params['entities'] = entities |
| 4229 | reply = await self.rpc(msg) |
| 4230 | return reply |
| 4231 | |
| 4232 | |
| 4233 | |
| 4234 | @ReturnMapping(ErrorResults) |
| 4235 | async def SetCharmURL(self, entities): |
| 4236 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4237 | entities : typing.Sequence[~EntityCharmURL] |
| 4238 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4239 | ''' |
| 4240 | # map input types to rpc msg |
| 4241 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4242 | msg = dict(type='Uniter', |
| 4243 | request='SetCharmURL', |
| 4244 | version=4, |
| 4245 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4246 | _params['entities'] = entities |
| 4247 | reply = await self.rpc(msg) |
| 4248 | return reply |
| 4249 | |
| 4250 | |
| 4251 | |
| 4252 | @ReturnMapping(ErrorResults) |
| 4253 | async def SetStatus(self, entities): |
| 4254 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4255 | entities : typing.Sequence[~EntityStatusArgs] |
| 4256 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4257 | ''' |
| 4258 | # map input types to rpc msg |
| 4259 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4260 | msg = dict(type='Uniter', |
| 4261 | request='SetStatus', |
| 4262 | version=4, |
| 4263 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4264 | _params['entities'] = entities |
| 4265 | reply = await self.rpc(msg) |
| 4266 | return reply |
| 4267 | |
| 4268 | |
| 4269 | |
| 4270 | @ReturnMapping(ErrorResults) |
| 4271 | async def SetUnitStatus(self, entities): |
| 4272 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4273 | entities : typing.Sequence[~EntityStatusArgs] |
| 4274 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4275 | ''' |
| 4276 | # map input types to rpc msg |
| 4277 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4278 | msg = dict(type='Uniter', |
| 4279 | request='SetUnitStatus', |
| 4280 | version=4, |
| 4281 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4282 | _params['entities'] = entities |
| 4283 | reply = await self.rpc(msg) |
| 4284 | return reply |
| 4285 | |
| 4286 | |
| 4287 | |
| 4288 | @ReturnMapping(ErrorResults) |
| 4289 | async def SetWorkloadVersion(self, entities): |
| 4290 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4291 | entities : typing.Sequence[~EntityWorkloadVersion] |
| 4292 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4293 | ''' |
| 4294 | # map input types to rpc msg |
| 4295 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4296 | msg = dict(type='Uniter', |
| 4297 | request='SetWorkloadVersion', |
| 4298 | version=4, |
| 4299 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4300 | _params['entities'] = entities |
| 4301 | reply = await self.rpc(msg) |
| 4302 | return reply |
| 4303 | |
| 4304 | |
| 4305 | |
| 4306 | @ReturnMapping(LifeResults) |
| 4307 | async def StorageAttachmentLife(self, ids): |
| 4308 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4309 | ids : typing.Sequence[~StorageAttachmentId] |
| 4310 | Returns -> typing.Sequence[~LifeResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4311 | ''' |
| 4312 | # map input types to rpc msg |
| 4313 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4314 | msg = dict(type='Uniter', |
| 4315 | request='StorageAttachmentLife', |
| 4316 | version=4, |
| 4317 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4318 | _params['ids'] = ids |
| 4319 | reply = await self.rpc(msg) |
| 4320 | return reply |
| 4321 | |
| 4322 | |
| 4323 | |
| 4324 | @ReturnMapping(StorageAttachmentResults) |
| 4325 | async def StorageAttachments(self, ids): |
| 4326 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4327 | ids : typing.Sequence[~StorageAttachmentId] |
| 4328 | Returns -> typing.Sequence[~StorageAttachmentResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4329 | ''' |
| 4330 | # map input types to rpc msg |
| 4331 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4332 | msg = dict(type='Uniter', |
| 4333 | request='StorageAttachments', |
| 4334 | version=4, |
| 4335 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4336 | _params['ids'] = ids |
| 4337 | reply = await self.rpc(msg) |
| 4338 | return reply |
| 4339 | |
| 4340 | |
| 4341 | |
| 4342 | @ReturnMapping(StatusResults) |
| 4343 | async def UnitStatus(self, entities): |
| 4344 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4345 | entities : typing.Sequence[~Entity] |
| 4346 | Returns -> typing.Sequence[~StatusResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4347 | ''' |
| 4348 | # map input types to rpc msg |
| 4349 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4350 | msg = dict(type='Uniter', |
| 4351 | request='UnitStatus', |
| 4352 | version=4, |
| 4353 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4354 | _params['entities'] = entities |
| 4355 | reply = await self.rpc(msg) |
| 4356 | return reply |
| 4357 | |
| 4358 | |
| 4359 | |
| 4360 | @ReturnMapping(StorageAttachmentIdsResults) |
| 4361 | async def UnitStorageAttachments(self, entities): |
| 4362 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4363 | entities : typing.Sequence[~Entity] |
| 4364 | Returns -> typing.Sequence[~StorageAttachmentIdsResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4365 | ''' |
| 4366 | # map input types to rpc msg |
| 4367 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4368 | msg = dict(type='Uniter', |
| 4369 | request='UnitStorageAttachments', |
| 4370 | version=4, |
| 4371 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4372 | _params['entities'] = entities |
| 4373 | reply = await self.rpc(msg) |
| 4374 | return reply |
| 4375 | |
| 4376 | |
| 4377 | |
| 4378 | @ReturnMapping(ErrorResults) |
| 4379 | async def UpdateSettings(self, relation_units): |
| 4380 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4381 | relation_units : typing.Sequence[~RelationUnitSettings] |
| 4382 | Returns -> typing.Sequence[~ErrorResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4383 | ''' |
| 4384 | # map input types to rpc msg |
| 4385 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4386 | msg = dict(type='Uniter', |
| 4387 | request='UpdateSettings', |
| 4388 | version=4, |
| 4389 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4390 | _params['relation-units'] = relation_units |
| 4391 | reply = await self.rpc(msg) |
| 4392 | return reply |
| 4393 | |
| 4394 | |
| 4395 | |
| 4396 | @ReturnMapping(NotifyWatchResults) |
| 4397 | async def Watch(self, entities): |
| 4398 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4399 | entities : typing.Sequence[~Entity] |
| 4400 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4401 | ''' |
| 4402 | # map input types to rpc msg |
| 4403 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4404 | msg = dict(type='Uniter', |
| 4405 | request='Watch', |
| 4406 | version=4, |
| 4407 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4408 | _params['entities'] = entities |
| 4409 | reply = await self.rpc(msg) |
| 4410 | return reply |
| 4411 | |
| 4412 | |
| 4413 | |
| 4414 | @ReturnMapping(NotifyWatchResult) |
| 4415 | async def WatchAPIHostPorts(self): |
| 4416 | ''' |
| 4417 | |
| 4418 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 4419 | ''' |
| 4420 | # map input types to rpc msg |
| 4421 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4422 | msg = dict(type='Uniter', |
| 4423 | request='WatchAPIHostPorts', |
| 4424 | version=4, |
| 4425 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4426 | |
| 4427 | reply = await self.rpc(msg) |
| 4428 | return reply |
| 4429 | |
| 4430 | |
| 4431 | |
| 4432 | @ReturnMapping(StringsWatchResults) |
| 4433 | async def WatchActionNotifications(self, entities): |
| 4434 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4435 | entities : typing.Sequence[~Entity] |
| 4436 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4437 | ''' |
| 4438 | # map input types to rpc msg |
| 4439 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4440 | msg = dict(type='Uniter', |
| 4441 | request='WatchActionNotifications', |
| 4442 | version=4, |
| 4443 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4444 | _params['entities'] = entities |
| 4445 | reply = await self.rpc(msg) |
| 4446 | return reply |
| 4447 | |
| 4448 | |
| 4449 | |
| 4450 | @ReturnMapping(StringsWatchResults) |
| 4451 | async def WatchApplicationRelations(self, entities): |
| 4452 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4453 | entities : typing.Sequence[~Entity] |
| 4454 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4455 | ''' |
| 4456 | # map input types to rpc msg |
| 4457 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4458 | msg = dict(type='Uniter', |
| 4459 | request='WatchApplicationRelations', |
| 4460 | version=4, |
| 4461 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4462 | _params['entities'] = entities |
| 4463 | reply = await self.rpc(msg) |
| 4464 | return reply |
| 4465 | |
| 4466 | |
| 4467 | |
| 4468 | @ReturnMapping(NotifyWatchResults) |
| 4469 | async def WatchConfigSettings(self, entities): |
| 4470 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4471 | entities : typing.Sequence[~Entity] |
| 4472 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4473 | ''' |
| 4474 | # map input types to rpc msg |
| 4475 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4476 | msg = dict(type='Uniter', |
| 4477 | request='WatchConfigSettings', |
| 4478 | version=4, |
| 4479 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4480 | _params['entities'] = entities |
| 4481 | reply = await self.rpc(msg) |
| 4482 | return reply |
| 4483 | |
| 4484 | |
| 4485 | |
| 4486 | @ReturnMapping(NotifyWatchResult) |
| 4487 | async def WatchForModelConfigChanges(self): |
| 4488 | ''' |
| 4489 | |
| 4490 | Returns -> typing.Union[str, _ForwardRef('Error')] |
| 4491 | ''' |
| 4492 | # map input types to rpc msg |
| 4493 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4494 | msg = dict(type='Uniter', |
| 4495 | request='WatchForModelConfigChanges', |
| 4496 | version=4, |
| 4497 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4498 | |
| 4499 | reply = await self.rpc(msg) |
| 4500 | return reply |
| 4501 | |
| 4502 | |
| 4503 | |
| 4504 | @ReturnMapping(NotifyWatchResults) |
| 4505 | async def WatchLeadershipSettings(self, entities): |
| 4506 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4507 | entities : typing.Sequence[~Entity] |
| 4508 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4509 | ''' |
| 4510 | # map input types to rpc msg |
| 4511 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4512 | msg = dict(type='Uniter', |
| 4513 | request='WatchLeadershipSettings', |
| 4514 | version=4, |
| 4515 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4516 | _params['entities'] = entities |
| 4517 | reply = await self.rpc(msg) |
| 4518 | return reply |
| 4519 | |
| 4520 | |
| 4521 | |
| 4522 | @ReturnMapping(NotifyWatchResults) |
| 4523 | async def WatchMeterStatus(self, entities): |
| 4524 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4525 | entities : typing.Sequence[~Entity] |
| 4526 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4527 | ''' |
| 4528 | # map input types to rpc msg |
| 4529 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4530 | msg = dict(type='Uniter', |
| 4531 | request='WatchMeterStatus', |
| 4532 | version=4, |
| 4533 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4534 | _params['entities'] = entities |
| 4535 | reply = await self.rpc(msg) |
| 4536 | return reply |
| 4537 | |
| 4538 | |
| 4539 | |
| 4540 | @ReturnMapping(RelationUnitsWatchResults) |
| 4541 | async def WatchRelationUnits(self, relation_units): |
| 4542 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4543 | relation_units : typing.Sequence[~RelationUnit] |
| 4544 | Returns -> typing.Sequence[~RelationUnitsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4545 | ''' |
| 4546 | # map input types to rpc msg |
| 4547 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4548 | msg = dict(type='Uniter', |
| 4549 | request='WatchRelationUnits', |
| 4550 | version=4, |
| 4551 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4552 | _params['relation-units'] = relation_units |
| 4553 | reply = await self.rpc(msg) |
| 4554 | return reply |
| 4555 | |
| 4556 | |
| 4557 | |
| 4558 | @ReturnMapping(NotifyWatchResults) |
| 4559 | async def WatchStorageAttachments(self, ids): |
| 4560 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4561 | ids : typing.Sequence[~StorageAttachmentId] |
| 4562 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4563 | ''' |
| 4564 | # map input types to rpc msg |
| 4565 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4566 | msg = dict(type='Uniter', |
| 4567 | request='WatchStorageAttachments', |
| 4568 | version=4, |
| 4569 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4570 | _params['ids'] = ids |
| 4571 | reply = await self.rpc(msg) |
| 4572 | return reply |
| 4573 | |
| 4574 | |
| 4575 | |
| 4576 | @ReturnMapping(NotifyWatchResults) |
| 4577 | async def WatchUnitAddresses(self, entities): |
| 4578 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4579 | entities : typing.Sequence[~Entity] |
| 4580 | Returns -> typing.Sequence[~NotifyWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4581 | ''' |
| 4582 | # map input types to rpc msg |
| 4583 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4584 | msg = dict(type='Uniter', |
| 4585 | request='WatchUnitAddresses', |
| 4586 | version=4, |
| 4587 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4588 | _params['entities'] = entities |
| 4589 | reply = await self.rpc(msg) |
| 4590 | return reply |
| 4591 | |
| 4592 | |
| 4593 | |
| 4594 | @ReturnMapping(StringsWatchResults) |
| 4595 | async def WatchUnitStorageAttachments(self, entities): |
| 4596 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4597 | entities : typing.Sequence[~Entity] |
| 4598 | Returns -> typing.Sequence[~StringsWatchResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4599 | ''' |
| 4600 | # map input types to rpc msg |
| 4601 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4602 | msg = dict(type='Uniter', |
| 4603 | request='WatchUnitStorageAttachments', |
| 4604 | version=4, |
| 4605 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4606 | _params['entities'] = entities |
| 4607 | reply = await self.rpc(msg) |
| 4608 | return reply |
| 4609 | |
| 4610 | |
| 4611 | |
| 4612 | @ReturnMapping(StringResults) |
| 4613 | async def WorkloadVersion(self, entities): |
| 4614 | ''' |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4615 | entities : typing.Sequence[~Entity] |
| 4616 | Returns -> typing.Sequence[~StringResult] |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4617 | ''' |
| 4618 | # map input types to rpc msg |
| 4619 | _params = dict() |
| Adam Israel | b8a8281 | 2019-03-27 14:50:11 -0400 | [diff] [blame] | 4620 | msg = dict(type='Uniter', |
| 4621 | request='WorkloadVersion', |
| 4622 | version=4, |
| 4623 | params=_params) |
| Adam Israel | dcdf82b | 2017-08-15 15:26:43 -0400 | [diff] [blame] | 4624 | _params['entities'] = entities |
| 4625 | reply = await self.rpc(msg) |
| 4626 | return reply |