Skip to content

Commit 0a92d9f

Browse files
committed
feat(orgs): add AOSCX and EdgeConnect register command APIs
1 parent 9dc604d commit 0a92d9f

3 files changed

Lines changed: 48 additions & 5 deletions

File tree

‎src/mistapi/api/v1/orgs/__init__.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
admins,
1717
alarms,
1818
alarmtemplates,
19-
aos,
19+
aoscx,
2020
apitokens,
2121
aptemplates,
2222
assetfilters,
@@ -30,6 +30,7 @@
3030
crl,
3131
deviceprofiles,
3232
devices,
33+
edgeconnect,
3334
events,
3435
evpn_topologies,
3536
exports,
@@ -102,7 +103,7 @@
102103
"admins",
103104
"alarms",
104105
"alarmtemplates",
105-
"aos",
106+
"aoscx",
106107
"apitokens",
107108
"aptemplates",
108109
"assetfilters",
@@ -116,6 +117,7 @@
116117
"crl",
117118
"deviceprofiles",
118119
"devices",
120+
"edgeconnect",
119121
"events",
120122
"evpn_topologies",
121123
"exports",
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
from mistapi.__api_response import APIResponse as _APIResponse
1515

1616

17-
def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
17+
def getOrgAoscxRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse:
1818
"""
19-
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aos/get-org-aos-register-cmd
19+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/aoscx/get-org-aoscx-register-cmd
2020
2121
PARAMS
2222
-----------
@@ -33,7 +33,7 @@ def getOrgAosRegisterCmd(mist_session: _APISession, org_id: str) -> _APIResponse
3333
response from the API call
3434
"""
3535

36-
uri = f"/api/v1/orgs/{org_id}/aos/register_cmd"
36+
uri = f"/api/v1/orgs/{org_id}/aoscx/register_cmd"
3737
query_params: dict[str, str] = {}
3838
resp = mist_session.mist_get(uri=uri, query=query_params)
3939
return resp
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
"""
2+
--------------------------------------------------------------------------------
3+
------------------------- Mist API Python CLI Session --------------------------
4+
5+
Written by: Thomas Munzer (tmunzer@juniper.net)
6+
Github : https://github.com/tmunzer/mistapi_python
7+
8+
This package is licensed under the MIT License.
9+
10+
--------------------------------------------------------------------------------
11+
"""
12+
13+
from mistapi import APISession as _APISession
14+
from mistapi.__api_response import APIResponse as _APIResponse
15+
16+
17+
def getOrgEdgeconnectRegisterCmd(
18+
mist_session: _APISession, org_id: str
19+
) -> _APIResponse:
20+
"""
21+
API doc: https://www.juniper.net/documentation/us/en/software/mist/api/http/api/orgs/devices/edgeconnect/get-org-edgeconnect-register-cmd
22+
23+
PARAMS
24+
-----------
25+
mistapi.APISession : mist_session
26+
mistapi session including authentication and Mist host information
27+
28+
PATH PARAMS
29+
-----------
30+
org_id : str
31+
32+
RETURN
33+
-----------
34+
mistapi.APIResponse
35+
response from the API call
36+
"""
37+
38+
uri = f"/api/v1/orgs/{org_id}/edgeconnect/register_cmd"
39+
query_params: dict[str, str] = {}
40+
resp = mist_session.mist_get(uri=uri, query=query_params)
41+
return resp

0 commit comments

Comments
 (0)