Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/nb37
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGES.md
#	pack.yaml
  • Loading branch information
abhi1693 committed Jan 25, 2024
2 parents b0820b3 + 6f5c6a4 commit 96f2053
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 11 deletions.
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence, users and
# teams which are put in owners will be requested for review
# when someone opens a pull request.

# This is base configuration. These owners could review all
# files in this repository.
* @lampwins @abhi1693 @StackStorm-Exchange/tsc

# CI configuration files should be reviewed by specific owners
# who are more responsible for ensuring the quality of this pack
# or orchestrate StackStorm-Exchanges.
.circleci/** @StackStorm-Exchange/tsc
.github/** @StackStorm-Exchange/tsc
15 changes: 11 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
# Change Log

## 3.3.0
## 3.4.0

- Updated spec as per v3.7.1

## 3.2.0
## 3.3.0

- Updated spec as per v3.6.9

## 3.2.0

- Update spec as per v3.5.9

## 3.1.0

- Updated spec as per v3.5.9
- Updated spec as per v3.4.7

## 3.0.7

- Add @abhi1693 as code owner.

## 3.0.6

Expand Down Expand Up @@ -94,4 +102,3 @@

## 0.1.0
- First release

29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,32 @@ http://<ip-address>:<port>/netbox/webhooks/
```
**Note:** the sensor does not support HTTPS but this could be accomplished by fronting the sensor with Nginx/Apache/etc, which would terminate the SSL connection and then proxy the request to the sensor over HTTP.
# How to update the pack
The pack is auto generated from the NetBox OpenAPI (Swagger) spec file. To update the pack, follow these steps:
1. Create a virtual environment and install the required dependencies:
```shell
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
```

2. Change to `bin` directory and run the `generate.py` script:
```shell
cd bin
python generate.py --url https://demo.netbox.dev
```

3. Update the `CHANGES.md` file with the new version of NetBox that was used to generate the pack.
4. Update the `pack.yaml` file with the new version of NetBox that was used to generate the pack.
5. Commit the changes and create a pull request.
6. Once the pull request is merged, a new version of the pack will be released to the StackStorm Exchange.

## Maintainers

Active pack maintainers with review & write repository access and expertise with Netbox:

- John Anderson <[email protected]> @lampwins
- Abhimanyu Saharan <[email protected]> @abhi1693
8 changes: 4 additions & 4 deletions bin/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def main():
"""
parser = argparse.ArgumentParser()
parser.add_argument(
'--host',
'--url',
type=str,
default='https://demo.netbox.dev',
help='NetBox hostname'
Expand All @@ -238,11 +238,11 @@ def main():
)

args = parser.parse_args()
host = str(args.host).rstrip('/')
url = str(args.url).rstrip('/')

try:
print(f'Connecting to {host}...')
response = requests.get(f'{host}/api/schema?format=json', verify=args.skip_ssl)
print(f'Connecting to {url}...')
response = requests.get(f'{url}/api/schema?format=json', verify=args.skip_ssl)
response.raise_for_status()
spec = response.json()
except requests.RequestException as e:
Expand Down
8 changes: 5 additions & 3 deletions pack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ keywords:
- networking
- ipam
- dcim
version: 3.3.0
author: John Anderson, Jefferson White
email: [email protected]
version: 3.4.0
python_versions:
- "3"
author: John Anderson, Jefferson White
email: [email protected]
contributors:
- Abhimanyu Saharan <[email protected]>

0 comments on commit 96f2053

Please sign in to comment.