From 1da3f36e1ed4e290b472a88ba05d45e9e8b52cc1 Mon Sep 17 00:00:00 2001 From: Arrokoth-byte Date: Tue, 12 Sep 2023 13:55:24 -0600 Subject: [PATCH 1/2] Update of add_vn in sdk.py about parameters virtualNetWorkName and siteNameHierarchy --- dnacentersdk/api/v2_3_3_0/sda.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/dnacentersdk/api/v2_3_3_0/sda.py b/dnacentersdk/api/v2_3_3_0/sda.py index 57e639c9..a5b64ee2 100644 --- a/dnacentersdk/api/v2_3_3_0/sda.py +++ b/dnacentersdk/api/v2_3_3_0/sda.py @@ -2375,6 +2375,8 @@ def get_vn(self, return self._object_factory('bpm_cb1fe08692b85767a42b84340c4c7d53_v2_3_3_0', json_data) def add_vn(self, + siteNameHierarchy=None, + virtualNetworkName=None, headers=None, payload=None, active_validation=True, @@ -2382,9 +2384,11 @@ def add_vn(self, """Add virtual network (VN) in SDA Fabric . Args: + siteNameHierarchy(string): SDA's Path of sda Fabric Site . + virtualNetworkName(string): SDA's Virtual Network Name, that is created at Global level . headers(dict): Dictionary of HTTP Headers to send with the Request . - payload(list): A JSON serializable Python object to send in the + payload(dict): A JSON serializable Python object to send in the body of the Request. active_validation(bool): Enable/Disable payload validation. Defaults to True. @@ -2399,9 +2403,11 @@ def add_vn(self, TypeError: If the parameter types are incorrect. MalformedRequest: If the request body created is invalid. ApiError: If the DNA Center cloud returns an error. + Documentation Link: + https://developer.cisco.com/docs/dna-center/#!add-vn """ check_type(headers, dict) - check_type(payload, list) + check_type(payload, dict) if headers is not None: if 'X-Auth-Token' in headers: check_type(headers.get('X-Auth-Token'), @@ -2414,7 +2420,18 @@ def add_vn(self, path_params = { } - _payload = payload or [] + _payload = [ + { + 'virtualNetworkName': + virtualNetworkName, + 'siteNameHierarchy': + siteNameHierarchy, + } + ] + + if payload is not None: + _payload.extend(payload) + if active_validation: self._request_validator('jsd_e3a724a35854758d65a83823c88435_v2_3_3_0')\ .validate(_payload) From a388d4a32b70bd11ad2bc3d06b7e013ab2760f41 Mon Sep 17 00:00:00 2001 From: fmunoz Date: Tue, 12 Sep 2023 15:30:35 -0600 Subject: [PATCH 2/2] ## [2.6.8] - 2023-09-12 - 2_3_3_0 sda sevice `add_vn` method update. --- CHANGELOG.md | 5 ++++- README.rst | 2 +- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1920e518..b41bf620 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [2.6.8] - 2023-09-12 +- 2_3_3_0 sda sevice `add_vn` method update. ## [2.6.7] - 2023-08-25 ### Changed @@ -448,4 +450,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [2.6.5]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.4...v2.6.5 [2.6.6]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.5...v2.6.6 [2.6.7]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.6...v2.6.7 -[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.7...develop +[2.6.8]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.7...v2.6.8 +[Unreleased]: https://github.com/cisco-en-programmability/dnacentersdk/compare/v2.6.8...develop diff --git a/README.rst b/README.rst index 91be6616..7429cd83 100755 --- a/README.rst +++ b/README.rst @@ -158,7 +158,7 @@ The following table shows the supported versions. * - 2.3.3.0 - 2.5.6 * - 2.3.5.3 - - 2.6.7 + - 2.6.8 If your SDK is older please consider updating it first. diff --git a/pyproject.toml b/pyproject.toml index 708bbee2..2b8e38cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "dnacentersdk" -version = "2.6.7" +version = "2.6.8" description = "Cisco DNA Center Platform SDK" authors = ["Jose Bogarin Solano ", "William Astorga ", "Francisco Muñoz ", "Francisco Muñoz ", "Bryan Vargas "] license = "MIT"