Code Monkey home page Code Monkey logo

cloudgenix_config's People

Contributors

ebob9 avatar ktanushree avatar sappojisetty avatar vishwaspg94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cloudgenix_config's Issues

HA Configuration is Failing on First Pass

We're trying to deploy HA configuration for a site. It was working a couple weeks ago. Now when we try to deploy the site and add a device to an HA group with a tracked interface, it fails for the first pass.

Example: We have two devices we are deploying in HA configuration.

Test 1 as follows:

  1. Download yaml with do_site with HA configured. Or generate the yaml based on template.
  2. Deploy the site with do_site.
  3. Failure when Updating Spoke HA for the first device.
  4. Run do_site again with the same yaml and the Spoke HA is successful for the first device. But then error when Updating Spoke HA for the second device.
  5. Run do_site again with the same yaml and the script completes successfully.

Test 2 As follows:

  1. Generate the yaml configuration.
  2. Comment out the device specific HA configuration in the yaml.
  3. Deploy the site with do_site and it works fine.
  4. Uncomment the device specific HA configuration and it works fine this time and site runs fine.

See the capture of the error that is initially generated.

error_capture.txt

Warning message does not specify the site name

While running the pull_site for ALL_SITES the warning messages that pop up do not specify the site name for which the error message is

Example below:

WARNING: Duplicate name vz_mgmt on a Element Extension, renaming to 'vz_mgmt 2'
WARNING: Duplicate name MPLS-OBS on a Waninterface, renaming to 'MPLS-OBS 2'

If there is a Site name before the error message it would be easy to fix the problem

Fail to update Spoke HA config.

Python 3.7.2
cloudgenix==6.0.2b1
cloudgenix-config==1.7.0b1
cloudgenix-idname==2.0.2

Seeing the payload attributes device_profile_id, main_power_usage_threshold, and switch_config not be sent when updating the Spoke HA config. l Causing the failure message INVAILD_JSON_INPUT - Input JSON does not have all required attributes.

Needed to the items to the element_put_items list in the do.py to get it to work.

Removing / Replacing Element Fails When Static Route Is Bound to Interface

Conditions:

  • Static route using an interface
  • Using do_site.py to remove/replace an element

Results:
Un-assigning element (15308817088200246) bound to 15324417818150218.
Removing LAN Networks/WAN Interfaces from controller 1.
Removing LAN Networks/WAN Interfaces from wan 3.
Removing LAN Networks/WAN Interfaces from lan 3.
Removing LAN Networks/WAN Interfaces from wan 1lan 1.
ERROR: Could not strip config from wan 1lan 1:
{
"_error": [
{
"message": "Interface can not be deleted as it is used in static routes with destination prefixes {}",
"code": "INTERFACE_REFERENCED_IN_STATIC_ROUTE"
}
],
"_updated_on_utc": 0,
"_content_length": "321",
"_schema": 0,
"_request_id": "1532540073127012400006604725859333727993",
"_status_code": "400",
"_created_on_utc": 0,
"_etag": 0
}

Certificate verify Failed while logging onto controller

image

Login failed, please try again: {'_error': [{'message': "REST Request Exception: HTTPSConnectionPool(host='api.elcapitan.cloudgenix.com', port=443): Max retries exceeded with url: /v2.0/api/login (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)')))", 'data': {}}]}

Can someone please help in fixing this certificate problem, we recently got Zscaler on our machines by our organization,

Can someone please share command to point the certificate path to use lo Zscaler certificate. I have downloaded and installed it in root ca-certificate.

Loopback bypass handling fails after initial creation.

Returns error:

   Deleting Unconfigured Interface loopback-153626616195701813.
ERROR: Could not delete Interface loopback-153626616195701813: 
REQUEST: DELETE /v4.4/api/tenants/1236/sites/15362657963840245/elements/15362661107690181/interfaces/15362661635760037
REQUEST HEADERS:
	User-Agent: python-requests/2.18.4 (CGX SDK v5.0.1b1)
	Accept-Encoding: gzip, deflate
	Accept: application/json
	Connection: keep-alive
	Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
	Content-Length: 0
REQUEST BODY:
{}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
	Date: Thu, 06 Sep 2018 20:37:03 GMT
	Content-Type: application/json; charset=utf-8
	Content-Length: 262
	Connection: keep-alive
	Server: nginx
	Content-Security-Policy: default-src 'self'
	X-Content-Type-Options: nosniff
	X-Frame-Options: DENY
	X-Permitted-Cross-Domain-Policies: master-only
	X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "258",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1536266222921012400007632345298972051606",
    "_error": [
        {
            "code": "INTERFACE_CONFIG_CONFIGURATION_EXISTS",
            "message": "Interface is configured."
        }
    ]
}
edwards-mbp-pro:Desktop aaron$ ```

WAN network duplicate names are common

Duplicate name detection for WAN Networks are causing issues. Often have two separate WAN networks (Ex: "AT&T" and "AT&T" - one public and one private).

This causes config changes to fail, as duplicate names are ignored on purpose to prevent errors.

WARNING: Lookup value 'Comcast' was seen two or more times. If this object is used in a config template, it cannot be auto-referenced. To use, please remove duplicates in the controller, or reference it explicitly by the actual value: 
[
    {
        "Comcast": "15341953374350239"
    },
    {
        "Comcast": "14994517568370210"
    }
]
WARNING: Lookup value 'Vodafone' was seen two or more times. If this object is used in a config template, it cannot be auto-referenced. To use, please remove duplicates in the controller, or reference it explicitly by the actual value: 
[
    {
        "Vodafone": "15342032488420228"
    },
    {
        "Vodafone": "15342024136460067"
    }
]
No Change for Site New York Branch 1.
ERROR: WAN Interface NYC-Comcast-Broadband(ID: 14998848023590022) config has changed 'network_id'. This is not supported. To change the network_id, please remove the WAN Interface and re-create it with the new network_id in a subsequent run.
{
    "FROM CONFIG": {
        "id": "14998848023590022",
        "_etag": 1,
        "_content_length": "513",
        "_schema": 3,
        "_created_on_utc": 14998848023590022,
        "_updated_on_utc": 14998848023590022,
        "_status_code": "200",
        "_request_id": "1536162877909018400006982058069230764917",
        "_debug": null,
        "_info": null,
        "_warning": null,
        "_error": null,
        "name": "NYC-Comcast-Broadband",
        "description": "",
        "network_id": "Comcast",
        "link_bw_down": 50.0,
        "link_bw_up": 50.0,
        "bw_config_mode": "manual",
        "bfd_mode": "aggressive",
        "label_id": "14992952901570138",
        "lqm_enabled": true,
        "bwc_enabled": true
    },
    "ON CONTROLLER": {
        "id": "14998848023590022",
        "_etag": 1,
        "_content_length": "513",
        "_schema": 3,
        "_created_on_utc": 14998848023590022,
        "_updated_on_utc": 14998848023590022,
        "_status_code": "200",
        "_request_id": "1536162877909018400006982058069230764917",
        "_debug": null,
        "_info": null,
        "_warning": null,
        "_error": null,
        "name": "NYC-Comcast-Broadband",
        "description": "",
        "network_id": "14994517568370210",
        "link_bw_down": 50.0,
        "link_bw_up": 50.0,
        "bw_config_mode": "manual",
        "bfd_mode": "aggressive",
        "label_id": "14992952901570138",
        "lqm_enabled": true,
        "bwc_enabled": true
    }
}

Use the API version number

Use the API version number that is in the YAML file for PUT/POST operations. That way we can upgrade cloudgenix package without impacting old automation templates

Can't put config with security policy set, name to ID fails

ERROR: Site update failed: 
REQUEST: PUT /v4.2/api/tenants/1092/sites/14994517577210142
REQUEST HEADERS:
    User-Agent: python-requests/2.19.1 (CGX SDK v5.0.1b1)
    Accept-Encoding: gzip, deflate
    Accept: application/json
    Connection: keep-alive
    Content-Type: application/json
    Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
    Content-Length: 845
REQUEST BODY:
{
    "id": "14994517577210142",
    "_etag": 9,
    "_content_length": "778",
    "_schema": 2,
    "_created_on_utc": 14994517577210142,
    "_updated_on_utc": 15137895188540004,
    "_status_code": "200",
    "_request_id": "1531940091878018000002419675382375531570",
    "_debug": null,
    "_info": null,
    "_warning": null,
    "_error": null,
    "name": "New York Branch 1",
    "description": null,
    "admin_state": "active",
    "address": {
        "city": "Bronx",
        "country": "United States",
        "post_code": "10452",
        "state": "NY",
        "street": "1 E 161st St",
        "street2": null
    },
    "location": {
        "description": null,
        "latitude": 40.829185485839844,
        "longitude": -73.92875671386719
    },
    "policy_set_id": "14992953109520146",
    "element_cluster_role": "SPOKE",
    "security_policyset_id": "Default ZBFW Policy",
    "service_binding": "15037321773580004",
    "network_policysetstack_id": null,
    "priority_policysetstack_id": null
}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
    Date: Wed, 18 Jul 2018 18:54:52 GMT
    Content-Type: application/json; charset=utf-8
    Content-Length: 271
    Connection: keep-alive
    Server: nginx
    Content-Security-Policy: default-src 'self'
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Permitted-Cross-Domain-Policies: master-only
    X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "267",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1531940091990005000002893459125249473776",
    "_error": [
        {
            "code": "INVALID_SECURITY_POLICYSET",
            "message": "Specified security policyset is not present."
        }
    ]
}```

Bypass Pairs using loopbacks cannot be restored

Trying to clone sites with loopback interfaces in bypass pairs throws the following error:

    "_status_code": "400", 
    "_error": [
        {
            "message": "Site wan interface configuration is not supported by this device software for the specified interface", 
            "code": "INTERFACE_CONFIG_SWI_UNSUPPORTED_ON_DEVICESW"
        }
    ], 
    "_etag": 0, 
    "_updated_on_utc": 0, 
    "_content_length": "342", 
    "_created_on_utc": 0, 
    "_schema": 0, 
    "_request_id": "1535137995410003600004478704255447944746"
}```

Error when trying to run destroy option on site

pip freeze

astroid==2.4.2
certifi==2020.12.5
cffi==1.14.4
chardet==4.0.0
cloudgenix==5.4.3b1
cloudgenix-config==1.3.0b1
colorama==0.4.4
cryptography==3.3.1
idna==2.10
isort==5.7.0
lazy-object-proxy==1.4.3
mccabe==0.6.1
pycparser==2.20
pylint==2.6.0
pyOpenSSL==20.0.1
PyYAML==5.4.1
requests==2.25.1
six==1.15.0
toml==0.10.2
urllib3==1.26.3
websockets==8.1
wrapt==1.12.1

Running on python 3.8.6 for windows

C:\Git\cloudgenix_config>do_site.py US-0002.yml --destroy 
Beginning to DESTROY site US-0002_Vancouver Store(16100479533620038)..
Un-assigning Element US-0002-ION-01(some_serial) bound to 16100479533620038.
 Removing LAN Networks/WAN Interfaces from 3.
 Removing LAN Networks/WAN Interfaces from 1.
 Removing LAN Networks/WAN Interfaces from controller.
 Removing LAN Networks/WAN Interfaces from 4.
 Removing LAN Networks/WAN Interfaces from 2.
 Removing LAN Networks/WAN Interfaces from 5.
 Removing LAN Networks/WAN Interfaces from 5.200.
 Removing LAN Networks/WAN Interfaces from 5.201.
 Removing LAN Networks/WAN Interfaces from 5.203.
 Removing LAN Networks/WAN Interfaces from 5.204.
 Removing LAN Networks/WAN Interfaces from 5.205.
 Removing LAN Networks/WAN Interfaces from 5.206.
 Removing LAN Networks/WAN Interfaces from 5.207.
 Removing LAN Networks/WAN Interfaces from 5.98.
 Removing any leftover Element Security Zones and Spoke HA from US-0002-ION-01:
   Deleting Unconfigured Element Securityzone mapping for Zone 'VPN Zone'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'IDN'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'PCI_LAN'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'Restricted Access'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'Signage'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'Store LANs'.
   Deleting Unconfigured Element Securityzone mapping for Zone 'VLAN 200'.
   No Change for Spoke HA in Element US-0002-ION-01.
 Deleting Unconfigured Waninterface DSR.
ERROR: Could not delete Waninterface DSR: 
REQUEST: DELETE /v2.6/api/tenants/sometenant/sites/16100479533620038/waninterfaces/16100479539560080
REQUEST HEADERS:
        User-Agent: python-requests/2.25.1 (CGX SDK v5.4.3b1)
        Accept-Encoding: gzip, deflate
        Accept: application/json
        Connection: keep-alive
        X-Auth-Token: <SENSITIVE - NOT SHOWN BY DEFAULT>
        Content-Length: 0
REQUEST BODY:
{}
 
RESPONSE: 400 Bad Request
RESPONSE HEADERS:
        Date: Fri, 29 Jan 2021 18:24:39 GMT
        Content-Type: application/json; charset=utf-8
        Content-Length: 286
        Connection: keep-alive
        Server: nginx
        Content-Security-Policy: default-src 'self'
        X-Content-Type-Options: nosniff
        X-Frame-Options: DENY
        X-Permitted-Cross-Domain-Policies: master-only
        X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "0",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1611944679354018900006753890714203099218",
    "_error": [
        {
            "code": "WAN_INTERFACE_CONFIG_IN_ZONE",
            "message": "WAN interface is used in a security zone bound to the site."
        }
    ]
}

To me it looks like the wan interface isnt removed from the security zone binding before a deletion is attempted. Thank you for creating this sweet tool!

Importing cloudgenix_config via other script instantiates an extra sdk instance

Due to line 204 in pull config:
https://github.com/CloudGenix/cloudgenix_config/blob/master/cloudgenix_config/pull.py#L204

And line 306 in do config:
https://github.com/CloudGenix/cloudgenix_config/blob/master/cloudgenix_config/do.py#L306

cloudgenix_config instantiates an extra copy of the SDK. This causes extra warning/line when using non-current versions of SDKs.

Suggest modifying these scripts as follows:

  1. Leave sdk global but set it to None by default.
  2. On function where passed_sdk can be passed, bring GLOBAL sdk variable and instantiate the default SDK only if an sdk is not passed.

Extensions

with extension for device management, if the same source is allowed for ssh and ping, we get the following error.

WARNING: Lookup value 'inboundSSH' was seen two or more times. If this object is used in a config template, it cannot be auto-referenced. To use, please remove duplicates in the controller, or reference it explicitly by the actual value:
[
    {
        "inboundSSH": "15184696736440133"
    },
    {
        "inboundSSH": "15184698272890142"
    }
]
ERROR: Element_extension creation failed:
REQUEST: POST /v2.0/api/tenants/1116/sites/15168123325400185/elements/15180605714660151/extensions
REQUEST HEADERS:
	Connection: keep-alive
	Accept-Encoding: gzip, deflate
	Accept: application/json
	User-Agent: python-requests/2.18.4 (CGX SDK v5.0.1b1)
	Content-Type: application/json
	Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
	Content-Length: 272
REQUEST BODY:
{
    "disabled": false,
    "entity_id": "15180606131290224",
    "namespace": "devicemanagement/interface",
    "name": "inboundSSH",
    "conf": {
        "rules": [
            {
                "action": "ALLOW",
                "app": "SSH",
                "prefix": "104.59.238.208/32"
            },
            {
                "action": "ALLOW",
                "app": "PING",
                "prefix": "104.59.238.208/32"
            }
        ]
    }
}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
	Date: Fri, 20 Jul 2018 02:05:44 GMT
	Content-Type: application/json; charset=utf-8
	Content-Length: 260
	Connection: keep-alive
	Server: nginx
	Content-Security-Policy: default-src 'self'
	X-Content-Type-Options: nosniff
	X-Frame-Options: DENY
	X-Permitted-Cross-Domain-Policies: master-only
	X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_warning": [
        {
            "message": "\"Resource already exists.\"",
            "code": "INVALID_REQUEST_DUPLICATE_KEY"
        }
    ],
    "_updated_on_utc": 0,
    "_content_length": "256",
    "_schema": 0,
    "_request_id": "1532052344251003200007944648036737902390",
    "_status_code": "400",
    "_created_on_utc": 0,
    "_etag": 0
}

AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'

Steps

  • Download the zip with all files from Github
  • Extract the files
  • Run do_site

./do_site.py ~/sdwan-scripts/DC-12.yml --controller https://api.sugarloaf.cloudgenix.com

Traceback (most recent call last):
  File "/home/username/cloudgenix_config-master/./do_site.py", line 2, in <module>
    from cloudgenix_config.do import go
  File "/home/username/cloudgenix_config-master/cloudgenix_config/__init__.py", line 38, in <module>
    from cloudgenix import jdout, jdout_detailed
  File "/home/username/.local/lib/python3.10/site-packages/cloudgenix/__init__.py", line 301, in <module>
    class API(object):
  File "/home/username/.local/lib/python3.10/site-packages/cloudgenix/__init__.py", line 628, in API
    method_whitelist=urllib3.util.retry.Retry.DEFAULT_METHOD_WHITELIST, status_forcelist=None,
AttributeError: type object 'Retry' has no attribute 'DEFAULT_METHOD_WHITELIST'

SubIf Creation

Hello,

I am trying to bulk configure multiple IONs. I have configured a model ION device and pulled its configuration now I am trying to modify its contents to a new site and trying to "do_site" with different site name. My configuration involves sub-interfaces which means the configuration has to be added to the remote ION and that where the exception is occurring (in my view):

ERROR: Interface update failed: 
REQUEST: PUT /v4.11/api/tenants/21633424124/sites/16474963306150041/elements/16474838470100020/interfaces/16475000599790177
REQUEST HEADERS:                                                                                                           
        User-Agent: python-requests/2.25.1 (CGX SDK v5.6.1b2)                                                              
        Accept-Encoding: gzip, deflate                                                                                     
        Accept: application/json                                                                                           
        Connection: keep-alive                                                                                             
        Content-Type: application/json                                                                                     
        Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"                                                            
        Content-Length: 2435                                                                                               
REQUEST BODY:                                                                                                              
{                                                                                                                          
    "id": "16475000599790177",                                                                                             
    "_etag": 1,                                                                                                            
    "_content_length": "0",                                                                                                
    "_schema": 4,                                                                                                          
    "_created_on_utc": 16475000599790177,                                                                                  
    "_updated_on_utc": 16475000599790177,                                                                                  
    "_status_code": "200",                                                                                                 
    "_request_id": "1647507637107012999998124337308457436260",                                                             
    "_debug": null,
    "_info": null,
    "_warning": null,
    "_error": null,
    "name": "4.101",
    "description": "SERVER-VLAN",
    "type": "subinterface",
    "attached_lan_networks": null,
    "site_wan_interface_ids": null,
    "mac_address": null,
    "mtu": 0,
    "ipv4_config": {
        "dhcp_config": null,
        "dns_v4_config": {
            "name_servers": [
                "172.25.1.10",
                "172.25.1.55"
            ]
        },
        "routes": null,
        "static_config": {
            "address": "10.5.57.1/24"
        },
        "type": "static"
    },
    "dhcp_relay": null,
    "ethernet_port": {
        "full_duplex": false,
        "speed": 0
    },
    "admin_up": true,
    "nat_address": null,
    "nat_port": 0,
    "used_for": "lan",
    "bound_interfaces": null,
    "sub_interface": {
        "native_vlan": false,
        "vlan_id": 101
    },
    "pppoe_config": null,
    "parent": "16474840768660167",
    "network_context_id": "CORPORATE",
    "bypass_pair": null,
    "service_link_config": null,
    "scope": "global",
    "tags": null,
    "nat_zone_id": null,
    "devicemgmt_policysetstack_id": null,
    "nat_pools": null,
    "directed_broadcast": false,
    "ipfixcollectorcontext_id": null,
    "ipfixfiltercontext_id": null,
    "secondary_ip_configs": null,
    "static_arp_configs": null,
    "cellular_config": null,
    "multicast_config": {
        "igmp_version": "IGMPV3",
        "multicast_enabled": false
    },
    "4.102": {
        "admin_up": true,
        "attached_lan_networks": null,
        "bound_interfaces": null,
        "bypass_pair": null,
        "cellular_config": null,
        "description": "DATA-VLAN",
        "devicemgmt_policysetstack_id": null,
        "dhcp_relay": null,
        "directed_broadcast": false,
        "ethernet_port": {
            "full_duplex": false,
            "speed": 0
        },
        "ipfixcollectorcontext_id": null,
        "ipfixfiltercontext_id": null,
        "ipv4_config": {
            "dhcp_config": null,
            "dns_v4_config": {
                "name_servers": [
                    "172.25.1.10",
                    "172.25.1.55"
                ]
            },
            "routes": null,
            "static_config": {
                "address": "10.5.58.1"
            },
            "type": "static"
        },
        "mac_address": null,
        "mtu": 0,
        "multicast_config": {
            "igmp_version": "IGMPV3",
            "multicast_enabled": false
        },
        "nat_address": null,
        "nat_pools": null,
        "nat_port": 0,
        "nat_zone_id": null,
        "network_context_id": "CORPORATE",
        "parent": "4",
        "pppoe_config": null,
        "scope": "global",
        "secondary_ip_configs": null,
        "service_link_config": null,
        "site_wan_interface_ids": null,
        "static_arp_configs": null,
        "sub_interface": {
            "native_vlan": false,
            "vlan_id": 102
        },
        "tags": null,
        "type": "subinterface",
        "used_for": "lan"
    }
}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
        Date: Thu, 17 Mar 2022 09:00:37 GMT
        Content-Length: 293
        Connection: keep-alive
        Server: nginx
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "0",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1647507637293009400005118138606181728337",
    "_error": [
        {
            "code": "INVALID_JSON_EXTRA_ATTRIBUTE",
            "message": "\"Input JSON has attribute not recognized by the current schema.\""
        }
    ]
}

Is there a way to add interfaces using this script or is there another workflow script for this?

Can not enable l3 lan forwarding when private L2 interface in use

Recently, configuring a new, out of the box ION 2000 results in an error code CANNOT_ENABLE_L3_LAN_FORWARDING_WHEN_PRIVATE_L2_INTERFACE_IN_USE

cloudgenix_config will attempt to set the element configuring the interfaces. An out of the box ION 2000 has ports 4 and 5 configured in a Bypass Pair with a port type of Private L2. Having an interface configured as Private L2 now causes the API to return an error when setting l3_lan_forwarding to true in the element configuration.

While it would be possible to change the bypass pair to something other than Private L2 before running do_site, I believe it is unexpected behavior for the provisioning to fail due to the order of operations being in such a way that now causes the API to return an error during the provisioning process.

To reproduce:

Generate a yaml config that sets l3_direct_private_wan_forwarding and l3_lan_forwarding to true under the element configuration and then attempt to apply that configuration to a new ION 2000. Even though none of the elements interfaces will be configured to be used for Private L2, the do_site tool will attempt to set the l3_lan_forwarding to true before removing the default Private L2 configuration from the bypass pair.

cloudgenix_config does not work with forthcoming 5.1.1RC1 SDK

Using 5.1.1RC1 SDK:

Output:

No Change for Site AUTOMATION-LAB.
 No Change for Waninterface AUTO-INT.
 No Change for Waninterface AUTO-INT 2.
 No Change for Waninterface Circuit to Verizon-MPLS.
 No Change for Lannetwork VLAN_23.
 No Change for Lannetwork VLAN_24.
 No Change for Lannetwork VLAN_25.
 No Change for Lannetwork VLAN_26.
 Element: Changing element from  to 4.7.1-b22.
  Element 15391033241090227 not yet at requested image:  (is ). Waited so far 0 seconds out of 600.```

Config never succeeds.

Failure to apply network_context_id on subinterface

Appears to be an issue with applying a network context on subinterfaces.

A site pulled with pull_site.py correctly shows the subinterface by its friendly name:

wan 1lan 1.2042:
... #config omitted
  network_context_id: Guest

On application of do_site.py, the network_context_id is removed from the subinterface.

Log output, do_site.py when applying already configured friendly network_context_id name:

DEBUG: INTERFACE DIFF: ipv4_config->ethernet_port->sub_interface :
 -  network_context_id  :  15156366995910130
 +  network_context_id  :  Guest

The above context id and friendly name refer to the same thing, so it should not even attempt to change it, in this instance. When I look at the subinterface configuration after this, the network_context_id is not set.

If I change the network_context_id in the template to its numeric identifier, then it correctly preserves (if already configured), or sets(if not configured) the context on the subinterface.

e.g. This correctly sets the network_context to the "Guest" context:

wan 1lan 1.2042:
...
  network_context_id: "15156366995910130"

Pull_site error

I am using a pull_site command to back up the latest config a CloudGenix site. Lately that script does not work or at least it not working for some of my colleagues. Would support have some information about this and has this command change?

Here is the output as an example.

PS C:\cloudgenix> pull_site -S "AM529 - Gallatin TN Nitrogen PSA Plant" --output AM529.yaml
WARNING: Duplicate name SolarWinds on a Element Extension@AM529 - Gallatin TN Nitrogen PSA Plant(16116015242200089), renaming to 'SolarWinds 2'
ERROR: Application probe get failed:
REQUEST: GET /v2.0/api/tenants/1324/sites/16116015242200089/elements/16110063940720086/application_probe
REQUEST HEADERS:
User-Agent: python-requests/2.24.0 (CGX SDK v5.4.3b1)
Accept-Encoding: gzip, deflate
Accept: application/json
Connection: keep-alive
X-Auth-Token: <SENSITIVE - NOT SHOWN BY DEFAULT>
REQUEST BODY:
{}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
Date: Tue, 23 Mar 2021 17:33:10 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 319
Connection: keep-alive
Server: nginx
Content-Security-Policy: default-src 'self'
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: master-only
X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
"_etag": 0,
"_content_length": "0",
"_schema": 0,
"_created_on_utc": 0,
"_updated_on_utc": 0,
"_status_code": "400",
"_request_id": "1616520790413000000005818506370139268470",
"_error": [
{
"code": "APPLICATION_PROBE_CONFIG_UNSUPPORTED_SWVERSION",
"message": "Element software version does not support application probe configuration."
}
]
}
Traceback (most recent call last):
File "C:\Users\inagank\AppData\Local\Programs\Python\Python38-32\Scripts\pull_site-script.py", line 11, in
load_entry_point('cloudgenix-config==1.3.0b2', 'console_scripts', 'pull_site')()
File "c:\users\inagank\appdata\local\programs\python\python38-32\lib\site-packages\cloudgenix_config\pull.py", line 1731, in go
pull_config_sites(args['sites'], filename, output_multi=multi_output, normalize=normalize,
File "c:\users\inagank\appdata\local\programs\python\python38-32\lib\site-packages\cloudgenix_config\pull.py", line 1473, in pull_config_sites
_pull_config_for_single_site(val.strip())
File "c:\users\inagank\appdata\local\programs\python\python38-32\lib\site-packages\cloudgenix_config\pull.py", line 1319, in pull_config_for_single_site
throw_error("Application probe get failed: ", response)
File "c:\users\inagank\appdata\local\programs\python\python38-32\lib\site-packages\cloudgenix_config_init
.py", line 137, in throw_error
raise CloudGenixConfigError(message)
cloudgenix_config.CloudGenixConfigError: Application probe get failed:

do_site fails to decouple bypasspair on ION 3000

I've been attempting to find a way to decouple a bypass pair during the run of do_site.py.

I did a pull_site on an Site that I want to use as a template for deploying additional sites. In our configuration we uncouple the wan 3lan 3 bypass pair to use lan 3 as a dhcp server. YAML configuration pulled with pull_site.py has no configuration for the bypasspair wan 3lan 3. It has individual configuration for lan 3, and wan 3.

A default configured ION3000 has wan 3lan 3 coupled, so would expect do_site targeting said device to successfully decouple said bypasspair given the YAML template made from the above configuration.

It looks to me like when there's no provided wan 3lan 3 configuration, that it attempts to set a default configuration, but there is an issue in the default configuration that sets "type" to "port", which is invalid for a bypasspair. Would expect, based on tracing GUI behavior of decoupling that it would HTTP DELETE to the bypasspair endpoint, which looks to be what decouples the interfaces.

Receive this error:

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
        Date: Wed, 10 Aug 2022 18:59:55 GMT
        Content-Length: 336
        Connection: keep-alive
        Server: nginx
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "0",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1660157995054012799993096857044812616835",
    "_error": [
        {
            "code": "INTERFACE_CONFIG_INVALID_INTERFACE_TYPE_UPDATE_NOT_ALLOWED",
            "message": "Invalid interface config. Interface type bypasspair cannot be modified to port."
        }
    ]

Easy to Reproduce

  1. Decouple bypasspair (wan 3lan 3 in my case), through the GUI,
  2. Run pull_site.py, targeting this site
  3. Couple the bypasspair through GUI.
  4. Run do_site, targeting this exact same site, using the configuration pulled in step 2.
  5. Should result in the error above.

Verbose 2 output... Verbose 3 crashes: (scrubbed sensitive info):

 Element: Code is at correct version 5.6.5-b16.
  No Change for Element MERIONX3001.
   Setting Bypasspair wan 3lan 3 to default.
ERROR: Interface update failed: 
REQUEST: PUT /v4.11/api/tenants/XXXX/sites/XXXXXXXXXXXXX/elements/XXXXXXXXXXXXXX/interfaces/XXXXXXXXXXXXXXX
REQUEST HEADERS:
        User-Agent: python-requests/2.28.1 (CGX SDK v5.6.1b2)
        Accept-Encoding: gzip, deflate
        Accept: application/json
        Connection: keep-alive
        X-Auth-Token: <SENSITIVE - NOT SHOWN BY DEFAULT>
        Content-Type: application/json
        Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
        Content-Length: 1104
REQUEST BODY:
{
    "id": "XXXXXXXXXXXXXXXX",
    "_etag": 1,
    "_content_length": "0",
    "_schema": 4,
    "_created_on_utc": 16601579802350106,
    "_updated_on_utc": 16601579802350106,
    "_status_code": "200",
    "_request_id": "1660158836670002499998246869148421731882",
    "_debug": null,
    "_info": null,
    "_warning": null,
    "_error": null,
    "name": "wan 3lan 3",
    "description": null,
    "type": "port",
    "attached_lan_networks": null,
    "site_wan_interface_ids": null,
    "mac_address": null,
    "mtu": 1500,
    "ipv4_config": null,
    "dhcp_relay": null,
    "ethernet_port": {
        "full_duplex": false,
        "speed": 0
    },
    "admin_up": true,
    "nat_address": null,
    "nat_port": 0,
    "used_for": "none",
    "bound_interfaces": null,
    "sub_interface": null,
    "pppoe_config": null,
    "parent": null,
    "network_context_id": null,
    "bypass_pair": null,
    "service_link_config": null,
    "scope": "local",
    "tags": null,
    "nat_zone_id": null,
    "devicemgmt_policysetstack_id": null,
    "nat_pools": null,
    "directed_broadcast": false,
    "ipfixcollectorcontext_id": null,
    "ipfixfiltercontext_id": null,
    "secondary_ip_configs": null,
    "static_arp_configs": null,
    "cellular_config": null,
    "multicast_config": null
}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
        Date: Wed, 10 Aug 2022 19:13:56 GMT
        Content-Length: 336
        Connection: keep-alive
        Server: nginx
RESPONSE DATA:
{
    "_etag": 0,
    "_content_length": "0",
    "_schema": 0,
    "_created_on_utc": 0,
    "_updated_on_utc": 0,
    "_status_code": "400",
    "_request_id": "1660158836804004699996670444739754992054",
    "_error": [
        {
            "code": "INTERFACE_CONFIG_INVALID_INTERFACE_TYPE_UPDATE_NOT_ALLOWED",
            "message": "Invalid interface config. Interface type bypasspair cannot be modified to port."
        }
    ]
}

Running pull_site from PIP install returns error

output below:

edwards-mbp-pro:cloudgenix_config aaron$ pull_site 
Traceback (most recent call last):
  File "/usr/local/bin/pull_site", line 7, in <module>
    from cloudgenix_config import go
ImportError: cannot import name 'go'
edwards-mbp-pro:cloudgenix_config aaron$ 

Can't change WAN Network on WAN Interface

Throws error:

ERROR: Waninterface update failed: 
REQUEST: PUT /v2.1/api/tenants/10006/sites/15311892298400041/waninterfaces/15315078391780064
REQUEST HEADERS:
	Connection: keep-alive
	Accept-Encoding: gzip, deflate
	Accept: application/json
	User-Agent: python-requests/2.18.4 (CGX SDK v5.0.1b1)
	X-Auth-Token: <SENSITIVE - NOT SHOWN BY DEFAULT>
	Content-Type: application/json
	Cookie: AWSALB=JsE2suhMvJJLDCX68rRRTwc7vG4IV8eJ0A1/14LzP21lQbqORAk+13Ah6UoXp/s5CSZ39B85VWvmYQudpCbsLTFeCsfpjnaE5YDKZeN9MZUq9oD65vdXqw0kvuif
	Content-Length: 560
REQUEST BODY:
{
    "_content_length": "514", 
    "_schema": 3, 
    "id": "15315078391780064", 
    "_warning": null, 
    "_debug": null, 
    "_updated_on_utc": 15315080107370241, 
    "bwc_enabled": true, 
    "label_id": "14870321015840059", 
    "_status_code": "200", 
    "description": null, 
    "link_bw_up": 10.0, 
    "_request_id": "1531927862067003699999460185223318477766", 
    "link_bw_down": 30.0, 
    "bfd_mode": "aggressive", 
    "lqm_enabled": true, 
    "bw_config_mode": "manual", 
    "name": "Circuit to Megapath", 
    "_error": null, 
    "network_id": "14897856564230025", 
    "_info": null, 
    "_created_on_utc": 15315078391780064, 
    "_etag": 3
}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
	Date: Wed, 18 Jul 2018 15:31:02 GMT
	Content-Type: application/json; charset=utf-8
	Content-Length: 277
	Connection: keep-alive
	Set-Cookie: AWSALB=FJLgChrhv9ceDTENTKYr802YbR5DCzpQaSSQHuamol4QnqeioMPUs3B+KGDGwT8yMfyztodM9Rd6iW7sv8jlXrfQY/P/DDztl1i9U3K/UfESxTpSKq+yNA1L5UtL; Expires=Wed, 25 Jul 2018 15:31:02 GMT; Path=/
	Server: nginx
	Content-Security-Policy: default-src 'self'
	X-Content-Type-Options: nosniff
	X-Frame-Options: DENY
	X-Permitted-Cross-Domain-Policies: master-only
	X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_error": [
        {
            "message": "WANINTERFACE_CONFIG_INVALID_NETWORK_ID", 
            "code": "WANINTERFACE_CONFIG_INVALID_NETWORK_ID"
        }
    ], 
    "_updated_on_utc": 0, 
    "_content_length": "273", 
    "_schema": 0, 
    "_request_id": "1531927862095008500003942214959372913327", 
    "_status_code": "400", 
    "_created_on_utc": 0, 
    "_etag": 0
}
edwards-mbp-pro:config_export_import aaron$```

do.py unable to parse an interface with multiple `nat_pools` entries

When a device interface is defined and contains multiple nat_pool entries do.py errors out as shown below. This occurs on both new interfaces and existing interfaces where the nat_pool entries are being modified.

Traceback

The yaml definition which triggers this is shown below.

          '1.23':
            ...
            nat_pools:
            - ipv4_ranges:
              - end: 1.1.1.1
                start: 1.1.1.9
              nat_pool_id: Example Pool ID 1
            - ipv4_ranges:
              - end: 2.2.2.1
                start: 2.2.2.9
              nat_pool_id: Example Pool ID 2

Reviewing the traceback you can see the function name_lookup_in_template param template expects a dictionary but is receiving a list.

name_lookup_in_template

do_site --destroy throws errors when destroying site level Security Zones

With an HA site configured and trying to destroy the site.

Deleting Unconfigured Waninterface xxxxxx:121212.
ERROR: Could not delete Waninterface xxxxxx:121212:
REQUEST: DELETE /v2.3/api/tenants/xxxx/sites/15675566054280216/waninterfaces/15675566066210036
REQUEST HEADERS:
User-Agent: python-requests/2.22.0 (CGX SDK v5.1.1b1)
Accept-Encoding: gzip, deflate
Accept: application/json
Connection: keep-alive
Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
Content-Length: 0
REQUEST BODY:
{}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
Date: Wed, 04 Sep 2019 02:33:22 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 286
Connection: keep-alive
Server: nginx
Content-Security-Policy: default-src 'self'
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: master-only
X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
"_etag": 0,
"_content_length": "0",
"_schema": 0,
"_created_on_utc": 0,
"_updated_on_utc": 0,
"_status_code": "400",
"_request_id": "1567564402316018799990912935143175275483",
"_error": [
{
"code": "WAN_INTERFACE_CONFIG_IN_ZONE",
"message": "WAN interface is used in a security zone bound to the site."
}
]
}

Controller 2 config not available for code version 5.2.1

When doing pull_site it does not return the controller 2 config for an element that has version 5.2.1. When trying to add the controller 2 interface in the yaml file and doing a do_site,it throws a warning starting the controller 2 port cannot be configured.

----Output Snipped------------
Element: Code is at correct version 5.2.1-b7.
No Change for Element Budapest-CG02.
No Change for Interface wan 1lan 1.
No Change for Interface wan 2lan 2.
No Change for Interface wan 4lan 4.
No Change for Interface controller 1.
No Change for Interface internet 1.
No Change for Interface internet 2.
No Change for Interface internet bypass 1.
No Change for Interface internet bypass 2.
No Change for Interface lan 3.
No Change for Interface wan 3.
WARNING: Interface controller 2 is not configurable.
No Change for Spoke HA in Element Device-CG.
No Change for BGP Global Config 1580396519671111.
No Change for BGP Peer VZB-MPLS.
No Change for Ntp default.
No Change for Toolkit 1580394003591111.
No Change for Site LAB state (active).
DONE
----Output Snipped------------

Error when running pull site using latest build

Fresh python 3.6.9 venv, running the latest SDK
When running the pull site script, here is the output

(cgx-venv-5-2-1) julio@lab2:~/cgx-5-2-1/cloudgenix_config$ python3 pull_site.py -S "Test A" --output ./sites/Test-A.yaml
controller login: [email protected]
controller password:
Traceback (most recent call last):
  File "pull_site.py", line 5, in <module>
    go()
  File "/home/julio/cgx-5-2-1/cloudgenix_config/cloudgenix_config/pull.py", line 1624, in go
    no_header=args['no_header'])
  File "/home/julio/cgx-5-2-1/cloudgenix_config/cloudgenix_config/pull.py", line 1369, in pull_config_sites
    _pull_config_for_single_site(val.strip())
  File "/home/julio/cgx-5-2-1/cloudgenix_config/cloudgenix_config/pull.py", line 752, in _pull_config_for_single_site
    site_natlocalprefixes = response.cgx_content['items']
KeyError: 'items'
(cgx-venv-5-2-1) julio@lab2:~/cgx-5-2-1/cloudgenix_config$

Create of new bypasspair with new loopback interface does not complete

Output below:

 Updated Waninterface Circuit to Comcast (Etag 1 -> 2).
 Updated Waninterface Circuit to AT&T Wireless (Etag 4 -> 5).
 Updated Waninterface Circuit to Verizon (Etag 1 -> 2).
 No Change for Lannetwork 12.
 No Change for Lannetwork 34.
 No Change for Lannetwork 56.
 No Change for Lannetwork 78.
 No Change for Lannetwork 910.
 No Change for Lannetwork 11.
 No Change for Lannetwork 12.
 No Change for Lannetwork 13.
 Serial 20-004006-1111 is not CLAIMED, attempting to claim..
 Checking 20-004006-111..
  Unclaimed(allocated). Beginning Claim process..
  ION 20-004006-8774 still claiming, waited so far 0 seconds out of 600.
  ION 20-004006-8774 still claiming, waited so far 10 seconds out of 600.
  ION 20-004006-8774 still claiming, waited so far 20 seconds out of 600.
 Claimed. Continuing..
 Element: Changing element from 4.4.1-b47 to 4.5.3-b17.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b35). Waited so far 0 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b35). Waited so far 10 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 20 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 30 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 40 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 50 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 60 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 70 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 80 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 90 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 100 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 110 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 120 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 130 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 140 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 150 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 160 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 170 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 180 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 190 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 200 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 210 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 220 seconds out of 600.
  Element 15321123755110029 not yet at requested image: 4.5.3-b17 (is 4.4.3-b14). Waited so far 230 seconds out of 600.
  Assigning Element 15321123755110029.
  Element 15321123755110029 not yet in requested state(s): bound (is bound_in_progress). Waited so far 0 seconds out of 600.
   Updated Interface 45 (Etag 3 -> 4).
   Setting Bypasspair parents for 3loopback-15239809476940036 to default.
   Updated Interface 3 (Etag 3 -> 4).
ERROR: Unable to retrieve interface:
REQUEST: GET /v4.4/api/tenants/0000/sites/15204788184610066/elements/15321123755110029/interfaces/loopback-15239809476940036
REQUEST HEADERS:
    Connection: keep-alive
    Accept-Encoding: gzip, deflate
    Accept: application/json
    User-Agent: python-requests/2.18.4 (CGX SDK v5.0.1b1)
    Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
REQUEST BODY:
{}
RESPONSE: 404 Not Found
RESPONSE HEADERS:
    Date: Fri, 20 Jul 2018 18:51:06 GMT
    Content-Length: 0
    Connection: keep-alive
    Server: nginx
    Content-Security-Policy: default-src 'self'
    X-Content-Type-Options: nosniff
    X-Frame-Options: DENY
    X-Permitted-Cross-Domain-Policies: master-only
    X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{}```

Unable to apply description changes to VPN Interfaces

The only changes that were made were to the descriptions on the 3rd Party VPN interfaces. When attempting to post those changes back received an error.

No Change for Site Dublin Lab.
 Updated Waninterface Circuit to LTE1 (Etag 2 -> 3).
 Updated Waninterface Circuit to LTE2 (Etag 2 -> 3).
 Updated Waninterface Circuit to MPLS (Etag 1 -> 2).
 No Change for Lannetwork default_dublin-lab_174985983.
 No Change for Dhcpserver for 10.255.254.0/24.
 Element: Code is at correct version 4.7.1-b15.
  No Change for Element Dub-Lab-ION3K-1.
   Deleting Unconfigured Interface internet 1internet bypass 1.
ERROR: Could not delete Interface internet 1internet bypass 1: 
REQUEST: DELETE /v4.4/api/tenants/1233/sites/15307267734150011/elements/15314974716520138/interfaces/15314976797550090
REQUEST HEADERS:
	Connection: keep-alive
	Accept-Encoding: gzip, deflate
	Accept: application/json
	User-Agent: python-requests/2.18.4 (CGX SDK v5.0.1b1)
	Cookie: AUTH_TOKEN="<SENSITIVE - NOT SHOWN BY DEFAULT>"
	Content-Length: 0
REQUEST BODY:
{}

RESPONSE: 400 Bad Request
RESPONSE HEADERS:
	Date: Wed, 18 Jul 2018 16:40:25 GMT
	Content-Type: application/json; charset=utf-8
	Content-Length: 262
	Connection: keep-alive
	Server: nginx
	Content-Security-Policy: default-src 'self'
	X-Content-Type-Options: nosniff
	X-Frame-Options: DENY
	X-Permitted-Cross-Domain-Policies: master-only
	X-XSS-Protection: 1; mode=block
RESPONSE DATA:
{
    "_error": [
        {
            "message": "Interface is configured.", 
            "code": "INTERFACE_CONFIG_CONFIGURATION_EXISTS"
        }
    ], 
    "_updated_on_utc": 0, 
    "_content_length": "258", 
    "_schema": 0, 
    "_request_id": "1531932024956013100006687349340366597599", 
    "_status_code": "400", 
    "_created_on_utc": 0, 
    "_etag": 0
}

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Upon further inspect it looks like the pull_site.py did NOT capture the original "internet 1internet bypass 1" configuration. I have attached the config.yml.

NTP configs are not applying

  File "./do_site.py", line 6, in <module>
    go()
  File "/Users/richardgallagher/PycharmProjects/cloudgenix_config_5.2.1/cloudgenix_config/do.py", line 7732, in go
    do_site(loaded_config, destroy, declaim=declaim)
  File "/Users/richardgallagher/PycharmProjects/cloudgenix_config_5.2.1/cloudgenix_config/do.py", line 7241, in do_site
    ntp_id = create_ntp(config_ntp_record, interfaces_n2id, site_id, element_id)
  File "/Users/richardgallagher/PycharmProjects/cloudgenix_config_5.2.1/cloudgenix_config/do.py", line 4835, in create_ntp
    ntp_resp = sdk.post.ntp(element_id, ntp_template)
AttributeError: 'PostWrapper' object has no attribute 'ntp'```

do_site --destroy throws error when encountering HA Config

I have an HA site configured. When trying to issue do_site --destroy the following error is thrown. I can perform workaround by deleteing the HA group and the Site level security zones and rerun the --destroy and it will work.

Removing LAN Networks/WAN Interfaces from lan 2.27.
Deleting Unconfigured Staticroute 15675653945700060.
Deleting Unconfigured Staticroute 15675653963690100.
ERROR: Could not unbind element LNWO6-SDW-A:
{
"_etag": 0,
"_content_length": "0",
"_schema": 0,
"_created_on_utc": 0,
"_updated_on_utc": 0,
"_status_code": "400",
"_request_id": "1567565934025014899994567113533932001939",
"_error": [
{
"code": "ELEMENT_SPOKE_CLUSTER_MEMBER",
"message": "Element cannot be unbound from the site. Element is attached to a Spoke Cluster."
}
]
}
(env) krispeters-ltm3:SDWAN kris.peterson$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.