Skip to content

Commit

Permalink
Release 1.1.11 (#98)
Browse files Browse the repository at this point in the history
* Bump yamale from 3.0.4 to 3.0.8 (#2)

Bumps [yamale](https://github.com/23andMe/Yamale) from 3.0.4 to 3.0.8.
- [Release notes](https://github.com/23andMe/Yamale/releases)
- [Commits](23andMe/Yamale@3.0.4...3.0.8)

---
updated-dependencies:
- dependency-name: yamale
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump urllib3 from 1.26.3 to 1.26.5 (#1)

Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.3 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](urllib3/urllib3@1.26.3...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* CASMNET-834 Ensure mountain device names names are unique. (#4)

* Ensure node unique naming and add JSON output.

* Fix failing test.

* Remove leftover refactoring cruft.

* Remove debug output.

* Patch a test for vendor assignment.

* Version bump. (#6)

* CASMNET-872  (#5)

* added selective diff output

* change tag load method

* updated hier-config

* made compatable with older hier_config

Co-authored-by: batesl <[email protected]>

* lint

* cache switch vendor on canu init

* lint

* Update Licensing and Copyright information. (#9)

* Update Licensing and Copyright information.

* Date bump.

* match SLS API

* Merge branch 'develop' into feature/dellanox

* Fix non-development installs. (#13)

* Fix non-development installs.

* Add config j2 templates to install.

* Add yaml, json and j2 files to pyinstaller.

* setup and cache nits.

* One last version change - for rpm this time.

* CASMNET-904 - add canu user home dir and workdir to container env (#16)

Co-authored-by: Dat Le <[email protected]>

* CASMNET-879 (#11)

* pull out prefix len from SLS and apply to templates

* updated tests, fixed acl templates

* dynamically pull in VLANs from SLS to apply to CDU port configs

* dynamically pull in IP address for CDU switch vlan interfaces

* add prefix length

* remove pprint, modify tests

* fix tests and lint

* remove uncessary loop

* remove print statements

* added ssh to vrf keepalive, allows for backdoor access

* update readme

Co-authored-by: lukebates123 <[email protected]>

* Fix confusing warning and user guidance in config generation. (#18)

* Add BMC ports to river compute and add tests. (#17)

* CASMNET-885: Convert csi-folder cli to sls-file. (#19)

* Convert csi-folder cli to sls-file.

* Doc nits.

* Feature/dellanox (#14)

* lint

* update requirements

* remove version from hier-config

* update readme

* add license

* lint

* Add Dell and Mellanox and running config from file

* update test

* move running and generated configs to own folders

* move cache functions to utils

* add canu cache commands

* Update readme.md (#21)

* CASMNET-914: Move WIP document generation work. (#20)

* Move WIP docs generation work.

* Carriage return nit.

* CASMNET-806 add hsn hardware to architecture (#22)

Signed-off-by: Jacob Salmela <[email protected]>

Co-authored-by: Jacob Salmela <[email protected]>

* CASMNET-806: add PDU to to model/config (#25)

* add additional compute node lookup_name to include both cn* and nid* style names

both node names are used when generating hmn_connections.json file from csi

Signed-off-by: Jacob Salmela <[email protected]>

* add slurm lookup_name as a type of uan

this allows the node to be presenet when generating hmn_connections.json file from csi

Signed-off-by: Jacob Salmela <[email protected]>

* Casmnet-908 configuration override/ignore (#23)

* added override option

* add override config to config file output

* format

* remove canu.test

* added override option

* add override config to config file output

* format

* remove canu.test

* define heir config version

* canu/generate/network/config/config.py

* add override.yaml test

* added override option

* add override config to config file output

* format

* remove canu.test

* updated tests for config ignore file

* fix config output comments

* .yaml format, updated readme

* fix options.yaml

* fix requirements.txt

* added override config option to config validate

* re-order to fix tests

* updated readme

* updated readme

* change where override file is opened

* fix flake8

* updated tests/requirements

Co-authored-by: lukebates123 <[email protected]>

* Fix many template issues (#27)

Co-authored-by: lukebates123 <[email protected]>

* Feature/mellanox-bgp (#28)

* config bgp mellanox

* config bgp tests

* update readme

* CASMNET-858: Create initial Dell and Mellanox configuration templates - WIP (#12)

* dell-mellanox phase 1

* dellanox phase 2

* moving files

* remove old files

* phase to relocate files, new variables

* fixes as per Lukes review

* fix build error

* fixes roud 2

* dell mellanox config gen first pass

* update requirements

* update test requirements

* rpm build update

* lint

* update docs for Dell and Mellanox

* added extra configs

* fixed sw-leaf-bmc config template

* dellanox template updates

* added dellanox MTN templates

* Added dellanox MTN templates

Co-authored-by: kosonenj <[email protected]>
Co-authored-by: Brooks Vinyard <[email protected]>
Co-authored-by: lukebates123 <[email protected]>

* change --shasta flag to --csm (#31)

* add regex support, closes #35 (#37)

new entries added to cray-network-architecture can now contain a 'regex:' key,
which is a list of regex patterns to be searched.  an example is that pdus can
have a name like x3000p1 or pdup1, so this allows the user to search for both.

Signed-off-by: Jacob Salmela <[email protected]>

* add PDU hardware types, closes #36 (#38)

this adds pdus, which requires #35 to work properly.
It can find pdus with names like x3000p1 and pdup1.

Signed-off-by: Jacob Salmela <[email protected]>

* mac-address-table lookup (#30)

* dell-mellanox phase 1

* dellanox phase 2

* moving files

* remove old files

* phase to relocate files, new variables

* fixes as per Lukes review

* fix build error

* fixes roud 2

* dell mellanox config gen first pass

* update requirements

* update test requirements

* rpm build update

* lint

* update docs for Dell and Mellanox

* added extra configs

* add mac-address-table and mac lookup

* enable mac lookup offline

* add mac vendors file to installer

* add function to update mac vendors (unused)

* fix templates

Co-authored-by: kosonenj <[email protected]>

* CASMNET-960 Add warning for unknown devices (#32)

* change --shasta flag to --csm

* add warning for unknown devices

* Add PR template (#34)

Signed-off-by: Jacob Salmela <[email protected]>

* CASMNET-991 - fix pip3 depenancy for container environment (#42)

Co-authored-by: Dat Le <[email protected]>

* add pdus to network hardware and architecture (#41)

Signed-off-by: Jacob Salmela <[email protected]>

* Feature/shcd cabling (#46)

* dell-mellanox phase 1

* dellanox phase 2

* moving files

* remove old files

* phase to relocate files, new variables

* fixes as per Lukes review

* fix build error

* fixes roud 2

* dell mellanox config gen first pass

* update requirements

* update test requirements

* rpm build update

* lint

* update docs for Dell and Mellanox

* added extra configs

* add mac-address-table and mac lookup

* enable mac lookup offline

* add mac vendors file to installer

* add function to update mac vendors (unused)

* fix templates

* update shcd-cabling, fix find_mac, and file out

* add shcd-cabling tests

* updated docs

* fix for HMN slot warning always None

Co-authored-by: kosonenj <[email protected]>
Co-authored-by: Brooks Vinyard <[email protected]>

* Casmnet-987 (#43)

* Dellanox Template ordering

* more templates

* add dell/mellanox tests

* fix dellanox config generation

* dellanox stp updates

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1003 added CMN support for dell,mellanox,aruba (#47)

* added CMN support for dell,mellanox,aruba

* update readme

* add mgmt plane ACL and metallb

* update readme

* removed hard coded variables from aruba templates

* add variaibles to dellanox templates

* readme

* added csm version templates

* update templates

* updated pyinstaller

* added dellanox to canu validate switch config

* rollback netmiko setting

Co-authored-by: lukebates123 <[email protected]>

* add contributing guide (#39)

Signed-off-by: Jacob Salmela <[email protected]>

Co-authored-by: Sean Lynn <[email protected]>

* Feature/subrack (#50)

* add sub_location to NodeLocation

* add SubRack

* readme

Co-authored-by: Sean Lynn <[email protected]>

* add code of conduct file (#40)

Signed-off-by: Jacob Salmela <[email protected]>

* Feature/docs (#48)

* auto generating docs

* update pics

* update pic dir

* update readme

* Casmnet 896 bgp support (#49)

* added Aruba BGP support

* update aruba tests for BGP

* added Mellanox BGP support

* update mellanox template/tests

* update readme

* added support for Computes/HSN-bmcs/VizNodes/LoginNodes/pdu during config generation

* update cray-network-architecture.yaml

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1031 add subrack to TDS arch (#52)

* add subrack to TDS arch

* add SubRack to config gen

Co-authored-by: lukebates123 <[email protected]>

* Paddle (#54)

* add sub_location to NodeLocation

* add SubRack

* readme

* addle paddle / CCJ support

* paddle docs

* add issue templates (#45)

Signed-off-by: Jacob Salmela <[email protected]>

* CASMNET-1035  (#53)

* Fix UAN lag#s, fix bgp template

* fix dellanox 1.0 template

* remove test print line

* fix uan/viz/login code

* update config.py

* add VRF CAN to aruba BGP templates

* CASMNET-929

* update BGP templates

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: Sean Lynn <[email protected]>

* MTL-1556 print ncn mac addresses for use with 'csi config shcd' (#51)

Signed-off-by: Jacob Salmela <[email protected]>

* CASMNET-1056 - Include jq in CANU docker image (#56)

* CASMNET-1056 - Include jq in CANU docker image

* CASMNET-1056 - Include jq in CANU docker image

* CANU 1.0.0 Release (#57)

* Revert "CANU 1.0.0 Release (#57)" (#58)

This reverts commit 0583e4e.

* CASMNET-1060 update templates for CMN net (#60)

* update templates for CMN net

* review changes

* fix cdu-spine template

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1070: Modify setup.py file globs to use migrated Jinja2 templates (#61)

* Modify file globs to use migrated Jinja2 templates

* Update changelog.

* Casmnet 1071 - Update Dell and Mellanox CMN templates (#63)

* update dellanox templates for CMN

Co-authored-by: lukebates123 <[email protected]>

* Casmnet 1088 (#65)

* casmnet-1088

* add more logic to CMN creation

* CASMNET-1089

* CASMNET-1090

* add additional error message

* format

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1092 (#67)

* CASMNET-1092

* CASMNET 1077

* CASMNET-966

* CASMNET-1098

* change how config file opens

Co-authored-by: lukebates123 <[email protected]>

* Casmnet 1099 (#68)

* updated PR template, added STP timeout, updated develop version.

* Added stp comment

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: Sean Lynn <[email protected]>

* Update develop version (#70)

* Update .version

* Update .version

* Casmnet 1071 Casmnet 1101 (#72)

* fix dellanox speed on ports

* readme and license

* more license updates

* licenses

* jenkinsfile license

* format

* format

* format

* format

* CASMNET-1101

* updated readme

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-383 Added network tests (#55)

* Added network tests using nornir

* update to test framework

* add additonal features to canu test

* update pyinstaller

* add nornir to imports

* add nornir hook file

* add metadata+doc string

* reformat

* add nornir-salt to hooks

* pyinstaller

* pyinstaller hook

* add netmiko to pyinstaller hook

* fix pyinstaller hooks

* fix sls file requirement

* comma

* json print and readme updated

* adding tests

* update readme

* Update test.py

* update license

* more licenses

* yet another license

* create sls_token function

* remote request update

* add sls file and update bgp tests

* fix tests

* update readme.md

* version bump, add dell tests file

* modify how we get sls data

* more sls hardware bits

* fix test

* fix sls hardware

* fix pyinstaller

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: root <[email protected]>

* Update .version

* CASMINST-3485 (#75)

* Update sls.py

* Update readme.md

* Add howto on releasing a new CANU version.

* Bump lxml from 4.6.4 to 4.6.5 (#73)

Bumps [lxml](https://github.com/lxml/lxml) from 4.6.4 to 4.6.5.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.6.4...lxml-4.6.5)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* CASMNET-1112: Fix PDU naming and add lm/lmem and gateway/gw nodes. (#77)

* Fix PDU naming and add LM nodes.

* Add gateway nodes, fix PDU naming, add lm nodes.

* Update Golden SHCDs and tests to add pdu, gateway and lm hardware.

* Fix lxml lib vulnerability

* CASMNET-1119 (#82)

* update mellanox port ISL port speed

* Update readme.md

Co-authored-by: lukebates123 <[email protected]>

* update mellanox templates (#83)

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1125 (#84)

* mellanox template fixes

* readme

* fix tests and templates

* version bump

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1127 - Add switch configuration banners and SLES rpm install instructions (#85)

* Add banner and rpm install docs.

* Remove debug.

* changed order of banner to match other templates

* update test

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: lukebates123 <[email protected]>

* Update readme.md (#66)

.venv canu install directions are incorrect.
Assuming I'm in the canu repo, I'll install .
setup.py is locaded at ., not at ./canu

Co-authored-by: cjohnson-hpe <[email protected]>
Co-authored-by: Sean Lynn <[email protected]>

* CASMNET-1131 (#86)

* level set 1.0 templates with 1.2, add CMN acl

* add CAN ip-helpers

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-1091 (#87)

* remove hard coding ASN

* remove print statements

Co-authored-by: lukebates123 <[email protected]>

* CASMINST-3986 (#89)

* fix mellanox web interface command

* readme

Co-authored-by: lukebates123 <[email protected]>

* CASMNET-938 (#88)

* update canu validate

* canu validate improvements

* testing different build image in makefile

* build image test #2

* rollback build_image in makefile

* testing new build_image

* Update .version

Co-authored-by: lukebates123 <[email protected]>
Co-authored-by: Dat Le <[email protected]>

* Feature/casmnet 1149 (#95)

* updated jenkins build targets to be sles sp2 and sp3

* add tag to build_image in Makefile

Co-authored-by: Dat Le <[email protected]>

* CASMNET-1136 - Configure each Mellanox virtual router with a unique MAC address (#94)

* CASMNET-1136 - Configure each Mellanox virtual router with a unique MAC address.

* CASMINST-4000 CASMNET-1153 (#93)

* fix tests

* remove lacp-individual

Co-authored-by: lukebates123 <[email protected]>

* Rollback (#96)

* revert all the things

* rollback image

Co-authored-by: lukebates123 <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sean Lynn <[email protected]>
Co-authored-by: batesl <[email protected]>
Co-authored-by: Brooks Vinyard <[email protected]>
Co-authored-by: Brooks Vinyard <[email protected]>
Co-authored-by: dle-hpe <[email protected]>
Co-authored-by: Dat Le <[email protected]>
Co-authored-by: Jacob Salmela <[email protected]>
Co-authored-by: kosonenj <[email protected]>
Co-authored-by: Chris Spiller <[email protected]>
Co-authored-by: root <[email protected]>
Co-authored-by: cjohnson-hpe <[email protected]>
  • Loading branch information
13 people authored Feb 18, 2022
1 parent 1606129 commit 65651b9
Show file tree
Hide file tree
Showing 114 changed files with 6,405 additions and 1,785 deletions.
41 changes: 36 additions & 5 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ pipeline {
}

environment {
RPM_NAME = "canu"
SPEC_FILE = "canu.spec"
IS_STABLE = getBuildIsStable()
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
PUBLISH_SP2 = "sle-15sp2"
PUBLISH_SP3 = "sle-15sp3"
}

stages {
Expand Down Expand Up @@ -61,19 +64,47 @@ pipeline {
}
}
}
stage("Build RPM") {
stage("Build SP2") {
agent {
docker {
image "arti.dev.cray.com/dstbuildenv-docker-master-local/cray-sle15sp2_build_environment:latest"
reuseNode true
// Support docker in docker for clamav scan
args "-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --group-add 999"
}
}
steps {
sh "make rpm"
}
}

stage('Publish SP2') {
steps {
script {
sh "make rpm"
publishCsmRpms(component: env.RPM_NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: env.PUBLISH_SP2, arch: "x86_64", isStable: env.IS_STABLE)
publishCsmRpms(component: env.RPM_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: env.PUBLISH_SP2, arch: "src", isStable: env.IS_STABLE)
}
}
}
stage("Build SP3") {
agent {
docker {
image "arti.dev.cray.com/dstbuildenv-docker-master-local/cray-sle15sp3_build_environment:latest"
reuseNode true
// Support docker in docker for clamav scan
args "-v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker --group-add 999"
}
}
steps {
sh "make rpm"
}
}

stage('Publish ') {
stage('Publish SP3') {
steps {
script {
publishCsmRpms(component: "canu", pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", arch: "x86_64", isStable: env.IS_STABLE)
publishCsmRpms(component: "canu", pattern: "dist/rpmbuild/SRPMS/*.rpm", arch: "src", isStable: env.IS_STABLE)
publishCsmRpms(component: env.RPM_NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: env.PUBLISH_SP3, arch: "x86_64", isStable: env.IS_STABLE)
publishCsmRpms(component: env.RPM_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: env.PUBLISH_SP3, arch: "src", isStable: env.IS_STABLE)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion canu/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.4
1.1.11
42 changes: 36 additions & 6 deletions canu/generate/switch/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
# Schema and Data files
canu_cache_file = path.join(cache_directory(), "canu_cache.yaml")
canu_config_file = path.join(project_root, "canu", "canu.yaml")
canu_version_file = path.join(project_root, "canu", ".version")

# Import templates
network_templates_folder = path.join(
Expand All @@ -80,6 +81,11 @@

csm_options = canu_config["csm_versions"]

# Get CANU version from .version
with open(canu_version_file, "r") as file:
canu_version = file.readline()
canu_version = canu_version.strip()


@click.command(
cls=HelpColorsCommand,
Expand Down Expand Up @@ -508,6 +514,8 @@ def generate_switch_config(

variables = {
"HOSTNAME": switch_name,
"CSM_VERSION": csm,
"CANU_VERSION": canu_version,
"NCN_W001": sls_variables["ncn_w001"],
"NCN_W002": sls_variables["ncn_w002"],
"NCN_W003": sls_variables["ncn_w003"],
Expand All @@ -521,13 +529,15 @@ def generate_switch_config(
"CMN_NETMASK": sls_variables["CMN_NETMASK"],
"CMN_NETWORK_IP": sls_variables["CMN_NETWORK_IP"],
"CMN_PREFIX_LEN": sls_variables["CMN_PREFIX_LEN"],
"CMN_ASN": sls_variables["CMN_ASN"],
"MTL_NETMASK": sls_variables["MTL_NETMASK"],
"MTL_PREFIX_LEN": sls_variables["MTL_PREFIX_LEN"],
"NMN": sls_variables["NMN"],
"NMN_VLAN": sls_variables["NMN_VLAN"],
"NMN_NETMASK": sls_variables["NMN_NETMASK"],
"NMN_NETWORK_IP": sls_variables["NMN_NETWORK_IP"],
"NMN_PREFIX_LEN": sls_variables["NMN_PREFIX_LEN"],
"NMN_ASN": sls_variables["NMN_ASN"],
"HMN": sls_variables["HMN"],
"HMN_VLAN": sls_variables["HMN_VLAN"],
"HMN_NETMASK": sls_variables["HMN_NETMASK"],
Expand Down Expand Up @@ -571,6 +581,7 @@ def generate_switch_config(
"CMN_IPs": sls_variables["CMN_IPs"],
"NMN_IPs": sls_variables["NMN_IPs"],
"HMN_IPs": sls_variables["HMN_IPs"],
"SWITCH_ASN": sls_variables["SWITCH_ASN"],
}
cabling = {}
cabling["nodes"], unknown = get_switch_nodes(
Expand Down Expand Up @@ -689,14 +700,16 @@ def generate_switch_config(
v1_config = ""
dell_switch = Host(node_shasta_name, "dellOS10", dell_options)
dell_config_hier = HConfig(host=dell_switch)
dell_config_hier.load_from_string(switch_config).set_order_weight()
dell_config_hier.load_from_string(switch_config)
dell_config_hier.set_order_weight()
for line in dell_config_hier.all_children_sorted():
v1_config = v1_config + line.cisco_style_text() + "\n"
if "sw-spine" in node_shasta_name:
v1_config = ""
mellanox_switch = Host(node_shasta_name, "onyx", mellanox_options)
mellanox_config_hier = HConfig(host=mellanox_switch)
mellanox_config_hier.load_from_string(switch_config).set_order_weight()
mellanox_config_hier.load_from_string(switch_config)
mellanox_config_hier.set_order_weight()
for line in mellanox_config_hier.all_children_sorted():
v1_config = v1_config + line.cisco_style_text() + "\n"
return v1_config, devices, unknown
Expand All @@ -718,9 +731,8 @@ def generate_switch_config(
+ "# The configuration below has been ignored and is not included in the GENERATED CONFIG\n"
)
override_config_hier = HConfig(host=host)
override_config_hier.load_from_string(switch_config).add_tags(
override[switch_name],
)
override_config_hier.load_from_string(switch_config)
override_config_hier.add_tags(override[switch_name])
for line in override_config_hier.all_children_sorted_by_tags(
"override",
None,
Expand Down Expand Up @@ -811,7 +823,7 @@ def get_switch_nodes(switch_name, network_node_list, factory, sls_variables):
destination_slot = port["destination_slot"]

shasta_name = get_shasta_name(destination_node_name, factory.lookup_mapper())

print(port)
primary_port = get_primary_port(nodes_by_name, switch_name, destination_node_id)
if shasta_name == "ncn-m":
print("\nport", port)
Expand Down Expand Up @@ -1155,6 +1167,7 @@ def parse_sls_for_config(input_json):
networks_list = []

sls_variables = {
"SWITCH_ASN": None,
"CAN": None,
"CAN_VLAN": None,
"CAN_NETMASK": None,
Expand All @@ -1165,6 +1178,7 @@ def parse_sls_for_config(input_json):
"CMN_NETMASK": None,
"CMN_PREFIX_LEN": None,
"CMN_NETWORK_IP": None,
"CMN_ASN": None,
"HMN": None,
"HMN_VLAN": None,
"HMN_NETMASK": None,
Expand All @@ -1179,6 +1193,7 @@ def parse_sls_for_config(input_json):
"NMN_NETMASK": None,
"NMN_NETWORK_IP": None,
"NMN_PREFIX_LEN": None,
"NMN_ASN": None,
"HMN_MTN": None,
"HMN_MTN_NETMASK": None,
"HMN_MTN_NETWORK_IP": None,
Expand Down Expand Up @@ -1256,6 +1271,10 @@ def parse_sls_for_config(input_json):
sls_variables["CMN_NETMASK"] = sls_variables["CMN"].netmask
sls_variables["CMN_PREFIX_LEN"] = sls_variables["CMN"].prefixlen
sls_variables["CMN_NETWORK_IP"] = sls_variables["CMN"].ip
sls_variables["CMN_ASN"] = sls_network.get("ExtraProperties", {}).get(
"MyASN",
{},
)
for subnets in sls_network.get("ExtraProperties", {}).get("Subnets", {}):
if subnets["Name"] == "bootstrap_dhcp":
sls_variables["CMN_IP_GATEWAY"] = subnets["Gateway"]
Expand Down Expand Up @@ -1314,6 +1333,17 @@ def parse_sls_for_config(input_json):
sls_variables["NMN_NETMASK"] = sls_variables["NMN"].netmask
sls_variables["NMN_PREFIX_LEN"] = sls_variables["NMN"].prefixlen
sls_variables["NMN_NETWORK_IP"] = sls_variables["NMN"].ip
sls_variables["SWITCH_ASN"] = sls_network.get("ExtraProperties", {}).get(
"PeerASN",
{},
)
sls_variables["NMN_ASN"] = sls_network.get("ExtraProperties", {}).get(
"MyASN",
{},
)
sls_variables["NMN_NETMASK"] = sls_variables["NMN"].netmask
sls_variables["NMN_PREFIX_LEN"] = sls_variables["NMN"].prefixlen
sls_variables["NMN_NETWORK_IP"] = sls_variables["NMN"].ip
for subnets in sls_network.get("ExtraProperties", {}).get("Subnets", {}):
if subnets["Name"] == "bootstrap_dhcp":
for ip in subnets["IPReservations"]:
Expand Down
8 changes: 1 addition & 7 deletions canu/test/aruba/test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
- name: Software version test
task: show version
test: contains
pattern: "10.08.1021"
pattern: "10.09.0010"
err_msg: Software version is wrong
device:
- cdu
Expand Down Expand Up @@ -116,12 +116,6 @@
pattern: 10.94.100.222
err_msg: IP-Helper is missing
device: spine
- name: vlan 7 ip-helper test
task: show run interface vlan 7
test: contains
pattern: 10.92.100.222
err_msg: IP-Helper is missing
device: spine
- name: tftp route
task: show ip route 10.92.100.60
test: contains
Expand Down
30 changes: 15 additions & 15 deletions canu/test/dellanox/test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
pattern: "3.9.3210"
err_msg: Software version is wrong
device: spine
- name: BGP test
task: show ip bgp vrf all summary
test: contains_lines
pattern:
- IDLE
- ACTIVE
- CONNECT
err_msg: BGP has Neighbors in active or idle
device: spine
# - name: BGP test
# task: show ip bgp vrf all summary
# test: contains_lines
# pattern:
# - IDLE
# - ACTIVE
# - CONNECT
# err_msg: BGP has Neighbors in active or idle
# device: spine
- name: STP check for root bridge
task: show spanning-tree
test: contains
Expand All @@ -53,12 +53,12 @@
pattern: "Active nodes: 1"
err_msg: MLAG VIP has only 1 active node
device: spine
- name: unsaved config changes
task: show configuration files
test: eval
expr: "all(['no' in line for line in result.splitlines()])"
err_msg: There are unsaved changes
device: spine
# - name: unsaved config changes
# task: show configuration files
# test: eval
# expr: "all(['no' in line for line in result.splitlines()])"
# err_msg: There are unsaved changes
# device: spine
- name: Interface error check
task: "show interfaces ethernet counters | include error"
test: "!contains_re"
Expand Down
5 changes: 5 additions & 0 deletions canu/utils/sls.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def remote_request(
sls_networks = sls_cache

sls_variables = {
"SWITCH_ASN": None,
"CAN": None,
"CAN_VLAN": None,
"CMN": None,
Expand Down Expand Up @@ -268,6 +269,10 @@ def remote_request(
"CIDR",
"",
)
sls_variables["SWITCH_ASN"] = sls_network.get("ExtraProperties", {}).get(
"PeerASN",
{},
)
for subnets in sls_network.get("ExtraProperties", {}).get("Subnets", {}):
sls_variables["NMN_VLAN"] = subnets.get("VlanID", "")
if subnets["Name"] == "bootstrap_dhcp":
Expand Down
Loading

0 comments on commit 65651b9

Please sign in to comment.