Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically regenerated library. #237

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion meraki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
)
from meraki.rest_session import *

__version__ = '1.40.1'
__version__ = '1.41.0'


class DashboardAPI(object):
Expand Down
2 changes: 1 addition & 1 deletion meraki/aio/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs):
- networkId (string): Network ID
- enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured.
- asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512.
- ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated.
"""

Expand Down
114 changes: 114 additions & 0 deletions meraki/aio/api/licensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,120 @@ def __init__(self, session):



def getAdministeredLicensingSubscriptionSubscriptions(self, total_pages=1, direction='next', **kwargs):
"""
**List available subscriptions**
https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-subscriptions

- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- subscriptionIds (array): List of subscription ids to fetch
- organizationIds (array): Organizations to get associated subscriptions for
- startDate (string): Filter subscriptions by start date, ISO 8601 format. To filter with a range of dates, use 'startDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
- endDate (string): Filter subscriptions by end date, ISO 8601 format. To filter with a range of dates, use 'endDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
- statuses (array): List of statuses that returned subscriptions can have
- productTypes (array): List of product types that returned subscriptions need to have entitlements for.
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'getAdministeredLicensingSubscriptionSubscriptions'
}
resource = f'/administered/licensing/subscription/subscriptions'

query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'startDate', 'endDate', 'statuses', 'productTypes', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['subscriptionIds', 'organizationIds', 'statuses', 'productTypes', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def claimAdministeredLicensingSubscriptionSubscriptions(self, claimKey: str, organizationId: str, **kwargs):
"""
**Claim a subscription into an organization.**
https://developer.cisco.com/meraki/api-v1/#!claim-administered-licensing-subscription-subscriptions

- claimKey (string): The subscription's claim key
- organizationId (string): The id of the organization claiming the subscription
- name (string): Friendly name to identify the subscription
- description (string): Extra details or notes about the subscription
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'claimAdministeredLicensingSubscriptionSubscriptions'
}
resource = f'/administered/licensing/subscription/subscriptions/claim'

body_params = ['claimKey', 'organizationId', 'name', 'description', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def validateAdministeredLicensingSubscriptionSubscriptionsClaimKey(self, claimKey: str):
"""
**Find a subscription by claim key**
https://developer.cisco.com/meraki/api-v1/#!validate-administered-licensing-subscription-subscriptions-claim-key

- claimKey (string): The subscription's claim key
"""

kwargs = locals()

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions', 'claimKey'],
'operation': 'validateAdministeredLicensingSubscriptionSubscriptionsClaimKey'
}
resource = f'/administered/licensing/subscription/subscriptions/claimKey/validate'

body_params = ['claimKey', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, networkIds: list, **kwargs):
"""
**Bind networks to a subscription**
https://developer.cisco.com/meraki/api-v1/#!bind-administered-licensing-subscription-subscription

- subscriptionId (string): Subscription ID
- networkIds (array): List of network ids to bind to the subscription
- validate (boolean): Check if the provided networks can be bound to the subscription. Returns any licensing problems and does not commit the results.
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'bindAdministeredLicensingSubscriptionSubscription'
}
subscriptionId = urllib.parse.quote(str(subscriptionId), safe='')
resource = f'/administered/licensing/subscription/subscriptions/{subscriptionId}/bind'

body_params = ['networkIds', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getOrganizationLicensingCotermLicenses(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**List the licenses in a coterm organization**
Expand Down
2 changes: 1 addition & 1 deletion meraki/api/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2180,7 +2180,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs):
- networkId (string): Network ID
- enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured.
- asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512.
- ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated.
"""

Expand Down
2 changes: 1 addition & 1 deletion meraki/api/batch/appliance.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs):
- networkId (string): Network ID
- enabled (boolean): Boolean value to enable or disable the BGP configuration. When BGP is enabled, the asNumber (ASN) will be autopopulated with the preconfigured ASN at other Hubs or a default value if there is no ASN configured.
- asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512.
- ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- ibgpHoldTimer (integer): The iBGP holdtimer in seconds. The iBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
- neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated.
"""

Expand Down
114 changes: 114 additions & 0 deletions meraki/api/licensing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,120 @@ def __init__(self, session):



def getAdministeredLicensingSubscriptionSubscriptions(self, total_pages=1, direction='next', **kwargs):
"""
**List available subscriptions**
https://developer.cisco.com/meraki/api-v1/#!get-administered-licensing-subscription-subscriptions

- total_pages (integer or string): use with perPage to get total results up to total_pages*perPage; -1 or "all" for all pages
- direction (string): direction to paginate, either "next" (default) or "prev" page
- perPage (integer): The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
- startingAfter (string): A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- endingBefore (string): A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
- subscriptionIds (array): List of subscription ids to fetch
- organizationIds (array): Organizations to get associated subscriptions for
- startDate (string): Filter subscriptions by start date, ISO 8601 format. To filter with a range of dates, use 'startDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
- endDate (string): Filter subscriptions by end date, ISO 8601 format. To filter with a range of dates, use 'endDate[<option>]=?' in the request. Accepted options include lt, gt, lte, gte.
- statuses (array): List of statuses that returned subscriptions can have
- productTypes (array): List of product types that returned subscriptions need to have entitlements for.
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'getAdministeredLicensingSubscriptionSubscriptions'
}
resource = f'/administered/licensing/subscription/subscriptions'

query_params = ['perPage', 'startingAfter', 'endingBefore', 'subscriptionIds', 'organizationIds', 'startDate', 'endDate', 'statuses', 'productTypes', ]
params = {k.strip(): v for k, v in kwargs.items() if k.strip() in query_params}

array_params = ['subscriptionIds', 'organizationIds', 'statuses', 'productTypes', ]
for k, v in kwargs.items():
if k.strip() in array_params:
params[f'{k.strip()}[]'] = kwargs[f'{k}']
params.pop(k.strip())

return self._session.get_pages(metadata, resource, params, total_pages, direction)



def claimAdministeredLicensingSubscriptionSubscriptions(self, claimKey: str, organizationId: str, **kwargs):
"""
**Claim a subscription into an organization.**
https://developer.cisco.com/meraki/api-v1/#!claim-administered-licensing-subscription-subscriptions

- claimKey (string): The subscription's claim key
- organizationId (string): The id of the organization claiming the subscription
- name (string): Friendly name to identify the subscription
- description (string): Extra details or notes about the subscription
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'claimAdministeredLicensingSubscriptionSubscriptions'
}
resource = f'/administered/licensing/subscription/subscriptions/claim'

body_params = ['claimKey', 'organizationId', 'name', 'description', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def validateAdministeredLicensingSubscriptionSubscriptionsClaimKey(self, claimKey: str):
"""
**Find a subscription by claim key**
https://developer.cisco.com/meraki/api-v1/#!validate-administered-licensing-subscription-subscriptions-claim-key

- claimKey (string): The subscription's claim key
"""

kwargs = locals()

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions', 'claimKey'],
'operation': 'validateAdministeredLicensingSubscriptionSubscriptionsClaimKey'
}
resource = f'/administered/licensing/subscription/subscriptions/claimKey/validate'

body_params = ['claimKey', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def bindAdministeredLicensingSubscriptionSubscription(self, subscriptionId: str, networkIds: list, **kwargs):
"""
**Bind networks to a subscription**
https://developer.cisco.com/meraki/api-v1/#!bind-administered-licensing-subscription-subscription

- subscriptionId (string): Subscription ID
- networkIds (array): List of network ids to bind to the subscription
- validate (boolean): Check if the provided networks can be bound to the subscription. Returns any licensing problems and does not commit the results.
"""

kwargs.update(locals())

metadata = {
'tags': ['licensing', 'configure', 'subscription', 'subscriptions'],
'operation': 'bindAdministeredLicensingSubscriptionSubscription'
}
subscriptionId = urllib.parse.quote(str(subscriptionId), safe='')
resource = f'/administered/licensing/subscription/subscriptions/{subscriptionId}/bind'

body_params = ['networkIds', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}

return self._session.post(metadata, resource, payload)



def getOrganizationLicensingCotermLicenses(self, organizationId: str, total_pages=1, direction='next', **kwargs):
"""
**List the licenses in a coterm organization**
Expand Down