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

Release 1.6.27 #236

Merged
merged 94 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
f148f40
Fixes #44 and #182 Build Once and Use Git-Tags
rustydb Jun 30, 2022
819c745
Fixes #44 and #182 Build Once and Remove `.version` (#184)
trad511 Oct 21, 2022
6353348
Bump jinja2 from 3.0.2 to 3.1.2
dependabot[bot] Oct 21, 2022
295e5d1
Bump openpyxl from 3.0.9 to 3.0.10
dependabot[bot] Oct 21, 2022
8a90793
Squish original CAMSNET-1896 branch commits
trad511 Oct 21, 2022
c0f840d
fix canu version
lukebates123 Oct 21, 2022
fa0f57a
CASMNET-1896 (#209)
trad511 Oct 21, 2022
971397e
Remove control-plane acl for Customer VRF in 1.2
trad511 Oct 11, 2022
3dccc5b
bump version
trad511 Oct 24, 2022
b94cf9a
Fix tests lost in rebase.
trad511 Oct 24, 2022
a1dc9a6
CASMNET-1901 - Remove control-plane acl for Customer VRF in CSM1.2 (#…
trad511 Oct 24, 2022
f8ca9e9
fix uan port for UAN
lukebates123 Oct 13, 2022
320674b
bump version
trad511 Oct 24, 2022
4c026e9
CASMNET-1910 (#211)
trad511 Oct 24, 2022
5c7a04c
fix json input in canu backup
lukebates123 Oct 17, 2022
fa90918
fix nornir inventory
lukebates123 Oct 17, 2022
7848480
bump version
trad511 Oct 24, 2022
cc435a3
lint
lukebates123 Oct 24, 2022
a3d3822
CASMNET-1912 (#212)
trad511 Oct 24, 2022
27165ff
Merge branch 'develop' into dependabot/pip/openpyxl-3.0.10
trad511 Oct 24, 2022
e613ffe
Bump openpyxl from 3.0.9 to 3.0.10 (#217)
trad511 Oct 24, 2022
555bfbb
Merge branch 'develop' into dependabot/pip/jinja2-3.1.2
trad511 Oct 24, 2022
1c2812b
Bump pyyaml from 5.4.1 to 6.0
dependabot[bot] Oct 24, 2022
0e014e8
Bump jinja2 from 3.0.2 to 3.1.2 (#216)
trad511 Oct 24, 2022
e91e4a7
Merge branch 'develop' into dependabot/pip/pyyaml-6.0
trad511 Oct 24, 2022
61f4c96
Bump nornir-scrapli from 2022.1.30 to 2022.7.30
dependabot[bot] Oct 24, 2022
848db14
Bump pyyaml from 5.4.1 to 6.0 (#214)
trad511 Oct 24, 2022
43f12bd
Merge branch 'develop' into dependabot/pip/nornir-scrapli-2022.7.30
trad511 Oct 24, 2022
9c966be
Bump nornir-scrapli from 2022.1.30 to 2022.7.30 (#218)
trad511 Oct 24, 2022
0a2b6d7
Bump kubernetes from 20.13.0 to 24.2.0
dependabot[bot] Oct 24, 2022
bca0f6f
Bump kubernetes from 20.13.0 to 24.2.0 (#215)
trad511 Oct 25, 2022
f349f57
Add gpu nodes to v2 tds
trad511 Oct 4, 2022
0474409
correct destination port/slot in message
trad511 Oct 11, 2022
d1e9b40
Fix strict port re-use for LLDP cable checks and add logging.
trad511 Oct 20, 2022
e4b2203
Update connection failure messaging.
trad511 Oct 21, 2022
470ce35
Update port re-use messaging.
trad511 Oct 27, 2022
5cbe375
Generated docs bump.
trad511 Oct 27, 2022
1067a66
lint
trad511 Oct 27, 2022
bec927e
bump version.
trad511 Oct 27, 2022
c69137f
Resurrect lnet in v2_tds architecture.
trad511 Oct 27, 2022
1bf4190
Remove bgp config code and docs that keeps coming back.
trad511 Oct 27, 2022
df5acc7
Pin pytest at 7.1.3 until related libraries equalize on removal of py…
trad511 Oct 27, 2022
abee076
Add GPU nodes to v2 tds, Fix modeling from LLDP data, and Enhance con…
trad511 Oct 27, 2022
f1e9b14
Various markdown fixes
rustydb Oct 24, 2022
fb066de
PR Template adjustments
rustydb Oct 24, 2022
7e06465
More tweaks
rustydb Oct 27, 2022
09aaf71
Local build support
rustydb Oct 27, 2022
36d44e9
Various markdown fixes (#219)
trad511 Oct 27, 2022
1070814
Fix broken RPM build from #219
rustydb Oct 28, 2022
db2bd1a
Fix broken RPM build from #219 (#221)
rustydb Oct 31, 2022
f4aea6d
Update ruamel-yaml requirement from <=0.16.13 to <0.17.22
dependabot[bot] Oct 31, 2022
3f85a1a
Update pytest requirement from <=7.1.3 to <7.2.1
dependabot[bot] Oct 31, 2022
29b53d2
Bump netutils from 1.0.0 to 1.2.0
dependabot[bot] Oct 31, 2022
286c31c
Bump emoji from 1.6.0 to 2.1.0
dependabot[bot] Oct 31, 2022
22d52f0
Bump nornir-salt from 0.9.0 to 0.16.1
dependabot[bot] Oct 31, 2022
dcd8404
Add missing kvm and gpu nodes to v1 network architecture.
trad511 Oct 27, 2022
fe5f5e0
Add and initialize logging and change output messaging.
trad511 Oct 27, 2022
410cc86
Em-blacken code formatting.
trad511 Oct 27, 2022
21da57a
bump version
trad511 Oct 27, 2022
8592ca4
last cleanup nits.
trad511 Oct 27, 2022
9fc45d6
Add missing nodes to v1 architecture and clean up switch and network …
trad511 Oct 31, 2022
0ade3d0
Add py dependency to to enable pytest>7.1.3.
trad511 Oct 31, 2022
dbd3756
Add py dependency to to enable pytest version bump (#227)
trad511 Oct 31, 2022
3bea2c0
Merge branch 'develop' into dependabot/pip/pytest-lt-7.2.1
trad511 Oct 31, 2022
e60b387
Update pytest requirement from <=7.1.3 to <7.2.1 (#226)
trad511 Oct 31, 2022
afa0f5a
Relates to #44 - Fixes stable RPM's
rustydb Nov 1, 2022
c28118a
Relates to #44 - Fixes stable RPM's (#228)
trad511 Nov 1, 2022
f3e08c5
Relates to #44 - Fix stable Docker images
rustydb Nov 1, 2022
4a00a36
Publish Stable Docker images to stable
rustydb Nov 2, 2022
d86a760
Relates to #44 - Fix stable Docker images (#229)
rustydb Nov 4, 2022
8301dcf
rename login node shasta name
lukebates123 Nov 8, 2022
3427cf7
readme
lukebates123 Nov 8, 2022
a3524dd
readme
lukebates123 Nov 8, 2022
4bd6c43
CASMNET-1941 (#230)
trad511 Nov 8, 2022
73d0f5b
Merge branch 'develop' into dependabot/pip/nornir-salt-0.16.1
lukebates123 Nov 8, 2022
847f26e
bump lib versions
lukebates123 Nov 8, 2022
5273856
Merge branch 'develop' into CASMNET-1941
lukebates123 Nov 8, 2022
9646205
bump lib versions (#233)
trad511 Nov 8, 2022
2d02926
Merge branch 'develop' into dependabot/pip/netutils-1.2.0
lukebates123 Nov 9, 2022
768c417
Merge branch 'develop' into dependabot/pip/nornir-salt-0.16.1
lukebates123 Nov 9, 2022
4fba166
Merge branch 'develop' into dependabot/pip/ruamel-yaml-lt-0.17.22
lukebates123 Nov 9, 2022
1ecc502
Bump netutils from 1.0.0 to 1.2.0 (#225)
trad511 Nov 9, 2022
3e19341
Merge branch 'develop' into dependabot/pip/emoji-2.1.0
trad511 Nov 9, 2022
656a6a4
Bump emoji from 1.6.0 to 2.1.0 (#224)
trad511 Nov 9, 2022
f740713
Update setup.py
lukebates123 Nov 9, 2022
d01c088
Merge branch 'develop' into dependabot/pip/ruamel-yaml-lt-0.17.22
lukebates123 Nov 9, 2022
45afb6a
Merge branch 'develop' into dependabot/pip/nornir-salt-0.16.1
lukebates123 Nov 9, 2022
00b1b13
Update ruamel-yaml requirement from <=0.16.13 to <0.17.22 (#223)
trad511 Nov 9, 2022
3bf440e
Merge branch 'develop' into dependabot/pip/nornir-salt-0.16.1
trad511 Nov 9, 2022
f9f2e5a
Bump nornir-salt from 0.9.0 to 0.16.1 (#222)
trad511 Nov 9, 2022
342becb
Updating template for `Jenkinsfile`
rustydb Nov 9, 2022
7807f61
Updating template for `Jenkinsfile` (#234)
rustydb Nov 11, 2022
0f069a6
Minor update to support Snyk scanning
rustydb Nov 11, 2022
f7df1cf
Minor update to support Snyk scanning (#235)
trad511 Nov 14, 2022
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
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
select = B,B9,BLK,C,D,DAR,E,F,I,W,C4,N
ignore = E203,E501,W503,WPS111,WPS201,WPS202,WPS210,WPS211,WPS213,WPS219,WPS220,WPS221,WPS216,WPS226,WPS231,WPS232,WPS305,WPS336,WPS432,I001,I003,I004,I005
ignore = E203,E501,W503,WPS111,WPS201,WPS202,WPS210,WPS211,WPS213,WPS219,WPS220,WPS221,WPS216,WPS226,WPS231,WPS232,WPS305,WPS336,WPS432,I001,I003,I004,I005,BLK100
max-line-length = 120
application-import-names = canu,tests
import-order-style = google
Expand Down
26 changes: 26 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Summary and Scope

Description:

<!-- What does this change do? Use examples of new options and output changes when possible. If other changes were made list these as well in a list. --->

PR checklist (you may replace this section):

- [ ] I have run `nox` locally and all tests, linting, and code coverage pass
- [ ] I have added new tests to cover the new code
- [ ] My code follows the style guidelines of this project
- [ ] If adding a new file, I have updated `pyinstaller.py`
- [ ] I have updated the appropriate Changelog entries in `README.md`
- [ ] I have incremented the version in the `README.md`

### Issues and Related PRs

* Resolves: `Issue`
* Relates to: `Issue`
* Requires: `Issue`

### Testing

Tested on:

<!-- List of virtual or physical systems used. --->
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
26 changes: 0 additions & 26 deletions .github/pull_request_template.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Python package
name: Python

on: [push]

jobs:
nox:
name: Coverage, Docs, Lint, and Unit Tests
name: Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Also fetch git-tags
- name: Set up Python
uses: actions/setup-python@v3
with:
Expand All @@ -16,4 +18,5 @@ jobs:
env:
GIT_REPO_NAME: "${GITHUB_REPOSITORY#*/}"
run: |
make test
pip install .[ci]
nox -e docs
22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Python

on: [push]

jobs:
nox:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Also fetch git-tags
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: nox
env:
GIT_REPO_NAME: "${GITHUB_REPOSITORY#*/}"
run: |
pip install .[ci]
nox -e lint
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Python

on: [push]

jobs:
nox:
name: Tests and Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Also fetch git-tags
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: nox
env:
GIT_REPO_NAME: "${GITHUB_REPOSITORY#*/}"
run: |
pip install .[ci]
nox -e tests
nox -e cover
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
canu_cache.yaml
files/*
nornir.log
pyinstaller.spec

# Build artifacts
*.py[cod]
Expand Down
1 change: 0 additions & 1 deletion .version

This file was deleted.

24 changes: 7 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,22 @@
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

FROM artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python:3.10

# create canu user
RUN useradd -ms /bin/bash canu
FROM artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python:3.10

# update command prompt
RUN echo 'export PS1="canu \w : "' >> /etc/bash.bashrc

# make files dir
RUN mkdir /files

# prep image layer for faster builds
COPY requirements.txt /app/canu/

RUN pip3 install -r /app/canu/requirements.txt
COPY dist/rpmbuild/RPMS/x86_64/ /files

# copy canu files
COPY . /app/canu

# install canu
RUN pip3 install --editable /app/canu/
RUN ls -l /files && \
zypper --no-gpg-checks -n in --allow-unsigned-rpm --auto-agree-with-licenses -y /files/canu*.rpm

# set file perms for canu
RUN chown -R canu /app/canu /files /home
# set none root user: canu
USER canu
RUN chown -R canu /files /home

USER canu

WORKDIR /files
97 changes: 46 additions & 51 deletions Jenkinsfile.github
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
// (C) Copyright [2022] Hewlett Packard Enterprise Development LP
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
/*
*
* MIT License
*
* (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
*/

@Library('csm-shared-library') _

def isStable = env.TAG_NAME != null ? true : false
def pythonImage = 'artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python'
def pythonVersion = '3.10'

pipeline {

agent {
label "metal-gcp-builder"
}
Expand All @@ -34,49 +44,34 @@ pipeline {
}

environment {
DESCRIPTION = "CANU (CSM Automatic Network Utility) will float through a Shasta network and make switch setup and validation a breeze."
IS_STABLE = getBuildIsStable()
GIT_REPO_NAME = getRepoName()
BUILD_METADATA = getRpmRevision(isStable: env.IS_STABLE)
IMAGE_VERSION = getDockerBuildVersion(isStable: env.IS_STABLE)
DOCKER_ARGS = getDockerBuildArgs(name: "cray-${getRepoName()}", description: env.DESCRIPTION)
NAME = getRepoName()
IMAGE_VERSION = sh(returnStdout: true, script: "git describe --tags | tr -s '-' '_' | tr -d '^v'").trim()
VERSION = sh(returnStdout: true, script: "git describe --tags | tr -s '-' '~' | tr -d '^v'").trim()
}

stages {

stage("Prepare: RPM") {
stage('Prepare: RPMs') {
agent {
docker {
image "artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python:${pythonVersion}"
label 'docker'
image "${pythonImage}:${pythonVersion}"
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 {
script {
runLibraryScript("addRpmMetaData.sh", "${env.GIT_REPO_NAME}.spec")
sh "make prepare"
}
runLibraryScript("addRpmMetaData.sh", "${env.NAME}.spec")
sh "make prepare"
sh "git update-index --assume-unchanged ${env.NAME}.spec"
}
}

stage("Build: Binary") {
steps {
script {
sh "make binary"
}
}
}


stage("Build: RPMs") {
stage('Build: RPMs') {
agent {
docker {
image "artifactory.algol60.net/csm-docker/stable/csm-docker-sle-python:${pythonVersion}"
label 'docker'
image "${pythonImage}:${pythonVersion}"
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 {
Expand All @@ -87,10 +82,10 @@ pipeline {
stage('Publish: RPMs') {
steps {
script {
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: "sle-15sp2", arch: "x86_64", isStable: env.IS_STABLE)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: "sle-15sp3", arch: "x86_64", isStable: env.IS_STABLE)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp2", arch: "src", isStable: env.IS_STABLE)
publishCsmRpms(component: env.GIT_REPO_NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp3", arch: "src", isStable: env.IS_STABLE)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: "sle-15sp2", arch: "x86_64", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/RPMS/x86_64/*.rpm", os: "sle-15sp3", arch: "x86_64", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp2", arch: "src", isStable: isStable)
publishCsmRpms(component: env.NAME, pattern: "dist/rpmbuild/SRPMS/*.rpm", os: "sle-15sp3", arch: "src", isStable: isStable)
}
}
}
Expand All @@ -106,7 +101,7 @@ pipeline {
stage('Publish: Image') {
steps {
script {
publishCsmDockerImage(image: "cray-${env.GIT_REPO_NAME}", tag: env.IMAGE_VERSION, isStable: env.IS_STABLE)
publishCsmDockerImage(image: "cray-${env.NAME}", tag: env.IMAGE_VERSION, isStable: isStable)
}
}
}
Expand Down
14 changes: 6 additions & 8 deletions pyinstaller.sh → MANIFEST.in
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
#
# MIT License
#
# (C) Copyright [2022] Hewlett Packard Enterprise Development LP
# (C) Copyright 2022 Hewlett Packard Enterprise Development LP
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
Expand All @@ -20,9 +20,7 @@
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

# Pyinstaller needs a .spec file but it conflicts with rpm builds
cp pyinstaller.py pyinstaller.spec
pyinstaller --clean -y --dist ./dist/linux --workpath /tmp pyinstaller.spec
rm pyinstaller.spec
chown -R --reference=. ./dist/linux
#
include README.md
include LICENSE
global-include *.yaml
Loading