Skip to content

Commit

Permalink
Merge pull request #125 from cisco-en-programmability/develop
Browse files Browse the repository at this point in the history
Develop v2.6.8
  • Loading branch information
fmunozmiranda authored Sep 12, 2023
2 parents c0aeb61 + a388d4a commit ec7c17e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
23 changes: 20 additions & 3 deletions dnacentersdk/api/v2_3_3_0/sda.py
Original file line number Diff line number Diff line change
Expand Up @@ -2375,16 +2375,20 @@ 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,
**request_parameters):
"""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.
Expand All @@ -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'),
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <jbogarin@altus.cr>", "William Astorga <wastorga@altus.cr>", "Francisco Muñoz <fmunoz@altus.cr>", "Francisco Muñoz <fmunoz@altus.cr>", "Bryan Vargas <bvargas@altus.cr>"]
license = "MIT"
Expand Down

0 comments on commit ec7c17e

Please sign in to comment.