Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ The CloudGenix Config Utility will default to using the SDK version. An out-of-d
#### Version
| Version | Build | Changes |
| ------- | ----- | ------- |
| **1.6.0** | **b2** | Minor bug fixes |
| **1.6.0** | **b3** | Hot fix for CGESC-601. Setting address_family as ipv4 for staticroutes |
| | **b2** | Minor bug fixes |
| | **b1** | Support for CloudGenix SDK 5.6.1b2, cellular devices, multicast, apiversion flag in cli, bugfixes
| **1.5.0** | **b2** | Back ported fix for CGCBL-847 - updated used_for (private_wan to private) in default_interfaces|
| | **b1** | Removed mandatory 480 seconds delay (workaround for CGSDW-799) after claiming ION|
Expand Down
4 changes: 2 additions & 2 deletions cloudgenix_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Configuration IMPORT/EXPORT common functions

**Version:** 1.6.0b2
**Version:** 1.6.0b3

**Author:** CloudGenix

Expand Down Expand Up @@ -49,7 +49,7 @@


# Version for reference
__version__ = "1.6.0b2"
__version__ = "1.6.0b3"
version = __version__

__author__ = "CloudGenix Developer Support <developers@cloudgenix.com>"
Expand Down
2 changes: 1 addition & 1 deletion cloudgenix_config/default_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Configuration IMPORT/EXPORT default device port configurations

**Version:** 1.6.0b2
**Version:** 1.6.0b3

**Author:** CloudGenix

Expand Down
84 changes: 78 additions & 6 deletions cloudgenix_config/do.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Configuration IMPORT worker/script

**Version:** 1.6.0b2
**Version:** 1.6.0b3

**Author:** CloudGenix

Expand Down Expand Up @@ -137,7 +137,7 @@
FILE_TYPE_REQUIRED = "cloudgenix template"
FILE_VERSION_REQUIRED = "1.0"
SDK_VERSION_REQUIRED = '5.6.1b2'
CONFIG_VERSION_REQUIRED = '1.6.0b2'
CONFIG_VERSION_REQUIRED = '1.6.0b3'
DEFAULT_WAIT_MAX_TIME = 600 # seconds
DEFAULT_WAIT_INTERVAL = 10 # seconds
DEFAULT_ELEM_CONFIG_INTERVAL = 0 # seconds
Expand Down Expand Up @@ -1830,7 +1830,16 @@ def unbind_elements(element_id_list, site_id, declaim=False, version=None):
id2n=element_securityzones_id2zoneid)

# Remove static routes from device.
static_routes_resp = sdk.get.staticroutes(site_id, element_item_id)
#
# HotFix for Static Route Issue: Begin
#
static_routes_resp = sdk.get.staticroutes(site_id, element_item_id,api_version="v2.2")
#
# HotFix for Static Route Issue: End
#

# Uncomment to remove
#static_routes_resp = sdk.get.staticroutes(site_id, element_item_id)

if not static_routes_resp.cgx_status:
throw_error("Could not get list of element {0} static routes: ".format(element_item_name),
Expand Down Expand Up @@ -4394,6 +4403,18 @@ def create_staticroute(config_staticroute, interfaces_n2id, site_id, element_id,
local_debug("STATICROUTE TEMPLATE: " + str(json.dumps(staticroute_template, indent=4)))

# create staticroute
#
# HotFix for Static Route Issue: Begin
#
version = "v2.2"
if "address_family" in staticroute_config.keys():
if staticroute_config["address_family"] is None:
staticroute_config["address_family"] = "ipv4"
else:
staticroute_config["address_family"] = "ipv4"
#
# HotFix for Static Route Issue: End
#
staticroute_resp = sdk.post.staticroutes(site_id, element_id, staticroute_template, api_version=version)

if not staticroute_resp.cgx_status:
Expand Down Expand Up @@ -4461,7 +4482,17 @@ def modify_staticroute(config_staticroute, staticroute_id, interfaces_n2id,
local_debug("STATICROUTE TEMPLATE: " + str(json.dumps(staticroute_template, indent=4)))

# get current staticroute
staticroute_resp = sdk.get.staticroutes(site_id, element_id, staticroute_id)
#
# HotFix for Static Route Issue: Begin
#
staticroute_resp = sdk.get.staticroutes(site_id, element_id, staticroute_id, api_version="v2.2")
#
# HotFix for Static Route Issue: Begin
#

# Uncomment to remove HotFix for Static Route Issue
#staticroute_resp = sdk.get.staticroutes(site_id, element_id, staticroute_id)

if staticroute_resp.cgx_status:
staticroute_config = staticroute_resp.cgx_content
else:
Expand All @@ -4473,6 +4504,13 @@ def modify_staticroute(config_staticroute, staticroute_id, interfaces_n2id,
# Check for changes:
staticroute_change_check = copy.deepcopy(staticroute_config)
staticroute_config.update(staticroute_template)
#
# HotFix for Static Route Issue: Begin
#
staticroute_config["address_family"] = "ipv4"
#
# HotFix for Static Route Issue: End
#
if not force_update and staticroute_config == staticroute_change_check:
# no change in config, pass.
staticroute_id = staticroute_change_check.get('id')
Expand All @@ -4483,6 +4521,13 @@ def modify_staticroute(config_staticroute, staticroute_id, interfaces_n2id,
if debuglevel >= 3:
local_debug("STATICROUTE DIFF: {0}".format(find_diff(staticroute_change_check, staticroute_config)))

#
# HotFix for Static Route Issue: Begin
#
version = "v2.2"
#
# HotFix for Static Route Issue: End
#
# Update Staticroute.
staticroute_resp2 = sdk.put.staticroutes(site_id, element_id, staticroute_id, staticroute_config, api_version=version)

Expand Down Expand Up @@ -7546,6 +7591,13 @@ def do_site(loaded_config, destroy, declaim=False, passed_sdk=None, passed_timeo
default={}, sdk_or_yaml=apiversion)
routing_static_version = use_sdk_yaml_version(config_routing, 'static', sdk.put.staticroutes,
default={}, sdk_or_yaml=apiversion)
#
# HotFix for Static Route Issue: Begin
#
routing_static_version = "v2.2"
#
# HotFix for Static Route Issue: End
#
snmp_traps_version = use_sdk_yaml_version(config_snmp, 'traps', sdk.put.snmptraps, default=[], sdk_or_yaml=apiversion)
snmp_agent_version = use_sdk_yaml_version(config_snmp, 'agent', sdk.put.snmpagents, default=[], sdk_or_yaml=apiversion)
element_cellular_modules_version = use_sdk_yaml_version(config_element, 'element_cellular_modules', sdk.put.element_cellular_modules, default=[], sdk_or_yaml=apiversion)
Expand Down Expand Up @@ -7858,7 +7910,17 @@ def do_site(loaded_config, destroy, declaim=False, passed_sdk=None, passed_timeo
# -- End element_securityzones

# START STATIC ROUTING
staticroutes_resp = sdk.get.staticroutes(site_id, element_id)
#
# HotFix for Static Route Issue: Begin
#
staticroutes_resp = sdk.get.staticroutes(site_id, element_id, api_version="v2.2")
#
# HotFix for Static Route Issue: End
#

#Uncomment to remove HotFix for Static Route Issue
#staticroutes_resp = sdk.get.staticroutes(site_id, element_id)

staticroutes_cache, leftover_staticroutes = extract_items(staticroutes_resp, 'staticroutes')
# build lookup cache based on prefix.
staticroutes_n2id = build_lookup_dict(staticroutes_cache, key_val='destination_prefix')
Expand Down Expand Up @@ -9400,7 +9462,17 @@ def do_site(loaded_config, destroy, declaim=False, passed_sdk=None, passed_timeo
# END BGP PEERS

# START STATIC ROUTING
staticroutes_resp = sdk.get.staticroutes(site_id, element_id)
#
# HotFix for Static Route Issue: Begin
#
staticroutes_resp = sdk.get.staticroutes(site_id, element_id, api_version="v2.2")
#
# HotFix for Static Route Issue: End
#

#Uncomment to remove HotFix for Static Route Issue
#staticroutes_resp = sdk.get.staticroutes(site_id, element_id)

staticroutes_cache, leftover_staticroutes = extract_items(staticroutes_resp, 'staticroutes')
# build lookup cache based on prefix.
staticroutes_n2id = build_lookup_dict(staticroutes_cache, key_val='destination_prefix')
Expand Down
4 changes: 2 additions & 2 deletions cloudgenix_config/pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""
Configuration EXPORT worker/script

**Version:** 1.6.0b2
**Version:** 1.6.0b3

**Author:** CloudGenix

Expand Down Expand Up @@ -209,7 +209,7 @@
FROM_CLOUDBLADE = 0
# Fix for CGCBL-565
SDK_VERSION_REQUIRED = '5.6.1b2'
CONFIG_VERSION_REQUIRED = '1.6.0b2'
CONFIG_VERSION_REQUIRED = '1.6.0b3'
# Define constructor globally for now.
sdk = cloudgenix.API()
jd = cloudgenix.jd
Expand Down
40 changes: 40 additions & 0 deletions release_notes/160b3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Release Notes 1.6.0b3

## Release Date
June 22, 2022

## What's new?
- Hot fix (CGESC-601).
- When updating staticroutes using do_site, the utility now checks for address_family in the payload.
- If it's null, the utility sets it to "ipv4"

## API Major Version Changes
None

## API Minor Version Changes
None

## New Parameters introduced in the YAML file
None


## Caveats
ION 9000:

- When trying to configure bypasspairs and interfaces of type port having the same name i.e. 12,13,14,15 or 16, the configuration must be pushed in two steps
- Step 1: Configure interface of type port first - only include interface configuration for type port in the YAML file.
- Step 2: Configure interface of type bypasspair - only include interface configuration for type bypasspair in the YAML file

- When the source interface or the parent interface is of type byppasspair and another interface of type port with the same name exist, set the attribute **parent_type** to **bypasspair_<interface_name>**. This helps the utility correctly identify the interface between the bypasspair and port of the same name. If the parent_type is not set, the utility assume the parent interface is of type port in case of conflicts.


## More Info

- Prisma SD-WAN Release Notes

<https://docs.paloaltonetworks.com/prisma/prisma-sd-wan/prisma-sd-wan-release-notes.html>

- Prisma SDWAN Documentation

<https://docs.paloaltonetworks.com/prisma/prisma-sd-wan.html>

2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[metadata]
name = cloudgenix_config
description = Configuration exporting and Continuous Integration (CI) capable configuration importing for the CloudGenix Cloud Controller.
version = 1.6.0b2
version = 1.6.0b3
author = CloudGenix Developer Support
author-email = developers@cloudgenix.com
description-file = README.md
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
long_description = f.read()

setup(name='cloudgenix_config',
version='1.6.0b2',
version='1.6.0b3',
description='Configuration exporting and Continuous Integration (CI) capable configuration importing for the '
'CloudGenix Cloud Controller.',
long_description=long_description,
Expand Down