Skip to content

Commit

Permalink
22.10.4 released
Browse files Browse the repository at this point in the history
  • Loading branch information
SRBuilds committed Apr 13, 2023
1 parent 1d48852 commit deba84f
Show file tree
Hide file tree
Showing 15 changed files with 229 additions and 52 deletions.
Binary file not shown.
Binary file added docs/source/_static/fonts/NokiaPureText_Rg.ttf
Binary file not shown.
Binary file added docs/source/_static/nokia-logo-blue-2023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/source/_static/nokia-logo-blue-on-white.png
Binary file not shown.
Binary file removed docs/source/_static/nokia-logo-white-on-blue.png
Binary file not shown.
202 changes: 197 additions & 5 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,209 @@
{% block footer %} {{ super() }}

<style>

@font-face {
font-family: 'Nokia Pure Text';
src: url('_static/fonts/NokiaPureText_Rg.ttf') format('truetype');
}

@font-face {
font-family: 'Nokia Pure Headline';
src: url('_static/fonts/NokiaPureHeadline_Rg.ttf') format('truetype');
}

/* Document */
.document {
font-family: "Nokia Pure Text";
}
/* Sidebar header (and topbar for mobile) */
.wy-side-nav-search, .wy-nav-top {
background: #124191;
.wy-side-nav-search, .wy-nav-top, .wy-nav-side {
background: #FFFFFF;
}
/* Home icons */
.icon:before {
color: #005AFF; /* Nokia bright blue */
}
.icon .icon-home ::before {
font-family: "Nokia Pure Text";
color: #005AFF; /* Nokia bright blue */
}
/* pySROS logo */
.wy-side-nav-search .wy-dropdown>a, .wy-side-nav-search>a, {
color: #005AFF; /* Nokia bright blue */
font-family: "Nokia Pure Text";
}
.wy-side-nav-search>a {
color: #005AFF; /* Nokia bright blue */
font-family: "Nokia Pure Text";
}
/* Sidebar
.wy-nav-side {
background: #124191;
} */
background: #FFFFFF;
border-right: outset;
border-color: #005AFF; /* Nokia bright blue */
color: #005AFF; /* Nokia bright blue */
}
/* Top-left search box */
.wy-side-nav-search input[type=text], .wy-side-nav-search input[type="text" i] {
color: #005AFF; /* Nokia bright blue */
font-family: "Nokia Pure Text";
border-color: #005AFF; /* Nokia bright blue */
}
/* Version number */
.wy-side-nav-search>div.version {
color: #005AFF; /* Nokia bright blue */
font-family: "Nokia Pure Text";
}
/* Left menu */
.wy-side-scroll {
background: #005AFF; /* Nokia bright blue */
}
/* Top right view page source */
.wy-breadcrumbs {
font-family: "Nokia Pure Headline";
color: #001135; /* Nokia blue-black */
}
.wy-breadcrumbs li a:first-child {
color: #001135; /* Nokia blue-black */
font-family: "Nokia Pure Text";
}
/* Top right view page source */
.wy-breadcrumbs li.wy-breadcrumbs-aside a:first-child {
color: #23ABB6; /* Nokia teal */
font-family: "Nokia Pure Text";
}
/* Links */
a.reference {
color: #005AFF; /* Nokia bright blue */
}
.fa, .icon, .rst-content .admonition-title, .rst-content .code-block-caption .headerlink, .rst-content code.download span:first-child, .rst-content dl dt .headerlink, .rst-content h1 .headerlink, .rst-content h2 .headerlink, .rst-content h3 .headerlink, .rst-content h4 .headerlink, .rst-content h5 .headerlink, .rst-content h6 .headerlink, .rst-content p.caption .headerlink, .rst-content table>caption .headerlink, .rst-content tt.download span:first-child, .wy-dropdown .caret, .wy-inline-validate.wy-inline-validate-danger .wy-input-context, .wy-inline-validate.wy-inline-validate-info .wy-input-context, .wy-inline-validate.wy-inline-validate-success .wy-input-context, .wy-inline-validate.wy-inline-validate-warning .wy-input-context, .wy-menu-vertical li.current>a span.toctree-expand, .wy-menu-vertical li.on a span.toctree-expand, .wy-menu-vertical li span.toctree-expand {
color: #005AFF; /* Nokia bright blue */
}
.rst-content .toctree-wrapper>p.caption, h1, h2, h3, h4, h5, h6, legend {
font-family: "Nokia Pure Headline";
}
.rst-content code.literal, .rst-content tt.literal {
color: #E23B3B; /* Nokia red */
}
.rst-content code.xref, .rst-content tt.xref, a .rst-content code, a .rst-content tt {
color: #23ABB6; /* Nokia teal */
}

/* Attention and important boxes */
.rst-content .important, .rst-content .attention {
background: #FFF1E4; /* Nokia orange 100 */
}
/* Note boxes */
.rst-content .note {
background: #FFE4FE; /* Nokia pink 100 */
}
/* Warning boxes */
.rst-content .warning {
background: #FFE6E4; /* Nokia red 100 */
}
/* Seealso (see also) boxes */
.rst-content .seealso, .rst-content .seealso a.reference {
color: #001135; /* Nokia blue-black */
background: #EAE4FF; /* Nokia purple 100 */
}

/* Important box header */
.rst-content .hint .admonition-title, .rst-content .hint .wy-alert-title, .rst-content .important .admonition-title, .rst-content .important .wy-alert-title, .rst-content .tip .admonition-title, .rst-content .tip .wy-alert-title, .rst-content .wy-alert-success.admonition-todo .admonition-title, .rst-content .wy-alert-success.admonition-todo .wy-alert-title, .rst-content .wy-alert-success.admonition .admonition-title, .rst-content .wy-alert-success.admonition .wy-alert-title, .rst-content .wy-alert-success.attention .admonition-title, .rst-content .wy-alert-success.attention .wy-alert-title, .rst-content .wy-alert-success.caution .admonition-title, .rst-content .wy-alert-success.caution .wy-alert-title, .rst-content .wy-alert-success.danger .admonition-title, .rst-content .wy-alert-success.danger .wy-alert-title, .rst-content .wy-alert-success.error .admonition-title, .rst-content .wy-alert-success.error .wy-alert-title, .rst-content .wy-alert-success.note .admonition-title, .rst-content .wy-alert-success.note .wy-alert-title, .rst-content .wy-alert-success.seealso .admonition-title, .rst-content .wy-alert-success.seealso .wy-alert-title, .rst-content .wy-alert-success.warning .admonition-title, .rst-content .wy-alert-success.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-success .admonition-title, .wy-alert.wy-alert-success .rst-content .admonition-title, .wy-alert.wy-alert-success .wy-alert-title {
color: #FFFFFF; /* White */
background: #F47F31; /* Nokia orange */
}
/* Attention box header */
.rst-content .hint .admonition-title, .rst-content .hint .wy-alert-title, .rst-content .attention .admonition-title, .rst-content .attention .wy-alert-title, .rst-content .tip .admonition-title, .rst-content .tip .wy-alert-title, .rst-content .wy-alert-success.admonition-todo .admonition-title, .rst-content .wy-alert-success.admonition-todo .wy-alert-title, .rst-content .wy-alert-success.admonition .admonition-title, .rst-content .wy-alert-success.admonition .wy-alert-title, .rst-content .wy-alert-success.attention .admonition-title, .rst-content .wy-alert-success.attention .wy-alert-title, .rst-content .wy-alert-success.caution .admonition-title, .rst-content .wy-alert-success.caution .wy-alert-title, .rst-content .wy-alert-success.danger .admonition-title, .rst-content .wy-alert-success.danger .wy-alert-title, .rst-content .wy-alert-success.error .admonition-title, .rst-content .wy-alert-success.error .wy-alert-title, .rst-content .wy-alert-success.note .admonition-title, .rst-content .wy-alert-success.note .wy-alert-title, .rst-content .wy-alert-success.seealso .admonition-title, .rst-content .wy-alert-success.seealso .wy-alert-title, .rst-content .wy-alert-success.warning .admonition-title, .rst-content .wy-alert-success.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-success .admonition-title, .wy-alert.wy-alert-success .rst-content .admonition-title, .wy-alert.wy-alert-success .wy-alert-title {
color: #FFFFFF; /* White */
background: #F47F31; /* Nokia orange */
}
/* Note box header */
.rst-content .note .admonition-title, .rst-content .note .wy-alert-title, .rst-content .seealso .admonition-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .admonition-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .rst-content .wy-alert-info.admonition .admonition-title, .rst-content .wy-alert-info.admonition .wy-alert-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .wy-alert.wy-alert-info .wy-alert-title {
background: #E03DCD; /* Nokia pink */
color: #FFFFFF; /* White */
}
/* Warning box header */
.rst-content .warning .admonition-title, .rst-content .warning .wy-alert-title, .rst-content .seealso .admonition-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .admonition-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .rst-content .wy-alert-info.admonition .admonition-title, .rst-content .wy-alert-info.admonition .wy-alert-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .wy-alert.wy-alert-info .wy-alert-title {
background: #E23B3B; /* Nokia red */
color: #FFFFFF; /* White */
}
/* See also box header */
.rst-content .seealso .admonition-title, .rst-content .seealso .wy-alert-title, .rst-content .seealso .admonition-title, .rst-content .seealso .wy-alert-title, .rst-content .wy-alert-info.admonition-todo .admonition-title, .rst-content .wy-alert-info.admonition-todo .wy-alert-title, .rst-content .wy-alert-info.admonition .admonition-title, .rst-content .wy-alert-info.admonition .wy-alert-title, .rst-content .wy-alert-info.attention .admonition-title, .rst-content .wy-alert-info.attention .wy-alert-title, .rst-content .wy-alert-info.caution .admonition-title, .rst-content .wy-alert-info.caution .wy-alert-title, .rst-content .wy-alert-info.danger .admonition-title, .rst-content .wy-alert-info.danger .wy-alert-title, .rst-content .wy-alert-info.error .admonition-title, .rst-content .wy-alert-info.error .wy-alert-title, .rst-content .wy-alert-info.hint .admonition-title, .rst-content .wy-alert-info.hint .wy-alert-title, .rst-content .wy-alert-info.important .admonition-title, .rst-content .wy-alert-info.important .wy-alert-title, .rst-content .wy-alert-info.tip .admonition-title, .rst-content .wy-alert-info.tip .wy-alert-title, .rst-content .wy-alert-info.warning .admonition-title, .rst-content .wy-alert-info.warning .wy-alert-title, .rst-content .wy-alert.wy-alert-info .admonition-title, .wy-alert.wy-alert-info .rst-content .admonition-title, .wy-alert.wy-alert-info .wy-alert-title {
background: #7D33F2; /* Nokia purple */
color: #FFFFFF; /* White */
}
/* Left menu header and caption title */
.wy-menu-vertical header, .wy-menu-vertical p.caption {
background: #005AFF; /* Nokia bright blue */
color: #FFFFFF; /* White */
height: 40px;
}
/* Left menu items */
.wy-menu-vertical a {
color: #FFFFFF; /* White */
background: #005AFF; /* Nokia bright blue */
}
p, h1, h2, h3, h4 {
color: #001135; /* Nokia blue-black */
}
body, p {
font-family: "Nokia Pure Text";
}
.wy-menu-vertical li.toctree-l1 a, .wy-menu-vertical li.toctree-l1>a span.toctree-expand {
background: #005AFF; /* Nokia bright blue */
color: #FFFFFF; /* White */
}
.wy-menu-vertical li.toctree-l1 a:hover, .wy-menu-vertical li.toctree-l1>a:hover span.toctree-expand {
background: #FFFFFF; /* White */
color: #005AFF; /* Nokia bright blue */
}
.wy-menu-vertical li.toctree-l1.current>a, .wy-menu-vertical li.toctree-l1.current>a span.toctree-expand, .wy-menu-vertical li.toctree-l1.current>a:hover span.toctree-expand {
background: #005ADF; /* Nokia blue 600 */
color: #FFFFFF; /* White */
}

.wy-menu-vertical li.toctree-l2 a, .wy-menu-vertical li.toctree-l2>a span.toctree-expand {
background: #FFFFFF; /* White */
color: #005AFF; /* Nokia bright blue */
}
.wy-menu-vertical li.toctree-l2 a:hover, .wy-menu-vertical li.toctree-l2>a:hover span.toctree-expand {
background: #005AFF; /* Nokia bright blue */
color: #FFFFFF; /* White */
}
.wy-menu-vertical li.toctree-l2.current>a, .wy-menu-vertical li.toctree-l2.current>a span.toctree-expand, .wy-menu-vertical li.toctree-l2.current>a:hover span.toctree-expand {
background: #FFFFFF; /* White */
color: #005ADF; /* Nokia blue 600 */
}

.wy-menu-vertical li.toctree-l2.current li.toctree-l3 a, .wy-menu-vertical li.toctree-l3>a span.toctree-expand {
background: #8EC2FF; /* Nokia blue 300 */
color: #FFFFFF; /* White */
}
.wy-menu-vertical li.toctree-l2.current li.toctree-l3 a:hover, .wy-menu-vertical li.toctree-l2.current li.toctree-l3>a:hover span.toctree-expand {
background: #FFFFFF; /* White */
color: #8EC2FF; /* Nokia blue 300 */
}
.wy-menu-vertical li.toctree-l2.current li.toctree-l3.current>a, .wy-menu-vertical li.toctree-l2.current li.toctree-l3.current>a span.toctree-expand, .wy-menu-vertical li.toctree-l2.current li.toctree-l3.current>a:hover span.toctree-expand {
background: #4092FF; /* Nokia blue 400 */
color: #FFFFFF; /* White */
}

/* override table no-wrap */
.wy-table-responsive table td, .wy-table-responsive table th {
white-space: normal;
}
/* Next button */
.btn.btn-neutral.float-right {
font-family: "Nokia Pure Text";
}
.admonition-title {
color: white;
}
.admonition-note {
background-color: #FFE4FE;
}
.reference.internal {
font-family: "Nokia Pure Text";
}
</style>
{% endblock %}
6 changes: 3 additions & 3 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 = '22.10.3'
release = '22.10.3'
version = '22.10.4'
release = '22.10.4'


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -47,6 +47,6 @@

html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
html_logo = "_static/nokia-logo-white-on-blue.png"
html_logo = "_static/nokia-logo-blue-2023.png"


6 changes: 6 additions & 0 deletions docs/source/features/22.10.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Release 22.10
*************


22.10.4
#######

* Minimum supported lxml version now 4.9.2

22.10.3
#######

Expand Down
10 changes: 6 additions & 4 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.. image:: _static/nokia-logo-blue-on-white.png
.. image:: _static/nokia-logo-blue-2023.png
:align: right
:width: 200px
:alt: Nokia logo

Python 3 for the Nokia Service Router Operating System (pySROS)
===============================================================
Expand All @@ -16,10 +17,11 @@ documentation will be updated accordingly.
.. list-table::
:header-rows: 0

* - pySROS release: 22.10.3
* - Document Number: 3HE 18378 AAAI TQZZA
* - pySROS release: 22.10.4
* - Document Number: 3HE 18378 AAAJ TQZZA

.. Reviewed by PLM 20230124
.. Reviewed by PLM 20230223
.. Reviewed by TechComms 20230317
.. toctree::
Expand Down
3 changes: 0 additions & 3 deletions pysros/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
pysros_err_can_not_find_yang = (ModelProcessingError, "Cannot find yang '{yang_name}'")
pysros_err_cannot_call_go_to_parent = (InvalidPathError, "Cannot call go_to_parent on root")
pysros_err_cannot_delete_from_state = (SrosMgmtError, "Cannot delete from state tree")
pysros_err_cannot_find_module_set_id_or_content_id = (RuntimeError, "Cannot find module-set-id or content-id")
pysros_err_cannot_lock_and_unlock_running = (SrosMgmtError, "Cannot lock and unlock running config")
pysros_err_cannot_modify_config = (SrosMgmtError, "Cannot modify running config")
pysros_err_cannot_modify_state = (SrosMgmtError, "Cannot modify state tree")
Expand Down Expand Up @@ -68,8 +67,6 @@
pysros_err_path_should_be_string = (TypeError, "path argument should be a string")
pysros_err_prefix_does_not_have_ns = (LookupError, "prefix '{prefix}' of '{name}' does not have corresponding namespace")
pysros_err_root_path = (InvalidPathError, "Operation cannot be performed on root")
pysros_err_server_dos_not_have_required_yang_lib = (RuntimeError, "NETCONF server does not have required yang-library")
pysros_err_server_dos_not_have_yang_lib = (RuntimeError, "NETCONF server does not have yang-library capability")
pysros_err_target_should_be_list = (InvalidPathError, "Target should be a list")
pysros_err_type_must_be = (TypeError, "must be {expected:.50s}, not {actual:.50s}")
pysros_err_unended_quoted_string = (InvalidPathError, "Unended quoted string")
Expand Down
22 changes: 0 additions & 22 deletions pysros/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,21 +283,6 @@ def _find_module(self, yang_name):
return candidate
raise make_exception(pysros_err_can_not_find_yang, yang_name=yang_name)

def _get_module_set_id(self):
caps = list(self._nc.server_capabilities)
yang_cap = list(filter(lambda x: x.startswith("urn:ietf:params:netconf:capability:yang-library:"), self._nc.server_capabilities))
if len(yang_cap) == 0:
raise make_exception(pysros_err_server_dos_not_have_yang_lib)
if yang_cap[0].find("yang-library:1.0") != -1:
match = re.search("module-set-id=([^&]*)", yang_cap[0])
elif yang_cap[0].find("yang-library:1.1") != -1:
match = re.search("content-id=([^&]*)", yang_cap[0])
else:
raise make_exception(pysros_err_server_dos_not_have_required_yang_lib)
if match is None:
raise make_exception(pysros_err_cannot_find_module_set_id_or_content_id)
return match.group(1)

def _get_yang_models(self):
subtree = to_ele("""
<modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">
Expand All @@ -306,13 +291,6 @@ def _get_yang_models(self):
</modules-state>""")
with self._process_connected():
yangs_resp = self._nc.get(filter=("subtree", subtree))
module_set_id = yangs_resp.xpath(
"/ncbase:rpc-reply/ncbase:data/library:modules-state/library:module-set-id",
self._common_namespaces
)[0].text

if module_set_id != self._get_module_set_id():
raise make_exception(pysros_err_invalid_module_set_id_or_content_id)

result = []
modules = yangs_resp.xpath(
Expand Down
3 changes: 2 additions & 1 deletion pysros/model_walker.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def validate_get_filter(self, filter: Union[dict, Container]):
filter = filter.data
if not isinstance(filter, dict):
raise make_exception(pysros_err_filter_should_be_dict)
if "" in filter.values():
unwrap = lambda v: v.data if isinstance(v, Leaf) else v
if any(unwrap(v) == '' for v in filter.values()):
raise make_exception(pysros_err_filter_empty_string)
for k, v in filter.items():
with self.visit_child(k):
Expand Down
Loading

0 comments on commit deba84f

Please sign in to comment.