forked from mirrors/thatmattlove-hyperglass
Merge branch 'develop' into generic-commands
This commit is contained in:
commit
b05e544e40
22 changed files with 207 additions and 194 deletions
96
CHANGELOG.md
96
CHANGELOG.md
|
|
@ -4,10 +4,24 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
# 1.0.1 - 2021-06-17
|
# 1.0.4 - 2021-07-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#150](https://github.com/checktheroads/hyperglass/issues/150): Fix handling of BIRD AS_PATH/Community targets.
|
- [#148](https://github.com/thatmattlove/hyperglass/issues/148): Update Debian/Ubuntu Python package name in installer and documentation.
|
||||||
|
- [#151](https://github.com/thatmattlove/hyperglass/issues/151): Fix issue with Junos structured output parsing from d1160fe where hyperglass would always query both IPv4 and IPv6 for any query type.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Improve handling of Junos XML errors. When a Junos device returns an error in the XML output, it will be displayed in the UI.
|
||||||
|
- Improve `hyperglass system-info` output. NodeJS version is now included in the output.
|
||||||
|
|
||||||
|
# 1.0.3 - 2021-06-23
|
||||||
|
|
||||||
|
_1.0.3 is a cosmetic release to factor in code-level changes related to the repository name change from checktheroads to thatmattlove._
|
||||||
|
|
||||||
|
# 1.0.2 - 2021-06-18
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- [#150](https://github.com/thatmattlove/hyperglass/issues/150): Fix handling of BIRD AS_PATH/Community targets.
|
||||||
|
|
||||||
# 1.0.1 - 2021-06-17
|
# 1.0.1 - 2021-06-17
|
||||||
|
|
||||||
|
|
@ -21,13 +35,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- The transitionary `frr_ssh` and `bird_ssh` NOS parameters no longer exist — `frr` and `bird` can now be used for SSH-based connectivity. hyperglass-agent users must now use `frr_legacy` and `bird_legacy` until hyperglass-agent is fully deprecated.
|
- The transitionary `frr_ssh` and `bird_ssh` NOS parameters no longer exist — `frr` and `bird` can now be used for SSH-based connectivity. hyperglass-agent users must now use `frr_legacy` and `bird_legacy` until hyperglass-agent is fully deprecated.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#139](https://github.com/checktheroads/hyperglass/issues/139): Fix an issue where the API cannot be queried by device name.
|
- [#139](https://github.com/thatmattlove/hyperglass/issues/139): Fix an issue where the API cannot be queried by device name.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Updated UI dependencies
|
- Updated UI dependencies
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- [#140](https://github.com/checktheroads/hyperglass/issues/140): Genericize links and menus so that multiple links and/or menus can be defined and fully customized.
|
- [#140](https://github.com/thatmattlove/hyperglass/issues/140): Genericize links and menus so that multiple links and/or menus can be defined and fully customized.
|
||||||
|
|
||||||
# 1.0.0-beta.82 - 2021-04-22
|
# 1.0.0-beta.82 - 2021-04-22
|
||||||
|
|
||||||
|
|
@ -35,13 +49,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
**NodeJS 14.15 or later is required**. See [the docs](https://hyperglass.dev/docs/getting-started) for installation instructions.
|
**NodeJS 14.15 or later is required**. See [the docs](https://hyperglass.dev/docs/getting-started) for installation instructions.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#135](https://github.com/checktheroads/hyperglass/issues/135): Fix an issue where Juniper indirect next-hops were empty.
|
- [#135](https://github.com/thatmattlove/hyperglass/issues/135): Fix an issue where Juniper indirect next-hops were empty.
|
||||||
- Fix an issue where Juniper structured AS_PATH or Community queries would appear to fail if one address family (IPv4 or IPv6) had an empty response. For example, if an AS_PATH query for `.* 29414 .*` was made (which only returns IPv4 routes), the query would fail.
|
- Fix an issue where Juniper structured AS_PATH or Community queries would appear to fail if one address family (IPv4 or IPv6) had an empty response. For example, if an AS_PATH query for `.* 29414 .*` was made (which only returns IPv4 routes), the query would fail.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Updated major Python dependencies (FastAPI, Scrapli, Netmiko, Pydantic, Uvicorn, Gunicorn, etc.)
|
- Updated major Python dependencies (FastAPI, Scrapli, Netmiko, Pydantic, Uvicorn, Gunicorn, etc.)
|
||||||
- Updated UI dependencies
|
- Updated UI dependencies
|
||||||
- [#128](https://github.com/checktheroads/hyperglass/pull/128): Add `best` to all Juniper BGP Route queries. See [Juniper docs](https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/ref/command/show-route-best.html) for more details.
|
- [#128](https://github.com/thatmattlove/hyperglass/pull/128): Add `best` to all Juniper BGP Route queries. See [Juniper docs](https://www.juniper.net/documentation/us/en/software/junos/bgp/topics/ref/command/show-route-best.html) for more details.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- The driver for devices can now be overridden with the `driver` parameter.
|
- The driver for devices can now be overridden with the `driver` parameter.
|
||||||
|
|
@ -49,17 +63,17 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
# 1.0.0-beta.81 - 2021-04-10
|
# 1.0.0-beta.81 - 2021-04-10
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#124](https://github.com/checktheroads/hyperglass/issues/124): Fix an issue where networks weren't always sorted alphabetically.
|
- [#124](https://github.com/thatmattlove/hyperglass/issues/124): Fix an issue where networks weren't always sorted alphabetically.
|
||||||
- [#126](https://github.com/checktheroads/hyperglass/issues/126): Fix rendering of markdown tables.
|
- [#126](https://github.com/thatmattlove/hyperglass/issues/126): Fix rendering of markdown tables.
|
||||||
- [#132](https://github.com/checktheroads/hyperglass/issues/132): Fix an issue where iBGP routes on Arista devices caused output parsing to fail.
|
- [#132](https://github.com/thatmattlove/hyperglass/issues/132): Fix an issue where iBGP routes on Arista devices caused output parsing to fail.
|
||||||
- [#133](https://github.com/checktheroads/hyperglass/issues/133): Use body styles for background/foreground color, allowing the user to override the `light` and `dark` colors per the docs.
|
- [#133](https://github.com/thatmattlove/hyperglass/issues/133): Use body styles for background/foreground color, allowing the user to override the `light` and `dark` colors per the docs.
|
||||||
- Fix an issue with select menu list style.
|
- Fix an issue with select menu list style.
|
||||||
|
|
||||||
## 1.0.0-beta.80 - 2021-03-03
|
## 1.0.0-beta.80 - 2021-03-03
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix an issue where the UI did not properly filter and detect the correct Query VRF when only one was defined.
|
- Fix an issue where the UI did not properly filter and detect the correct Query VRF when only one was defined.
|
||||||
- [#121](https://github.com/checktheroads/hyperglass/issues/121): Fix issue with select menu styling in light mode.
|
- [#121](https://github.com/thatmattlove/hyperglass/issues/121): Fix issue with select menu styling in light mode.
|
||||||
|
|
||||||
## 1.0.0-beta.79 - 2021-02-26
|
## 1.0.0-beta.79 - 2021-02-26
|
||||||
|
|
||||||
|
|
@ -92,14 +106,14 @@ Moving forward, the `name` field is only used to define the name of the VRF **as
|
||||||
**POTENTIALLY BREAKING CHANGE**: The device `display_name` field is being deprecated, in favor of a single `name` field, which will be displayed to the end user. The `display_name` field still works, but you should migrate away from it as soon as possible.
|
**POTENTIALLY BREAKING CHANGE**: The device `display_name` field is being deprecated, in favor of a single `name` field, which will be displayed to the end user. The `display_name` field still works, but you should migrate away from it as soon as possible.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#117](https://github.com/checktheroads/hyperglass/issues/117): Fix naming and mapping of the Arista EOS driver. `arista` and `arista_eos` will both work now.
|
- [#117](https://github.com/thatmattlove/hyperglass/issues/117): Fix naming and mapping of the Arista EOS driver. `arista` and `arista_eos` will both work now.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Removed `display_name` field from device model. The `name` field will be used in the UI. If a `display_name` is defined, it will be used, for backwards compatibility.
|
- Removed `display_name` field from device model. The `name` field will be used in the UI. If a `display_name` is defined, it will be used, for backwards compatibility.
|
||||||
|
|
||||||
## 1.0.0-beta.76 - 2021-02-06
|
## 1.0.0-beta.76 - 2021-02-06
|
||||||
|
|
||||||
**NOTICE**: *[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) will be deprecated soon. Use `frr_ssh` or `bird_ssh` for SSH connectivity in the meantime.*
|
**NOTICE**: *[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) will be deprecated soon. Use `frr_ssh` or `bird_ssh` for SSH connectivity in the meantime.*
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- FRR & BIRD may now be accessed via standard SSH using the `frr_ssh` and `bird_ssh` NOS. [See the docs](https://hyperglass.dev/docs/platforms#caveats) for important caveats.
|
- FRR & BIRD may now be accessed via standard SSH using the `frr_ssh` and `bird_ssh` NOS. [See the docs](https://hyperglass.dev/docs/platforms#caveats) for important caveats.
|
||||||
|
|
@ -124,24 +138,24 @@ Moving forward, the `name` field is only used to define the name of the VRF **as
|
||||||
- Updated UI dependencies.
|
- Updated UI dependencies.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#109](https://github.com/checktheroads/hyperglass/issues/109): Remove the custom error page, because it doesn't work and doesn't really add much.
|
- [#109](https://github.com/thatmattlove/hyperglass/issues/109): Remove the custom error page, because it doesn't work and doesn't really add much.
|
||||||
|
|
||||||
## 1.0.0-beta.73 - 2021-01-18
|
## 1.0.0-beta.73 - 2021-01-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- [#106](https://github.com/checktheroads/hyperglass/issues/106): Add built-in support for Nokia SR OS (thanks @paunadeu!).
|
- [#106](https://github.com/thatmattlove/hyperglass/issues/106): Add built-in support for Nokia SR OS (thanks @paunadeu!).
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- [#105](https://github.com/checktheroads/hyperglass/issues/105): Check NodeJS version on startup to ensure the minimum supported version is present.
|
- [#105](https://github.com/thatmattlove/hyperglass/issues/105): Check NodeJS version on startup to ensure the minimum supported version is present.
|
||||||
- Update UI dependencies.
|
- Update UI dependencies.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#107](https://github.com/checktheroads/hyperglass/issues/107): Fix footer menu styling so it doesn't overflow the viewport, especially on mobile.
|
- [#107](https://github.com/thatmattlove/hyperglass/issues/107): Fix footer menu styling so it doesn't overflow the viewport, especially on mobile.
|
||||||
|
|
||||||
## 1.0.0-beta.72 - 2021-01-16
|
## 1.0.0-beta.72 - 2021-01-16
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#104](https://github.com/checktheroads/hyperglass/issues/104): Handle the usage of `juniper_junos` as a NOS. `juniper_junos` will now automatically be mapped to `juniper`.
|
- [#104](https://github.com/thatmattlove/hyperglass/issues/104): Handle the usage of `juniper_junos` as a NOS. `juniper_junos` will now automatically be mapped to `juniper`.
|
||||||
- Fix an issue with dual RP juniper devices and structured output, where output containing `{master}` outside of the XML output was improperly stripped out, causing a parsing failure.
|
- Fix an issue with dual RP juniper devices and structured output, where output containing `{master}` outside of the XML output was improperly stripped out, causing a parsing failure.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
@ -159,7 +173,7 @@ Moving forward, the `name` field is only used to define the name of the VRF **as
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#100](https://github.com/checktheroads/hyperglass/issues/100): Fix result panel bug where incorrect panels would open, or panels would not open at all. Resolved by accessing internal state of the `Accordion />` component via `useAccordionContext()` instead of directly changing the index prop via state.
|
- [#100](https://github.com/thatmattlove/hyperglass/issues/100): Fix result panel bug where incorrect panels would open, or panels would not open at all. Resolved by accessing internal state of the `Accordion />` component via `useAccordionContext()` instead of directly changing the index prop via state.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Query results now automatically cancel when each result panel unmounts (e.g. when one clicks the back button).
|
- Query results now automatically cancel when each result panel unmounts (e.g. when one clicks the back button).
|
||||||
|
|
@ -197,7 +211,7 @@ Moving forward, the `name` field is only used to define the name of the VRF **as
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [#72](https://github.com/checktheroads/hyperglass/issues/72): _EXPERIMENTAL_ BGP map support for devices supporting structured output (Juniper Junos, currently).
|
- [#72](https://github.com/thatmattlove/hyperglass/issues/72): _EXPERIMENTAL_ BGP map support for devices supporting structured output (Juniper Junos, currently).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
@ -212,7 +226,7 @@ Moving forward, the `name` field is only used to define the name of the VRF **as
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [#87](https://github.com/checktheroads/hyperglass/issues/87): [TNSR] Support. To add a TNSR device, use the `tnsr` [NOS key](https://hyperglass.dev/docs/adding-devices#all-device-parameters).
|
- [#87](https://github.com/thatmattlove/hyperglass/issues/87): [TNSR] Support. To add a TNSR device, use the `tnsr` [NOS key](https://hyperglass.dev/docs/adding-devices#all-device-parameters).
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|
@ -236,17 +250,17 @@ When hyperglass starts up, it will check to see if `~/hyperglass` or `/etc/hyper
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [#81](https://github.com/checktheroads/hyperglass/issues/81): Add support for SSH key authentication. See [the docs](https://hyperglass.dev/docs/adding-devices#credential) for more details.
|
- [#81](https://github.com/thatmattlove/hyperglass/issues/81): Add support for SSH key authentication. See [the docs](https://hyperglass.dev/docs/adding-devices#credential) for more details.
|
||||||
|
|
||||||
## 1.0.0-beta.60 - 2020-10-10
|
## 1.0.0-beta.60 - 2020-10-10
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#90](https://github.com/checktheroads/hyperglass/issues/90): Fix a typing error that caused ping & traceroute queries to fail for certain devices.
|
- [#90](https://github.com/thatmattlove/hyperglass/issues/90): Fix a typing error that caused ping & traceroute queries to fail for certain devices.
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- [#82](https://github.com/checktheroads/hyperglass/issues/82): Add support for Redis password authentication. Authentication can be configured in the following manner:
|
- [#82](https://github.com/thatmattlove/hyperglass/issues/82): Add support for Redis password authentication. Authentication can be configured in the following manner:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# hyperglass.yaml
|
# hyperglass.yaml
|
||||||
|
|
@ -276,7 +290,7 @@ requirepass examplepassword
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- [#79](https://github.com/checktheroads/hyperglass/issues/79): Run the UI build on startup & clarify docs.
|
- [#79](https://github.com/thatmattlove/hyperglass/issues/79): Run the UI build on startup & clarify docs.
|
||||||
- Removed all f-strings from log messages.
|
- Removed all f-strings from log messages.
|
||||||
- Migrate icon library to [@meronex/icons](https://github.com/meronex/meronex-icons) for better tree-shaking.
|
- Migrate icon library to [@meronex/icons](https://github.com/meronex/meronex-icons) for better tree-shaking.
|
||||||
- Improve console (stdout) logging
|
- Improve console (stdout) logging
|
||||||
|
|
@ -284,16 +298,16 @@ requirepass examplepassword
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#74](https://github.com/checktheroads/hyperglass/issues/74): Fix UI build failures caused by `.alias.js`.
|
- [#74](https://github.com/thatmattlove/hyperglass/issues/74): Fix UI build failures caused by `.alias.js`.
|
||||||
- [#75](https://github.com/checktheroads/hyperglass/issues/75): Fix whitespace stripping of query target.
|
- [#75](https://github.com/thatmattlove/hyperglass/issues/75): Fix whitespace stripping of query target.
|
||||||
- [#77](https://github.com/checktheroads/hyperglass/issues/77): Allow dashes in FQDN validation pattern.
|
- [#77](https://github.com/thatmattlove/hyperglass/issues/77): Allow dashes in FQDN validation pattern.
|
||||||
- [#83](https://github.com/checktheroads/hyperglass/issues/83): Fix lack of support for `protocol-nh` field in Juniper XML BGP table.
|
- [#83](https://github.com/thatmattlove/hyperglass/issues/83): Fix lack of support for `protocol-nh` field in Juniper XML BGP table.
|
||||||
|
|
||||||
## 1.0.0-beta.57 - 2020-07-30
|
## 1.0.0-beta.57 - 2020-07-30
|
||||||
|
|
||||||
### BREAKING CHANGE
|
### BREAKING CHANGE
|
||||||
|
|
||||||
If you use [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), you must upgrade your version of hyperglass-agent to 0.1.6 or later. If using hyperglass-agent with SSL, this release will require you to re-generate & re-send your SSL certificates to hyperglass:
|
If you use [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent), you must upgrade your version of hyperglass-agent to 0.1.6 or later. If using hyperglass-agent with SSL, this release will require you to re-generate & re-send your SSL certificates to hyperglass:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ hyperglass-agent certificate
|
$ hyperglass-agent certificate
|
||||||
|
|
@ -316,13 +330,13 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#56](https://github.com/checktheroads/hyperglass/issues/56): Fix a silent Redis connection error if the Redis server was anything other than `localhost`, preventing hyperglass from starting.
|
- [#56](https://github.com/thatmattlove/hyperglass/issues/56): Fix a silent Redis connection error if the Redis server was anything other than `localhost`, preventing hyperglass from starting.
|
||||||
|
|
||||||
## 1.0.0-beta.55 - 2020-07-27
|
## 1.0.0-beta.55 - 2020-07-27
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Removed JS favicon build process in favor of native Python implementation ([favicons](https://github/checktheroads/favicons))
|
- Removed JS favicon build process in favor of native Python implementation ([favicons](https://github/thatmattlove/favicons))
|
||||||
|
|
||||||
## 1.0.0-beta.54 - 2020-07-25
|
## 1.0.0-beta.54 - 2020-07-25
|
||||||
|
|
||||||
|
|
@ -334,7 +348,7 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **BREAKING CHANGE**: [Scrapli](https://github.com/carlmontanari/scrapli) is now used for SSH connectivity to Cisco IOS, Cisco IOS-XE, Cisco IOS-XR, Cisco NX-OS Juniper Junos, and Arista EOS, which should improve the speed at which output is gathered from devices. _As of this release, Cisco IOS/IOS-XE and Juniper Junos have been directly tested and worked without issue. However, if you discover any anomalies with any of these operating systems, please [open an issue](https://github.com/checktheroads/hyperglass/issues)._
|
- **BREAKING CHANGE**: [Scrapli](https://github.com/carlmontanari/scrapli) is now used for SSH connectivity to Cisco IOS, Cisco IOS-XE, Cisco IOS-XR, Cisco NX-OS Juniper Junos, and Arista EOS, which should improve the speed at which output is gathered from devices. _As of this release, Cisco IOS/IOS-XE and Juniper Junos have been directly tested and worked without issue. However, if you discover any anomalies with any of these operating systems, please [open an issue](https://github.com/thatmattlove/hyperglass/issues)._
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
@ -352,23 +366,23 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
- API route `/api/info`, which displays general system information such as the name of the organization and version of hyperglass.
|
- API route `/api/info`, which displays general system information such as the name of the organization and version of hyperglass.
|
||||||
- API docs configuration parameters for the `/api/info` route.
|
- API docs configuration parameters for the `/api/info` route.
|
||||||
- [#63](https://github.com/checktheroads/hyperglass/issues/63): Minimum RAM requirements.
|
- [#63](https://github.com/thatmattlove/hyperglass/issues/63): Minimum RAM requirements.
|
||||||
- `hyperglass system-info` CLI command to gather system CPU, Memory, Disk, Python Version, hyperglass Version, & OS info. _Note: this information is only gathered if you run the command, and even then, is printed to the console and not otherwise shared or exported_.
|
- `hyperglass system-info` CLI command to gather system CPU, Memory, Disk, Python Version, hyperglass Version, & OS info. _Note: this information is only gathered if you run the command, and even then, is printed to the console and not otherwise shared or exported_.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Updated docs dependencies.
|
- Updated docs dependencies.
|
||||||
- Improved YAML alias & anchor docs.
|
- Improved YAML alias & anchor docs.
|
||||||
- [#55](https://github.com/checktheroads/hyperglass/issues/55): Removed YAML alias & anchors from default examples to avoid confusion.
|
- [#55](https://github.com/thatmattlove/hyperglass/issues/55): Removed YAML alias & anchors from default examples to avoid confusion.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- API docs logo URL now displays correctly.
|
- API docs logo URL now displays correctly.
|
||||||
- [#62](https://github.com/checktheroads/hyperglass/issues/62): Added `epel-release` to CentOS installation instructions.
|
- [#62](https://github.com/thatmattlove/hyperglass/issues/62): Added `epel-release` to CentOS installation instructions.
|
||||||
- [#59](https://github.com/checktheroads/hyperglass/issues/59): Fixed copy output for Juniper devices on non-table output query types.
|
- [#59](https://github.com/thatmattlove/hyperglass/issues/59): Fixed copy output for Juniper devices on non-table output query types.
|
||||||
- [hyperglass-agent #6](https://github.com/hyperglass-agent/issues/6): Fixed hyperglass-agent documentation issues.
|
- [hyperglass-agent #6](https://github.com/hyperglass-agent/issues/6): Fixed hyperglass-agent documentation issues.
|
||||||
- Improve command customization docs.
|
- Improve command customization docs.
|
||||||
- [#61](https://github.com/checktheroads/hyperglass/issues/61): Fixed copy output for table data. Output is now a bulleted list of parsed data.
|
- [#61](https://github.com/thatmattlove/hyperglass/issues/61): Fixed copy output for table data. Output is now a bulleted list of parsed data.
|
||||||
|
|
||||||
## 1.0.0-beta.51 - 2020-07-13
|
## 1.0.0-beta.51 - 2020-07-13
|
||||||
|
|
||||||
|
|
@ -379,7 +393,7 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#54](https://github.com/checktheroads/hyperglass/issues/54): A Junos parsing error caused routes with no communities to raise an error.
|
- [#54](https://github.com/thatmattlove/hyperglass/issues/54): A Junos parsing error caused routes with no communities to raise an error.
|
||||||
- Pre-validated config files are no longer logged on startup unless debugging is enabled.
|
- Pre-validated config files are no longer logged on startup unless debugging is enabled.
|
||||||
|
|
||||||
## 1.0.0-beta.50 - 2020-07-12
|
## 1.0.0-beta.50 - 2020-07-12
|
||||||
|
|
@ -399,7 +413,7 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#54](https://github.com/checktheroads/hyperglass/issues/54): A Junos structured/table output parsing error caused routes with multiple next-hops to raise an error.
|
- [#54](https://github.com/thatmattlove/hyperglass/issues/54): A Junos structured/table output parsing error caused routes with multiple next-hops to raise an error.
|
||||||
- RPKI validation no longer occurs twice (once on serialization of the output, once on validation of the API response).
|
- RPKI validation no longer occurs twice (once on serialization of the output, once on validation of the API response).
|
||||||
|
|
||||||
## 1.0.0-beta.49 - 2020-07-05
|
## 1.0.0-beta.49 - 2020-07-05
|
||||||
|
|
@ -451,7 +465,7 @@ $ hyperglass-agent send-certificate
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Support for hyperglass-agent [0.1.5](https://github.com/checktheroads/hyperglass-agent)
|
- Support for hyperglass-agent [0.1.5](https://github.com/thatmattlove/hyperglass-agent)
|
||||||
|
|
||||||
## 1.0.0-beta.45 - 2020-06-27
|
## 1.0.0-beta.45 - 2020-06-27
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
hyperglass is primarily maintained by me, [Matt Love](https://github.com/checktheroads). This is my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, Javascript, or Github. I was a network engineer trying to solve a problem and learn a few things while I was at it.
|
hyperglass is primarily maintained by me, [Matt Love](https://github.com/thatmattlove). This is my first ever open source application, and as such, it's kind of my "baby". When I first started writing hyperglass, I knew _nothing_ about development, Python, Javascript, or Github. I was a network engineer trying to solve a problem and learn a few things while I was at it.
|
||||||
|
|
||||||
Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I **absolutely welcome development contributions**, please don't be offended if pull requests are denied, or if I request things to be done a certain way. To help understand why, here are some of the development design goals for hyperglass:
|
Because I've been solo-maintaining and building hyperglass since around April 2019, I've become pretty particular about things that might seem trivial to someone just trying to help out. While I **absolutely welcome development contributions**, please don't be offended if pull requests are denied, or if I request things to be done a certain way. To help understand why, here are some of the development design goals for hyperglass:
|
||||||
|
|
||||||
|
|
|
||||||
14
README.md
14
README.md
|
|
@ -15,11 +15,11 @@
|
||||||
|
|
||||||
[](https://pypi.org/project/hyperglass/)
|
[](https://pypi.org/project/hyperglass/)
|
||||||

|

|
||||||
[](https://github.com/checktheroads/hyperglass)
|
[](https://github.com/thatmattlove/hyperglass)
|
||||||
|
|
||||||
[](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Frontend+Testing%22)
|
[](https://github.com/thatmattlove/hyperglass/actions?query=workflow%3A%Frontend+Testing%22)
|
||||||
[](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Backend+Testing%22)
|
[](https://github.com/thatmattlove/hyperglass/actions?query=workflow%3A%Backend+Testing%22)
|
||||||
[](https://github.com/checktheroads/hyperglass/actions?query=workflow%3A%Installer+Testing%22)
|
[](https://github.com/thatmattlove/hyperglass/actions?query=workflow%3A%Installer+Testing%22)
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ hyperglass is intended to make implementing a looking glass too easy not to do,
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### [Changelog](https://github.com/checktheroads/hyperglass/blob/v1.0.0/CHANGELOG.md)
|
### [Changelog](https://github.com/thatmattlove/hyperglass/blob/v1.0.0/CHANGELOG.md)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ hyperglass is intended to make implementing a looking glass too easy not to do,
|
||||||
- Query multiple devices simultaneously
|
- Query multiple devices simultaneously
|
||||||
- Browser-based DNS-over-HTTPS resolution of FQDN queries
|
- Browser-based DNS-over-HTTPS resolution of FQDN queries
|
||||||
|
|
||||||
*To request support for a specific platform, please [submit a Github Issue](https://github.com/checktheroads/hyperglass/issues/new) with the **feature** label.*
|
*To request support for a specific platform, please [submit a Github Issue](https://github.com/thatmattlove/hyperglass/issues/new) with the **feature** label.*
|
||||||
|
|
||||||
### [Get Started →](https://hyperglass.dev/docs/introduction)
|
### [Get Started →](https://hyperglass.dev/docs/introduction)
|
||||||
|
|
||||||
|
|
@ -83,4 +83,4 @@ hyperglass is built entirely on open-source software. Here are some of the aweso
|
||||||
- [Pydantic](https://pydantic-docs.helpmanual.io/)
|
- [Pydantic](https://pydantic-docs.helpmanual.io/)
|
||||||
- [Chakra UI](https://chakra-ui.com/)
|
- [Chakra UI](https://chakra-ui.com/)
|
||||||
|
|
||||||
[](https://github.com/checktheroads/hyperglass/blob/v1.0.0/LICENSE)
|
[](https://github.com/thatmattlove/hyperglass/blob/v1.0.0/LICENSE)
|
||||||
|
|
|
||||||
|
|
@ -41,19 +41,19 @@ routers:
|
||||||
|
|
||||||
## All Device Parameters
|
## All Device Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| :------------------ | :-----: | :----------------------------------------------------------------------------------------------------------------- |
|
| :------------------ | :-----: | :---------------------------------------------------------------------------------------------------------------- |
|
||||||
| <R/> `name` | String | Device's user-facing name. |
|
| <R/> `name` | String | Device's user-facing name. |
|
||||||
| <R/> `address` | String | Device management hostname or IP address. |
|
| <R/> `address` | String | Device management hostname or IP address. |
|
||||||
| <R/> `network` | String | [Network Configuration](#network) |
|
| <R/> `network` | String | [Network Configuration](#network) |
|
||||||
| <R/> `port` | Integer | TCP port used to connect to the device. `22` by default. |
|
| <R/> `port` | Integer | TCP port used to connect to the device. `22` by default. |
|
||||||
| <R/> `nos` | String | Network Operating System. <MiniNote>Must be a <Link to="platforms">supported platform</Link>.</MiniNote> |
|
| <R/> `nos` | String | Network Operating System. <MiniNote>Must be a <Link to="platforms">supported platform</Link>.</MiniNote> |
|
||||||
| `structured_output` | Boolean | Disabled output parsing to structured data. |
|
| `structured_output` | Boolean | Disabled output parsing to structured data. |
|
||||||
| `driver` | String | Override the device driver. Must be 'scrapli' or 'netmiko'. |
|
| `driver` | String | Override the device driver. Must be 'scrapli' or 'netmiko'. |
|
||||||
| <R/>`credential` | | [Device Credential Configuration](#credential) |
|
| <R/>`credential` | | [Device Credential Configuration](#credential) |
|
||||||
| <R/>`vrfs` | | [Device VRF Configuration](#vrfs) |
|
| <R/>`vrfs` | | [Device VRF Configuration](#vrfs) |
|
||||||
| `proxy` | | [SSH Proxy Configuration](#proxy) |
|
| `proxy` | | [SSH Proxy Configuration](#proxy) |
|
||||||
| `ssl` | | [SSL Configuration](#ssl) for devices using [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent). |
|
| `ssl` | | [SSL Configuration](#ssl) for devices using [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent). |
|
||||||
|
|
||||||
### `network`
|
### `network`
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ Currently, only `linux_ssh` has been tested and validated for use as an SSH prox
|
||||||
|
|
||||||
While all devices require a credential mapping, the credential values themselves may be used in different ways depending on the device NOS. For SSH devices, the credential is used as a typical SSH username and password.
|
While all devices require a credential mapping, the credential values themselves may be used in different ways depending on the device NOS. For SSH devices, the credential is used as a typical SSH username and password.
|
||||||
|
|
||||||
For HTTP devices (i.e. devices using [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent)), the username is ignored and the password is used as a secret for [JSON Web Token](https://tools.ietf.org/html/rfc7519) encoding/decoding.
|
For HTTP devices (i.e. devices using [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent)), the username is ignored and the password is used as a secret for [JSON Web Token](https://tools.ietf.org/html/rfc7519) encoding/decoding.
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| :-------------- | :----- | :----------------------------------------------------------- |
|
| :-------------- | :----- | :----------------------------------------------------------- |
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import Tabs from "@theme/Tabs";
|
||||||
import TabItem from "@theme/TabItem";
|
import TabItem from "@theme/TabItem";
|
||||||
|
|
||||||
:::caution Deprecation Warning
|
:::caution Deprecation Warning
|
||||||
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/thatmattlove/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
@ -77,5 +77,5 @@ $ pip3 install hyperglass-agent
|
||||||
```
|
```
|
||||||
|
|
||||||
:::caution Deprecation Warning
|
:::caution Deprecation Warning
|
||||||
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/thatmattlove/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import M from "../../src/components/MiniNote";
|
||||||
import PL from "../../src/components/PageLink";
|
import PL from "../../src/components/PageLink";
|
||||||
|
|
||||||
:::caution Deprecation Warning
|
:::caution Deprecation Warning
|
||||||
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/thatmattlove/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
<div class="table--full-width" />
|
<div class="table--full-width" />
|
||||||
|
|
@ -68,5 +68,5 @@ By default, hyperglass-agent writes all log messages to a log file located at `/
|
||||||
| `max_size` | String | `'50MB'` | Maximum log file size before old logs are overwritten. |
|
| `max_size` | String | `'50MB'` | Maximum log file size before old logs are overwritten. |
|
||||||
|
|
||||||
:::caution Deprecation Warning
|
:::caution Deprecation Warning
|
||||||
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/thatmattlove/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ description: Configure hyperglass-agent
|
||||||
import M from "../../src/components/MiniNote";
|
import M from "../../src/components/MiniNote";
|
||||||
|
|
||||||
:::caution Deprecation Warning
|
:::caution Deprecation Warning
|
||||||
[hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/checktheroads/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
[hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is going to be deprecated soon. See [Issue #143](https://github.com/thatmattlove/hyperglass/issues/143) and [here](platforms.mdx) for more detail.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
:::important Time & NTP
|
:::important Time & NTP
|
||||||
|
|
@ -55,5 +55,5 @@ Options:
|
||||||
:::
|
:::
|
||||||
|
|
||||||
:::important More coming soon
|
:::important More coming soon
|
||||||
Documentation for [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent) is in progress!
|
Documentation for [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent) is in progress!
|
||||||
:::
|
:::
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ $ curl https://install.hyperglass.dev | sudo bash
|
||||||
```
|
```
|
||||||
|
|
||||||
:::caution Piping to bash
|
:::caution Piping to bash
|
||||||
You should be <i>very</i> worried when someone asks you to do what I just did. Downloading a bash script from the internet and piping it to `bash` with root privileges is a terrible idea, unless you fully trust the source. Please don't trust me - go [look at the code](https://github.com/checktheroads/hyperglass/blob/v1.0.0/install.sh) and determine for your self if it's safe to execute. If you feel it's not, please proceed with the manual installation (and [tell me why](https://github.com/checktheroads/hyperglass/issues), so I can fix it).
|
You should be <i>very</i> worried when someone asks you to do what I just did. Downloading a bash script from the internet and piping it to `bash` with root privileges is a terrible idea, unless you fully trust the source. Please don't trust me - go [look at the code](https://github.com/thatmattlove/hyperglass/blob/v1.0.0/install.sh) and determine for your self if it's safe to execute. If you feel it's not, please proceed with the manual installation (and [tell me why](https://github.com/thatmattlove/hyperglass/issues), so I can fix it).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Manual Installation
|
## Manual Installation
|
||||||
|
|
@ -46,7 +46,7 @@ If you're confident upgrading your system's version of Python won't break your s
|
||||||
<TabItem value="debian">
|
<TabItem value="debian">
|
||||||
|
|
||||||
```shell-session
|
```shell-session
|
||||||
$ sudo apt install -y python3.6-dev python3-pip
|
$ sudo apt install -y python3-dev python3-pip
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ When [debug](parameters.mdx#global-settings) is set to `true`, the number of wor
|
||||||
|
|
||||||
### Memory
|
### Memory
|
||||||
|
|
||||||
Testing shows that hyperglass is extremely memory efficient at runtime. For example, running 4 simulations BGP Route queries, with two devices utilizing [hyperglass-agent](https://github.com/checktheroads/hyperglass-agent), and two devices utilizing SSH, the server increased RAM utilization by about 20MB during execution, and went back down afterwards.
|
Testing shows that hyperglass is extremely memory efficient at runtime. For example, running 4 simulations BGP Route queries, with two devices utilizing [hyperglass-agent](https://github.com/thatmattlove/hyperglass-agent), and two devices utilizing SSH, the server increased RAM utilization by about 20MB during execution, and went back down afterwards.
|
||||||
|
|
||||||
However, at build time, there are some fairly memory-intensive tasks which _will_ time out or cause strange errors without the proper amount of RAM. Testing suggests **2GB of RAM is sufficient**, however **4GB is the ideal minimum amount of RAM**.
|
However, at build time, there are some fairly memory-intensive tasks which _will_ time out or cause strange errors without the proper amount of RAM. Testing suggests **2GB of RAM is sufficient**, however **4GB is the ideal minimum amount of RAM**.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
const githubURL = "https://github.com/checktheroads/hyperglass";
|
const githubURL = "https://github.com/thatmattlove/hyperglass";
|
||||||
|
|
||||||
const { googleTrackingId, algoliaKey } = process.env;
|
const { googleTrackingId, algoliaKey } = process.env;
|
||||||
|
|
||||||
|
|
@ -8,7 +8,7 @@ const docusaurusConfig = {
|
||||||
url: "https://hyperglass.dev",
|
url: "https://hyperglass.dev",
|
||||||
baseUrl: "/",
|
baseUrl: "/",
|
||||||
favicon: "img/favicon.ico",
|
favicon: "img/favicon.ico",
|
||||||
organizationName: "checktheroads",
|
organizationName: "thatmattlove",
|
||||||
projectName: "hyperglass",
|
projectName: "hyperglass",
|
||||||
themeConfig: {
|
themeConfig: {
|
||||||
image: "opengraph.jpg",
|
image: "opengraph.jpg",
|
||||||
|
|
@ -77,7 +77,7 @@ const docusaurusConfig = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Twitter",
|
label: "Twitter",
|
||||||
href: "https://twitter.com/checktheroads",
|
href: "https://twitter.com/thatmattlove",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
"""hyperglass is a modern, customizable network looking glass written in Python 3.
|
"""hyperglass is a modern, customizable network looking glass written in Python 3.
|
||||||
|
|
||||||
https://github.com/checktheroads/hyperglass
|
https://github.com/thatmattlove/hyperglass
|
||||||
|
|
||||||
The Clear BSD License
|
The Clear BSD License
|
||||||
|
|
||||||
Copyright (c) 2020 Matthew Love
|
Copyright (c) 2021 Matthew Love
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,9 @@ def setup(unattended):
|
||||||
|
|
||||||
success(
|
success(
|
||||||
"""Completed hyperglass installation.
|
"""Completed hyperglass installation.
|
||||||
After adding your hyperglass.yaml file, you should run the `hyperglass build-ui` command.""" # noqa: E501
|
After adding your {devices} file, you should run the {build_cmd} command.""", # noqa: E501
|
||||||
|
devices="devices.yaml",
|
||||||
|
build_cmd="hyperglass build-ui",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,12 +148,12 @@ def write_to_file(file, data) -> bool:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def system_info() -> bool:
|
def system_info() -> None:
|
||||||
"""Create a markdown table of various system information."""
|
"""Create a markdown table of various system information."""
|
||||||
# Project
|
# Project
|
||||||
from hyperglass.util.system_info import get_system_info
|
from hyperglass.util.system_info import get_system_info
|
||||||
|
|
||||||
values = get_system_info()
|
data = get_system_info()
|
||||||
|
|
||||||
def _code(val):
|
def _code(val):
|
||||||
return f"`{str(val)}`"
|
return f"`{str(val)}`"
|
||||||
|
|
@ -161,39 +161,21 @@ def system_info() -> bool:
|
||||||
def _bold(val):
|
def _bold(val):
|
||||||
return f"**{str(val)}**"
|
return f"**{str(val)}**"
|
||||||
|
|
||||||
def _suffix(val, suffix):
|
md_table_lines = ("| Metric | Value |", "| :----- | :---- |")
|
||||||
return f"{str(val)}{str(suffix)}"
|
|
||||||
|
|
||||||
columns = (
|
for title, metric in data.items():
|
||||||
("hyperglass Version", _bold),
|
value, mod = metric
|
||||||
("hyperglass Path", _code),
|
|
||||||
("Python Version", _code),
|
|
||||||
("Platform Info", _code),
|
|
||||||
("CPU Info", None),
|
|
||||||
("Logical Cores", _code),
|
|
||||||
("Physical Cores", _code),
|
|
||||||
("Processor Speed", "GHz"),
|
|
||||||
("Total Memory", " GB"),
|
|
||||||
("Memory Utilization", "%"),
|
|
||||||
("Total Disk Space", " GB"),
|
|
||||||
("Disk Utilization", "%"),
|
|
||||||
)
|
|
||||||
md_table_lines = ("| Metric | Value |", "| ------ | ----- |")
|
|
||||||
|
|
||||||
for i, metric in enumerate(values):
|
title = _bold(title)
|
||||||
title, mod = columns[i]
|
|
||||||
value = metric
|
|
||||||
|
|
||||||
if isinstance(mod, str):
|
if mod == "code":
|
||||||
value = _suffix(value, mod)
|
value = _code(value)
|
||||||
elif callable(mod):
|
|
||||||
value = mod(value)
|
|
||||||
|
|
||||||
md_table_lines += (f"| **{title}** | {value} |",)
|
md_table_lines += (f"| {title} | {value} |",)
|
||||||
|
|
||||||
md_table = "\n".join(md_table_lines)
|
md_table = "\n".join(md_table_lines)
|
||||||
|
|
||||||
info("Please copy & paste this table in your bug report:\n")
|
info("Please copy & paste this table in your bug report:\n")
|
||||||
echo(md_table + "\n")
|
echo(md_table + "\n")
|
||||||
|
|
||||||
return True
|
return None
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
__name__ = "hyperglass"
|
__name__ = "hyperglass"
|
||||||
__version__ = "1.0.2"
|
__version__ = "1.0.4"
|
||||||
__author__ = "Matt Love"
|
__author__ = "Matt Love"
|
||||||
__copyright__ = f"Copyright {datetime.now().year} Matthew Love"
|
__copyright__ = f"Copyright {datetime.now().year} Matthew Love"
|
||||||
__license__ = "BSD 3-Clause Clear License"
|
__license__ = "BSD 3-Clause Clear License"
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ class Construct:
|
||||||
|
|
||||||
# Set AFIs for based on query type
|
# Set AFIs for based on query type
|
||||||
if self.query_data.query_type in ("bgp_route", "ping", "traceroute"):
|
if self.query_data.query_type in ("bgp_route", "ping", "traceroute"):
|
||||||
|
|
||||||
# For IP queries, AFIs are enabled (not null/None) VRF -> AFI definitions
|
# For IP queries, AFIs are enabled (not null/None) VRF -> AFI definitions
|
||||||
# where the IP version matches the IP version of the target.
|
# where the IP version matches the IP version of the target.
|
||||||
self.afis = [
|
self.afis = [
|
||||||
|
|
@ -52,8 +51,7 @@ class Construct:
|
||||||
)
|
)
|
||||||
if v is not None and self.query_data.query_target.version == v.version
|
if v is not None and self.query_data.query_target.version == v.version
|
||||||
]
|
]
|
||||||
|
elif self.query_data.query_type in ("bgp_aspath", "bgp_community"):
|
||||||
with Formatter(self.device.nos, self.query_data.query_type) as formatter:
|
|
||||||
# For AS Path/Community queries, AFIs are just enabled VRF -> AFI
|
# For AS Path/Community queries, AFIs are just enabled VRF -> AFI
|
||||||
# definitions, no IP version checking is performed (since there is no IP).
|
# definitions, no IP version checking is performed (since there is no IP).
|
||||||
self.afis = [
|
self.afis = [
|
||||||
|
|
@ -64,6 +62,8 @@ class Construct:
|
||||||
)
|
)
|
||||||
if v is not None
|
if v is not None
|
||||||
]
|
]
|
||||||
|
|
||||||
|
with Formatter(self.device.nos, self.query_data.query_type) as formatter:
|
||||||
self.target = formatter(self.query_data.query_target)
|
self.target = formatter(self.query_data.query_target)
|
||||||
|
|
||||||
def json(self, afi):
|
def json(self, afi):
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,9 @@ if sys.version_info < MIN_PYTHON_VERSION:
|
||||||
raise RuntimeError(f"Python {pretty_version}+ is required.")
|
raise RuntimeError(f"Python {pretty_version}+ is required.")
|
||||||
|
|
||||||
# Ensure the NodeJS version meets the minimum requirements.
|
# Ensure the NodeJS version meets the minimum requirements.
|
||||||
node_version = get_node_version()
|
node_major, _, __ = get_node_version()
|
||||||
|
|
||||||
if node_version != MIN_NODE_VERSION:
|
if node_major != MIN_NODE_VERSION:
|
||||||
raise RuntimeError(f"NodeJS {MIN_NODE_VERSION}+ is required.")
|
raise RuntimeError(f"NodeJS {MIN_NODE_VERSION}+ is required.")
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,11 @@ def parse_juniper(output: Sequence) -> Dict: # noqa: C901
|
||||||
log.debug("Initially Parsed Response: \n{}", parsed)
|
log.debug("Initially Parsed Response: \n{}", parsed)
|
||||||
|
|
||||||
if "rpc-reply" in parsed.keys():
|
if "rpc-reply" in parsed.keys():
|
||||||
|
if "xnm:error" in parsed["rpc-reply"]:
|
||||||
|
if "message" in parsed["rpc-reply"]["xnm:error"]:
|
||||||
|
err = parsed["rpc-reply"]["xnm:error"]["message"]
|
||||||
|
raise ParsingError('Error from device: "{}"', err)
|
||||||
|
|
||||||
parsed_base = parsed["rpc-reply"]["route-information"]
|
parsed_base = parsed["rpc-reply"]["route-information"]
|
||||||
elif "route-information" in parsed.keys():
|
elif "route-information" in parsed.keys():
|
||||||
parsed_base = parsed["route-information"]
|
parsed_base = parsed["route-information"]
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# hyperglass-ui
|
# hyperglass-ui
|
||||||
|
|
||||||
[hyperglass](https://github.com/checktheroads/hyperglass) UI, written in [React](https://reactjs.org/), on [Next.js](https://nextjs.org/), with [Chakra UI](https://chakra-ui.com/).
|
[hyperglass](https://github.com/thatmattlove/hyperglass) UI, written in [React](https://reactjs.org/), on [Next.js](https://nextjs.org/), with [Chakra UI](https://chakra-ui.com/).
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import math
|
||||||
import shutil
|
import shutil
|
||||||
import asyncio
|
import asyncio
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Dict, Optional
|
from typing import Dict, Tuple, Optional
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
# Project
|
# Project
|
||||||
|
|
@ -17,7 +17,7 @@ from hyperglass.log import log
|
||||||
from .files import copyfiles, check_path
|
from .files import copyfiles, check_path
|
||||||
|
|
||||||
|
|
||||||
def get_node_version() -> int:
|
def get_node_version() -> Tuple[int, int, int]:
|
||||||
"""Get the system's NodeJS version."""
|
"""Get the system's NodeJS version."""
|
||||||
node_path = shutil.which("node")
|
node_path = shutil.which("node")
|
||||||
|
|
||||||
|
|
@ -28,9 +28,7 @@ def get_node_version() -> int:
|
||||||
# Node returns the version as 'v14.5.0', for example. Remove the v.
|
# Node returns the version as 'v14.5.0', for example. Remove the v.
|
||||||
version = raw_version.replace("v", "")
|
version = raw_version.replace("v", "")
|
||||||
# Parse the version parts.
|
# Parse the version parts.
|
||||||
major, minor, patch = version.split(".")
|
return tuple((int(v) for v in version.split(".")))
|
||||||
|
|
||||||
return int(major)
|
|
||||||
|
|
||||||
|
|
||||||
def get_ui_build_timeout() -> Optional[int]:
|
def get_ui_build_timeout() -> Optional[int]:
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
# Standard Library
|
# Standard Library
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
from typing import Dict, Tuple, Union
|
||||||
|
|
||||||
# Third Party
|
# Third Party
|
||||||
import psutil as _psutil
|
import psutil as _psutil
|
||||||
|
|
@ -11,8 +12,13 @@ from cpuinfo import get_cpu_info as _get_cpu_info
|
||||||
# Project
|
# Project
|
||||||
from hyperglass.constants import __version__
|
from hyperglass.constants import __version__
|
||||||
|
|
||||||
|
# Local
|
||||||
|
from .frontend import get_node_version
|
||||||
|
|
||||||
def _cpu():
|
SystemData = Dict[str, Tuple[Union[str, int], str]]
|
||||||
|
|
||||||
|
|
||||||
|
def _cpu() -> SystemData:
|
||||||
"""Construct CPU Information."""
|
"""Construct CPU Information."""
|
||||||
cpu_info = _get_cpu_info()
|
cpu_info = _get_cpu_info()
|
||||||
brand = cpu_info.get("brand_raw", "")
|
brand = cpu_info.get("brand_raw", "")
|
||||||
|
|
@ -22,7 +28,7 @@ def _cpu():
|
||||||
return (brand, cores_logical, cores_raw, cpu_ghz)
|
return (brand, cores_logical, cores_raw, cpu_ghz)
|
||||||
|
|
||||||
|
|
||||||
def _memory():
|
def _memory() -> SystemData:
|
||||||
"""Construct RAM Information."""
|
"""Construct RAM Information."""
|
||||||
mem_info = _psutil.virtual_memory()
|
mem_info = _psutil.virtual_memory()
|
||||||
total_gb = round(mem_info.total / 1e9, 2)
|
total_gb = round(mem_info.total / 1e9, 2)
|
||||||
|
|
@ -30,7 +36,7 @@ def _memory():
|
||||||
return (total_gb, usage_percent)
|
return (total_gb, usage_percent)
|
||||||
|
|
||||||
|
|
||||||
def _disk():
|
def _disk() -> SystemData:
|
||||||
"""Construct Disk Information."""
|
"""Construct Disk Information."""
|
||||||
disk_info = _psutil.disk_usage("/")
|
disk_info = _psutil.disk_usage("/")
|
||||||
total_gb = round(disk_info.total / 1e9, 2)
|
total_gb = round(disk_info.total / 1e9, 2)
|
||||||
|
|
@ -38,19 +44,25 @@ def _disk():
|
||||||
return (total_gb, usage_percent)
|
return (total_gb, usage_percent)
|
||||||
|
|
||||||
|
|
||||||
def get_system_info():
|
def get_system_info() -> SystemData:
|
||||||
"""Get system info."""
|
"""Get system info."""
|
||||||
yield __version__
|
|
||||||
|
|
||||||
yield os.environ["hyperglass_directory"]
|
cpu_info, cpu_logical, cpu_physical, cpu_speed = _cpu()
|
||||||
|
mem_total, mem_usage = _memory()
|
||||||
|
disk_total, disk_usage = _disk()
|
||||||
|
|
||||||
yield platform.python_version()
|
return {
|
||||||
|
"hyperglass Version": (__version__, "text"),
|
||||||
yield platform.platform()
|
"hyperglass Path": (os.environ["hyperglass_directory"], "code"),
|
||||||
|
"Python Version": (platform.python_version(), "code"),
|
||||||
for c in _cpu():
|
"Node Version": (".".join(str(v) for v in get_node_version()), "code"),
|
||||||
yield c
|
"Platform Info": (platform.platform(), "code"),
|
||||||
for m in _memory():
|
"CPU Info": (cpu_info, "text"),
|
||||||
yield m
|
"Logical Cores": (cpu_logical, "code"),
|
||||||
for d in _disk():
|
"Physical Cores": (cpu_physical, "code"),
|
||||||
yield d
|
"Processor Speed": (f"{cpu_speed}GHz", "code"),
|
||||||
|
"Total Memory": (f"{mem_total} GB", "text"),
|
||||||
|
"Memory Utilization": (f"{mem_usage}%", "text"),
|
||||||
|
"Total Disk Space": (f"{disk_total} GB", "text"),
|
||||||
|
"Disk Utilization": (f"{disk_usage}%", "text"),
|
||||||
|
}
|
||||||
|
|
|
||||||
116
install.sh
116
install.sh
|
|
@ -27,8 +27,8 @@ NEEDS_NODE="1"
|
||||||
NEEDS_YARN="1"
|
NEEDS_YARN="1"
|
||||||
NEEDS_REDIS="1"
|
NEEDS_REDIS="1"
|
||||||
|
|
||||||
has_cmd () {
|
has_cmd() {
|
||||||
which $1 > /dev/null
|
which $1 >/dev/null
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
echo "0"
|
echo "0"
|
||||||
|
|
@ -37,30 +37,30 @@ has_cmd () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
clean_temp () {
|
clean_temp() {
|
||||||
echo "Cleaning up temporary files..."
|
echo "Cleaning up temporary files..."
|
||||||
rm -rf /tmp/yarnkey.gpg
|
rm -rf /tmp/yarnkey.gpg
|
||||||
rm -rf /tmp/nodesetup.sh
|
rm -rf /tmp/nodesetup.sh
|
||||||
}
|
}
|
||||||
|
|
||||||
catch_interrupt () {
|
catch_interrupt() {
|
||||||
echo "Stopping..."
|
echo "Stopping..."
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
semver () {
|
semver() {
|
||||||
local ver_raw=$(echo "$1" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
|
local ver_raw=$(echo "$1" | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
local ver_digits=( ${ver_raw//./ } )
|
local ver_digits=(${ver_raw//./ })
|
||||||
echo ${ver_digits[@]}
|
echo ${ver_digits[@]}
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_redis_version () {
|
parse_redis_version() {
|
||||||
local one=$(echo "$@" | egrep -o 'v=[0-9]+\.[0-9]+\.[0-9]+')
|
local one=$(echo "$@" | egrep -o 'v=[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
local two=$(echo $one | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
|
local two=$(echo $one | egrep -o '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
echo $two
|
echo $two
|
||||||
}
|
}
|
||||||
|
|
||||||
python3_version () {
|
python3_version() {
|
||||||
local ver_digits=($(semver "$(python3 --version)"))
|
local ver_digits=($(semver "$(python3 --version)"))
|
||||||
local major="${ver_digits[0]}"
|
local major="${ver_digits[0]}"
|
||||||
local minor="${ver_digits[1]}"
|
local minor="${ver_digits[1]}"
|
||||||
|
|
@ -80,10 +80,10 @@ python3_version () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
node_version () {
|
node_version() {
|
||||||
local ver_digits=($(semver "$(node --version)"))
|
local ver_digits=($(semver "$(node --version)"))
|
||||||
local major="${ver_digits[0]}"
|
local major="${ver_digits[0]}"
|
||||||
|
|
||||||
if [[ $major < $MIN_NODE_MAJOR ]]; then
|
if [[ $major < $MIN_NODE_MAJOR ]]; then
|
||||||
echo "1"
|
echo "1"
|
||||||
elif [[ $major -ge $MIN_NODE_MAJOR ]]; then
|
elif [[ $major -ge $MIN_NODE_MAJOR ]]; then
|
||||||
|
|
@ -93,7 +93,7 @@ node_version () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
needs_python () {
|
needs_python() {
|
||||||
local has_python3=$(has_cmd "python3")
|
local has_python3=$(has_cmd "python3")
|
||||||
if [[ $has_python3 == 1 ]]; then
|
if [[ $has_python3 == 1 ]]; then
|
||||||
NEEDS_PYTHON="1"
|
NEEDS_PYTHON="1"
|
||||||
|
|
@ -111,7 +111,7 @@ needs_python () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
needs_node () {
|
needs_node() {
|
||||||
local has_node=$(has_cmd node)
|
local has_node=$(has_cmd node)
|
||||||
if [[ $has_node == 1 ]]; then
|
if [[ $has_node == 1 ]]; then
|
||||||
NEEDS_NODE="1"
|
NEEDS_NODE="1"
|
||||||
|
|
@ -129,7 +129,7 @@ needs_node () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
needs_yarn () {
|
needs_yarn() {
|
||||||
local has_yarn=$(has_cmd yarn)
|
local has_yarn=$(has_cmd yarn)
|
||||||
if [[ $has_yarn == 1 ]]; then
|
if [[ $has_yarn == 1 ]]; then
|
||||||
NEEDS_YARN="1"
|
NEEDS_YARN="1"
|
||||||
|
|
@ -140,7 +140,7 @@ needs_yarn () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
needs_redis () {
|
needs_redis() {
|
||||||
local has_redis=$(has_cmd redis-server)
|
local has_redis=$(has_cmd redis-server)
|
||||||
if [[ $has_redis == 1 ]]; then
|
if [[ $has_redis == 1 ]]; then
|
||||||
NEEDS_REDIS="1"
|
NEEDS_REDIS="1"
|
||||||
|
|
@ -151,11 +151,11 @@ needs_redis () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
get_platform () {
|
get_platform() {
|
||||||
local use_apt=$(has_cmd apt-get)
|
local use_apt=$(has_cmd apt-get)
|
||||||
local use_yum=$(has_cmd yum)
|
local use_yum=$(has_cmd yum)
|
||||||
local use_brew=$(has_cmd brew)
|
local use_brew=$(has_cmd brew)
|
||||||
|
|
||||||
if [[ $use_apt == 0 ]]; then
|
if [[ $use_apt == 0 ]]; then
|
||||||
INSTALLER="apt"
|
INSTALLER="apt"
|
||||||
elif [[ $use_yum == 0 ]]; then
|
elif [[ $use_yum == 0 ]]; then
|
||||||
|
|
@ -168,7 +168,7 @@ get_platform () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
python_post () {
|
python_post() {
|
||||||
if [[ $1 == 0 ]]; then
|
if [[ $1 == 0 ]]; then
|
||||||
local successful=$(needs_python)
|
local successful=$(needs_python)
|
||||||
if [[ $successful == 0 ]]; then
|
if [[ $successful == 0 ]]; then
|
||||||
|
|
@ -181,7 +181,7 @@ python_post () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
node_post () {
|
node_post() {
|
||||||
if [[ $1 == 0 ]]; then
|
if [[ $1 == 0 ]]; then
|
||||||
local successful=$(needs_node)
|
local successful=$(needs_node)
|
||||||
if [[ $successful == 0 ]]; then
|
if [[ $successful == 0 ]]; then
|
||||||
|
|
@ -194,7 +194,7 @@ node_post () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_post () {
|
yarn_post() {
|
||||||
if [[ $1 == 0 ]]; then
|
if [[ $1 == 0 ]]; then
|
||||||
local successful=$(needs_yarn)
|
local successful=$(needs_yarn)
|
||||||
if [[ $successful == 0 ]]; then
|
if [[ $successful == 0 ]]; then
|
||||||
|
|
@ -207,7 +207,7 @@ yarn_post () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
redis_post () {
|
redis_post() {
|
||||||
if [[ $1 == 0 ]]; then
|
if [[ $1 == 0 ]]; then
|
||||||
local successful=$(needs_redis)
|
local successful=$(needs_redis)
|
||||||
if [[ $successful == 0 ]]; then
|
if [[ $successful == 0 ]]; then
|
||||||
|
|
@ -220,14 +220,14 @@ redis_post () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
node_apt_prepare () {
|
node_apt_prepare() {
|
||||||
curl -sL https://deb.nodesource.com/setup_$MIN_NODE_MAJOR.x -o /tmp/nodesetup.sh
|
curl -sL https://deb.nodesource.com/setup_$MIN_NODE_MAJOR.x -o /tmp/nodesetup.sh
|
||||||
sleep 1
|
sleep 1
|
||||||
bash /tmp/nodesetup.sh
|
bash /tmp/nodesetup.sh
|
||||||
NEEDS_UPDATE="1"
|
NEEDS_UPDATE="1"
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_apt_prepare () {
|
yarn_apt_prepare() {
|
||||||
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg -o /tmp/yarnkey.gpg
|
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg -o /tmp/yarnkey.gpg
|
||||||
sleep 1
|
sleep 1
|
||||||
apt-key add /tmp/yarnkey.gpg
|
apt-key add /tmp/yarnkey.gpg
|
||||||
|
|
@ -235,62 +235,62 @@ yarn_apt_prepare () {
|
||||||
NEEDS_UPDATE="1"
|
NEEDS_UPDATE="1"
|
||||||
}
|
}
|
||||||
|
|
||||||
node_yum_prepare () {
|
node_yum_prepare() {
|
||||||
curl -sL https://rpm.nodesource.com/setup_$MIN_NODE_MAJOR.x -o /tmp/nodesetup.sh
|
curl -sL https://rpm.nodesource.com/setup_$MIN_NODE_MAJOR.x -o /tmp/nodesetup.sh
|
||||||
bash /tmp/nodesetup.sh
|
bash /tmp/nodesetup.sh
|
||||||
sleep 1
|
sleep 1
|
||||||
NEEDS_UPDATE="1"
|
NEEDS_UPDATE="1"
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_yum_prepare () {
|
yarn_yum_prepare() {
|
||||||
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
|
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
|
||||||
sleep 1
|
sleep 1
|
||||||
NEEDS_UPDATE="1"
|
NEEDS_UPDATE="1"
|
||||||
}
|
}
|
||||||
|
|
||||||
node_apt () {
|
node_apt() {
|
||||||
apt-get install -y nodejs
|
apt-get install -y nodejs
|
||||||
sleep 1
|
sleep 1
|
||||||
node_post $?
|
node_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
node_yum () {
|
node_yum() {
|
||||||
yum -y install gcc-c++ make nodejs
|
yum -y install gcc-c++ make nodejs
|
||||||
sleep 1
|
sleep 1
|
||||||
node_post $?
|
node_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
node_brew () {
|
node_brew() {
|
||||||
brew install node
|
brew install node
|
||||||
sleep 1
|
sleep 1
|
||||||
node_post $?
|
node_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_apt () {
|
yarn_apt() {
|
||||||
apt-get install -y yarn
|
apt-get install -y yarn
|
||||||
sleep 1
|
sleep 1
|
||||||
yarn_post $?
|
yarn_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_yum () {
|
yarn_yum() {
|
||||||
yum -y install gcc-c++ make yarn
|
yum -y install gcc-c++ make yarn
|
||||||
sleep 1
|
sleep 1
|
||||||
yarn_post $?
|
yarn_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
yarn_brew () {
|
yarn_brew() {
|
||||||
brew install yarn
|
brew install yarn
|
||||||
sleep 1
|
sleep 1
|
||||||
yarn_post $?
|
yarn_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
python_apt () {
|
python_apt() {
|
||||||
apt-get install -y python3.6-dev python3-pip > /dev/null
|
apt-get install -y python3-dev python3-pip >/dev/null
|
||||||
sleep 1
|
sleep 1
|
||||||
python_post $?
|
python_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
python_yum () {
|
python_yum() {
|
||||||
yum install centos-release-scl
|
yum install centos-release-scl
|
||||||
yum install rh-python36
|
yum install rh-python36
|
||||||
yum install python3-devel
|
yum install python3-devel
|
||||||
|
|
@ -299,31 +299,31 @@ python_yum () {
|
||||||
python_post $?
|
python_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
python_brew () {
|
python_brew() {
|
||||||
brew install python3
|
brew install python3
|
||||||
sleep 1
|
sleep 1
|
||||||
python_post $?
|
python_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
redis_apt () {
|
redis_apt() {
|
||||||
apt-get install -y redis-server
|
apt-get install -y redis-server
|
||||||
sleep 1
|
sleep 1
|
||||||
redis_post $?
|
redis_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
redis_yum () {
|
redis_yum() {
|
||||||
yum -y install redis
|
yum -y install redis
|
||||||
sleep 1
|
sleep 1
|
||||||
redis_post $?
|
redis_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
redis_brew () {
|
redis_brew() {
|
||||||
brew install redis
|
brew install redis
|
||||||
sleep 1
|
sleep 1
|
||||||
redis_post $?
|
redis_post $?
|
||||||
}
|
}
|
||||||
|
|
||||||
update_repo () {
|
update_repo() {
|
||||||
if [[ $INSTALLER == "apt" ]]; then
|
if [[ $INSTALLER == "apt" ]]; then
|
||||||
apt-get update
|
apt-get update
|
||||||
elif [[ $INSTALLER == "yum" ]]; then
|
elif [[ $INSTALLER == "yum" ]]; then
|
||||||
|
|
@ -333,7 +333,7 @@ update_repo () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_python () {
|
install_python() {
|
||||||
if [[ $NEEDS_PYTHON == "1" ]]; then
|
if [[ $NEEDS_PYTHON == "1" ]]; then
|
||||||
echo "[INFO] Installing Python..."
|
echo "[INFO] Installing Python..."
|
||||||
|
|
||||||
|
|
@ -354,10 +354,10 @@ install_python () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_node () {
|
install_node() {
|
||||||
if [[ $NEEDS_NODE == "1" ]]; then
|
if [[ $NEEDS_NODE == "1" ]]; then
|
||||||
echo "[INFO] Installing NodeJS..."
|
echo "[INFO] Installing NodeJS..."
|
||||||
|
|
||||||
if [[ $INSTALLER == "apt" ]]; then
|
if [[ $INSTALLER == "apt" ]]; then
|
||||||
node_apt
|
node_apt
|
||||||
elif [[ $INSTALLER == "yum" ]]; then
|
elif [[ $INSTALLER == "yum" ]]; then
|
||||||
|
|
@ -365,20 +365,20 @@ install_node () {
|
||||||
elif [[ $INSTALLER == "brew" ]]; then
|
elif [[ $INSTALLER == "brew" ]]; then
|
||||||
node_brew
|
node_brew
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $NEEDS_NODE == "0" ]]; then
|
elif [[ $NEEDS_NODE == "0" ]]; then
|
||||||
echo "[INFO] Your system is running NodeJS $(node --version) (Minimum is $MIN_NODE_MAJOR+)."
|
echo "[INFO] Your system is running NodeJS $(node --version) (Minimum is $MIN_NODE_MAJOR+)."
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "[ERROR] Unable to determine if your system needs NodeJS."
|
echo "[ERROR] Unable to determine if your system needs NodeJS."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_yarn () {
|
install_yarn() {
|
||||||
if [[ $NEEDS_YARN == "1" ]]; then
|
if [[ $NEEDS_YARN == "1" ]]; then
|
||||||
echo "[INFO] Installing Yarn..."
|
echo "[INFO] Installing Yarn..."
|
||||||
|
|
||||||
if [[ $INSTALLER == "apt" ]]; then
|
if [[ $INSTALLER == "apt" ]]; then
|
||||||
yarn_apt
|
yarn_apt
|
||||||
elif [[ $INSTALLER == "yum" ]]; then
|
elif [[ $INSTALLER == "yum" ]]; then
|
||||||
|
|
@ -386,20 +386,20 @@ install_yarn () {
|
||||||
elif [[ $INSTALLER == "brew" ]]; then
|
elif [[ $INSTALLER == "brew" ]]; then
|
||||||
yarn_brew
|
yarn_brew
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $NEEDS_YARN == "0" ]]; then
|
elif [[ $NEEDS_YARN == "0" ]]; then
|
||||||
echo "[INFO] Your system is running Yarn $(yarn --version) (Minimum is $MIN_YARN_MAJOR+)."
|
echo "[INFO] Your system is running Yarn $(yarn --version) (Minimum is $MIN_YARN_MAJOR+)."
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "[ERROR] Unable to determine if your system needs Yarn."
|
echo "[ERROR] Unable to determine if your system needs Yarn."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install_redis () {
|
install_redis() {
|
||||||
if [[ $NEEDS_REDIS == "1" ]]; then
|
if [[ $NEEDS_REDIS == "1" ]]; then
|
||||||
echo "[INFO] Installing Redis..."
|
echo "[INFO] Installing Redis..."
|
||||||
|
|
||||||
if [[ $INSTALLER == "apt" ]]; then
|
if [[ $INSTALLER == "apt" ]]; then
|
||||||
redis_apt
|
redis_apt
|
||||||
elif [[ $INSTALLER == "yum" ]]; then
|
elif [[ $INSTALLER == "yum" ]]; then
|
||||||
|
|
@ -407,10 +407,10 @@ install_redis () {
|
||||||
elif [[ $INSTALLER == "brew" ]]; then
|
elif [[ $INSTALLER == "brew" ]]; then
|
||||||
redis_brew
|
redis_brew
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ $NEEDS_REDIS == "0" ]]; then
|
elif [[ $NEEDS_REDIS == "0" ]]; then
|
||||||
echo "[INFO] Your system is running Redis $(parse_redis_version $(redis-server --version)) (Minimum is $MIN_REDIS_MAJOR+)."
|
echo "[INFO] Your system is running Redis $(parse_redis_version $(redis-server --version)) (Minimum is $MIN_REDIS_MAJOR+)."
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "[ERROR] Unable to determine if your system needs Redis."
|
echo "[ERROR] Unable to determine if your system needs Redis."
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -419,30 +419,30 @@ install_redis () {
|
||||||
|
|
||||||
# The below script installs locally instead of from PyPI
|
# The below script installs locally instead of from PyPI
|
||||||
#
|
#
|
||||||
install_app () {
|
install_app() {
|
||||||
echo "[INFO] Installing hyperglass..."
|
echo "[INFO] Installing hyperglass..."
|
||||||
|
|
||||||
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -o /tmp/get-poetry.py
|
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -o /tmp/get-poetry.py
|
||||||
python3 /tmp/get-poetry.py -f -y > /dev/null
|
python3 /tmp/get-poetry.py -f -y >/dev/null
|
||||||
sleep 1
|
sleep 1
|
||||||
source $HOME/.profile
|
source $HOME/.profile
|
||||||
|
|
||||||
[ -d "/tmp/hyperglass" ] && rm -rf /tmp/hyperglass
|
[ -d "/tmp/hyperglass" ] && rm -rf /tmp/hyperglass
|
||||||
[ -d "/tmp/build" ] && rm -rf /tmp/build
|
[ -d "/tmp/build" ] && rm -rf /tmp/build
|
||||||
|
|
||||||
git clone --branch v1.0.0 --depth 1 https://github.com/checktheroads/hyperglass.git /tmp/hyperglass
|
git clone --branch v1.0.0 --depth 1 https://github.com/thatmattlove/hyperglass.git /tmp/hyperglass
|
||||||
cd /tmp/hyperglass
|
cd /tmp/hyperglass
|
||||||
poetry build
|
poetry build
|
||||||
mkdir /tmp/build
|
mkdir /tmp/build
|
||||||
|
|
||||||
# local build_tarball="/tmp/hyperglass/dist/hyperglass-build.tar.gz"
|
# local build_tarball="/tmp/hyperglass/dist/hyperglass-build.tar.gz"
|
||||||
local build_tarballs=(/tmp/hyperglass/dist/*.tar.gz)
|
local build_tarballs=(/tmp/hyperglass/dist/*.tar.gz)
|
||||||
local build_tarball=${build_tarballs[-1]}
|
local build_tarball=${build_tarballs[-1]}
|
||||||
local build_dir=$(basename $build_tarball .tar.gz)
|
local build_dir=$(basename $build_tarball .tar.gz)
|
||||||
|
|
||||||
tar -xvf /tmp/hyperglass/dist/$build_dir.tar.gz -C /tmp/build
|
tar -xvf /tmp/hyperglass/dist/$build_dir.tar.gz -C /tmp/build
|
||||||
cd /tmp/build/$build_dir
|
cd /tmp/build/$build_dir
|
||||||
pip3 install . > /dev/null
|
pip3 install . >/dev/null
|
||||||
|
|
||||||
if [[ ! $? == 0 ]]; then
|
if [[ ! $? == 0 ]]; then
|
||||||
echo "[ERROR] An error occurred while trying to install hyperglass."
|
echo "[ERROR] An error occurred while trying to install hyperglass."
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@ keywords = ["looking glass", "network automation", "isp", "bgp", "routing"]
|
||||||
license = "BSD-3-Clause-Clear"
|
license = "BSD-3-Clause-Clear"
|
||||||
name = "hyperglass"
|
name = "hyperglass"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
repository = "https://github.com/checktheroads/hyperglass"
|
repository = "https://github.com/thatmattlove/hyperglass"
|
||||||
version = "1.0.2"
|
version = "1.0.4"
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
hyperglass = "hyperglass.console:CLI"
|
hyperglass = "hyperglass.console:CLI"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue