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

It is not possible to create a global pool with network_settings.create_global_pool #60

Closed
2 tasks done
nextnoob opened this issue Jul 12, 2022 · 3 comments
Closed
2 tasks done

Comments

@nextnoob
Copy link

nextnoob commented Jul 12, 2022

Prerequisites

  • Have you tested the operation in the API directly?

Yes →

Example Payload:

{
    "settings": { 
        "ippool": [ 
            { 
                "ipPoolName": "TestPool", 
                "type": "Generic", 
                "ipPoolCidr": "10.253.0.0/20",
                "IpAddressSpace": "IPv4"
            }
        ] 
    }
}
  • Do you have the latest SDK version?
pip show dnacentersdk
Name: dnacentersdk
Version: 2.5.0
Summary: Cisco DNA Center Platform SDK
Home-page: https://dnacentersdk.readthedocs.io/en/latest/
Author: Jose Bogarin Solano
Author-email: jbogarin@altus.cr
License: MIT
Location: c:\users\user1\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages
Requires: fastjsonschema, future, requests, requests-toolbelt
Required-by: 

Describe the bug

Class: classNetworkSettings
Function: create_global_pool(settings=None, headers=None, payload=None, active_validation=True, **request_parameters)

The parameter "IpAddressSpace" in the payload does not allow valid values. This is apparently due to the validator.

Error message:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/dnacentersdk/models/validators/v2_3_3_0/jsd_eecf4323cb285985be72a7e061891059.py", line 97, in validate
    self._validator(request)
  File "<string>", line 37, in validate
fastjsonschema.exceptions.JsonSchemaValueException: data.settings.ippool[0].IpAddressSpace must be one of ['IPv6 or IPv4']

When I adjust the validator, the API call works.

"IpAddressSpace": {
    "enum": [
        "IPv6",   
        "IPv4"
    ]

Expected behavior
"IPv4" or "IPv6" should be accepted as value for "IpAddressSpace".

Screenshots
CreateIPPool1
CreateIPPool2
CreateIPPool3

Environment (please complete the following information):

  • Cisco DNA Center Version and patch: Version 2.2.3.5
  • Python version: Python 3.10.5
  • SDK version: 2.5.0
  • OS Version: Python:3 Docker Container

Additional context

Thanks for maintaining the very good SDK 😊

@bvargasre
Copy link
Collaborator

Hi @nextnoob, thanks for report, we will work on it.

@bvargasre
Copy link
Collaborator

Hi @nextnoob, dnacentersdk has been updated to version 2.5.1, so try this new version and tell me if it works.

@nextnoob
Copy link
Author

Hi @bvargasre ,

it works perfectly. Thanks for the quick implementation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants