Skip to content

Commit ccd9067

Browse files
author
Juan Tirado
committed
Added 3.1.2 and 3.2-beta2 schemas.
1 parent 831f388 commit ccd9067

13 files changed

Lines changed: 104675 additions & 237 deletions

juju/client/_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,10 @@ class SecretsManagerFacade(TypeFactory):
481481
pass
482482

483483

484+
class SecretsRevisionWatcherFacade(TypeFactory):
485+
pass
486+
487+
484488
class SecretsTriggerWatcherFacade(TypeFactory):
485489
pass
486490

juju/client/_client1.py

Lines changed: 167 additions & 51 deletions
Large diffs are not rendered by default.

juju/client/_client10.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ class MachineManagerFacade(Type):
252252
'container': {'type': 'string'},
253253
'cores': {'type': 'integer'},
254254
'cpu-power': {'type': 'integer'},
255+
'image-id': {'type': 'string'},
255256
'instance-role': {'type': 'string'},
256257
'instance-type': {'type': 'string'},
257258
'mem': {'type': 'integer'},

juju/client/_client11.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,6 +1752,7 @@ class ProvisionerFacade(Type):
17521752
'container': {'type': 'string'},
17531753
'cores': {'type': 'integer'},
17541754
'cpu-power': {'type': 'integer'},
1755+
'image-id': {'type': 'string'},
17551756
'instance-role': {'type': 'string'},
17561757
'instance-type': {'type': 'string'},
17571758
'mem': {'type': 'integer'},

juju/client/_client18.py

Lines changed: 101 additions & 62 deletions
Large diffs are not rendered by default.

juju/client/_client2.py

Lines changed: 1461 additions & 1 deletion
Large diffs are not rendered by default.

juju/client/_client3.py

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class AdminFacade(Type):
6565
'type': 'array'},
6666
'type': 'array'},
6767
'nonce': {'type': 'string'},
68+
'token': {'type': 'string'},
6869
'user-data': {'type': 'string'}},
6970
'required': ['auth-tag',
7071
'credentials',
@@ -117,7 +118,7 @@ class AdminFacade(Type):
117118

118119

119120
@ReturnMapping(LoginResult)
120-
async def Login(self, auth_tag=None, bakery_version=None, cli_args=None, client_version=None, credentials=None, macaroons=None, nonce=None, user_data=None):
121+
async def Login(self, auth_tag=None, bakery_version=None, cli_args=None, client_version=None, credentials=None, macaroons=None, nonce=None, token=None, user_data=None):
121122
'''
122123
Login logs in with the provided credentials. All subsequent requests on the
123124
connection will act as the authenticated user.
@@ -129,6 +130,7 @@ async def Login(self, auth_tag=None, bakery_version=None, cli_args=None, client_
129130
credentials : str
130131
macaroons : typing.Sequence[~Macaroon]
131132
nonce : str
133+
token : str
132134
user_data : str
133135
Returns -> LoginResult
134136
'''
@@ -153,6 +155,9 @@ async def Login(self, auth_tag=None, bakery_version=None, cli_args=None, client_
153155
if nonce is not None and not isinstance(nonce, (bytes, str)):
154156
raise Exception("Expected nonce to be a str, received: {}".format(type(nonce)))
155157

158+
if token is not None and not isinstance(token, (bytes, str)):
159+
raise Exception("Expected token to be a str, received: {}".format(type(token)))
160+
156161
if user_data is not None and not isinstance(user_data, (bytes, str)):
157162
raise Exception("Expected user_data to be a str, received: {}".format(type(user_data)))
158163

@@ -169,6 +174,7 @@ async def Login(self, auth_tag=None, bakery_version=None, cli_args=None, client_
169174
_params['credentials'] = credentials
170175
_params['macaroons'] = macaroons
171176
_params['nonce'] = nonce
177+
_params['token'] = token
172178
_params['user-data'] = user_data
173179
reply = await self.rpc(msg)
174180
return reply
@@ -1400,6 +1406,19 @@ class MigrationMasterFacade(Type):
14001406
'agent-version',
14011407
'controller-agent-version'],
14021408
'type': 'object'},
1409+
'MigrationSourceInfo': {'additionalProperties': False,
1410+
'properties': {'addrs': {'items': {'type': 'string'},
1411+
'type': 'array'},
1412+
'ca-cert': {'type': 'string'},
1413+
'controller-alias': {'type': 'string'},
1414+
'controller-tag': {'type': 'string'},
1415+
'local-related-models': {'items': {'type': 'string'},
1416+
'type': 'array'}},
1417+
'required': ['local-related-models',
1418+
'controller-tag',
1419+
'addrs',
1420+
'ca-cert'],
1421+
'type': 'object'},
14031422
'MigrationSpec': {'additionalProperties': False,
14041423
'properties': {'model-tag': {'type': 'string'},
14051424
'target-info': {'$ref': '#/definitions/MigrationTargetInfo'}},
@@ -1599,6 +1618,14 @@ class MigrationMasterFacade(Type):
15991618
'the end user.',
16001619
'properties': {'Params': {'$ref': '#/definitions/SetMigrationStatusMessageArgs'}},
16011620
'type': 'object'},
1621+
'SourceControllerInfo': {'description': 'SourceControllerInfo '
1622+
'returns the details '
1623+
'required to connect '
1624+
'to\n'
1625+
'the source controller '
1626+
'for model migration.',
1627+
'properties': {'Result': {'$ref': '#/definitions/MigrationSourceInfo'}},
1628+
'type': 'object'},
16021629
'Watch': {'description': 'Watch starts watching for an active '
16031630
'migration for the model\n'
16041631
'associated with the API connection. '
@@ -1847,6 +1874,28 @@ async def SetStatusMessage(self, message=None):
18471874

18481875

18491876

1877+
@ReturnMapping(MigrationSourceInfo)
1878+
async def SourceControllerInfo(self):
1879+
'''
1880+
SourceControllerInfo returns the details required to connect to
1881+
the source controller for model migration.
1882+
1883+
1884+
Returns -> MigrationSourceInfo
1885+
'''
1886+
1887+
# map input types to rpc msg
1888+
_params = dict()
1889+
msg = dict(type='MigrationMaster',
1890+
request='SourceControllerInfo',
1891+
version=3,
1892+
params=_params)
1893+
1894+
reply = await self.rpc(msg)
1895+
return reply
1896+
1897+
1898+
18501899
@ReturnMapping(NotifyWatchResult)
18511900
async def Watch(self):
18521901
'''
@@ -1966,6 +2015,7 @@ class ModelConfigFacade(Type):
19662015
'container': {'type': 'string'},
19672016
'cores': {'type': 'integer'},
19682017
'cpu-power': {'type': 'integer'},
2018+
'image-id': {'type': 'string'},
19692019
'instance-role': {'type': 'string'},
19702020
'instance-type': {'type': 'string'},
19712021
'mem': {'type': 'integer'},

juju/client/_client4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ class ApplicationOffersFacade(Type):
165165
'type': 'array'}},
166166
'type': 'object'},
167167
'ConsumeOfferDetails': {'additionalProperties': False,
168-
'properties': {'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
168+
'properties': {'auth-token': {'type': 'string'},
169+
'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
169170
'macaroon': {'$ref': '#/definitions/Macaroon'},
170171
'offer': {'$ref': '#/definitions/ApplicationOfferDetails'}},
171172
'type': 'object'},
@@ -176,6 +177,7 @@ class ApplicationOffersFacade(Type):
176177
'type': 'object'},
177178
'ConsumeOfferDetailsResult': {'additionalProperties': False,
178179
'properties': {'ConsumeOfferDetails': {'$ref': '#/definitions/ConsumeOfferDetails'},
180+
'auth-token': {'type': 'string'},
179181
'error': {'$ref': '#/definitions/Error'},
180182
'external-controller': {'$ref': '#/definitions/ExternalControllerInfo'},
181183
'macaroon': {'$ref': '#/definitions/Macaroon'},

juju/client/_client7.py

Lines changed: 74 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -841,6 +841,7 @@ class CloudFacade(Type):
841841
'container': {'type': 'string'},
842842
'cores': {'type': 'integer'},
843843
'cpu-power': {'type': 'integer'},
844+
'image-id': {'type': 'string'},
844845
'instance-role': {'type': 'string'},
845846
'instance-type': {'type': 'string'},
846847
'mem': {'type': 'integer'},
@@ -1595,17 +1596,18 @@ class FirewallerFacade(Type):
15951596
'underlay': {'type': 'string'}},
15961597
'required': ['underlay', 'overlay'],
15971598
'type': 'object'},
1598-
'FirewallRule': {'additionalProperties': False,
1599-
'properties': {'known-service': {'type': 'string'},
1600-
'whitelist-cidrs': {'items': {'type': 'string'},
1601-
'type': 'array'}},
1602-
'required': ['known-service'],
1603-
'type': 'object'},
1604-
'KnownServiceArgs': {'additionalProperties': False,
1605-
'properties': {'known-services': {'items': {'type': 'string'},
1606-
'type': 'array'}},
1607-
'required': ['known-services'],
1608-
'type': 'object'},
1599+
'IngressRule': {'additionalProperties': False,
1600+
'properties': {'port-range': {'$ref': '#/definitions/PortRange'},
1601+
'source-cidrs': {'items': {'type': 'string'},
1602+
'type': 'array'}},
1603+
'required': ['port-range', 'source-cidrs'],
1604+
'type': 'object'},
1605+
'IngressRulesResult': {'additionalProperties': False,
1606+
'properties': {'error': {'$ref': '#/definitions/Error'},
1607+
'rules': {'items': {'$ref': '#/definitions/IngressRule'},
1608+
'type': 'array'}},
1609+
'required': ['rules'],
1610+
'type': 'object'},
16091611
'LifeResult': {'additionalProperties': False,
16101612
'properties': {'error': {'$ref': '#/definitions/Error'},
16111613
'life': {'type': 'string'}},
@@ -1616,11 +1618,6 @@ class FirewallerFacade(Type):
16161618
'type': 'array'}},
16171619
'required': ['results'],
16181620
'type': 'object'},
1619-
'ListFirewallRulesResults': {'additionalProperties': False,
1620-
'properties': {'Rules': {'items': {'$ref': '#/definitions/FirewallRule'},
1621-
'type': 'array'}},
1622-
'required': ['Rules'],
1623-
'type': 'object'},
16241621
'Macaroon': {'additionalProperties': False, 'type': 'object'},
16251622
'MacaroonResult': {'additionalProperties': False,
16261623
'properties': {'error': {'$ref': '#/definitions/Error'},
@@ -1813,13 +1810,6 @@ class FirewallerFacade(Type):
18131810
'configuration.',
18141811
'properties': {'Result': {'$ref': '#/definitions/ControllerConfigResult'}},
18151812
'type': 'object'},
1816-
'FirewallRules': {'description': 'FirewallRules returns the '
1817-
'firewall rules for the '
1818-
'specified well known service '
1819-
'types.',
1820-
'properties': {'Params': {'$ref': '#/definitions/KnownServiceArgs'},
1821-
'Result': {'$ref': '#/definitions/ListFirewallRulesResults'}},
1822-
'type': 'object'},
18231813
'GetAssignedMachine': {'description': 'GetAssignedMachine '
18241814
'returns the assigned '
18251815
'machine tag (if any) '
@@ -1867,6 +1857,13 @@ class FirewallerFacade(Type):
18671857
"current model's configuration.",
18681858
'properties': {'Result': {'$ref': '#/definitions/ModelConfigResult'}},
18691859
'type': 'object'},
1860+
'ModelFirewallRules': {'description': 'ModelFirewallRules '
1861+
'returns the firewall '
1862+
'rules that this model '
1863+
'is\n'
1864+
'configured to open',
1865+
'properties': {'Result': {'$ref': '#/definitions/IngressRulesResult'}},
1866+
'type': 'object'},
18701867
'OpenedMachinePortRanges': {'description': 'OpenedMachinePortRanges '
18711868
'returns a list of '
18721869
'the opened port '
@@ -1988,6 +1985,16 @@ class FirewallerFacade(Type):
19881985
'properties': {'Params': {'$ref': '#/definitions/Entities'},
19891986
'Result': {'$ref': '#/definitions/StringsWatchResults'}},
19901987
'type': 'object'},
1988+
'WatchModelFirewallRules': {'description': 'WatchModelFirewallRules '
1989+
'returns a '
1990+
'NotifyWatcher that '
1991+
'notifies of\n'
1992+
'potential changes '
1993+
"to a model's "
1994+
'configured '
1995+
'firewall rules',
1996+
'properties': {'Result': {'$ref': '#/definitions/NotifyWatchResult'}},
1997+
'type': 'object'},
19911998
'WatchModelMachineStartTimes': {'description': 'WatchModelMachineStartTimes '
19921999
'watches the '
19932000
'non-container '
@@ -2129,29 +2136,6 @@ async def ControllerConfig(self):
21292136

21302137

21312138

2132-
@ReturnMapping(ListFirewallRulesResults)
2133-
async def FirewallRules(self, known_services=None):
2134-
'''
2135-
FirewallRules returns the firewall rules for the specified well known service types.
2136-
2137-
known_services : typing.Sequence[str]
2138-
Returns -> ListFirewallRulesResults
2139-
'''
2140-
if known_services is not None and not isinstance(known_services, (bytes, str, list)):
2141-
raise Exception("Expected known_services to be a Sequence, received: {}".format(type(known_services)))
2142-
2143-
# map input types to rpc msg
2144-
_params = dict()
2145-
msg = dict(type='Firewaller',
2146-
request='FirewallRules',
2147-
version=7,
2148-
params=_params)
2149-
_params['known-services'] = known_services
2150-
reply = await self.rpc(msg)
2151-
return reply
2152-
2153-
2154-
21552139
@ReturnMapping(StringResults)
21562140
async def GetAssignedMachine(self, entities=None):
21572141
'''
@@ -2312,6 +2296,28 @@ async def ModelConfig(self):
23122296

23132297

23142298

2299+
@ReturnMapping(IngressRulesResult)
2300+
async def ModelFirewallRules(self):
2301+
'''
2302+
ModelFirewallRules returns the firewall rules that this model is
2303+
configured to open
2304+
2305+
2306+
Returns -> IngressRulesResult
2307+
'''
2308+
2309+
# map input types to rpc msg
2310+
_params = dict()
2311+
msg = dict(type='Firewaller',
2312+
request='ModelFirewallRules',
2313+
version=7,
2314+
params=_params)
2315+
2316+
reply = await self.rpc(msg)
2317+
return reply
2318+
2319+
2320+
23152321
@ReturnMapping(OpenMachinePortRangesResults)
23162322
async def OpenedMachinePortRanges(self, entities=None):
23172323
'''
@@ -2505,6 +2511,28 @@ async def WatchIngressAddressesForRelations(self, entities=None):
25052511

25062512

25072513

2514+
@ReturnMapping(NotifyWatchResult)
2515+
async def WatchModelFirewallRules(self):
2516+
'''
2517+
WatchModelFirewallRules returns a NotifyWatcher that notifies of
2518+
potential changes to a model's configured firewall rules
2519+
2520+
2521+
Returns -> NotifyWatchResult
2522+
'''
2523+
2524+
# map input types to rpc msg
2525+
_params = dict()
2526+
msg = dict(type='Firewaller',
2527+
request='WatchModelFirewallRules',
2528+
version=7,
2529+
params=_params)
2530+
2531+
reply = await self.rpc(msg)
2532+
return reply
2533+
2534+
2535+
25082536
@ReturnMapping(StringsWatchResult)
25092537
async def WatchModelMachineStartTimes(self):
25102538
'''

0 commit comments

Comments
 (0)