Skip to content

Commit

Permalink
24.3.3 released
Browse files Browse the repository at this point in the history
  • Loading branch information
SRBuilds committed Jun 28, 2024
1 parent 496211e commit bada90b
Show file tree
Hide file tree
Showing 28 changed files with 189 additions and 134 deletions.
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
author = 'Nokia'

# The full version, including alpha/beta/rc tags
version = '24.3.2'
release = '24.3.2'
version = '24.3.3'
release = '24.3.3'


# -- General configuration ---------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Release 24.3
************

24.3.3
######

* No additional features

.. Reviewed by PLM 20240509
.. Reviewed by TechComms 20210510
24.3.2
######

Expand Down
8 changes: 4 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ documentation will be updated accordingly.
.. list-table::
:header-rows: 0

* - pySROS release: 24.3.2
* - Document Number: 3HE 20087 AAAB TQZZA
* - pySROS release: 24.3.3
* - Document Number: 3HE 20087 AAAC TQZZA

.. Reviewed by PLM 20240403
.. Reviewed by TechComms 20240403
.. Reviewed by PLM 20240509
.. Reviewed by TechComms 20240510
.. toctree::
:maxdepth: 2
Expand Down
6 changes: 3 additions & 3 deletions examples/convert_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# Import sys library
import sys

# Import the connect method from the management pySROS sub-module
from pysros.management import connect

# Import the exceptions that are referenced so they can be caught on error.
from pysros.exceptions import ModelProcessingError

# Import the connect method from the management pySROS sub-module
from pysros.management import connect


class Data: # pylint: disable=too-few-public-methods
"""Create an object containing the input data in the required format
Expand Down
1 change: 1 addition & 0 deletions examples/filesystem_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# pylint: disable=broad-except, eval-used, unspecified-encoding

import sys

from pysros.management import connect, sros


Expand Down
4 changes: 2 additions & 2 deletions examples/get_all_router_and_vprn.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

"""Example to get all routers and VPRNs"""


import sys
from pysros.management import connect

from pysros.exceptions import ModelProcessingError
from pysros.management import connect
from pysros.pprint import Table # pylint: disable=no-name-in-module

credentials = {
Expand Down
5 changes: 3 additions & 2 deletions examples/get_all_vprn_routes_with_nexthop_ipv4_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

"""Example to get all VPRN routes with a given next-hop IP address"""

import sys
import ipaddress
from pysros.management import connect
import sys

from pysros.exceptions import ModelProcessingError
from pysros.management import connect
from pysros.pprint import Table # pylint: disable=no-name-in-module

credentials = {
Expand Down
9 changes: 5 additions & 4 deletions examples/get_inventory_remotely.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

"""Example to show obtaining a hardware inventory of multiple devices"""

# Import the required libraries
import sys
import ipaddress
import json
from pysros.management import connect, sros
from pysros.exceptions import ModelProcessingError

# Import the required libraries
import sys

from pysros.exceptions import ModelProcessingError
from pysros.management import connect, sros

# Global credentials dictionary for the purposes of this example. Global variables
# discouraged in operational applications.
Expand Down
7 changes: 2 additions & 5 deletions examples/get_list_keys_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@ def get_connection():
# Else if the application is executed remotely
else:
# Import sys for returning specific exit codes
import sys # pylint: disable=import-outside-toplevel

# Import getpass to read the password
import getpass # pylint: disable=import-outside-toplevel
import sys # pylint: disable=import-outside-toplevel

# Import the exceptions so they can be caught on error
# pylint: disable=import-outside-toplevel
from pysros.exceptions import (
ModelProcessingError,
)
from pysros.exceptions import ModelProcessingError

# Make sure we have the right number of arguments, the host can
# be an IP address or a hostname
Expand Down
7 changes: 3 additions & 4 deletions examples/make_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@

"""Example to show how to make a connection and handle exceptions"""


# Import sys for returning specific exit codes
import sys

# Import the connect method from the management pySROS sub-module
from pysros.management import connect

# Import the exceptions that are referenced so they can be caught on error.
from pysros.exceptions import ModelProcessingError

# Import the connect method from the management pySROS sub-module
from pysros.management import connect


def get_connection(host=None, credentials=None):
"""Function definition to obtain a Connection object to a specific SR OS device
Expand Down
5 changes: 2 additions & 3 deletions examples/make_connection_extended.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,15 @@ def get_connection():
# Else if the application is executed remotely
else:
# Import sys for returning specific exit codes
import sys

# Import getpass to read the password
import getpass
import sys

# Import the exceptions so they can be caught on error
# fmt: off
from pysros.exceptions import ModelProcessingError
# fmt: on

# fmt: on
# Make sure we have the right number of arguments, the host can
# be an IP address or a hostname
if len(sys.argv) != 2:
Expand Down
2 changes: 1 addition & 1 deletion examples/make_connection_extended_with_argv.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def get_remote_connection(my_username, my_host, my_password):
# Import the exceptions so they can be caught on error
# fmt: off
from pysros.exceptions import ModelProcessingError
# fmt: on

# fmt: on
# The try statement and except statements allow an operation
# attempt with specific error conditions handled gracefully
try:
Expand Down
2 changes: 1 addition & 1 deletion examples/set_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@

# Import the required libraries
import sys
from pysros.management import connect

# Import the exceptions so they can be caught on error.
from pysros.exceptions import ModelProcessingError
from pysros.management import connect


def get_connection(host=None, credentials=None):
Expand Down
8 changes: 4 additions & 4 deletions examples/set_user_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

"""Example to show how to set data"""

import random
import string

# Import the required libraries
import sys
import string
import random
from pysros.management import connect

# Import the exceptions so they can be caught on error.
from pysros.exceptions import ModelProcessingError

from pysros.management import connect

# Global credentials dictionary for the purposes of this example. Global variables
# discouraged in operational applications.
Expand Down
31 changes: 16 additions & 15 deletions examples/show_command_aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pylint: disable=import-error, import-outside-toplevel, line-too-long, too-many-branches, too-many-locals, too-many-statements

"""
Tested on: SR OS 23.10.R2
Tested on: SR OS 24.3.R1
Show command aliaseses.
Expand Down Expand Up @@ -58,8 +58,8 @@ def get_remote_connection(my_username, my_host, my_password):
# Import the exceptions so they can be caught on error
# fmt: off
from pysros.exceptions import ModelProcessingError
# fmt: on

# fmt: on
# The try statement and except statements allow an operation
# attempt with specific error conditions handled gracefully
try:
Expand Down Expand Up @@ -99,11 +99,12 @@ def get_remote_connection(my_username, my_host, my_password):
def show_command_aliases_output(connection_object):
"""Main function for the show_command_aliases command"""

bright_red = "\u001b[31;1m"
bright_green = "\u001b[32;1m"
bright_blue = "\u001b[34;1m"
bright_cyan = "\u001b[36;1m"
reset_color = "\u001b[0m"
bright_blue = "\033[1;34m"
bright_cyan = "\033[1;36m"
bright_green = "\033[1;32m"
bright_red = "\033[1;31m"
bright_yellow = "\033[1;33m"
reset_color = "\033[0m"

# Get environment configuration data
try:
Expand Down Expand Up @@ -155,7 +156,7 @@ def show_command_aliases_output(connection_object):
):
print(
"Alias name : "
+ bright_cyan
+ bright_blue
+ alias_name
+ reset_color
+ " ("
Expand All @@ -168,11 +169,11 @@ def show_command_aliases_output(connection_object):
else:
print(
"Alias name : "
+ bright_cyan
+ bright_blue
+ alias_name
+ reset_color
+ " ("
+ bright_red
+ bright_yellow
+ "disabled"
+ reset_color,
end="",
Expand Down Expand Up @@ -246,15 +247,15 @@ def show_command_aliases_output(connection_object):
if mount_point == "global":
print(
"Availability : "
+ bright_blue
+ bright_cyan
+ alias_name
+ reset_color
+ " (global)"
)
else:
print(
"Availability : "
+ bright_blue
+ bright_cyan
+ mount_point.replace("/", "")
+ " "
+ alias_name
Expand All @@ -264,7 +265,7 @@ def show_command_aliases_output(connection_object):
if mount_point == "global":
print(
" : "
+ bright_blue
+ bright_cyan
+ alias_name
+ reset_color
+ " (global)"
Expand All @@ -283,15 +284,15 @@ def show_command_aliases_output(connection_object):
print("-" * 80)
print(
"Total aliases : "
+ bright_cyan
+ bright_blue
+ str(num_admin_up_aliases + num_admin_down_aliases)
+ reset_color
+ " ("
+ bright_green
+ str(num_admin_up_aliases)
+ reset_color
+ " enabled, "
+ bright_red
+ bright_yellow
+ str(num_admin_down_aliases)
+ reset_color
+ " disabled, "
Expand Down
12 changes: 6 additions & 6 deletions examples/show_event_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"""

from pysros.exceptions import InternalError, InvalidPathError, SrosMgmtError
from pysros.management import connect, sros
from pysros.pprint import Table
from pysros.exceptions import InvalidPathError, SrosMgmtError, InternalError
from pysros.pprint import Table # pylint: disable=no-name-in-module


def get_connection():
Expand All @@ -56,16 +56,16 @@ def get_connection():
# Else if the application is executed remotely
else:
# Import sys for returning specific exit codes
import sys # pylint: disable=import-outside-toplevel

# Import getpass to read the password
import getpass # pylint: disable=import-outside-toplevel
import sys # pylint: disable=import-outside-toplevel

# Import the exceptions so they can be caught on error
# fmt: off
from pysros.exceptions import ModelProcessingError # pylint: disable=import-error disable=import-outside-toplevel
# fmt: on
from pysros.exceptions import \
ModelProcessingError # pylint: disable=import-error disable=import-outside-toplevel

# fmt: on
# Make sure we have the right number of arguments, the host can
# be an IP address or a hostname
if len(sys.argv) != 2:
Expand Down
12 changes: 6 additions & 6 deletions examples/show_log_event_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# pylint: disable=line-too-long

"""
Tested on: SR OS 23.10.R2
Tested on: SR OS 24.3.R1
Obtain a summary of the log event history on the node.
Expand All @@ -32,9 +32,9 @@
"""

from pysros.exceptions import InternalError, InvalidPathError, SrosMgmtError
from pysros.management import connect, sros
from pysros.pprint import Table
from pysros.exceptions import InvalidPathError, SrosMgmtError, InternalError


def get_connection():
Expand All @@ -56,16 +56,16 @@ def get_connection():
# Else if the application is executed remotely
else:
# Import sys for returning specific exit codes
import sys # pylint: disable=import-outside-toplevel

# Import getpass to read the password
import getpass # pylint: disable=import-outside-toplevel
import sys # pylint: disable=import-outside-toplevel

# Import the exceptions so they can be caught on error
# fmt: off
from pysros.exceptions import ModelProcessingError # pylint: disable=import-error disable=import-outside-toplevel
# fmt: on
from pysros.exceptions import \
ModelProcessingError # pylint: disable=import-error disable=import-outside-toplevel

# fmt: on
# Make sure we have the right number of arguments, the host can
# be an IP address or a hostname
if len(sys.argv) != 2:
Expand Down
Loading

0 comments on commit bada90b

Please sign in to comment.