-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from cisco-en-programmability/develop
Develop v2.5.4
- Loading branch information
Showing
4 changed files
with
162 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
dnacentersdk/models/validators/v2_3_3_0/jsd_ad96e712f4525a128368b1bfe3afc21c.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# -*- coding: utf-8 -*- | ||
"""Cisco DNA Center AddSSIDToIPPoolMapping data model. | ||
Copyright (c) 2019-2021 Cisco Systems. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
""" | ||
|
||
from __future__ import absolute_import, division, print_function, unicode_literals | ||
|
||
import json | ||
from builtins import * | ||
|
||
import fastjsonschema | ||
|
||
from dnacentersdk.exceptions import MalformedRequest | ||
|
||
|
||
class JSONSchemaValidatorAd96E712F4525A128368B1Bfe3Afc21C(object): | ||
"""AddSSIDToIPPoolMapping request schema definition.""" | ||
def __init__(self): | ||
super(JSONSchemaValidatorAd96E712F4525A128368B1Bfe3Afc21C, self).__init__() | ||
self._validator = fastjsonschema.compile(json.loads( | ||
'''{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"properties": { | ||
"scalableGroupName": { | ||
"type": "string" | ||
}, | ||
"siteNameHierarchy": { | ||
"type": "string" | ||
}, | ||
"ssidNames": { | ||
"items": { | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"vlanName": { | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}'''.replace("\n" + ' ' * 16, '') | ||
)) | ||
|
||
def validate(self, request): | ||
try: | ||
self._validator(request) | ||
except fastjsonschema.exceptions.JsonSchemaException as e: | ||
raise MalformedRequest( | ||
'{} is invalid. Reason: {}'.format(request, e.message) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "dnacentersdk" | ||
version = "2.5.3" | ||
version = "2.5.4" | ||
description = "Cisco DNA Center Platform SDK" | ||
authors = ["Jose Bogarin Solano <[email protected]>", "William Astorga <[email protected]>"] | ||
license = "MIT" | ||
|