From 7fca0f203c3470f5f8a46cd16ad4cb039efb6b5b Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 26 Jul 2016 22:26:09 -0700 Subject: [PATCH 01/39] added initial commit --- .gitignore | 2 + .travis.yml | 23 + .../Categories/categories.xml | 2 + .../Configuration/shellconfig.xml | 33 + .../DataModel/datamodel.xml | 671 +++++++ .../Generic Ericsson IPOS Driver Version2.zip | Bin 0 -> 2281 bytes Ericsson_IPOS_Shell_Package/metadata.xml | 6 + Ericsson_IPOS_Shell_Package/version.txt | 1 + LICENSE.htm | 1576 +++++++++++++++++ MANIFEST.in | 2 + README.md | 6 + README.txt | 1 + cloudshell/__init__.py | 3 + cloudshell/networking/__init__.py | 2 + cloudshell/networking/ericsson/__init__.py | 2 + .../networking/ericsson/ipos/__init__.py | 3 + .../ericsson/ipos/autoload/__init__.py | 3 + .../autoload/ericsson_ipos_snmp_autoload.py | 78 + .../networking/ericsson/ipos/autoload/test.py | 58 + .../ipos/ericsson_ipos_configuration.py | 54 + .../ipos/ericsson_ipos_resource_driver.py | 125 ++ requirements.txt | 5 + setup.py | 24 + test_requirements.txt | 3 + version.txt | 1 + 25 files changed, 2684 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Ericsson_IPOS_Shell_Package/Categories/categories.xml create mode 100644 Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml create mode 100644 Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml create mode 100644 Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version2.zip create mode 100644 Ericsson_IPOS_Shell_Package/metadata.xml create mode 100644 Ericsson_IPOS_Shell_Package/version.txt create mode 100644 LICENSE.htm create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 README.txt create mode 100644 cloudshell/__init__.py create mode 100644 cloudshell/networking/__init__.py create mode 100644 cloudshell/networking/ericsson/__init__.py create mode 100644 cloudshell/networking/ericsson/ipos/__init__.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/__init__.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/test.py create mode 100644 cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py create mode 100644 cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py create mode 100644 requirements.txt create mode 100644 setup.py create mode 100644 test_requirements.txt create mode 100644 version.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..86c7a21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.pyc +cloudshell/networking/ericsson/ipos/test_ipos.py diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5f16bec --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: python +python: +- '2.7' + +before_install: +- pip install ecdsa==0.13 +- pip install Inject==3.3.1 +- pip install ipcalc==1.1.3 +- pip install jsonpickle==0.9.3 +- pip install linecache2==1.0.0 +- pip install paramiko==1.15.2 +- pip install ply==3.8 +- pip install pyasn1==0.1.9 +- pip install pycrypto==2.6.1 +- pip install pysmi==0.0.6 +- pip install pysnmp==4.3.1 +- pip install traceback2==1.4.0 +- pip install -r test_requirements.txt -i https://testpypi.python.org/pypi + +install: + - python setup.py install + +script: python setup.py sdist --format zip \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/Categories/categories.xml b/Ericsson_IPOS_Shell_Package/Categories/categories.xml new file mode 100644 index 0000000..4d6c6ec --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/Categories/categories.xml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml new file mode 100644 index 0000000..c5ae352 --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -0,0 +1,33 @@ + + + + + The networking Shell template will create a resource of this type in CloudShell. Once the Router is modeled correctly in CloudShell it will be possible to use it in Sandboxes and for connectivity. + + Discovers the device structure and populate its attributes. + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml new file mode 100644 index 0000000..92c6346 --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -0,0 +1,671 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Ericsson IPOS Driver Version2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Ericsson IPOS Driver Version2 + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Switch + Ericsson IPOS Router + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + Generic Module + Generic Sub Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Switch + Ericsson IPOS Router + + + + + + + + + + + \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version2.zip b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version2.zip new file mode 100644 index 0000000000000000000000000000000000000000..59e4c4ef0191a6c38a624f8a012945b682f50da4 GIT binary patch literal 2281 zcmai$2{_d29>@Q~I5CU{V=ae{Lb{X)Wyz9=Fy^4F*+wSIFk|NwgK6w$WM8ulGJ__v z9;1=1Y$>u!5mA=xaa`^>=jq&g&wcLmKELPpF2DEpdEV!F-|z257_x%l006K9C3b82 zCC+kuUMv8h#|Z$u2eZytv>yuVf%0*1cJOhK3-E9sw`hsaJO@*!Aop9QCn`P8s%zdb zubHPk8NE7ePV0EaS_M|BhMvAR*^OeV{gKUYp$e)JQt%Di66}r>us%Dw5mL6w~}BBk>Qj;DEZuIfcIAM}&T%Owm3Rs6cv zb;Z93%V>4f?LpM-%r5@aP6XO*cS)bWA+u7p4NaXdxSSGKYMd^%`&_DD6-N-+9j2NC znTQ|rk@imEWue{3D=odePtqTDJOZyY49HV|mV4UKJaX)P=K#c*UR`WBAJ+{KW@hk8 zAM%^BEI$3#^SXdj2t**13^3?WKB*msC+t=6xUXzv@v;1^Ff_9?#^<;OD)0xeBkM>{(2nWR} zqNXVe*VDcxWy1Zr*`xWfrbYL#`F2=N^}B+?*zyE7T!yKZoOk#|I@(RAvk97=*ZOv& z8xdXnBeBK4l`-$+?Z_jrAvrHrK@OXoxVEycjQHbz0>H-O9ev3ON|40Cy*xD7fnibJ zzGy7U1Lf(1lk*AiadOA_I^$eX?(VXlC?9_e)(!1>TNZ^yJK=B`Pg%4V2KQ$|cA)+T2NFO(+jR4x{#^21c~2@06mCgHB~vdGuO zm9vUNoBo^rk#PPl!+w}=Au8RgtXKOkYB%w?G=)4f90RjLN4d3*ed*2amb$%K@U(WW zVqZDQEb8j4q69g+pI-Muya6vN5_N&^xI^T~ zP0#V#Uz=YTmcw`I#y7V{D|)?oGt;yDUid8H)oSMVMDa0wEGUFZG2Oku)pF~|EYb)H z`dGD?I8O56uGyQgOZ>)Zl{H4P*B;4m&xaU^WcG2TE@JLvU5r_h^7%lAE<$&*hiuZe z?o1k2wO!gYbTkH25T4wySA6jH}O@CpTC7UUe3)b~Cx#F)S z9Ea3xq(~Mu7N#k$6PrZ}eT=T%Em>IQpYlpmUTj@kVDfxrHTMql3!UpFl$9U@E6?zW z3qJB-D{NR{Ta%6pG*(^^9$5G5w?;-Y!wiI*Z-zGm`gOvEY&EH67TnuXK+*6}-xa6-IrG_`HV74vXKVZd7zlU_#{ zdzkc(ja)WL_~0*C7Z(*R8N>uW8IBHHBjsB~^GQ_dGorn%qbe6(i5S`p&z;6HX>1PT zv0SX7r^(QdgsUe==Vd%TZPbZ;j=^1v14~P}P(lMwfE-o*+pJG~hVQMc@wC8Oj#!y; z-J5|UNSYKWmW@M?!q-oQP^^UrH z!NfW1_pe4%$(!ea=TRmcW*pj+y)n((la?TM;VU+?r(}B7)YYNXkB^8dN*P3j+{=?= z6?6Ll!Vts)2mV(9KY5^N008=zvK{vRyPQM*SOWndTXQ>+{i{+~u84B37-+`)R#;2;2K IK5{tvCo9(zssI20 literal 0 HcmV?d00001 diff --git a/Ericsson_IPOS_Shell_Package/metadata.xml b/Ericsson_IPOS_Shell_Package/metadata.xml new file mode 100644 index 0000000..423dafd --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/metadata.xml @@ -0,0 +1,6 @@ + + + 27/12/2015 10:39:40 + 6.4.0 + CloudShellPackage + \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/version.txt b/Ericsson_IPOS_Shell_Package/version.txt new file mode 100644 index 0000000..56fea8a --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/version.txt @@ -0,0 +1 @@ +3.0.0 \ No newline at end of file diff --git a/LICENSE.htm b/LICENSE.htm new file mode 100644 index 0000000..f0d1b76 --- /dev/null +++ b/LICENSE.htm @@ -0,0 +1,1576 @@ + + + + + + + + + + + + + + + + + + + + + + + + cloudshell-core/LICENSE at 6.4 · QualiSystems/cloudshell-core + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+
+ +
+
+ + + +
    + +
  • +
    + +
    + + + + Unwatch + + + + +
    + +
    +
    +
    +
  • + +
  • + +
    + +
    + + +
    +
    + + +
    + +
  • + +
  • + + + Fork + + + + + +
  • +
+ +

+ + /cloudshell-core + + + + + +

+ +
+ +
+ +
+
+ + + + + + + +
+ +
+ + + +
+ +
+ + Find file + + +
+ +
+ + +
+ + + a2e6e03 + + + + + + + + +
+ +
+
+
+ +
+ Raw + Blame + History +
+ + + + + +
+ +
+ +
+ +
+ 202 lines (169 sloc) + + 11.1 KB +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
1. Definitions.
+
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
+
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
+
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
+
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
+
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
+
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
+
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
+
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
+
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
+
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
+
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
+
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
+
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
+
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
+
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
+
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
+
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
+
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
+
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
+
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
+
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
+
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
+
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
+
END OF TERMS AND CONDITIONS
+
APPENDIX: How to apply the Apache License to your work.
+
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
+
Copyright {yyyy} {name of copyright owner}
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+ +
+ +
+ +Jump to Line + + +
+ +
+ + +
+
+ +
+ + + + + + + + + +
+ + + Something went wrong with that request. Please try again. +
+ + + + + + + + + + + + + + diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..048e252 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include *.txt +global-include *.ini \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1f7d2a6 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Ericsson IPOS Shell +This Shell supports all Ericsson networking devices that run IPOS operating system. + +A CloudShell Shell implements integration of a device model, application or other technology with CloudShell. A Shell consists of a data-model that defines how the device and its properties are modeled in CloudShell along with an automation that enables interaction with the device via CloudShell. + +This Shell provides you with connectivity and management capabilities such as save and restore configurations, structure autoload functionality, upgrading firmware etc. diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..96f2920 --- /dev/null +++ b/README.txt @@ -0,0 +1 @@ +CloudShell networking Ericsson IPOS specific package powered by QualiSystems \ No newline at end of file diff --git a/cloudshell/__init__.py b/cloudshell/__init__.py new file mode 100644 index 0000000..a006e82 --- /dev/null +++ b/cloudshell/__init__.py @@ -0,0 +1,3 @@ +__author__ = 'coye' +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/__init__.py b/cloudshell/networking/__init__.py new file mode 100644 index 0000000..3ad9513 --- /dev/null +++ b/cloudshell/networking/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/__init__.py b/cloudshell/networking/ericsson/__init__.py new file mode 100644 index 0000000..3ad9513 --- /dev/null +++ b/cloudshell/networking/ericsson/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/ipos/__init__.py b/cloudshell/networking/ericsson/ipos/__init__.py new file mode 100644 index 0000000..34da70a --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/__init__.py @@ -0,0 +1,3 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) + diff --git a/cloudshell/networking/ericsson/ipos/autoload/__init__.py b/cloudshell/networking/ericsson/ipos/autoload/__init__.py new file mode 100644 index 0000000..a006e82 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/__init__.py @@ -0,0 +1,3 @@ +__author__ = 'coye' +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py new file mode 100644 index 0000000..bab0618 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -0,0 +1,78 @@ +import os +import time + +import inject + +from cloudshell.configuration.cloudshell_cli_binding_keys import CLI_SERVICE +from cloudshell.networking.ericsson.autoload.ericsson_generic_snmp_autoload import EricssonGenericSNMPAutoload +from cloudshell.shell.core.context_utils import get_attribute_by_name + + +class EricssonIPOSSNMPAutoload(EricssonGenericSNMPAutoload): + def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, community=None): + """Basic init with injected snmp handler and logger + + :param snmp_handler: + :param logger: + :return: + """ + + EricssonGenericSNMPAutoload.__init__(self, snmp_handler, logger, supported_os) + self.port_ethernet_vendor_type_pattern = r'.6.10.201|.6.10.202' + self._cli = cli + self.snmp_view = 'qualiview' + self.snmp_community = community + if not self.snmp_community: + self.snmp_community = get_attribute_by_name('SNMP Read Community') or 'qualicommunity' + + def load_ericsson_mib(self): + path = os.path.abspath(os.path.join(os.path.dirname(__file__), '', 'mibs')) + self.snmp.update_mib_sources(path) + + @property + def cli(self): + if self._cli is None: + self._cli = inject.instance(CLI_SERVICE) + return self._cli + + def discover(self): + self._enable_snmp() + try: + result = super(EricssonIPOSSNMPAutoload, self).discover() + except Exception as e: + self.logger.error('Autoload failed: {0}'.format(e.message)) + raise Exception('EricssonGenericSNMPAutoload', e.message) + finally: + self._disable_snmp() + return result + + def _enable_snmp(self): + existing_snmp_server = 'snmp server is not running' not in self.cli.send_command('show snmp server').lower() + existing_snmp_view = self.snmp_view in self.cli.send_command('show snmp view').lower() + existing_snmp_community = self.snmp_community in self.cli.send_command('show snmp communities').lower() + + if not existing_snmp_server: + self.cli.send_config_command('context local') + self.cli.send_config_command('service snmp server') + self.cli.send_config_command('end') + self.cli.send_config_command('snmp server') + + if not existing_snmp_view: + self.cli.send_config_command('snmp view {0} internet included'.format(self.snmp_view)) + if existing_snmp_community: + self.cli.send_config_command('no snmp community {0}'.format(self.snmp_community)) + existing_snmp_community = False + + if not existing_snmp_community: + self.cli.send_config_command('snmp community {0} all-contexts view qualiview read-only'.format( + self.snmp_community)) + self.cli.commit() + + def _disable_snmp(self): + time.sleep(5) + self.cli.send_config_command('no snmp community {0}'.format(self.snmp_community)) + self.cli.send_config_command('no snmp view {0}'.format(self.snmp_view)) + self.cli.send_config_command('no snmp server') + self.cli.send_config_command('context local') + self.cli.send_config_command('default service snmp server') + self.cli.send_config_command('end') \ No newline at end of file diff --git a/cloudshell/networking/ericsson/ipos/autoload/test.py b/cloudshell/networking/ericsson/ipos/autoload/test.py new file mode 100644 index 0000000..befbb01 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/test.py @@ -0,0 +1,58 @@ +__author__ = 'shms' + +import threading +from cloudshell.networking.ericsson.ipos.ericsson_ipos_resource_driver import EricssonIPOSResourceDriver +from cloudshell.shell.core.context import ResourceCommandContext, ResourceContextDetails, \ + ReservationContextDetails + +# class DriverCommandExecution(threading.Thread): +# def __init__(self, driver_instance, command_name, parameters_name_value_map): +# threading.Thread.__init__(self) +# +# self._parameters_name_value_map = parameters_name_value_map +# self._driver_instance = driver_instance +# self._command_name = command_name +# # self._cancellation_context = CancellationContext() +# +# def run(self): +# self._result = self._driver_instance.invoke_func(self._command_name, +# self._parameters_name_value_map) +# +# def set_cancellation_context(self): +# # self._cancellation_context.is_cancelled = True +# pass +# +# def get_result(self): +# return self._result +# +# +# class DriverWrapper: +# def __init__(self, obj): +# self.instance = obj +# +# def invoke_func(self, command_name, params): +# func = getattr(self.instance, command_name) +# +# return func(**params) + +tt = EricssonIPOSResourceDriver() + +context = ResourceCommandContext() +context.resource = ResourceContextDetails() +context.resource.name = 'er' +context.reservation = ReservationContextDetails() +context.reservation.reservation_id = 'test_id' +context.resource.attributes = {} +context.resource.attributes['User'] = 'test' +context.resource.attributes['Password'] = 'test' +context.resource.attributes['Enable Password'] = 'test' +context.resource.attributes['CLI Connection Type'] = 'Telnet' +context.resource.attributes['SNMP Read Community'] = 'test' +context.resource.attributes['SNMP Version'] = '2' +context.resource.address = '10.126.144.213' + +#threading.Thread(target=tt.send_custom_command, args=[context, 'show configuration']).start() +threading.Thread(target=tt.get_inventory, args=[context]).start() +# print 'Finished' +# tt.send_custom_command(context, 'kuku') +# tt.get_inventory(context) \ No newline at end of file diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py new file mode 100644 index 0000000..d311822 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py @@ -0,0 +1,54 @@ +import re +from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload +from cloudshell.shell.core.context_utils import get_decrypted_password_by_attribute_name_wrapper, \ + get_attribute_by_name_wrapper +from cloudshell.shell.core.dependency_injection.context_based_logger import get_logger_with_thread_id + +DEFAULT_PROMPT = '[>#]\s*$' +ENABLE_PROMPT = '#\s*$' +CONFIG_MODE_PROMPT = '\(config.*\)#\s*$' + + +def send_default_actions(session): + """Send default commands to configure/clear session outputs + :return: + """ + + # print 'default actions' + enter_enable_mode(session=session) + # session.hardware_expect('terminal length 0', ENABLE_PROMPT) + # session.hardware_expect('terminal no exec prompt timestamp', ENABLE_PROMPT) + # session.hardware_expect(ENTER_CONFIG_MODE_PROMPT_COMMAND, CONFIG_MODE_PROMPT) + # session.hardware_expect('no logging console', CONFIG_MODE_PROMPT) + # session.hardware_expect('exit', DEFAULT_PROMPT + '|' + ENABLE_PROMPT) + + +ENTER_CONFIG_MODE_PROMPT_COMMAND = 'configure' +EXIT_CONFIG_MODE_PROMPT_COMMAND = 'exit' +COMMIT_COMMAND = 'commit' +DEFAULT_ACTIONS = send_default_actions +SUPPORTED_OS = ["IP[ -]?OS"] +ERROR_MAP = {'Database.*Lock.*': 'Database connection locked, try again.'} + + +def enter_enable_mode(session): + result = session.hardware_expect('', re_string=DEFAULT_PROMPT) + if not re.search(ENABLE_PROMPT, result): + session.hardware_expect('enable', re_string=DEFAULT_PROMPT, + expect_map={'[Pp]assword': lambda session: session.send_line( + get_attribute_by_name_wrapper('Enable Password')())}) + #get_decrypted_password_by_attribute_name_wrapper('Enable Password')())}) + result = session.hardware_expect('', re_string=DEFAULT_PROMPT) + if not re.search(ENABLE_PROMPT, result): + raise Exception('enter_enable_mode', 'Enable password is incorrect') + + +CONNECTIVITY_OPERATIONS_CLASS = EricssonConnectivityOperations +CONFIGURATION_OPERATIONS_CLASS = EricssonConfigurationOperations +FIRMWARE_OPERATIONS_CLASS = EricssonConfigurationOperations +AUTOLOAD_OPERATIONS_CLASS = EricssonIPOSSNMPAutoload +SEND_COMMAND_OPERATIONS_CLASS = EricssonSendCommandOperations + +GET_LOGGER_FUNCTION = get_logger_with_thread_id +POOL_TIMEOUT = 300 diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py new file mode 100644 index 0000000..0bd644f --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -0,0 +1,125 @@ +import inject + +from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap +from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface +from cloudshell.shell.core.context_utils import context_from_args +from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface +from cloudshell.shell.core.driver_utils import GlobalLock + +import cloudshell.networking.ericsson.ipos.ericsson_ipos_configuration as driver_config + + +class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): + def __init__(self): + super(EricssonIPOSResourceDriver, self).__init__() + bootstrap = NetworkingGenericBootstrap() + bootstrap.add_config(driver_config) + bootstrap.initialize() + + @context_from_args + def initialize(self, context): + """Initialize method + :type context: cloudshell.shell.core.context.driver_context.InitCommandContext + """ + + return 'Finished initializing' + + def cleanup(self): + pass + + @context_from_args + def ApplyConnectivityChanges(self, context, request): + connectivity_operations = inject.instance('connectivity_operations') + connectivity_operations.logger.info('Start applying connectivity changes, request is: {0}'.format(str(request))) + response = connectivity_operations.apply_connectivity_changes(request) + connectivity_operations.logger.info('Finished applying connectivity changes, responce is: {0}'.format(str( + response))) + connectivity_operations.logger.info('Apply Connectivity changes completed') + return response + + @GlobalLock.lock + @context_from_args + def restore(self, context, path, config_type, restore_method, vrf=None): + """Restore selected file to the provided destination + + :param path: source config file + :param config_type: running or startup configs + :param restore_method: append or override methods + :param vrf: VRF management Name + """ + + configuration_operations = inject.instance('configuration_operations') + response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, + config_type=config_type, vrf=vrf) + configuration_operations.logger.info('Restore completed') + configuration_operations.logger.info(response) + + @context_from_args + def save(self, context, destination_host, source_filename, vrf=None): + """Save selected file to the provided destination + + :param source_filename: source file, which will be saved + :param destination_host: destination path where file will be saved + :param vrf: VRF management Name + """ + + configuration_operations = inject.instance('configuration_operations') + response = configuration_operations.save_configuration(destination_host, source_filename, vrf) + configuration_operations.logger.info('Save completed') + return response + + @context_from_args + def get_inventory(self, context): + """Return device structure with all standard attributes + + :return: response + :rtype: string + """ + + autoload_operations = inject.instance("autoload_operations") + response = autoload_operations.discover() + autoload_operations.logger.info('Autoload completed') + return response + + @GlobalLock.lock + @context_from_args + def update_firmware(self, context, remote_host, file_path): + """Upload and updates firmware on the resource + + :param remote_host: path to tftp:// server where firmware file is stored + :param file_path: firmware file name + :return: result + :rtype: string + """ + + firmware_operations = inject.instance("firmware_operations") + response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) + firmware_operations.logger.info(response) + + @context_from_args + def send_custom_command(self, context, command): + """Send custom command + + :return: result + :rtype: string + """ + + send_command_operations = inject.instance("send_command_operations") + response = send_command_operations.send_command(command=command) + print response + return response + + @context_from_args + def send_custom_config_command(self, context, command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + send_command_operations = inject.instance("send_command_operations") + result_str = send_command_operations.send_config_command(command=command) + return result_str + + @context_from_args + def shutdown(self, context): + pass diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d9e24c2 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +cloudshell-networking-ericsson +cloudshell-cli>=2.1,<2.2 +cloudshell-snmp>=2.1,<2.2 +cloudshell-automation-api>=7.0,<7.1 +inject==3.3.1 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9ab3fc5 --- /dev/null +++ b/setup.py @@ -0,0 +1,24 @@ +from setuptools import setup, find_packages +import os + +with open(os.path.join('version.txt')) as version_file: + version_from_file = version_file.read().strip() + +with open('requirements.txt') as f_required: + required = f_required.read().splitlines() + +with open('test_requirements.txt') as f_tests: + required_for_tests = f_tests.read().splitlines() + +setup( + name='cloudshell-networking-ericsson-ipos', + url='http://www.qualisystems.com/', + author='QualiSystems', + author_email='info@qualisystems.com', + packages=find_packages(), + install_requires=required, + tests_require=required_for_tests, + version=version_from_file, + description='QualiSystems networking Ericsson IPOS specific Package', + include_package_data = True +) \ No newline at end of file diff --git a/test_requirements.txt b/test_requirements.txt new file mode 100644 index 0000000..1fdda41 --- /dev/null +++ b/test_requirements.txt @@ -0,0 +1,3 @@ +cloudshell-networking-ericsson +cloudshell-snmp>=2.1,<2.2 +cloudshell-cli>=2.1,<2.2 \ No newline at end of file diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..afaf360 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.0.0 \ No newline at end of file From eb98763f8300bd27f916a20fd3194c825f0a1456 Mon Sep 17 00:00:00 2001 From: CoYe Date: Thu, 28 Jul 2016 14:23:21 -0700 Subject: [PATCH 02/39] Updated config --- .gitignore | 4 ++++ .../Configuration/shellconfig.xml | 2 +- .../DataModel/datamodel.xml | 4 ++-- ... Generic Ericsson IPOS Driver Version.zip} | Bin 2281 -> 2277 bytes .../ipos/ericsson_ipos_configuration.py | 9 +++++++-- 5 files changed, 14 insertions(+), 5 deletions(-) rename Ericsson_IPOS_Shell_Package/Resource Drivers - Python/{Generic Ericsson IPOS Driver Version2.zip => Generic Ericsson IPOS Driver Version.zip} (53%) diff --git a/.gitignore b/.gitignore index 86c7a21..9fcc339 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *.pyc cloudshell/networking/ericsson/ipos/test_ipos.py + +dist +cloudshell_networking_ericsson_ipos.egg-info/ +Ericsson_IPOS_Shell_Package/Ericsson-IPOS-Shell.zip diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index c5ae352..b4276f6 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -4,7 +4,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSchema.xsd"> - + The networking Shell template will create a resource of this type in CloudShell. Once the Router is modeled correctly in CloudShell it will be possible to use it in Sandboxes and for connectivity. Discovers the device structure and populate its attributes. diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 92c6346..3fbb2df 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -325,7 +325,7 @@ - Generic Ericsson IPOS Driver Version2 + Generic Ericsson IPOS Driver Version @@ -434,7 +434,7 @@ - Generic Ericsson IPOS Driver Version2 + Generic Ericsson IPOS Driver Version diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version2.zip b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version.zip similarity index 53% rename from Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version2.zip rename to Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version.zip index 59e4c4ef0191a6c38a624f8a012945b682f50da4..54400de09b16f630cfa726bccc9b0ffacc251cf8 100644 GIT binary patch delta 684 zcmV;d0#p6z5#@6aWAK2mno1`$z~d%r|TT002gj7bkzEz4bu4S|v?)rQLRw zUFC`_JP=D@Q`?a8_Z=G(K|&kCo>~qOjAx$Tyctg%-To?aQiIZ5ie>QW=3_uWB$9EF zErZIWA3g`SU*5lq){3JS`A!R12H!w{;tBbRKUzyc9-e=^5bv^U!Gi9^p<3K0%Ec+r6M%X$peyMQ1b+I zfZPd*9%&;h!Z1M)EKVwIWDzG)q&$m{6o)CJBUw2|l*~GI%JoGc{uwGk z$hrLrJziBcBFBgT$6dma?fX)kmiewM^9HjLkQiQb)2#MXWY|VS4gT!bDu7KW4{;^1 zu|d_qW+{K7;AaKe%uwV_f`r}anARzmTjXEujq&7Z4X4>U)1~yrW&p$TazQP*crT}w zy1(;A<_y7}so76TeT;*jyeZE?py65y?F6WlOTxuYVnTY)8KqjKlg477$8Ni^PBeo8 zgmFMu5t-Kwc)pR;DVJ?$ozoMgE9T`Q{Ov!XYlvbg_4l*hxXQh4+woqQLc;49qirwe zobxgL$&*L>Z`-dbk(E8WsyNWIHhh$nk!PBSVfByKQgHf>!fxp$!xlo;FI4yAbN zffx)%44gg|Cl+DhZj#~gDj9|CofKbx1GAt4D+LWrR{KZ@Fw8e>0ssI;lh_A!0i2Ug S2w?&3lduRg2D=9U0000k`ZwAD delta 688 zcmV;h0#E(r5$O>ZP)h>@6aWAK2mq*F^hl^=E)#G9002jk7bkzPZ7)4QS5>y@uC&`m z*;TH{!UM4cHnj~Yf8W8F2ol;5_SABSU_A5u=FNEG;PzLZkqVUNQiR_7<&8%`#FBB5 zhF)oscb~l5&u`xZcZ#DI`A%~Py>B2u@tAzYAFZVz51Sv)#JTKRun%7M7J46-Hx2L; zg|WaLkv5JbQW2VE@5}rm!io=xAk*usEO4c}b%JoGc z?ingU$hrLrJzi8fBFBgT$6fr9?fX)kmibFjWHn|bAU3?>re5u-NU@EE8vNOlUV}pOHfXz}w!Os%3nW4z51o6AmF|AWBx5&TR8{^5-3Qn`Nrc3FK%>ahw<$^Zk zqP?6}>i*7anK1<0P_v(u`WOc{c@v(2K*O~Z+6ho9n}m&>#Dw&oGfI_8CXK~DkKK0N zIMEbx5XJ&sMPyz#;Q2;Ur(Cw3bxuzdwwRZT@V93Fgsvf`)Zfi|V=MQ%ZO40I3JIrU zgton$bI!-~Cr=LTziq#=KvvD!Rr!IQwc(?rjI57qbDB{>E^&i7vuSHX$-NDopv2hr z%}|P_9*DtU#K7reabgh`_9p2cuabe^-bwNGH?y1qD+LXxUi3()WG)kM0ssI Date: Thu, 28 Jul 2016 15:55:16 -0700 Subject: [PATCH 03/39] added new firmware operations handler --- .../networking/ericsson/ipos/ericsson_ipos_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py index 1cdb93a..a881054 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py @@ -2,6 +2,7 @@ from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations +from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.shell.core.context_utils import get_decrypted_password_by_attribute_name_wrapper, \ @@ -18,9 +19,8 @@ def send_default_actions(session): :return: """ - # print 'default actions' enter_enable_mode(session=session) - # session.hardware_expect('terminal length 0', ENABLE_PROMPT) + session.hardware_expect('terminal length 0', ENABLE_PROMPT) # session.hardware_expect('terminal no exec prompt timestamp', ENABLE_PROMPT) # session.hardware_expect(ENTER_CONFIG_MODE_PROMPT_COMMAND, CONFIG_MODE_PROMPT) # session.hardware_expect('no logging console', CONFIG_MODE_PROMPT) @@ -50,7 +50,7 @@ def enter_enable_mode(session): CONNECTIVITY_OPERATIONS_CLASS = EricssonConnectivityOperations CONFIGURATION_OPERATIONS_CLASS = EricssonConfigurationOperations -FIRMWARE_OPERATIONS_CLASS = EricssonConfigurationOperations +FIRMWARE_OPERATIONS_CLASS = EricssonFirmwareOperations AUTOLOAD_OPERATIONS_CLASS = EricssonIPOSSNMPAutoload SEND_COMMAND_OPERATIONS_CLASS = EricssonSendCommandOperations From 8bfc7f8fd259d790a155feff36d2dfdf4c3b0bd8 Mon Sep 17 00:00:00 2001 From: CoYe Date: Fri, 29 Jul 2016 17:50:16 -0700 Subject: [PATCH 04/39] Removed version from driver name --- .gitignore | 1 + .../Configuration/shellconfig.xml | 2 +- .../DataModel/datamodel.xml | 113 +--------------- .../Generic Ericsson IPOS Driver Version.zip | Bin 2277 -> 0 bytes .../drivermetadata.xml | 48 +++++++ .../ericsson_ipos_resource_driver.py | 125 ++++++++++++++++++ .../requirements.txt | 1 + .../ipos/ericsson_ipos_configuration.py | 6 +- 8 files changed, 180 insertions(+), 116 deletions(-) delete mode 100644 Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version.zip create mode 100644 Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml create mode 100644 Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py create mode 100644 Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt diff --git a/.gitignore b/.gitignore index 9fcc339..c397d52 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ cloudshell/networking/ericsson/ipos/test_ipos.py dist cloudshell_networking_ericsson_ipos.egg-info/ Ericsson_IPOS_Shell_Package/Ericsson-IPOS-Shell.zip +cloudshell/networking/ericsson/ipos/autoload/test.py diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index b4276f6..ae95b26 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -4,7 +4,7 @@ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSchema.xsd"> - + The networking Shell template will create a resource of this type in CloudShell. Once the Router is modeled correctly in CloudShell it will be possible to use it in Sandboxes and for connectivity. Discovers the device structure and populate its attributes. diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 3fbb2df..b173800 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -223,115 +223,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Ericsson IPOS Driver Version - - - - - - @@ -434,7 +325,7 @@ - Generic Ericsson IPOS Driver Version + Generic Ericsson IPOS Driver @@ -459,7 +350,6 @@ - Ericsson IPOS Switch Ericsson IPOS Router @@ -656,7 +546,6 @@ - Ericsson IPOS Switch Ericsson IPOS Router diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version.zip b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver Version.zip deleted file mode 100644 index 54400de09b16f630cfa726bccc9b0ffacc251cf8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2277 zcmai$2{hDeAIJX;#W3#3U~CuJr)(jveYqsUy*;O3Q&$P9=L??Yoj2Y)n`Vk{@WM*X26We^u^DGk18=nlHosb&H_YKy@7@GIC;^;53Gt|*nsIRA7at4}wqmt`*X zRRm%3v~d?~;C@Ey@RLN~iCZUm`Llgd&ZnBA>j&x&Wx(ADLsgp&KCdmzAYYe;5ivH3 zKZMBD-8OmE?yGcT+K+Rr4>@Z?il2CwH>{NFGV8INwmOS}&_{KLXdB(WK-U`HM7c3S zm7d+ywr;`X?I@`jwX?dI8h5Qlso&)K8x(k%qdd#H^Rca$X;i-m4MofB_PX{YsQI?7 zW*mEbi1Ate{1HgRL-KD*xmdsAApzPE=G@^g%SNREiAt=k`pJggRxD%HJ zoiAEf-|fjf@fpXcMUb-%nk#h%>W^Q@$|64x!P;sd6lH_d{ElPY6dS`!1+w6bNj_S{ z`&c-y1#gj|kb;osn;^=YRfNdpI2NKhe05WNF&p*{qEbYP%z5Skc{!v|o3{FKpnj5mRR3sS}e;|PBxVZcSaG`i_w8tNBKqWZx)ma+{}Wj1x`runz%D^x}DPTdkUR}iXqBS8blY!&IPs=WML;;O3V z$X57P_+^-2uk|1_l#0#|uIxAc75ybcT#-(h8%=?tFi8QA#y|8IKUeTuD|^teQ2R|g z(;>-%sVPG#F7JbnI0)&`XP|b~@9c)x2F2248v9)>!II}Tb6nhkz7MbK2URpqK4&^s5O@P@BU(7Xo4bTNU-VPTM+M?+J!A>8Q#|6Dw|)Lz z)KVYPoOL?mE2h#T;Qa$y?p*N(_iLA#O%n$}=4^+u`RR-7Op1dxrHpmLm^c08RdI0R zW{y0qg_@_$N^BFQ5^YZYTE4g@I31j)z4T~fv5S8lbS5M=EM}oUp|adQvhIk0l<+Mq zC$)K%b3-vL(pGy>WQY|u=whGT6>GI}Ch_@>v-g5wpqiQV4FkpScD?e%3fS)YMB5@2 zdZ#lAR4}@&d7n}Dx-!8M7SkVF$6vpI5vy5`@RpaTPw9aN`&QZb3_ampPoy-1Qw7l&i9+!|Vl3d-rwO^}H>^NkrTP+uj(L6)GE8e6TGh&1<6D;cVDW(Z(qq5jD zpQYBw_c;#v*gDC_SB#&UU#Sl5RWUs4636gw`~<_EC*31ot$Go0p}-2o9kE39)y&B^ z6dTx%#>TRrsn)yPV#HC5Nr?Z}qoocfK`R!$G@QV0bVW z`lFI^W)pXxb(uYCsccA_^r|VIGEMB7`=XL@%v;y2FE#W~4Q}jXt6l4s1L(YgdfB9! z%gjqgE@kT&@Hoki+kxA3sz0Ue)08tCm&nhqOgTiqzJURxdj3|T&hdgojcZ0zy|L(st{z-)Y&M4aZ zHvFd~|DC{9gbXm + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py new file mode 100644 index 0000000..0bd644f --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -0,0 +1,125 @@ +import inject + +from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap +from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface +from cloudshell.shell.core.context_utils import context_from_args +from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface +from cloudshell.shell.core.driver_utils import GlobalLock + +import cloudshell.networking.ericsson.ipos.ericsson_ipos_configuration as driver_config + + +class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): + def __init__(self): + super(EricssonIPOSResourceDriver, self).__init__() + bootstrap = NetworkingGenericBootstrap() + bootstrap.add_config(driver_config) + bootstrap.initialize() + + @context_from_args + def initialize(self, context): + """Initialize method + :type context: cloudshell.shell.core.context.driver_context.InitCommandContext + """ + + return 'Finished initializing' + + def cleanup(self): + pass + + @context_from_args + def ApplyConnectivityChanges(self, context, request): + connectivity_operations = inject.instance('connectivity_operations') + connectivity_operations.logger.info('Start applying connectivity changes, request is: {0}'.format(str(request))) + response = connectivity_operations.apply_connectivity_changes(request) + connectivity_operations.logger.info('Finished applying connectivity changes, responce is: {0}'.format(str( + response))) + connectivity_operations.logger.info('Apply Connectivity changes completed') + return response + + @GlobalLock.lock + @context_from_args + def restore(self, context, path, config_type, restore_method, vrf=None): + """Restore selected file to the provided destination + + :param path: source config file + :param config_type: running or startup configs + :param restore_method: append or override methods + :param vrf: VRF management Name + """ + + configuration_operations = inject.instance('configuration_operations') + response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, + config_type=config_type, vrf=vrf) + configuration_operations.logger.info('Restore completed') + configuration_operations.logger.info(response) + + @context_from_args + def save(self, context, destination_host, source_filename, vrf=None): + """Save selected file to the provided destination + + :param source_filename: source file, which will be saved + :param destination_host: destination path where file will be saved + :param vrf: VRF management Name + """ + + configuration_operations = inject.instance('configuration_operations') + response = configuration_operations.save_configuration(destination_host, source_filename, vrf) + configuration_operations.logger.info('Save completed') + return response + + @context_from_args + def get_inventory(self, context): + """Return device structure with all standard attributes + + :return: response + :rtype: string + """ + + autoload_operations = inject.instance("autoload_operations") + response = autoload_operations.discover() + autoload_operations.logger.info('Autoload completed') + return response + + @GlobalLock.lock + @context_from_args + def update_firmware(self, context, remote_host, file_path): + """Upload and updates firmware on the resource + + :param remote_host: path to tftp:// server where firmware file is stored + :param file_path: firmware file name + :return: result + :rtype: string + """ + + firmware_operations = inject.instance("firmware_operations") + response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) + firmware_operations.logger.info(response) + + @context_from_args + def send_custom_command(self, context, command): + """Send custom command + + :return: result + :rtype: string + """ + + send_command_operations = inject.instance("send_command_operations") + response = send_command_operations.send_command(command=command) + print response + return response + + @context_from_args + def send_custom_config_command(self, context, command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + send_command_operations = inject.instance("send_command_operations") + result_str = send_command_operations.send_config_command(command=command) + return result_str + + @context_from_args + def shutdown(self, context): + pass diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt new file mode 100644 index 0000000..9c48207 --- /dev/null +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt @@ -0,0 +1 @@ +cloudshell-networking-ericsson-ipos \ No newline at end of file diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py index a881054..baeccd7 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py @@ -9,7 +9,7 @@ get_attribute_by_name_wrapper from cloudshell.shell.core.dependency_injection.context_based_logger import get_logger_with_thread_id -DEFAULT_PROMPT = '[>#]\s*$' +DEFAULT_PROMPT = '\].*[>#]\s*$' ENABLE_PROMPT = '#\s*$' CONFIG_MODE_PROMPT = '\(config.*\)#\s*$' @@ -34,7 +34,7 @@ def send_default_actions(session): SUPPORTED_OS = ["IP[ -]?OS"] AUTHENTICATION_ERROR_PATTERN = r'[Ll]ogin\s*[Ii]ncorrect|' + \ '[Bb]ad\s*([Pp]assword(s)?|[Ss]ecret(s)?|[Ff]ailed\s*(to)?\s*[Aa]uthenticate' -ERROR_MAP = {'Database.*Lock.*': 'Database connection locked, try again.'} +ERROR_MAP = {'Database.*Lock.*': 'Database locked out, please try again.'} def enter_enable_mode(session): @@ -56,4 +56,4 @@ def enter_enable_mode(session): GET_LOGGER_FUNCTION = get_logger_with_thread_id POOL_TIMEOUT = 300 -HE_MAX_LOOP_RETRIES = 2000 +HE_MAX_LOOP_RETRIES = 0 From e87b29f63312826a4ddad29cc3538139ef40c019 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 2 Aug 2016 16:28:19 -0700 Subject: [PATCH 05/39] Updated autoload --- .../autoload/ericsson_ipos_snmp_autoload.py | 13 +- .../mib/ERICSSON-ROUTER-PRODUCT-MIB.py | 320 ++++++++++++++++++ .../ipos/autoload/mib/ERICSSON-ROUTER-SMI.py | 23 ++ .../ipos/autoload/mib/ERICSSON-TOP-MIB.py | 16 + .../ericsson/ipos/autoload/mib/__init__.py | 0 5 files changed, 368 insertions(+), 4 deletions(-) create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index bab0618..61c1a99 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -18,15 +18,17 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, """ EricssonGenericSNMPAutoload.__init__(self, snmp_handler, logger, supported_os) - self.port_ethernet_vendor_type_pattern = r'.6.10.201|.6.10.202' + self.port_ethernet_vendor_type_pattern = r'port.*1ge|port.*10ge' self._cli = cli self.snmp_view = 'qualiview' self.snmp_community = community + self.vendor_type_exclusion_pattern = ['port.*mgmt'] + self.load_mib_list = ['ERICSSON-ROUTER-PRODUCT-MIB'] if not self.snmp_community: self.snmp_community = get_attribute_by_name('SNMP Read Community') or 'qualicommunity' def load_ericsson_mib(self): - path = os.path.abspath(os.path.join(os.path.dirname(__file__), '', 'mibs')) + path = os.path.abspath(os.path.join(os.path.dirname(__file__), '', 'mib')) self.snmp.update_mib_sources(path) @property @@ -47,15 +49,18 @@ def discover(self): return result def _enable_snmp(self): + snmp_service_enabled = 'not supported' not in self.cli.send_command('show service | include snmp').lower() existing_snmp_server = 'snmp server is not running' not in self.cli.send_command('show snmp server').lower() existing_snmp_view = self.snmp_view in self.cli.send_command('show snmp view').lower() existing_snmp_community = self.snmp_community in self.cli.send_command('show snmp communities').lower() - if not existing_snmp_server: + if not snmp_service_enabled: self.cli.send_config_command('context local') self.cli.send_config_command('service snmp server') self.cli.send_config_command('end') - self.cli.send_config_command('snmp server') + + if not existing_snmp_server: + self.cli.send_config_command('snmp server enhance ifmib') if not existing_snmp_view: self.cli.send_config_command('snmp view {0} internet included'.format(self.snmp_view)) diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py new file mode 100644 index 0000000..94bdc7b --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py @@ -0,0 +1,320 @@ +# +# PySNMP MIB module ERICSSON-ROUTER-PRODUCT-MIB (http://pysnmp.sf.net) +# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-PRODUCT-MIB.my +# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# On host ? platform ? version ? by user ? +# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# +( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") +( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") +( eriRouterProducts, eriRouterEntities, eriRouterModules, ) = mibBuilder.importSymbols("ERICSSON-ROUTER-SMI", "eriRouterProducts", "eriRouterEntities", "eriRouterModules") +( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") +( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") +( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterProductMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5, 1)).setRevisions(("2016-05-19 18:00", "2015-01-14 18:00", "2014-09-22 18:00", "2013-10-17 18:00", "2013-09-16 18:00", "2013-06-19 18:00", "2013-04-18 18:00", "2013-01-14 18:00", "2012-06-25 18:00", "2012-03-19 18:00", "2012-02-10 18:00", "2011-06-02 18:00", "2011-01-19 18:00", "2010-10-01 00:00", "2010-08-27 00:00", "2010-04-01 00:00", "2010-01-27 00:00", "2009-10-05 00:00", "2009-09-24 00:00", "2009-09-13 00:00", "2009-09-10 00:00", "2009-07-16 00:00", "2009-02-04 00:00", "2009-01-20 00:00", "2008-09-23 00:00", "2008-07-02 00:00", "2008-05-20 00:00", "2008-05-08 00:00", "2007-09-20 00:00", "2007-08-08 00:00", "2007-05-09 00:00", "2007-02-28 00:00", "2007-02-14 00:00", "2007-02-05 00:00", "2005-12-27 00:00", "2005-03-01 00:00", "2004-11-05 00:00", "2004-05-11 00:00", "2003-09-25 00:00", "2003-07-24 00:00", "2003-05-19 17:00", "2003-05-05 00:00", "2003-03-25 00:00", "2002-06-13 00:00", "2002-06-06 00:00", "2001-12-12 00:00", "2001-09-26 17:00", "2001-07-25 10:00", "2001-05-15 15:07", "2001-05-04 16:42", "2001-02-13 18:57", "2001-02-13 10:07", "2001-02-01 17:07", "2001-01-05 18:34", "2000-12-28 17:04", "2000-11-15 17:04", "2000-11-02 14:54", "2000-10-25 15:23", "2000-10-20 17:30", "2000-09-26 13:30", "2000-09-25 11:20", "2000-07-19 15:44", "2000-07-06 21:50", "2000-06-16 17:00", "2000-06-13 17:00", "2000-05-18 00:00", "1999-07-08 17:12", "1998-08-05 19:00",)) +eriRouterSMS1000 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 1)) +eriRouterSMS500 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 2)) +eriRouterSMS1800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 3)) +eriRouterSMS10000 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 4)) +eriRouterSmartEdge800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 10)) +eriRouterSmartEdge400 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 11)) +eriRouterSmartEdge100 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 12)) +eriRouterSmartEdge1200 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 13)) +eriRouterSM480 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 14)) +eriRouterSmartEdge600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 15)) +eriRouterSM240 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 16)) +eriRouterSSR8020 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 17)) +eriRouterSSR8010 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 18)) +eriRouterSSR8004 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 19)) +eriRouterSP415 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 20)) +eriRouterSP420 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 21)) +eriRouterEVR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 22)) +eriRouterEntityTypeOther = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 1)) +eriRouterEntityTypeUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 2)) +eriRouterEntityTypeChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3)) +eriRouterEntChassisSMS1000 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 1)) +eriRouterEntChassisSMS500 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 2)) +eriRouterEntChassisSMS1800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 3)) +eriRouterEntChassisSMS10000 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 4)) +eriRouterEntChassisSE800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 6)) +eriRouterEntChassisSE400 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 7)) +eriRouterEntChassisSE100 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 8)) +eriRouterEntChassisSE1200 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 9)) +eriRouterEntChassisSM480 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 10)) +eriRouterEntChassisSE600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 11)) +eriRouterEntChassisSM240 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 12)) +eriRouterEntChassisSE1200H = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 13)) +eriRouterEntChassisSSR8020 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 14)) +eriRouterEntChassisSSR8010 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 15)) +eriRouterEntChassisSSR8004 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 16)) +eriRouterEntChassisSP415 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 17)) +eriRouterEntChassisSP420 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 18)) +eriRouterEntChassisEVR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 19)) +eriRouterEntityTypeBackplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4)) +eriRouterEntBackplaneSMS1000Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 1)) +eriRouterEntBackplaneSMS1000Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 2)) +eriRouterEntBackplaneSMS500Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 3)) +eriRouterEntBackplaneSMS500Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 4)) +eriRouterEntBackplaneSMS1800Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 5)) +eriRouterEntBackplaneSMS1800Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 6)) +eriRouterEntBackplaneSMS10000Midplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 7)) +eriRouterEntBackplaneSE800Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 10)) +eriRouterEntBackplaneSE400Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 11)) +eriRouterEntBackplaneSE100Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 12)) +eriRouterEntBackplaneSE1200Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 13)) +eriRouterEntBackplaneSM480Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 14)) +eriRouterEntBackplaneSE600Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 15)) +eriRouterEntBackplaneSM240Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 16)) +eriRouterEntBackplaneSE1200HData = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 17)) +eriRouterEntBackplaneSSR8020Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 18)) +eriRouterEntBackplaneSSR8010Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 19)) +eriRouterEntBackplaneSSR8004Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 20)) +eriRouterEntBackplaneSP415Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 21)) +eriRouterEntBackplaneSP420Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 22)) +eriRouterEntBackplaneEVRVirtual = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 23)) +eriRouterEntityTypeContainer = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5)) +eriRouterEntContainerSMS1000Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 1)) +eriRouterEntContainerSMS1000Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 2)) +eriRouterEntContainerSMS500Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 3)) +eriRouterEntContainerSMS500Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 4)) +eriRouterEntContainerSMS1800Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 5)) +eriRouterEntContainerSMS1800Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 6)) +eriRouterEntContainerSMS10000Fabric = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 7)) +eriRouterEntContainerSMS10000Timing = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 8)) +eriRouterEntContainerSMS10000SMCM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 9)) +eriRouterEntContainerSMS10000IO = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 10)) +eriRouterEntContainerSE800Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 14)) +eriRouterEntContainerSE400Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 15)) +eriRouterEntContainerSE100Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 16)) +eriRouterEntContainerSE100Carrier = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 17)) +eriRouterEntContainerSE1200Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 18)) +eriRouterEntContainerSM480Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 19)) +eriRouterEntContainerSE600Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 20)) +eriRouterEntContainerSM240Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 21)) +eriRouterEntContainerSE1200HData = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 22)) +eriRouterEntContainerSSR8020FanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 23)) +eriRouterEntContainerSSR8020PowerModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 24)) +eriRouterEntContainerSSR8020Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 25)) +eriRouterEntContainerSSR8010FanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 26)) +eriRouterEntContainerSSR8010PowerModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 27)) +eriRouterEntContainerSSR8010Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 28)) +eriRouterEntContainerSSR8004FanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 29)) +eriRouterEntContainerSSR8004PowerModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 30)) +eriRouterEntContainerSSR8004Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 31)) +eriRouterEntContainerSPSC1FanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 32)) +eriRouterEntContainerSPSC1PowerModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 33)) +eriRouterEntContainerSPSC1Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 34)) +eriRouterEntContainerEVRData = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 35)) +eriRouterEntityTypePowerSupply = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6)) +eriRouterEntPowerSupplyUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 1)) +eriRouterEntPowerSupplySMS1000AC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 2)) +eriRouterEntPowerSupplySMS1000DC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 3)) +eriRouterEntPowerSupplySMS500AC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 4)) +eriRouterEntPowerSupplySMS500DC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 5)) +eriRouterEntPowerSupplySMS1800AC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 6)) +eriRouterEntPowerSupplySMS1800DC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 7)) +eriRouterEntPowerModuleSSR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 10)) +eriRouterEntPowerModuleSPSC1AC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 11)) +eriRouterEntPowerModuleSPSC1DC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 12)) +eriRouterEntityTypeFan = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7)) +eriRouterEntFanSE800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 1)) +eriRouterEntFanSE400 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 2)) +eriRouterEntFanSE1200 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 3)) +eriRouterEntFanSM480 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 4)) +eriRouterEntFanSE600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 5)) +eriRouterEntFanSM240 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 6)) +eriRouterEntFanSE1200H = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 7)) +eriRouterEntFanTraySSR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 8)) +eriRouterEntFanTraySPSC1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 9)) +eriRouterEntFanTrayAlarmIOSPSC1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 7, 10)) +eriRouterEntityTypeSensor = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 8)) +eriRouterEntSensorAlarmSE400 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 8, 1)) +eriRouterEntSensorAlarmSE600 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 8, 2)) +eriRouterEntSensorAlarmSM240 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 8, 3)) +eriRouterEntityTypeModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9)) +eriRouterEntModuleUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 1)) +eriRouterEntModuleSMSCE1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 16)) +eriRouterEntModuleSMSCE2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 17)) +eriRouterEntModuleSMSCE3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 18)) +eriRouterEntModuleSMSFE1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 10)) +eriRouterEntModuleSMSFE2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 12)) +eriRouterEntModuleSMSFE3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 35)) +eriRouterEntModuleSMSXFE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 40)) +eriRouterEntModuleSMSFABRIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 29)) +eriRouterEntModuleSMSTIMING = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 31)) +eriRouterEntModuleSMSCM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 30)) +eriRouterEntModuleSMSSM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 32)) +eriRouterEntModuleSMSEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 6)) +eriRouterEntModuleSMSGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 26)) +eriRouterEntModuleSMSAIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 4)) +eriRouterEntModuleSMSPIME3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 8)) +eriRouterEntModuleSMSPIME1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 22)) +eriRouterEntModuleSMSAIME3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 5)) +eriRouterEntModuleSMSAIME1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 23)) +eriRouterEntModuleSMSAIMT1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 20)) +eriRouterEntModuleSMSAIMOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 3)) +eriRouterEntModuleSMSAIMOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 27)) +eriRouterEntModuleSMSPOSOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 24)) +eriRouterEntModuleSMSPOSOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 25)) +eriRouterEntModuleSMSIPSEC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 28)) +eriRouterEntModuleSMSPIMDS1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 14)) +eriRouterEntModuleSMSPIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 7)) +eriRouterEntModuleSMSPIMCDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 15)) +eriRouterEntModuleSMSPIMHSSI = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 9)) +eriRouterEntModuleSEXC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 41)) +eriRouterEntModuleSEEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 42)) +eriRouterEntModuleSEGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 43)) +eriRouterEntModuleSEPOSOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 44)) +eriRouterEntModuleSEPOSOC48 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 45)) +eriRouterEntModuleSEPOSOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 46)) +eriRouterEntModuleSECHOC12DS1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 47)) +eriRouterEntModuleSECHOC12DS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 48)) +eriRouterEntModuleSEAIMOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 49)) +eriRouterEntModuleSEAIMOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 50)) +eriRouterEntModuleSECHDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 51)) +eriRouterEntModuleSEDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 52)) +eriRouterEntModuleSEAIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 53)) +eriRouterEntModuleSECHSTM1E1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 54)) +eriRouterEntModuleSEE1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 55)) +eriRouterEntModuleSEXC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 56)) +eriRouterEntModuleSEE3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 57)) +eriRouterEntModuleSEAIMOC12E = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 58)) +eriRouterEntModuleSEGIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 59)) +eriRouterEntModuleSE10GIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 60)) +eriRouterEntModuleSE100XC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 61)) +eriRouterEntModuleSE100EMIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 62)) +eriRouterEntModuleSE100FXMIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 63)) +eriRouterEntModuleSE100GERJMIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 64)) +eriRouterEntModuleSE100GEFXMIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 65)) +eriRouterEntModuleSEXC4 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 66)) +eriRouterEntModuleSE100AIMOC3MIC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 67)) +eriRouterEntModuleSEASE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 68)) +eriRouterEntModuleSEFE60GE2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 69)) +eriRouterEntModuleSEPOSOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 70)) +eriRouterEntModuleSE5PortGIGE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 71)) +eriRouterEntModuleSE20PortGIGE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 72)) +eriRouterEntModuleSE4Port10GIGE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 73)) +eriRouterEntModuleSE10GIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 74)) +eriRouterEntModuleSESSE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 75)) +eriRouterEntModuleSE10PortGIGEDDR2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 76)) +eriRouterEntModuleSE4PortOC48 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 77)) +eriRouterEntModuleSE8PortOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 78)) +eriRouterEntModuleSE8OR2PORTCHOC3OC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 79)) +eriRouterEntModuleSEASE2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 80)) +eriRouterEntModuleSE1Port10GEOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 81)) +eriRouterEntModuleSEPos8xOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 82)) +eriRouterEntModuleSEPos4xOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 83)) +eriRouterEntModuleSEAtm2xOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 84)) +eriRouterEntModuleSM10GIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 101)) +eriRouterEntModuleSMRP2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 102)) +eriRouterEntModuleSMGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 104)) +eriRouterEntModuleSMGIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 105)) +eriRouterEntModuleSM10GIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 106)) +eriRouterEntModuleSMFE60GE2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 107)) +eriRouterEntModuleSM20PortGIGE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 108)) +eriRouterEntModuleSM4Port10GIGE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 109)) +eriRouterEntModuleSM10PortGIGEDDR2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 110)) +eriRouterEntModuleSM1Port10GEOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 111)) +eriRouterEntModuleSM8OR2PORTCHOC3OC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 112)) +eriRouterEntModuleSSRALSW = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 201)) +eriRouterEntModuleSSRRPSW = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 202)) +eriRouterEntModuleSSRSW = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 203)) +eriRouterEntModuleSSR40Port1GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 204)) +eriRouterEntModuleSSR10Port10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 205)) +eriRouterEntModuleSSC1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 207)) +eriRouterEntModuleSSC2 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 208)) +eriRouterEntModuleSSR20Port1GEor10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 209)) +eriRouterEntModuleSSR2Port40GEor100GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 210)) +eriRouterEntModuleSSR20Port1GEor4Port10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 211)) +eriRouterEntModuleSPSC1SC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 212)) +eriRouterEntModuleSPSC11Port10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 213)) +eriRouterEntModuleSPSC18PortCES = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 214)) +eriRouterEntModuleSPSC116Port1GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 215)) +eriRouterEntModuleSPSC120and2Port1and10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 216)) +eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 217)) +eriRouterEntModuleEVR1PortVirtualForwarder = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 219)) +eriRouterEntModuleEVRVirtualSmartServicesCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 222)) +eriRouterEntityTypePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10)) +eriRouterEntPortUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 1)) +eriRouterEntPortSMSCE1MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 16)) +eriRouterEntPortSMSCE2MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 17)) +eriRouterEntPortSMSCE3MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 18)) +eriRouterEntPortSMSEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 6)) +eriRouterEntPortSMSGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 26)) +eriRouterEntPortSMSAIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 4)) +eriRouterEntPortSMSPIME3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 8)) +eriRouterEntPortSMSPIME1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 22)) +eriRouterEntPortSMSAIME3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 5)) +eriRouterEntPortSMSAIME1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 23)) +eriRouterEntPortSMSAIMT1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 20)) +eriRouterEntPortSMSAIMOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 3)) +eriRouterEntPortSMSAIMOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 27)) +eriRouterEntPortSMSPOSOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 24)) +eriRouterEntPortSMSPOSOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 25)) +eriRouterEntPortSMSPIMDS1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 14)) +eriRouterEntPortSMSPIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 7)) +eriRouterEntPortSMSPIMCDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 15)) +eriRouterEntPortSMSPIMHSSI = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 9)) +eriRouterEntPortSEXCMGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 41)) +eriRouterEntPortSEEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 42)) +eriRouterEntPortSEGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 43)) +eriRouterEntPortSEPOSOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 44)) +eriRouterEntPortSEPOSOC48 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 45)) +eriRouterEntPortSEPOSOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 46)) +eriRouterEntPortSECHOC12DS1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 47)) +eriRouterEntPortSECHOC12DS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 48)) +eriRouterEntPortSEAIMOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 49)) +eriRouterEntPortSEAIMOC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 50)) +eriRouterEntPortSECHDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 51)) +eriRouterEntPortSEDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 52)) +eriRouterEntPortSEAIMDS3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 53)) +eriRouterEntPortSECHSTM1E1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 54)) +eriRouterEntPortSEE1 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 55)) +eriRouterEntPortSEXC3MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 56)) +eriRouterEntPortSEE3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 57)) +eriRouterEntPortSEAIMOC12E = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 58)) +eriRouterEntPortSEGIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 59)) +eriRouterEntPortSE10GIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 60)) +eriRouterEntPortSE100XCMGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 61)) +eriRouterEntPortSE100EIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 62)) +eriRouterEntPortSE100FXIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 63)) +eriRouterEntPortSE100GERJIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 64)) +eriRouterEntPortSE100GEFXIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 65)) +eriRouterEntPortSEXC4MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 66)) +eriRouterEntPortSE100AIMOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 67)) +eriRouterEntPortSEPOSOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 68)) +eriRouterEntPortSE10GIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 69)) +eriRouterEntPortSECHOC3OC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 70)) +eriRouterEntPortSECHOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 71)) +eriRouterEntPortSM10GIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 101)) +eriRouterEntPortSMRPMGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 103)) +eriRouterEntPortSMGIGEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 104)) +eriRouterEntPortSMGIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 105)) +eriRouterEntPortSM10GIGETM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 106)) +eriRouterEntPortSMEIM = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 107)) +eriRouterEntPortSMCHOC3OC12 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 108)) +eriRouterEntPortSMCHOC3 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 109)) +eriRouterEntPortSSR1GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 201)) +eriRouterEntPortSSR10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 202)) +eriRouterEntPortSSRRPSWMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 203)) +eriRouterEntPortSSR100GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 204)) +eriRouterEntPortSSR40GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 205)) +eriRouterEntPortSSR40GEor100GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 206)) +eriRouterEntPortSPSC11GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 207)) +eriRouterEntPortSPSC110GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 208)) +eriRouterEntPortSPSC1SCMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 209)) +eriRouterEntPortSPSC1AlarmIn = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 210)) +eriRouterEntPortSPSC1AlarmOut = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 211)) +eriRouterEntPortSSR20POSOCorOC12orOC48orOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 212)) +eriRouterEntPortEVRVirtual = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 213)) +eriRouterEntityTypeStack = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 11)) +eriRouterEntityTypeCPU = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 12)) +eriRouterEntCpuUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 12, 1)) +eriRouterEntCpuOcteon = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 12, 2)) +eriRouterEntityTypeDisk = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 13)) +eriRouterEntDiskUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 13, 1)) +eriRouterEntDiskSSE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 13, 2)) +eriRouterEntityTypeMemory = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 14)) +mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSMSAIME3=eriRouterEntPortSMSAIME3, eriRouterEntModuleSE100FXMIC=eriRouterEntModuleSE100FXMIC, eriRouterEntModuleSM20PortGIGE=eriRouterEntModuleSM20PortGIGE, eriRouterEntPortSMSAIMDS3=eriRouterEntPortSMSAIMDS3, eriRouterEntContainerSMS10000Fabric=eriRouterEntContainerSMS10000Fabric, eriRouterEntPortSEE1=eriRouterEntPortSEE1, eriRouterEntFanSM480=eriRouterEntFanSM480, eriRouterEntFanSE600=eriRouterEntFanSE600, eriRouterEntContainerEVRData=eriRouterEntContainerEVRData, eriRouterEntPortSPSC1SCMgmt=eriRouterEntPortSPSC1SCMgmt, eriRouterEntityTypeFan=eriRouterEntityTypeFan, eriRouterEntFanSE1200=eriRouterEntFanSE1200, eriRouterEntModuleSMSEIM=eriRouterEntModuleSMSEIM, eriRouterEntContainerSE800Data=eriRouterEntContainerSE800Data, eriRouterEntPortSMSPIMDS1=eriRouterEntPortSMSPIMDS1, eriRouterSmartEdge1200=eriRouterSmartEdge1200, eriRouterEntPortSECHSTM1E1=eriRouterEntPortSECHSTM1E1, eriRouterSMS1000=eriRouterSMS1000, eriRouterEntModuleSEPos4xOC12=eriRouterEntModuleSEPos4xOC12, eriRouterEntChassisSP420=eriRouterEntChassisSP420, eriRouterEntBackplaneSMS1800Power=eriRouterEntBackplaneSMS1800Power, eriRouterEntModuleSEXC3=eriRouterEntModuleSEXC3, eriRouterEntChassisSE1200H=eriRouterEntChassisSE1200H, eriRouterEntModuleSSRALSW=eriRouterEntModuleSSRALSW, eriRouterEntPortSMSCE2MGMT=eriRouterEntPortSMSCE2MGMT, eriRouterEntityTypeSensor=eriRouterEntityTypeSensor, eriRouterEntPortSEGIGETM=eriRouterEntPortSEGIGETM, eriRouterEntModuleSMSIPSEC=eriRouterEntModuleSMSIPSEC, eriRouterEntBackplaneSP420Data=eriRouterEntBackplaneSP420Data, eriRouterEntPortSMSPIMHSSI=eriRouterEntPortSMSPIMHSSI, eriRouterEntityTypeContainer=eriRouterEntityTypeContainer, eriRouterEntModuleSM8OR2PORTCHOC3OC12=eriRouterEntModuleSM8OR2PORTCHOC3OC12, eriRouterEntPortUnknown=eriRouterEntPortUnknown, eriRouterEntModuleSEAIMOC12=eriRouterEntModuleSEAIMOC12, eriRouterEntChassisSM240=eriRouterEntChassisSM240, eriRouterEntPortSPSC1AlarmIn=eriRouterEntPortSPSC1AlarmIn, eriRouterEntModuleSEE1=eriRouterEntModuleSEE1, eriRouterEntPortSEE3=eriRouterEntPortSEE3, eriRouterEntModuleSMRP2=eriRouterEntModuleSMRP2, eriRouterEntContainerSE100Carrier=eriRouterEntContainerSE100Carrier, eriRouterEntModuleSM10GIGEIM=eriRouterEntModuleSM10GIGEIM, eriRouterEntChassisSE100=eriRouterEntChassisSE100, eriRouterEntContainerSSR8010PowerModule=eriRouterEntContainerSSR8010PowerModule, eriRouterEntModuleSMSAIME3=eriRouterEntModuleSMSAIME3, eriRouterEntPortSEPOSOC12=eriRouterEntPortSEPOSOC12, eriRouterEntModuleSEPos8xOC3=eriRouterEntModuleSEPos8xOC3, eriRouterSMS10000=eriRouterSMS10000, eriRouterEntModuleSEXC4=eriRouterEntModuleSEXC4, eriRouterEntPortSMSPOSOC12=eriRouterEntPortSMSPOSOC12, eriRouterEntFanTrayAlarmIOSPSC1=eriRouterEntFanTrayAlarmIOSPSC1, eriRouterEntContainerSSR8020Data=eriRouterEntContainerSSR8020Data, eriRouterEntPortSM10GIGEIM=eriRouterEntPortSM10GIGEIM, eriRouterEntPortSEAIMOC12=eriRouterEntPortSEAIMOC12, eriRouterEntBackplaneSE800Data=eriRouterEntBackplaneSE800Data, eriRouterEntPortSECHDS3=eriRouterEntPortSECHDS3, eriRouterEntModuleSMSCE3=eriRouterEntModuleSMSCE3, eriRouterEntityTypePowerSupply=eriRouterEntityTypePowerSupply, eriRouterEntPortSSR40GEor100GE=eriRouterEntPortSSR40GEor100GE, eriRouterEntModuleSPSC18PortCES=eriRouterEntModuleSPSC18PortCES, eriRouterEntModuleSMSFE1=eriRouterEntModuleSMSFE1, eriRouterEntPowerSupplySMS1800DC=eriRouterEntPowerSupplySMS1800DC, eriRouterEntModuleSMSSM=eriRouterEntModuleSMSSM, eriRouterEntPowerSupplySMS1000AC=eriRouterEntPowerSupplySMS1000AC, eriRouterEntBackplaneSSR8004Data=eriRouterEntBackplaneSSR8004Data, eriRouterEntContainerSMS1000Data=eriRouterEntContainerSMS1000Data, eriRouterEntBackplaneSMS1000Power=eriRouterEntBackplaneSMS1000Power, eriRouterEntityTypeModule=eriRouterEntityTypeModule, eriRouterEntPortSSRRPSWMgmt=eriRouterEntPortSSRRPSWMgmt, eriRouterEntCpuUnknown=eriRouterEntCpuUnknown, eriRouterEntBackplaneSM240Data=eriRouterEntBackplaneSM240Data, eriRouterEntContainerSE1200Data=eriRouterEntContainerSE1200Data, eriRouterEntContainerSPSC1FanTray=eriRouterEntContainerSPSC1FanTray, eriRouterEntContainerSE400Data=eriRouterEntContainerSE400Data, eriRouterEntModuleSEPOSOC48=eriRouterEntModuleSEPOSOC48, eriRouterEntModuleSMSXFE=eriRouterEntModuleSMSXFE, eriRouterEntModuleSEAIMOC3=eriRouterEntModuleSEAIMOC3, eriRouterEntModuleSMSPIMHSSI=eriRouterEntModuleSMSPIMHSSI, eriRouterEntPortSMSAIME1=eriRouterEntPortSMSAIME1, eriRouterEntPortSEXC4MGMT=eriRouterEntPortSEXC4MGMT, eriRouterEntBackplaneSE400Data=eriRouterEntBackplaneSE400Data, eriRouterEntModuleSMGIGEIM=eriRouterEntModuleSMGIGEIM, eriRouterEntModuleSMSAIMDS3=eriRouterEntModuleSMSAIMDS3, eriRouterEntFanTraySPSC1=eriRouterEntFanTraySPSC1, eriRouterEntModuleSMSPIMCDS3=eriRouterEntModuleSMSPIMCDS3, eriRouterSMS1800=eriRouterSMS1800, eriRouterEntContainerSMS1800Power=eriRouterEntContainerSMS1800Power, eriRouterEntPortSMSAIMT1=eriRouterEntPortSMSAIMT1, eriRouterSmartEdge800=eriRouterSmartEdge800, eriRouterEntFanSE400=eriRouterEntFanSE400, eriRouterEntModuleSE4PortOC48=eriRouterEntModuleSE4PortOC48, eriRouterEntContainerSPSC1PowerModule=eriRouterEntContainerSPSC1PowerModule, eriRouterEntModuleEVR1PortVirtualForwarder=eriRouterEntModuleEVR1PortVirtualForwarder, eriRouterEntPortSE100AIMOC3=eriRouterEntPortSE100AIMOC3, eriRouterEntPortSSR1GE=eriRouterEntPortSSR1GE, eriRouterEntModuleSMSAIMOC12=eriRouterEntModuleSMSAIMOC12, eriRouterEntFanSE800=eriRouterEntFanSE800, eriRouterEntPortSECHOC12DS1=eriRouterEntPortSECHOC12DS1, eriRouterEntBackplaneSM480Data=eriRouterEntBackplaneSM480Data, eriRouterEntDiskSSE=eriRouterEntDiskSSE, eriRouterEntModuleUnknown=eriRouterEntModuleUnknown, eriRouterEntModuleSMGIGETM=eriRouterEntModuleSMGIGETM, eriRouterEntPortSMCHOC3OC12=eriRouterEntPortSMCHOC3OC12, eriRouterSmartEdge100=eriRouterSmartEdge100, eriRouterEntPowerSupplySMS500DC=eriRouterEntPowerSupplySMS500DC, eriRouterEntModuleSEAIMDS3=eriRouterEntModuleSEAIMDS3, eriRouterEntPortSMSAIMOC12=eriRouterEntPortSMSAIMOC12, eriRouterEntModuleSECHDS3=eriRouterEntModuleSECHDS3, eriRouterEntContainerSM240Data=eriRouterEntContainerSM240Data, eriRouterEntPortSE100GEFXIM=eriRouterEntPortSE100GEFXIM, eriRouterSmartEdge600=eriRouterSmartEdge600, eriRouterEntChassisEVR=eriRouterEntChassisEVR, eriRouterEntPortSEEIM=eriRouterEntPortSEEIM, eriRouterEntChassisSM480=eriRouterEntChassisSM480, eriRouterEntPortSE10GIGETM=eriRouterEntPortSE10GIGETM, eriRouterEntPortSE100FXIM=eriRouterEntPortSE100FXIM, eriRouterEntChassisSE800=eriRouterEntChassisSE800, eriRouterEntModuleSMSPIME1=eriRouterEntModuleSMSPIME1, eriRouterEntityTypeDisk=eriRouterEntityTypeDisk, eriRouterEntContainerSSR8010Data=eriRouterEntContainerSSR8010Data, eriRouterSMS500=eriRouterSMS500, eriRouterEntPortSEPOSOC192=eriRouterEntPortSEPOSOC192, eriRouterEntModuleSE8PortOC3=eriRouterEntModuleSE8PortOC3, eriRouterEntModuleSEPOSOC12=eriRouterEntModuleSEPOSOC12, eriRouterProductMIB=eriRouterProductMIB, eriRouterEntBackplaneSMS1800Data=eriRouterEntBackplaneSMS1800Data, eriRouterEntPortSMCHOC3=eriRouterEntPortSMCHOC3, eriRouterEntBackplaneSP415Data=eriRouterEntBackplaneSP415Data, eriRouterEntContainerSMS1000Power=eriRouterEntContainerSMS1000Power, eriRouterEntityTypeOther=eriRouterEntityTypeOther, eriRouterEntPowerModuleSPSC1DC=eriRouterEntPowerModuleSPSC1DC, eriRouterEntModuleSMSPOSOC3=eriRouterEntModuleSMSPOSOC3, eriRouterSM240=eriRouterSM240, eriRouterEntModuleSPSC120and2Port1and10GE=eriRouterEntModuleSPSC120and2Port1and10GE, eriRouterEntModuleSPSC116Port1GE=eriRouterEntModuleSPSC116Port1GE, eriRouterEntModuleSSR20Port1GEor10GE=eriRouterEntModuleSSR20Port1GEor10GE, eriRouterEntBackplaneSE1200HData=eriRouterEntBackplaneSE1200HData, eriRouterEntContainerSSR8010FanTray=eriRouterEntContainerSSR8010FanTray, eriRouterEntPortSEAIMOC3=eriRouterEntPortSEAIMOC3, eriRouterEntPortSMSCE1MGMT=eriRouterEntPortSMSCE1MGMT, eriRouterEntPortSE100EIM=eriRouterEntPortSE100EIM, eriRouterEntModuleSECHOC12DS1=eriRouterEntModuleSECHOC12DS1, eriRouterEntPortSEAIMDS3=eriRouterEntPortSEAIMDS3, eriRouterEntChassisSSR8004=eriRouterEntChassisSSR8004, eriRouterEntChassisSE400=eriRouterEntChassisSE400, eriRouterEntSensorAlarmSM240=eriRouterEntSensorAlarmSM240, eriRouterEntPowerSupplySMS1000DC=eriRouterEntPowerSupplySMS1000DC, eriRouterEntModuleSEPOSOC192=eriRouterEntModuleSEPOSOC192, eriRouterEntContainerSSR8020PowerModule=eriRouterEntContainerSSR8020PowerModule, eriRouterEntModuleSE100EMIC=eriRouterEntModuleSE100EMIC, eriRouterEntModuleSM4Port10GIGE=eriRouterEntModuleSM4Port10GIGE, eriRouterEntPortSMSPOSOC3=eriRouterEntPortSMSPOSOC3, eriRouterEntSensorAlarmSE600=eriRouterEntSensorAlarmSE600, eriRouterEntityTypeChassis=eriRouterEntityTypeChassis, eriRouterEntModuleSE100AIMOC3MIC=eriRouterEntModuleSE100AIMOC3MIC, eriRouterEntModuleSM1Port10GEOC192=eriRouterEntModuleSM1Port10GEOC192, eriRouterEntContainerSSR8020FanTray=eriRouterEntContainerSSR8020FanTray, eriRouterEntSensorAlarmSE400=eriRouterEntSensorAlarmSE400, eriRouterSP420=eriRouterSP420, eriRouterEntPortSM10GIGETM=eriRouterEntPortSM10GIGETM, eriRouterEntModuleSSC2=eriRouterEntModuleSSC2, eriRouterEntChassisSE1200=eriRouterEntChassisSE1200, eriRouterEntPowerModuleSPSC1AC=eriRouterEntPowerModuleSPSC1AC, eriRouterEntModuleSE100GERJMIC=eriRouterEntModuleSE100GERJMIC, eriRouterEntPortSMSEIM=eriRouterEntPortSMSEIM, eriRouterEntPortSE10GIGEIM=eriRouterEntPortSE10GIGEIM, eriRouterEntBackplaneSMS500Power=eriRouterEntBackplaneSMS500Power, eriRouterEntPortSPSC1AlarmOut=eriRouterEntPortSPSC1AlarmOut, eriRouterEntModuleSEASE=eriRouterEntModuleSEASE, eriRouterEntPortSEAIMOC12E=eriRouterEntPortSEAIMOC12E, eriRouterEntModuleSMSFABRIC=eriRouterEntModuleSMSFABRIC, eriRouterEntDiskUnknown=eriRouterEntDiskUnknown, eriRouterEntModuleSSR2Port40GEor100GE=eriRouterEntModuleSSR2Port40GEor100GE, eriRouterEntPowerSupplySMS500AC=eriRouterEntPowerSupplySMS500AC, eriRouterSM480=eriRouterSM480, eriRouterEntModuleSEAtm2xOC12=eriRouterEntModuleSEAtm2xOC12, eriRouterEntBackplaneSMS1000Data=eriRouterEntBackplaneSMS1000Data, eriRouterEntModuleSMSPIMDS1=eriRouterEntModuleSMSPIMDS1, eriRouterEntModuleSMSFE2=eriRouterEntModuleSMSFE2, eriRouterEntPortSEPOSOC48=eriRouterEntPortSEPOSOC48, eriRouterEntPortSSR40GE=eriRouterEntPortSSR40GE, eriRouterEntContainerSSR8004PowerModule=eriRouterEntContainerSSR8004PowerModule, eriRouterEntPortSE100XCMGMT=eriRouterEntPortSE100XCMGMT, eriRouterEntModuleSMSAIMOC3=eriRouterEntModuleSMSAIMOC3, eriRouterEntContainerSM480Data=eriRouterEntContainerSM480Data, eriRouterEntPowerSupplyUnknown=eriRouterEntPowerSupplyUnknown, eriRouterEntityTypeMemory=eriRouterEntityTypeMemory, eriRouterEntContainerSMS10000IO=eriRouterEntContainerSMS10000IO, eriRouterEntModuleSSR20Port1GEor4Port10GE=eriRouterEntModuleSSR20Port1GEor4Port10GE, eriRouterEntityTypeBackplane=eriRouterEntityTypeBackplane, eriRouterSmartEdge400=eriRouterSmartEdge400, eriRouterEntPortSEGIGEIM=eriRouterEntPortSEGIGEIM, eriRouterEntModuleSMSFE3=eriRouterEntModuleSMSFE3, eriRouterEntBackplaneSMS500Data=eriRouterEntBackplaneSMS500Data, eriRouterEntModuleSSC1=eriRouterEntModuleSSC1, eriRouterEntModuleSE10GIGETM=eriRouterEntModuleSE10GIGETM, eriRouterEntContainerSMS500Data=eriRouterEntContainerSMS500Data, eriRouterEntModuleSMSGIGEIM=eriRouterEntModuleSMSGIGEIM, eriRouterEntContainerSSR8004Data=eriRouterEntContainerSSR8004Data, eriRouterEntModuleSEEIM=eriRouterEntModuleSEEIM, eriRouterEntityTypeUnknown=eriRouterEntityTypeUnknown, eriRouterEntModuleSEPOSOC3=eriRouterEntModuleSEPOSOC3, eriRouterEntBackplaneSSR8010Data=eriRouterEntBackplaneSSR8010Data, eriRouterEntPortSMGIGEIM=eriRouterEntPortSMGIGEIM, eriRouterEntChassisSSR8010=eriRouterEntChassisSSR8010, eriRouterEntPortSECHOC12DS3=eriRouterEntPortSECHOC12DS3, eriRouterSSR8010=eriRouterSSR8010, eriRouterEntityTypeStack=eriRouterEntityTypeStack, eriRouterEntBackplaneEVRVirtual=eriRouterEntBackplaneEVRVirtual, eriRouterEntModuleSMSCE1=eriRouterEntModuleSMSCE1, eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192=eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192, eriRouterEntModuleSECHOC12DS3=eriRouterEntModuleSECHOC12DS3, eriRouterEntContainerSPSC1Data=eriRouterEntContainerSPSC1Data, eriRouterEntModuleSMSCM=eriRouterEntModuleSMSCM, eriRouterEntPortSMEIM=eriRouterEntPortSMEIM, eriRouterEntModuleSEXC=eriRouterEntModuleSEXC, eriRouterEntModuleSECHSTM1E1=eriRouterEntModuleSECHSTM1E1, eriRouterEntPowerSupplySMS1800AC=eriRouterEntPowerSupplySMS1800AC, eriRouterEntContainerSMS1800Data=eriRouterEntContainerSMS1800Data, eriRouterEntModuleSMSAIME1=eriRouterEntModuleSMSAIME1, eriRouterEntPortSMSAIMOC3=eriRouterEntPortSMSAIMOC3, eriRouterEntPortSMSPIME1=eriRouterEntPortSMSPIME1, eriRouterEntContainerSSR8004FanTray=eriRouterEntContainerSSR8004FanTray, eriRouterEntPowerModuleSSR=eriRouterEntPowerModuleSSR, eriRouterEntCpuOcteon=eriRouterEntCpuOcteon, eriRouterEntPortSMSCE3MGMT=eriRouterEntPortSMSCE3MGMT, eriRouterEntModuleSMSPIMDS3=eriRouterEntModuleSMSPIMDS3, eriRouterEntModuleSEFE60GE2=eriRouterEntModuleSEFE60GE2, eriRouterEntModuleSE4Port10GIGE=eriRouterEntModuleSE4Port10GIGE, eriRouterEntModuleSE5PortGIGE=eriRouterEntModuleSE5PortGIGE, eriRouterEntContainerSE100Data=eriRouterEntContainerSE100Data, eriRouterEntityTypeCPU=eriRouterEntityTypeCPU, eriRouterEntChassisSMS10000=eriRouterEntChassisSMS10000, eriRouterEntModuleSMSCE2=eriRouterEntModuleSMSCE2, eriRouterEntModuleSSRSW=eriRouterEntModuleSSRSW, eriRouterEntPortSEPOSOC3=eriRouterEntPortSEPOSOC3, eriRouterEntModuleSEAIMOC12E=eriRouterEntModuleSEAIMOC12E, eriRouterEntContainerSMS10000Timing=eriRouterEntContainerSMS10000Timing, eriRouterEntModuleSM10PortGIGEDDR2=eriRouterEntModuleSM10PortGIGEDDR2, eriRouterEntModuleSE10PortGIGEDDR2=eriRouterEntModuleSE10PortGIGEDDR2, eriRouterEntPortSPSC11GE=eriRouterEntPortSPSC11GE, eriRouterEntModuleSM10GIGETM=eriRouterEntModuleSM10GIGETM, eriRouterEntModuleSESSE=eriRouterEntModuleSESSE, eriRouterEntModuleSE10GIGEIM=eriRouterEntModuleSE10GIGEIM, eriRouterEntPortSECHOC3=eriRouterEntPortSECHOC3, eriRouterEntPortSMSPIME3=eriRouterEntPortSMSPIME3, eriRouterEntFanTraySSR=eriRouterEntFanTraySSR, eriRouterEntModuleSE100GEFXMIC=eriRouterEntModuleSE100GEFXMIC, eriRouterEntPortSMGIGETM=eriRouterEntPortSMGIGETM, eriRouterEntPortSMSPIMDS3=eriRouterEntPortSMSPIMDS3, eriRouterEntModuleSMSPIME3=eriRouterEntModuleSMSPIME3, eriRouterEntPortSE100GERJIM=eriRouterEntPortSE100GERJIM, eriRouterEntBackplaneSE1200Data=eriRouterEntBackplaneSE1200Data, eriRouterEntPortSPSC110GE=eriRouterEntPortSPSC110GE, eriRouterEntChassisSMS500=eriRouterEntChassisSMS500) +mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSECHOC3OC12=eriRouterEntPortSECHOC3OC12, eriRouterEntBackplaneSSR8020Data=eriRouterEntBackplaneSSR8020Data, eriRouterEntPortSSR100GE=eriRouterEntPortSSR100GE, eriRouterEVR=eriRouterEVR, eriRouterEntBackplaneSE600Data=eriRouterEntBackplaneSE600Data, eriRouterEntContainerSMS10000SMCM=eriRouterEntContainerSMS10000SMCM, PYSNMP_MODULE_ID=eriRouterProductMIB, eriRouterEntPortSMSPIMCDS3=eriRouterEntPortSMSPIMCDS3, eriRouterEntChassisSMS1000=eriRouterEntChassisSMS1000, eriRouterSSR8004=eriRouterSSR8004, eriRouterEntContainerSMS500Power=eriRouterEntContainerSMS500Power, eriRouterEntityTypePort=eriRouterEntityTypePort, eriRouterEntModuleSE1Port10GEOC192=eriRouterEntModuleSE1Port10GEOC192, eriRouterEntPortSSR20POSOCorOC12orOC48orOC192=eriRouterEntPortSSR20POSOCorOC12orOC48orOC192, eriRouterEntModuleEVRVirtualSmartServicesCard=eriRouterEntModuleEVRVirtualSmartServicesCard, eriRouterSSR8020=eriRouterSSR8020, eriRouterEntModuleSE100XC=eriRouterEntModuleSE100XC, eriRouterSP415=eriRouterSP415, eriRouterEntModuleSMSAIMT1=eriRouterEntModuleSMSAIMT1, eriRouterEntModuleSSRRPSW=eriRouterEntModuleSSRRPSW, eriRouterEntChassisSSR8020=eriRouterEntChassisSSR8020, eriRouterEntPortEVRVirtual=eriRouterEntPortEVRVirtual, eriRouterEntContainerSE1200HData=eriRouterEntContainerSE1200HData, eriRouterEntContainerSE600Data=eriRouterEntContainerSE600Data, eriRouterEntModuleSMFE60GE2=eriRouterEntModuleSMFE60GE2, eriRouterEntPortSEXCMGMT=eriRouterEntPortSEXCMGMT, eriRouterEntPortSSR10GE=eriRouterEntPortSSR10GE, eriRouterEntChassisSE600=eriRouterEntChassisSE600, eriRouterEntPortSMRPMGMT=eriRouterEntPortSMRPMGMT, eriRouterEntBackplaneSMS10000Midplane=eriRouterEntBackplaneSMS10000Midplane, eriRouterEntPortSEXC3MGMT=eriRouterEntPortSEXC3MGMT, eriRouterEntModuleSPSC11Port10GE=eriRouterEntModuleSPSC11Port10GE, eriRouterEntModuleSEDS3=eriRouterEntModuleSEDS3, eriRouterEntModuleSSR40Port1GE=eriRouterEntModuleSSR40Port1GE, eriRouterEntModuleSPSC1SC=eriRouterEntModuleSPSC1SC, eriRouterEntModuleSEASE2=eriRouterEntModuleSEASE2, eriRouterEntPortSMSGIGEIM=eriRouterEntPortSMSGIGEIM, eriRouterEntFanSM240=eriRouterEntFanSM240, eriRouterEntModuleSE8OR2PORTCHOC3OC12=eriRouterEntModuleSE8OR2PORTCHOC3OC12, eriRouterEntBackplaneSE100Data=eriRouterEntBackplaneSE100Data, eriRouterEntModuleSSR10Port10GE=eriRouterEntModuleSSR10Port10GE, eriRouterEntModuleSE20PortGIGE=eriRouterEntModuleSE20PortGIGE, eriRouterEntModuleSMSTIMING=eriRouterEntModuleSMSTIMING, eriRouterEntModuleSEGIGETM=eriRouterEntModuleSEGIGETM, eriRouterEntModuleSMSPOSOC12=eriRouterEntModuleSMSPOSOC12, eriRouterEntModuleSEE3=eriRouterEntModuleSEE3, eriRouterEntModuleSEGIGEIM=eriRouterEntModuleSEGIGEIM, eriRouterEntPortSEDS3=eriRouterEntPortSEDS3, eriRouterEntFanSE1200H=eriRouterEntFanSE1200H, eriRouterEntChassisSMS1800=eriRouterEntChassisSMS1800, eriRouterEntChassisSP415=eriRouterEntChassisSP415) diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py new file mode 100644 index 0000000..dea3869 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py @@ -0,0 +1,23 @@ +# +# PySNMP MIB module ERICSSON-ROUTER-SMI (http://pysnmp.sf.net) +# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-SMI.my +# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# On host ? platform ? version ? by user ? +# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# +( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") +( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") +( ericsson, ) = mibBuilder.importSymbols("ERICSSON-TOP-MIB", "ericsson") +( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") +( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") +( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterSMI = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218)).setRevisions(("2015-01-14 18:00", "2011-01-19 18:00", "2002-06-06 00:00", "2001-06-27 00:00", "1998-04-18 23:00",)) +eriRouterProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1)) +eriRouterMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 2)) +eriRouterExperiment = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 3)) +eriRouterCapabilities = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 4)) +eriRouterModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5)) +eriRouterEntities = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6)) +eriRouterInternal = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 7)) +mibBuilder.exportSymbols("ERICSSON-ROUTER-SMI", eriRouterMgmt=eriRouterMgmt, eriRouterSMI=eriRouterSMI, eriRouterEntities=eriRouterEntities, eriRouterExperiment=eriRouterExperiment, eriRouterProducts=eriRouterProducts, eriRouterCapabilities=eriRouterCapabilities, PYSNMP_MODULE_ID=eriRouterSMI, eriRouterModules=eriRouterModules, eriRouterInternal=eriRouterInternal) diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py new file mode 100644 index 0000000..f27aeb0 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py @@ -0,0 +1,16 @@ +# +# PySNMP MIB module ERICSSON-TOP-MIB (http://pysnmp.sf.net) +# ASN.1 source file://\usr\share\snmp\ERICSSON-TOP-MIB.my +# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# On host ? platform ? version ? by user ? +# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# +( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") +( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") +( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") +( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, enterprises, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "enterprises", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") +( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +ericsson = ModuleIdentity((1, 3, 6, 1, 4, 1, 193)).setRevisions(("2008-10-17 00:00", "2002-05-28 00:00",)) +ericssonModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 183)) +mibBuilder.exportSymbols("ERICSSON-TOP-MIB", PYSNMP_MODULE_ID=ericsson, ericssonModules=ericssonModules, ericsson=ericsson) diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py b/cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py new file mode 100644 index 0000000..e69de29 From 9ead580af8414179abafb07d44ceebde3b803c93 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 3 Aug 2016 18:04:15 -0700 Subject: [PATCH 06/39] added mibs and portchannel logic --- .../autoload/ericsson_ipos_snmp_autoload.py | 6 ++- .../mib/ERICSSON-ROUTER-IP-BIND-MIB.py | 33 ++++++++++++ .../ipos/autoload/mib/ERICSSON-ROUTER-TC.py | 54 +++++++++++++++++++ 3 files changed, 91 insertions(+), 2 deletions(-) create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index 61c1a99..4358f0f 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -18,11 +18,13 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, """ EricssonGenericSNMPAutoload.__init__(self, snmp_handler, logger, supported_os) - self.port_ethernet_vendor_type_pattern = r'port.*1ge|port.*10ge' + self.port_ethernet_vendor_type_pattern = r'port.*\d+ge|\S+.1.193.218.6.10.251' self._cli = cli self.snmp_view = 'qualiview' self.snmp_community = community self.vendor_type_exclusion_pattern = ['port.*mgmt'] + self.interface_mapping_key = 'eriRouterIpBindIfIndex' + self.interface_mapping_mib = 'ERICSSON-ROUTER-IP-BIND-MIB' self.load_mib_list = ['ERICSSON-ROUTER-PRODUCT-MIB'] if not self.snmp_community: self.snmp_community = get_attribute_by_name('SNMP Read Community') or 'qualicommunity' @@ -80,4 +82,4 @@ def _disable_snmp(self): self.cli.send_config_command('no snmp server') self.cli.send_config_command('context local') self.cli.send_config_command('default service snmp server') - self.cli.send_config_command('end') \ No newline at end of file + self.cli.send_config_command('end') diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py new file mode 100644 index 0000000..2b14591 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py @@ -0,0 +1,33 @@ +# +# PySNMP MIB module ERICSSON-ROUTER-IP-BIND-MIB (http://pysnmp.sf.net) +# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-IP-BIND-MIB.my +# Produced by pysmi-0.0.6 at Wed Aug 03 17:53:30 2016 +# On host ? platform ? version ? by user ? +# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# +( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") +( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") +( eriRouterMgmt, ) = mibBuilder.importSymbols("ERICSSON-ROUTER-SMI", "eriRouterMgmt") +( EriRouterCircuitHandle, ) = mibBuilder.importSymbols("ERICSSON-ROUTER-TC", "EriRouterCircuitHandle") +( ifIndex, InterfaceIndexOrZero, ) = mibBuilder.importSymbols("IF-MIB", "ifIndex", "InterfaceIndexOrZero") +( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") +( NotificationGroup, ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") +( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, ModuleIdentity, Gauge32, iso, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "ModuleIdentity", "Gauge32", "iso", "ObjectIdentity", "Bits", "Counter32") +( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterIpBindMib = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218, 2, 26)).setRevisions(("2015-01-14 18:00", "2011-01-19 18:00", "2002-08-20 12:00",)) +eriRouterIpBindMibNotifications = MibIdentifier((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 0)) +eriRouterIpBindMibObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1)) +eriRouterIpBindMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 2)) +eriRouterIpBindTable = MibTable((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1), ) +eriRouterIpBindEntry = MibTableRow((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex"), (0, "ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindCircuitHandle")) +eriRouterIpBindCircuitHandle = MibTableColumn((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1, 1), EriRouterCircuitHandle()) +eriRouterIpBindIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1, 2), InterfaceIndexOrZero()).setMaxAccess("readonly") +eriRouterIpBindHierarchicalIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1, 3), InterfaceIndexOrZero()).setMaxAccess("readonly") +eriRouterIpBindCircuitDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1, 4), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0,192))).setMaxAccess("readonly") +eriRouterIpBindContextName = MibTableColumn((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 1, 1, 1, 5), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(0,63))).setMaxAccess("readonly") +eriRouterIpBindCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 2, 1)) +eriRouterIpBindGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 2, 2)) +eriRouterIpBindCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 2, 1, 1)).setObjects(*(("ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindDisplayGroup"),)) +eriRouterIpBindDisplayGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 193, 218, 2, 26, 2, 2, 1)).setObjects(*(("ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindIfIndex"), ("ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindHierarchicalIfIndex"), ("ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindCircuitDescr"), ("ERICSSON-ROUTER-IP-BIND-MIB", "eriRouterIpBindContextName"),)) +mibBuilder.exportSymbols("ERICSSON-ROUTER-IP-BIND-MIB", eriRouterIpBindMibConformance=eriRouterIpBindMibConformance, eriRouterIpBindDisplayGroup=eriRouterIpBindDisplayGroup, eriRouterIpBindTable=eriRouterIpBindTable, eriRouterIpBindGroups=eriRouterIpBindGroups, PYSNMP_MODULE_ID=eriRouterIpBindMib, eriRouterIpBindMibNotifications=eriRouterIpBindMibNotifications, eriRouterIpBindIfIndex=eriRouterIpBindIfIndex, eriRouterIpBindMibObjects=eriRouterIpBindMibObjects, eriRouterIpBindContextName=eriRouterIpBindContextName, eriRouterIpBindMib=eriRouterIpBindMib, eriRouterIpBindCircuitDescr=eriRouterIpBindCircuitDescr, eriRouterIpBindCompliances=eriRouterIpBindCompliances, eriRouterIpBindEntry=eriRouterIpBindEntry, eriRouterIpBindCircuitHandle=eriRouterIpBindCircuitHandle, eriRouterIpBindCompliance=eriRouterIpBindCompliance, eriRouterIpBindHierarchicalIfIndex=eriRouterIpBindHierarchicalIfIndex) diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py new file mode 100644 index 0000000..321056a --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py @@ -0,0 +1,54 @@ +# +# PySNMP MIB module ERICSSON-ROUTER-TC (http://pysnmp.sf.net) +# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-TC.my +# Produced by pysmi-0.0.6 at Wed Aug 03 17:53:30 2016 +# On host ? platform ? version ? by user ? +# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# +( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") +( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") +( eriRouterModules, ) = mibBuilder.importSymbols("ERICSSON-ROUTER-SMI", "eriRouterModules") +( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") +( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, ModuleIdentity, Gauge32, iso, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "ModuleIdentity", "Gauge32", "iso", "ObjectIdentity", "Bits", "Counter32") +( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterTC = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5, 2)).setRevisions(("2015-01-14 18:00", "2014-07-19 17:00", "2011-01-19 18:00", "2009-10-20 17:00", "2004-06-19 17:00", "2003-03-17 17:00", "2002-11-11 00:00", "2002-06-26 00:00", "2000-07-14 00:00",)) +class EriRouterCircuitHandle(OctetString, TextualConvention): + displayHint = '1d:1d:2x-2x-2x' + subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(8,8) + fixedLength = 8 + +class EriRouterKBytes(Integer32, TextualConvention): + displayHint = 'd' + subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,2147483647) + +class EriRouterPercentage(Integer32, TextualConvention): + displayHint = 'd%' + subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(0,100) + +class EriRouterSlot(Unsigned32, TextualConvention): + displayHint = 'd' + subtypeSpec = Unsigned32.subtypeSpec+ValueRangeConstraint(0,255) + +class EriRouterPort(Unsigned32, TextualConvention): + displayHint = 'd' + subtypeSpec = Unsigned32.subtypeSpec+ValueRangeConstraint(0,255) + +class EriRouterVidOrUntagged(Integer32, TextualConvention): + displayHint = 'd' + subtypeSpec = Integer32.subtypeSpec+ValueRangeConstraint(1,4096) + +class EriRouterPortMediumType(Integer32, TextualConvention): + subtypeSpec = Integer32.subtypeSpec+SingleValueConstraint(0, 11, 12, 13, 14,) + namedValues = NamedValues(("unknown", 0), ("dsl", 11), ("cable", 12), ("wireless", 13), ("satellite", 14),) + +class EriRouterUnsigned64(OctetString, TextualConvention): + displayHint = '8d' + subtypeSpec = OctetString.subtypeSpec+ValueSizeConstraint(8,8) + fixedLength = 8 + +class EriRouterSubscriberState(Integer32, TextualConvention): + subtypeSpec = Integer32.subtypeSpec+SingleValueConstraint(9, 13,) + namedValues = NamedValues(("up", 9), ("standby-up", 13),) + +mibBuilder.exportSymbols("ERICSSON-ROUTER-TC", EriRouterVidOrUntagged=EriRouterVidOrUntagged, EriRouterUnsigned64=EriRouterUnsigned64, EriRouterPortMediumType=EriRouterPortMediumType, EriRouterCircuitHandle=EriRouterCircuitHandle, EriRouterSubscriberState=EriRouterSubscriberState, eriRouterTC=eriRouterTC, EriRouterPort=EriRouterPort, EriRouterSlot=EriRouterSlot, EriRouterPercentage=EriRouterPercentage, PYSNMP_MODULE_ID=eriRouterTC, EriRouterKBytes=EriRouterKBytes) From 0194a63d55dadbada9a9225cb7f4c3588e7f2a9f Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 9 Aug 2016 10:31:40 +0300 Subject: [PATCH 07/39] modified autoload --- .../ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index 4358f0f..f56a013 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -9,7 +9,7 @@ class EricssonIPOSSNMPAutoload(EricssonGenericSNMPAutoload): - def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, community=None): + def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, snmp_community=None): """Basic init with injected snmp handler and logger :param snmp_handler: @@ -21,7 +21,7 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, self.port_ethernet_vendor_type_pattern = r'port.*\d+ge|\S+.1.193.218.6.10.251' self._cli = cli self.snmp_view = 'qualiview' - self.snmp_community = community + self.snmp_community = snmp_community self.vendor_type_exclusion_pattern = ['port.*mgmt'] self.interface_mapping_key = 'eriRouterIpBindIfIndex' self.interface_mapping_mib = 'ERICSSON-ROUTER-IP-BIND-MIB' @@ -42,7 +42,7 @@ def cli(self): def discover(self): self._enable_snmp() try: - result = super(EricssonIPOSSNMPAutoload, self).discover() + result = self.get_autoload_details() except Exception as e: self.logger.error('Autoload failed: {0}'.format(e.message)) raise Exception('EricssonGenericSNMPAutoload', e.message) From ebe860614420924332a4f538afba6b3108a129d4 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 9 Aug 2016 11:19:55 +0300 Subject: [PATCH 08/39] cleanup configuration file --- .../ericsson/ipos/ericsson_ipos_configuration.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py index baeccd7..67aa7ff 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py @@ -5,8 +5,7 @@ from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload -from cloudshell.shell.core.context_utils import get_decrypted_password_by_attribute_name_wrapper, \ - get_attribute_by_name_wrapper +from cloudshell.shell.core.context_utils import get_decrypted_password_by_attribute_name_wrapper from cloudshell.shell.core.dependency_injection.context_based_logger import get_logger_with_thread_id DEFAULT_PROMPT = '\].*[>#]\s*$' @@ -21,10 +20,6 @@ def send_default_actions(session): enter_enable_mode(session=session) session.hardware_expect('terminal length 0', ENABLE_PROMPT) - # session.hardware_expect('terminal no exec prompt timestamp', ENABLE_PROMPT) - # session.hardware_expect(ENTER_CONFIG_MODE_PROMPT_COMMAND, CONFIG_MODE_PROMPT) - # session.hardware_expect('no logging console', CONFIG_MODE_PROMPT) - # session.hardware_expect('exit', DEFAULT_PROMPT + '|' + ENABLE_PROMPT) ENTER_CONFIG_MODE_PROMPT_COMMAND = 'configure' From 306615abd2949415030b76a10268e81cfdbc0bdb Mon Sep 17 00:00:00 2001 From: CoYe Date: Thu, 11 Aug 2016 13:17:01 +0300 Subject: [PATCH 09/39] Updated Shell datamodel, drivermetadata and resource driver according to the new networking standard 4.0.0 --- .../DataModel/datamodel.xml | 1098 ++++++++--------- .../drivermetadata.xml | 118 +- .../ericsson_ipos_resource_driver.py | 37 +- 3 files changed, 648 insertions(+), 605 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index b173800..60ef1c2 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -1,142 +1,141 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -145,416 +144,417 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Ericsson IPOS Driver - - - - - - - - - - - - - - - - - - - - - - - - - Ericsson IPOS Router - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Chassis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Chassis - Generic Module - Generic Sub Module - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Module - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generic Chassis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Ericsson IPOS Router - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Ericsson IPOS Driver + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Router + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + Generic Module + Generic Sub Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Router + + + + + + + + + + \ No newline at end of file diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index cdb1f21..78dd414 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -1,48 +1,74 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index 0bd644f..ceaff1b 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -39,7 +39,7 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, config_type, restore_method, vrf=None): + def restore(self, context, path, configuration_type, restore_method, vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file @@ -50,12 +50,13 @@ def restore(self, context, path, config_type, restore_method, vrf=None): configuration_operations = inject.instance('configuration_operations') response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, - config_type=config_type, vrf=vrf) + config_type=configuration_type, + vrf=vrf_management_name) configuration_operations.logger.info('Restore completed') configuration_operations.logger.info(response) @context_from_args - def save(self, context, destination_host, source_filename, vrf=None): + def save(self, context, folder_path, configuration_type, vrf_management_name=None): """Save selected file to the provided destination :param source_filename: source file, which will be saved @@ -64,10 +65,18 @@ def save(self, context, destination_host, source_filename, vrf=None): """ configuration_operations = inject.instance('configuration_operations') - response = configuration_operations.save_configuration(destination_host, source_filename, vrf) + response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response + @context_from_args + def orchestration_save(self, context, mode="shallow", custom_params=None): + pass + + @context_from_args + def orchestration_restore(self, context, saved_artifact_info, custom_params=None): + pass + @context_from_args def get_inventory(self, context): """Return device structure with all standard attributes @@ -83,7 +92,7 @@ def get_inventory(self, context): @GlobalLock.lock @context_from_args - def update_firmware(self, context, remote_host, file_path): + def load_firmware(self, context, remote_host, file_path): """Upload and updates firmware on the resource :param remote_host: path to tftp:// server where firmware file is stored @@ -97,7 +106,7 @@ def update_firmware(self, context, remote_host, file_path): firmware_operations.logger.info(response) @context_from_args - def send_custom_command(self, context, command): + def send_custom_command(self, context, custom_command): """Send custom command :return: result @@ -105,19 +114,27 @@ def send_custom_command(self, context, command): """ send_command_operations = inject.instance("send_command_operations") - response = send_command_operations.send_command(command=command) - print response + response = send_command_operations.send_command(command=custom_command) return response @context_from_args - def send_custom_config_command(self, context, command): + def health_check(self, context): + """Performs device health check + + """ + + send_command_operations = inject.instance("send_command_operations") + send_command_operations.send_command(command='') + + @context_from_args + def send_custom_config_command(self, context, custom_command): """Send custom command in configuration mode :return: result :rtype: string """ send_command_operations = inject.instance("send_command_operations") - result_str = send_command_operations.send_config_command(command=command) + result_str = send_command_operations.send_config_command(command=custom_command) return result_str @context_from_args From a90e3081895f31e9e014151a7cce91cae8617b4c Mon Sep 17 00:00:00 2001 From: CoYe Date: Thu, 11 Aug 2016 19:38:19 +0300 Subject: [PATCH 10/39] cleaned and adjusted autoload, modified datamodel and drivermetadata --- .../DataModel/datamodel.xml | 8 +++ .../drivermetadata.xml | 34 ++++++----- .../autoload/ericsson_ipos_snmp_autoload.py | 8 ++- .../networking/ericsson/ipos/autoload/test.py | 58 ------------------- 4 files changed, 32 insertions(+), 76 deletions(-) delete mode 100644 cloudshell/networking/ericsson/ipos/autoload/test.py diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 60ef1c2..e4fd340 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -303,6 +303,12 @@ + + + + + + @@ -328,6 +334,8 @@ + + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 78dd414..5aeb669 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -1,12 +1,10 @@ + Description="Generic driver for all IPOS devices"> - - - + @@ -26,40 +24,44 @@ - + - + - - - + + DefaultValue="" + Description="The path in which the configuration file will be saved. Won't include the name of the file but only the folder. This input is optional and in case this input is empty the value will be taken from the 'Backup Location' attribute on the root resource. The path should include the protocol type, for example 'tftp://asdf'."/> + DefaultValue="Running" + Description="The type of configuration that will be saved. Possible values are StartUp and Running. If kept empty the default configuration type that will be used is Running."/> + Description="Virtual Routing and Forwarding is used to share same/overlapping sub-net on the same core. Service Providers use it to share their backbone with multiple customers and also assign a management VRF which they use to manage the devices. If kept empty the value in the 'VRF Management Name' attribute on the root model will be used."/> + Description="The path to the configuration file, including the configuration file name. The path should include the protocol type (for example 'tftp://10.10.10.10/asdf')."/> + DisplayName="Configuration Type" + Description="The configuration type to restore. Possible values are StartUp and Running. If kept empty the configuration type that will be restored is Running."/> + DisplayName="Restore Method" + Description="The restore method to use when restoring the configuration file. Possible Values are Append and Override. If kept empty the restore method will be Override."/> + Description="Virtual Routing and Forwarding is used to share same/overlapping sub-net on the same core. Service Providers use it to share their backbone with multiple customers and also assign a management VRF which they use to manage the devices. If kept empty the value in the 'VRF Management Name' attribute on the root model will be used."/> diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index f56a013..8b0b75d 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -40,14 +40,18 @@ def cli(self): return self._cli def discover(self): - self._enable_snmp() + enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + if enable_snmp: + self._enable_snmp() try: result = self.get_autoload_details() except Exception as e: self.logger.error('Autoload failed: {0}'.format(e.message)) raise Exception('EricssonGenericSNMPAutoload', e.message) finally: - self._disable_snmp() + if disable_snmp: + self._disable_snmp() return result def _enable_snmp(self): diff --git a/cloudshell/networking/ericsson/ipos/autoload/test.py b/cloudshell/networking/ericsson/ipos/autoload/test.py deleted file mode 100644 index befbb01..0000000 --- a/cloudshell/networking/ericsson/ipos/autoload/test.py +++ /dev/null @@ -1,58 +0,0 @@ -__author__ = 'shms' - -import threading -from cloudshell.networking.ericsson.ipos.ericsson_ipos_resource_driver import EricssonIPOSResourceDriver -from cloudshell.shell.core.context import ResourceCommandContext, ResourceContextDetails, \ - ReservationContextDetails - -# class DriverCommandExecution(threading.Thread): -# def __init__(self, driver_instance, command_name, parameters_name_value_map): -# threading.Thread.__init__(self) -# -# self._parameters_name_value_map = parameters_name_value_map -# self._driver_instance = driver_instance -# self._command_name = command_name -# # self._cancellation_context = CancellationContext() -# -# def run(self): -# self._result = self._driver_instance.invoke_func(self._command_name, -# self._parameters_name_value_map) -# -# def set_cancellation_context(self): -# # self._cancellation_context.is_cancelled = True -# pass -# -# def get_result(self): -# return self._result -# -# -# class DriverWrapper: -# def __init__(self, obj): -# self.instance = obj -# -# def invoke_func(self, command_name, params): -# func = getattr(self.instance, command_name) -# -# return func(**params) - -tt = EricssonIPOSResourceDriver() - -context = ResourceCommandContext() -context.resource = ResourceContextDetails() -context.resource.name = 'er' -context.reservation = ReservationContextDetails() -context.reservation.reservation_id = 'test_id' -context.resource.attributes = {} -context.resource.attributes['User'] = 'test' -context.resource.attributes['Password'] = 'test' -context.resource.attributes['Enable Password'] = 'test' -context.resource.attributes['CLI Connection Type'] = 'Telnet' -context.resource.attributes['SNMP Read Community'] = 'test' -context.resource.attributes['SNMP Version'] = '2' -context.resource.address = '10.126.144.213' - -#threading.Thread(target=tt.send_custom_command, args=[context, 'show configuration']).start() -threading.Thread(target=tt.get_inventory, args=[context]).start() -# print 'Finished' -# tt.send_custom_command(context, 'kuku') -# tt.get_inventory(context) \ No newline at end of file From bc033c7d1dc8c7932956b2b1c65035885b832916 Mon Sep 17 00:00:00 2001 From: CoYe Date: Fri, 12 Aug 2016 17:20:31 +0300 Subject: [PATCH 11/39] updated resource driver methods --- .../ericsson_ipos_resource_driver.py | 12 ++--- .../ipos/ericsson_ipos_resource_driver.py | 49 +++++++++++++------ 2 files changed, 39 insertions(+), 22 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index ceaff1b..0a072da 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -1,7 +1,7 @@ import inject from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap -from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface +from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock @@ -43,9 +43,9 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem """Restore selected file to the provided destination :param path: source config file - :param config_type: running or startup configs + :param configuration_type: running or startup configs :param restore_method: append or override methods - :param vrf: VRF management Name + :param vrf_management_name: VRF management Name """ configuration_operations = inject.instance('configuration_operations') @@ -59,9 +59,9 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem def save(self, context, folder_path, configuration_type, vrf_management_name=None): """Save selected file to the provided destination - :param source_filename: source file, which will be saved - :param destination_host: destination path where file will be saved - :param vrf: VRF management Name + :param configuration_type: source file, which will be saved + :param folder_path: destination path where file will be saved + :param vrf_management_name: VRF management Name """ configuration_operations = inject.instance('configuration_operations') diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index 0bd644f..0a072da 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -1,7 +1,7 @@ import inject from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap -from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface +from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock @@ -39,35 +39,44 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, config_type, restore_method, vrf=None): + def restore(self, context, path, configuration_type, restore_method, vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file - :param config_type: running or startup configs + :param configuration_type: running or startup configs :param restore_method: append or override methods - :param vrf: VRF management Name + :param vrf_management_name: VRF management Name """ configuration_operations = inject.instance('configuration_operations') response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, - config_type=config_type, vrf=vrf) + config_type=configuration_type, + vrf=vrf_management_name) configuration_operations.logger.info('Restore completed') configuration_operations.logger.info(response) @context_from_args - def save(self, context, destination_host, source_filename, vrf=None): + def save(self, context, folder_path, configuration_type, vrf_management_name=None): """Save selected file to the provided destination - :param source_filename: source file, which will be saved - :param destination_host: destination path where file will be saved - :param vrf: VRF management Name + :param configuration_type: source file, which will be saved + :param folder_path: destination path where file will be saved + :param vrf_management_name: VRF management Name """ configuration_operations = inject.instance('configuration_operations') - response = configuration_operations.save_configuration(destination_host, source_filename, vrf) + response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response + @context_from_args + def orchestration_save(self, context, mode="shallow", custom_params=None): + pass + + @context_from_args + def orchestration_restore(self, context, saved_artifact_info, custom_params=None): + pass + @context_from_args def get_inventory(self, context): """Return device structure with all standard attributes @@ -83,7 +92,7 @@ def get_inventory(self, context): @GlobalLock.lock @context_from_args - def update_firmware(self, context, remote_host, file_path): + def load_firmware(self, context, remote_host, file_path): """Upload and updates firmware on the resource :param remote_host: path to tftp:// server where firmware file is stored @@ -97,7 +106,7 @@ def update_firmware(self, context, remote_host, file_path): firmware_operations.logger.info(response) @context_from_args - def send_custom_command(self, context, command): + def send_custom_command(self, context, custom_command): """Send custom command :return: result @@ -105,19 +114,27 @@ def send_custom_command(self, context, command): """ send_command_operations = inject.instance("send_command_operations") - response = send_command_operations.send_command(command=command) - print response + response = send_command_operations.send_command(command=custom_command) return response @context_from_args - def send_custom_config_command(self, context, command): + def health_check(self, context): + """Performs device health check + + """ + + send_command_operations = inject.instance("send_command_operations") + send_command_operations.send_command(command='') + + @context_from_args + def send_custom_config_command(self, context, custom_command): """Send custom command in configuration mode :return: result :rtype: string """ send_command_operations = inject.instance("send_command_operations") - result_str = send_command_operations.send_config_command(command=command) + result_str = send_command_operations.send_config_command(command=custom_command) return result_str @context_from_args From 620565a3237cd05c67c031e79868b2757e5cd500 Mon Sep 17 00:00:00 2001 From: CoYe Date: Fri, 12 Aug 2016 17:28:40 +0300 Subject: [PATCH 12/39] removed inject from resource driver methods --- .../ericsson_ipos_resource_driver.py | 23 +++++++++++-------- .../ipos/ericsson_ipos_configuration.py | 11 --------- .../ipos/ericsson_ipos_resource_driver.py | 23 +++++++++++-------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index 0a072da..e951342 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -1,4 +1,8 @@ -import inject +from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations +from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations +from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations +from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface @@ -29,7 +33,7 @@ def cleanup(self): @context_from_args def ApplyConnectivityChanges(self, context, request): - connectivity_operations = inject.instance('connectivity_operations') + connectivity_operations = EricssonConnectivityOperations() connectivity_operations.logger.info('Start applying connectivity changes, request is: {0}'.format(str(request))) response = connectivity_operations.apply_connectivity_changes(request) connectivity_operations.logger.info('Finished applying connectivity changes, responce is: {0}'.format(str( @@ -48,7 +52,7 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem :param vrf_management_name: VRF management Name """ - configuration_operations = inject.instance('configuration_operations') + configuration_operations = EricssonConfigurationOperations() response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, config_type=configuration_type, vrf=vrf_management_name) @@ -64,7 +68,7 @@ def save(self, context, folder_path, configuration_type, vrf_management_name=Non :param vrf_management_name: VRF management Name """ - configuration_operations = inject.instance('configuration_operations') + configuration_operations = EricssonConfigurationOperations() response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response @@ -85,7 +89,8 @@ def get_inventory(self, context): :rtype: string """ - autoload_operations = inject.instance("autoload_operations") + autoload_operations = EricssonIPOSSNMPAutoload() + autoload_operations.logger.info('Autoload started') response = autoload_operations.discover() autoload_operations.logger.info('Autoload completed') return response @@ -101,7 +106,7 @@ def load_firmware(self, context, remote_host, file_path): :rtype: string """ - firmware_operations = inject.instance("firmware_operations") + firmware_operations = EricssonFirmwareOperations() response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) firmware_operations.logger.info(response) @@ -113,7 +118,7 @@ def send_custom_command(self, context, custom_command): :rtype: string """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() response = send_command_operations.send_command(command=custom_command) return response @@ -123,7 +128,7 @@ def health_check(self, context): """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() send_command_operations.send_command(command='') @context_from_args @@ -133,7 +138,7 @@ def send_custom_config_command(self, context, custom_command): :return: result :rtype: string """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() result_str = send_command_operations.send_config_command(command=custom_command) return result_str diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py index 67aa7ff..2cf2c96 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py @@ -1,10 +1,5 @@ import re -from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations -from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations -from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations -from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations -from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.shell.core.context_utils import get_decrypted_password_by_attribute_name_wrapper from cloudshell.shell.core.dependency_injection.context_based_logger import get_logger_with_thread_id @@ -43,12 +38,6 @@ def enter_enable_mode(session): raise Exception('enter_enable_mode', 'Enable password is incorrect') -CONNECTIVITY_OPERATIONS_CLASS = EricssonConnectivityOperations -CONFIGURATION_OPERATIONS_CLASS = EricssonConfigurationOperations -FIRMWARE_OPERATIONS_CLASS = EricssonFirmwareOperations -AUTOLOAD_OPERATIONS_CLASS = EricssonIPOSSNMPAutoload -SEND_COMMAND_OPERATIONS_CLASS = EricssonSendCommandOperations - GET_LOGGER_FUNCTION = get_logger_with_thread_id POOL_TIMEOUT = 300 HE_MAX_LOOP_RETRIES = 0 diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index 0a072da..e951342 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -1,4 +1,8 @@ -import inject +from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations +from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations +from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations +from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface @@ -29,7 +33,7 @@ def cleanup(self): @context_from_args def ApplyConnectivityChanges(self, context, request): - connectivity_operations = inject.instance('connectivity_operations') + connectivity_operations = EricssonConnectivityOperations() connectivity_operations.logger.info('Start applying connectivity changes, request is: {0}'.format(str(request))) response = connectivity_operations.apply_connectivity_changes(request) connectivity_operations.logger.info('Finished applying connectivity changes, responce is: {0}'.format(str( @@ -48,7 +52,7 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem :param vrf_management_name: VRF management Name """ - configuration_operations = inject.instance('configuration_operations') + configuration_operations = EricssonConfigurationOperations() response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, config_type=configuration_type, vrf=vrf_management_name) @@ -64,7 +68,7 @@ def save(self, context, folder_path, configuration_type, vrf_management_name=Non :param vrf_management_name: VRF management Name """ - configuration_operations = inject.instance('configuration_operations') + configuration_operations = EricssonConfigurationOperations() response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response @@ -85,7 +89,8 @@ def get_inventory(self, context): :rtype: string """ - autoload_operations = inject.instance("autoload_operations") + autoload_operations = EricssonIPOSSNMPAutoload() + autoload_operations.logger.info('Autoload started') response = autoload_operations.discover() autoload_operations.logger.info('Autoload completed') return response @@ -101,7 +106,7 @@ def load_firmware(self, context, remote_host, file_path): :rtype: string """ - firmware_operations = inject.instance("firmware_operations") + firmware_operations = EricssonFirmwareOperations() response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) firmware_operations.logger.info(response) @@ -113,7 +118,7 @@ def send_custom_command(self, context, custom_command): :rtype: string """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() response = send_command_operations.send_command(command=custom_command) return response @@ -123,7 +128,7 @@ def health_check(self, context): """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() send_command_operations.send_command(command='') @context_from_args @@ -133,7 +138,7 @@ def send_custom_config_command(self, context, custom_command): :return: result :rtype: string """ - send_command_operations = inject.instance("send_command_operations") + send_command_operations = EricssonSendCommandOperations() result_str = send_command_operations.send_config_command(command=custom_command) return result_str From 6e1e57251fbbda62f15e65f30d4299656373391c Mon Sep 17 00:00:00 2001 From: CoYe Date: Fri, 12 Aug 2016 17:50:15 +0300 Subject: [PATCH 13/39] updated requirements files --- .../Generic Ericsson IPOS Driver/requirements.txt | 2 +- requirements.txt | 2 +- test_requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt index 9c48207..a6bebab 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt @@ -1 +1 @@ -cloudshell-networking-ericsson-ipos \ No newline at end of file +cloudshell-networking-ericsson-ipos>=1.0,<1.1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index d9e24c2..dcdb8af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cloudshell-networking-ericsson +cloudshell-networking-ericsson>=1.0,<1.1 cloudshell-cli>=2.1,<2.2 cloudshell-snmp>=2.1,<2.2 cloudshell-automation-api>=7.0,<7.1 diff --git a/test_requirements.txt b/test_requirements.txt index 1fdda41..123f6bc 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,3 +1,3 @@ -cloudshell-networking-ericsson +cloudshell-networking-ericsson>=1.0,<1.1 cloudshell-snmp>=2.1,<2.2 cloudshell-cli>=2.1,<2.2 \ No newline at end of file From 9b9c8d3112a22f2c03180a8bf9640dd1d58d8705 Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 15 Aug 2016 12:27:11 +0300 Subject: [PATCH 14/39] removed old NetworkingGenericBootstrap --- Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml | 12 +++++++++++- .../ericsson_ipos_resource_driver.py | 4 ++-- .../ericsson/ipos/ericsson_ipos_resource_driver.py | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index e4fd340..94f8000 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -95,6 +95,16 @@ + + + + + + + + + + @@ -115,7 +125,7 @@ - + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index e951342..0b7a8a7 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -4,9 +4,9 @@ from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload -from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args +from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock @@ -16,7 +16,7 @@ class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): def __init__(self): super(EricssonIPOSResourceDriver, self).__init__() - bootstrap = NetworkingGenericBootstrap() + bootstrap = DriverBootstrap() bootstrap.add_config(driver_config) bootstrap.initialize() diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index e951342..0b7a8a7 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -4,9 +4,9 @@ from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload -from cloudshell.networking.generic_bootstrap import NetworkingGenericBootstrap from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args +from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock @@ -16,7 +16,7 @@ class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): def __init__(self): super(EricssonIPOSResourceDriver, self).__init__() - bootstrap = NetworkingGenericBootstrap() + bootstrap = DriverBootstrap() bootstrap.add_config(driver_config) bootstrap.initialize() From 9a6f1102e5a79f31f34a09a71278251f2eef956a Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 15 Aug 2016 16:16:47 +0300 Subject: [PATCH 15/39] adjusted config.xml --- Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index ae95b26..ddd26bc 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -16,6 +16,9 @@ xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSch + + + From d5c5a61235fe72da0a789085635ad3a55806ca5f Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 15 Aug 2016 16:39:51 +0300 Subject: [PATCH 16/39] adjusted regexp for port types --- .../ipos/autoload/ericsson_ipos_snmp_autoload.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index 8b0b75d..5fed7e0 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -18,7 +18,7 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, """ EricssonGenericSNMPAutoload.__init__(self, snmp_handler, logger, supported_os) - self.port_ethernet_vendor_type_pattern = r'port.*\d+ge|\S+.1.193.218.6.10.251' + self.port_ethernet_vendor_type_pattern = r'port.*\d+ge|\S+.1.193.218.6.10.251|\S+Port.251' self._cli = cli self.snmp_view = 'qualiview' self.snmp_community = snmp_community @@ -40,8 +40,13 @@ def cli(self): return self._cli def discover(self): - enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' - disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + try: + enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + except: + enable_snmp = True + disable_snmp = False + if enable_snmp: self._enable_snmp() try: From aa55c20bdf241c3a3336e2a18671fcc6ca635522 Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 15 Aug 2016 16:47:45 +0300 Subject: [PATCH 17/39] switched local variables enable/disable_snmp to field to simplify testing --- .../ipos/autoload/ericsson_ipos_snmp_autoload.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index 5fed7e0..5b78ac4 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -22,6 +22,8 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, self._cli = cli self.snmp_view = 'qualiview' self.snmp_community = snmp_community + self.enable_snmp = True + self.disable_snmp = False self.vendor_type_exclusion_pattern = ['port.*mgmt'] self.interface_mapping_key = 'eriRouterIpBindIfIndex' self.interface_mapping_mib = 'ERICSSON-ROUTER-IP-BIND-MIB' @@ -41,13 +43,12 @@ def cli(self): def discover(self): try: - enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' - disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + self.enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + self.disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' except: - enable_snmp = True - disable_snmp = False + pass - if enable_snmp: + if self.enable_snmp: self._enable_snmp() try: result = self.get_autoload_details() @@ -55,7 +56,7 @@ def discover(self): self.logger.error('Autoload failed: {0}'.format(e.message)) raise Exception('EricssonGenericSNMPAutoload', e.message) finally: - if disable_snmp: + if self.disable_snmp: self._disable_snmp() return result From ffc2ad1bfa44b3a7cfc317f510381a829f0590d8 Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 15 Aug 2016 18:02:59 +0300 Subject: [PATCH 18/39] Corrected parameter names and added VRF Management Name --- .../Configuration/shellconfig.xml | 1 + .../DataModel/datamodel.xml | 9 +++++++++ .../drivermetadata.xml | 16 ++++++++-------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index ddd26bc..5ada83d 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -30,6 +30,7 @@ xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSch + diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 94f8000..402371d 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -125,6 +125,11 @@ + + + + + @@ -268,6 +273,9 @@ + + + @@ -337,6 +345,7 @@ + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 5aeb669..49ab521 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -8,7 +8,7 @@ - + @@ -32,7 +32,7 @@ - @@ -40,13 +40,13 @@ - - - @@ -54,13 +54,13 @@ - - @@ -73,4 +73,4 @@ - + \ No newline at end of file From 981294696c2313b6705e0fc250132d906c6e7c26 Mon Sep 17 00:00:00 2001 From: CoYe Date: Thu, 25 Aug 2016 16:41:05 +0300 Subject: [PATCH 19/39] Updated driver with latest changes to standard --- .../drivermetadata.xml | 10 ++--- .../ericsson_ipos_resource_driver.py | 37 ++++++++++++------- .../ipos/ericsson_ipos_resource_driver.py | 37 ++++++++++++------- 3 files changed, 51 insertions(+), 33 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 49ab521..72bb3ee 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -30,15 +30,15 @@ - + - + - + - + @@ -64,7 +64,7 @@ Description="Virtual Routing and Forwarding is used to share same/overlapping sub-net on the same core. Service Providers use it to share their backbone with multiple customers and also assign a management VRF which they use to manage the devices. If kept empty the value in the 'VRF Management Name' attribute on the root model will be used."/> - + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index 0b7a8a7..fec847f 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -2,6 +2,7 @@ from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface @@ -43,7 +44,7 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, configuration_type, restore_method, vrf_management_name=None): + def restore(self, context, path, restore_method='override', configuration_type='running', vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file @@ -53,14 +54,14 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem """ configuration_operations = EricssonConfigurationOperations() - response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, - config_type=configuration_type, - vrf=vrf_management_name) + response = configuration_operations.restore(path=path, restore_method=restore_method, + configuration_type=configuration_type, + vrf_management_name=vrf_management_name) configuration_operations.logger.info('Restore completed') configuration_operations.logger.info(response) @context_from_args - def save(self, context, folder_path, configuration_type, vrf_management_name=None): + def save(self, context, configuration_type, folder_path, vrf_management_name=None): """Save selected file to the provided destination :param configuration_type: source file, which will be saved @@ -69,17 +70,25 @@ def save(self, context, folder_path, configuration_type, vrf_management_name=Non """ configuration_operations = EricssonConfigurationOperations() - response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) + response = configuration_operations.save(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response @context_from_args def orchestration_save(self, context, mode="shallow", custom_params=None): - pass + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration save started') + response = configuration_operations.orchestration_save(mode=mode, custom_params=custom_params) + configuration_operations.logger.info('Orchestration save completed') + return response @context_from_args def orchestration_restore(self, context, saved_artifact_info, custom_params=None): - pass + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration restore started') + configuration_operations.orchestration_restore(saved_artifact_info=saved_artifact_info, + custom_params=custom_params) + configuration_operations.logger.info('Orchestration restore completed') @context_from_args def get_inventory(self, context): @@ -97,17 +106,17 @@ def get_inventory(self, context): @GlobalLock.lock @context_from_args - def load_firmware(self, context, remote_host, file_path): + def load_firmware(self, context, path, vrf_management_name=None): """Upload and updates firmware on the resource - :param remote_host: path to tftp:// server where firmware file is stored - :param file_path: firmware file name + :param path: full path to firmware file, i.e. tftp://10.10.10.1/firmware.tar + :param vrf_management_name: VRF management Name :return: result :rtype: string """ firmware_operations = EricssonFirmwareOperations() - response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) + response = firmware_operations.load_firmware(path=path, vrf_management_name=vrf_management_name) firmware_operations.logger.info(response) @context_from_args @@ -128,8 +137,8 @@ def health_check(self, context): """ - send_command_operations = EricssonSendCommandOperations() - send_command_operations.send_command(command='') + state_operations = EricssonStateOperations() + return state_operations.health_check() @context_from_args def send_custom_config_command(self, context, custom_command): diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index 0b7a8a7..fec847f 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -2,6 +2,7 @@ from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface @@ -43,7 +44,7 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, configuration_type, restore_method, vrf_management_name=None): + def restore(self, context, path, restore_method='override', configuration_type='running', vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file @@ -53,14 +54,14 @@ def restore(self, context, path, configuration_type, restore_method, vrf_managem """ configuration_operations = EricssonConfigurationOperations() - response = configuration_operations.restore_configuration(source_file=path, restore_method=restore_method, - config_type=configuration_type, - vrf=vrf_management_name) + response = configuration_operations.restore(path=path, restore_method=restore_method, + configuration_type=configuration_type, + vrf_management_name=vrf_management_name) configuration_operations.logger.info('Restore completed') configuration_operations.logger.info(response) @context_from_args - def save(self, context, folder_path, configuration_type, vrf_management_name=None): + def save(self, context, configuration_type, folder_path, vrf_management_name=None): """Save selected file to the provided destination :param configuration_type: source file, which will be saved @@ -69,17 +70,25 @@ def save(self, context, folder_path, configuration_type, vrf_management_name=Non """ configuration_operations = EricssonConfigurationOperations() - response = configuration_operations.save_configuration(folder_path, configuration_type, vrf_management_name) + response = configuration_operations.save(folder_path, configuration_type, vrf_management_name) configuration_operations.logger.info('Save completed') return response @context_from_args def orchestration_save(self, context, mode="shallow", custom_params=None): - pass + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration save started') + response = configuration_operations.orchestration_save(mode=mode, custom_params=custom_params) + configuration_operations.logger.info('Orchestration save completed') + return response @context_from_args def orchestration_restore(self, context, saved_artifact_info, custom_params=None): - pass + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration restore started') + configuration_operations.orchestration_restore(saved_artifact_info=saved_artifact_info, + custom_params=custom_params) + configuration_operations.logger.info('Orchestration restore completed') @context_from_args def get_inventory(self, context): @@ -97,17 +106,17 @@ def get_inventory(self, context): @GlobalLock.lock @context_from_args - def load_firmware(self, context, remote_host, file_path): + def load_firmware(self, context, path, vrf_management_name=None): """Upload and updates firmware on the resource - :param remote_host: path to tftp:// server where firmware file is stored - :param file_path: firmware file name + :param path: full path to firmware file, i.e. tftp://10.10.10.1/firmware.tar + :param vrf_management_name: VRF management Name :return: result :rtype: string """ firmware_operations = EricssonFirmwareOperations() - response = firmware_operations.update_firmware(remote_host=remote_host, file_path=file_path) + response = firmware_operations.load_firmware(path=path, vrf_management_name=vrf_management_name) firmware_operations.logger.info(response) @context_from_args @@ -128,8 +137,8 @@ def health_check(self, context): """ - send_command_operations = EricssonSendCommandOperations() - send_command_operations.send_command(command='') + state_operations = EricssonStateOperations() + return state_operations.health_check() @context_from_args def send_custom_config_command(self, context, custom_command): From ce98c69bd0b397a7a8bcc8043cb4f71f3a807b61 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 31 Aug 2016 12:58:38 +0300 Subject: [PATCH 20/39] updated IPOS Shell with latest changes to Standard --- .../DataModel/datamodel.xml | 27 +++++++++++++++++++ .../ericsson_ipos_resource_driver.py | 21 ++++++++++++--- cloudshell/__init__.py | 1 - .../ipos/ericsson_ipos_resource_driver.py | 21 ++++++++++++--- 4 files changed, 63 insertions(+), 7 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 402371d..3803094 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -64,6 +64,21 @@ + + + + + + + + + + + + + + + @@ -273,6 +288,15 @@ + + + + + + + + + @@ -338,6 +362,9 @@ + + + diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index fec847f..e3b8812 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -5,7 +5,7 @@ from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload -from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface +from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface @@ -44,7 +44,7 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, restore_method='override', configuration_type='running', vrf_management_name=None): + def restore(self, context, path, configuration_type='running', restore_method='override', vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file @@ -61,7 +61,7 @@ def restore(self, context, path, restore_method='override', configuration_type=' configuration_operations.logger.info(response) @context_from_args - def save(self, context, configuration_type, folder_path, vrf_management_name=None): + def save(self, context, folder_path, configuration_type, vrf_management_name=None): """Save selected file to the provided destination :param configuration_type: source file, which will be saved @@ -151,6 +151,21 @@ def send_custom_config_command(self, context, custom_command): result_str = send_command_operations.send_config_command(command=custom_command) return result_str + @GlobalLock.lock + @context_from_args + def update_firmware(self, context, remote_host, file_path): + """Upload and updates firmware on the resource + + :param remote_host: path to firmware file location on ftp or tftp server + :param file_path: firmware file name + :return: result + :rtype: string + """ + + firmware_operations = EricssonFirmwareOperations() + response = firmware_operations.load_firmware(path=remote_host) + firmware_operations.logger.info(response) + @context_from_args def shutdown(self, context): pass diff --git a/cloudshell/__init__.py b/cloudshell/__init__.py index a006e82..3ad9513 100644 --- a/cloudshell/__init__.py +++ b/cloudshell/__init__.py @@ -1,3 +1,2 @@ -__author__ = 'coye' from pkgutil import extend_path __path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index fec847f..ce32680 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -5,7 +5,7 @@ from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload -from cloudshell.networking.networking_resource_driver_interface_v4 import NetworkingResourceDriverInterface +from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface @@ -44,7 +44,7 @@ def ApplyConnectivityChanges(self, context, request): @GlobalLock.lock @context_from_args - def restore(self, context, path, restore_method='override', configuration_type='running', vrf_management_name=None): + def restore(self, context, path, configuration_type='running', restore_method='override', vrf_management_name=None): """Restore selected file to the provided destination :param path: source config file @@ -61,7 +61,7 @@ def restore(self, context, path, restore_method='override', configuration_type=' configuration_operations.logger.info(response) @context_from_args - def save(self, context, configuration_type, folder_path, vrf_management_name=None): + def save(self, context, folder_path, configuration_type, vrf_management_name=None): """Save selected file to the provided destination :param configuration_type: source file, which will be saved @@ -131,6 +131,21 @@ def send_custom_command(self, context, custom_command): response = send_command_operations.send_command(command=custom_command) return response + @GlobalLock.lock + @context_from_args + def update_firmware(self, context, remote_host, file_path): + """Upload and updates firmware on the resource + + :param remote_host: path to firmware file location on ftp or tftp server + :param file_path: firmware file name + :return: result + :rtype: string + """ + + firmware_operations = EricssonFirmwareOperations() + response = firmware_operations.load_firmware(path=remote_host) + firmware_operations.logger.info(response) + @context_from_args def health_check(self, context): """Performs device health check From 0282315f7badf1ca0c50a40f2625702f518d9d60 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 31 Aug 2016 13:20:01 +0300 Subject: [PATCH 21/39] added update_firmware method to hidden commands --- .../drivermetadata.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 72bb3ee..910be60 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -29,6 +29,14 @@ + + + + + + @@ -66,10 +74,10 @@ - - + From bc26f7b46356bdcd5c6ba18995d6b8e7d0601b58 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 31 Aug 2016 13:34:56 +0300 Subject: [PATCH 22/39] added Backup Type, Backup Password, Backup User to shellconfig.xml --- Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index 5ada83d..9ee28a1 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -27,6 +27,9 @@ xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSch + + + From 006e8c91d6fdbb8662508552d6700b3bff1144ff Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 7 Sep 2016 12:19:20 +0300 Subject: [PATCH 23/39] changes to ericsson datamodel and drivermetadata --- .../DataModel/datamodel.xml | 87 +++++++++---------- .../drivermetadata.xml | 22 +++-- .../ericsson_ipos_resource_driver.py | 39 +++++++-- .../ipos/ericsson_ipos_resource_driver.py | 6 +- 4 files changed, 92 insertions(+), 62 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 3803094..9aba68e 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -2,166 +2,166 @@ - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - @@ -174,55 +174,55 @@ - + - + - + - + - + - + - + - + - @@ -233,20 +233,19 @@ - + - + - diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 910be60..024e9c5 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -6,7 +6,7 @@ - + @@ -18,7 +18,7 @@ - + @@ -37,10 +37,16 @@ Description="Firmware file name"/> + + + + + - + - @@ -52,7 +58,7 @@ DefaultValue="" Description="The path in which the configuration file will be saved. Won't include the name of the file but only the folder. This input is optional and in case this input is empty the value will be taken from the 'Backup Location' attribute on the root resource. The path should include the protocol type, for example 'tftp://asdf'."/> @@ -62,10 +68,10 @@ - - - diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index e3b8812..49c5f37 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -1,7 +1,7 @@ from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations -from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ericsson_run_command_operations import EricssonRunCommandOperations from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload @@ -120,15 +120,15 @@ def load_firmware(self, context, path, vrf_management_name=None): firmware_operations.logger.info(response) @context_from_args - def send_custom_command(self, context, custom_command): + def run_custom_command(self, context, custom_command): """Send custom command :return: result :rtype: string """ - send_command_operations = EricssonSendCommandOperations() - response = send_command_operations.send_command(command=custom_command) + send_command_operations = EricssonRunCommandOperations() + response = send_command_operations.run_custom_command(command=custom_command) return response @context_from_args @@ -141,14 +141,15 @@ def health_check(self, context): return state_operations.health_check() @context_from_args - def send_custom_config_command(self, context, custom_command): + def run_custom_config_command(self, context, custom_command): """Send custom command in configuration mode :return: result :rtype: string """ - send_command_operations = EricssonSendCommandOperations() - result_str = send_command_operations.send_config_command(command=custom_command) + + send_command_operations = EricssonRunCommandOperations() + result_str = send_command_operations.run_custom_config_command(command=custom_command) return result_str @GlobalLock.lock @@ -166,6 +167,30 @@ def update_firmware(self, context, remote_host, file_path): response = firmware_operations.load_firmware(path=remote_host) firmware_operations.logger.info(response) + @context_from_args + def send_custom_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + response = send_command_operations.run_custom_command(command=custom_command) + return response + + @context_from_args + def send_custom_config_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + result_str = send_command_operations.run_custom_config_command(command=custom_command) + return result_str + @context_from_args def shutdown(self, context): pass diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py index ce32680..3af60ec 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py @@ -1,7 +1,7 @@ from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations -from cloudshell.networking.ericsson.ericsson_send_command_operations import EricssonSendCommandOperations +from cloudshell.networking.ericsson.ericsson_run_command_operations import EricssonRunCommandOperations from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload @@ -127,7 +127,7 @@ def send_custom_command(self, context, custom_command): :rtype: string """ - send_command_operations = EricssonSendCommandOperations() + send_command_operations = EricssonRunCommandOperations() response = send_command_operations.send_command(command=custom_command) return response @@ -162,7 +162,7 @@ def send_custom_config_command(self, context, custom_command): :return: result :rtype: string """ - send_command_operations = EricssonSendCommandOperations() + send_command_operations = EricssonRunCommandOperations() result_str = send_command_operations.send_config_command(command=custom_command) return result_str From 153d8b06e2e04ab662a56752d59ccc3627b5697c Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 7 Sep 2016 12:53:09 +0300 Subject: [PATCH 24/39] fixed shellconfig --- Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml index 9ee28a1..00414be 100644 --- a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml +++ b/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml @@ -27,12 +27,12 @@ xmlns="http://schemas.qualisystems.com/ResourceManagement/ShellsConfigurationSch - + - + From ad54acff38880a58bef4f38bd493800b7ec27c38 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 7 Sep 2016 13:09:52 +0300 Subject: [PATCH 25/39] adjusted default values under Ericsson Router resource model --- Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 9aba68e..28713c8 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -363,7 +363,7 @@ - + @@ -375,10 +375,11 @@ + - + From bb6f9ae4175cbbc6a452dcead5ae734a29efe291 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 7 Sep 2016 13:38:39 +0300 Subject: [PATCH 26/39] corrected snmp_autoload commands according to operations interface --- .../autoload/ericsson_ipos_snmp_autoload.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py index 5b78ac4..3e1fd76 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py @@ -22,8 +22,8 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, self._cli = cli self.snmp_view = 'qualiview' self.snmp_community = snmp_community - self.enable_snmp = True - self.disable_snmp = False + self._enable_snmp = True + self._disable_snmp = False self.vendor_type_exclusion_pattern = ['port.*mgmt'] self.interface_mapping_key = 'eriRouterIpBindIfIndex' self.interface_mapping_mib = 'ERICSSON-ROUTER-IP-BIND-MIB' @@ -43,24 +43,24 @@ def cli(self): def discover(self): try: - self.enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' - self.disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + self._enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + self._disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' except: pass - if self.enable_snmp: - self._enable_snmp() + if self._enable_snmp: + self.enable_snmp() try: result = self.get_autoload_details() except Exception as e: self.logger.error('Autoload failed: {0}'.format(e.message)) raise Exception('EricssonGenericSNMPAutoload', e.message) finally: - if self.disable_snmp: - self._disable_snmp() + if self._disable_snmp: + self.disable_snmp() return result - def _enable_snmp(self): + def enable_snmp(self): snmp_service_enabled = 'not supported' not in self.cli.send_command('show service | include snmp').lower() existing_snmp_server = 'snmp server is not running' not in self.cli.send_command('show snmp server').lower() existing_snmp_view = self.snmp_view in self.cli.send_command('show snmp view').lower() @@ -85,7 +85,7 @@ def _enable_snmp(self): self.snmp_community)) self.cli.commit() - def _disable_snmp(self): + def disable_snmp(self): time.sleep(5) self.cli.send_config_command('no snmp community {0}'.format(self.snmp_community)) self.cli.send_config_command('no snmp view {0}'.format(self.snmp_view)) From b8ac3eeb66a861e988022e7632861ea94e3a440a Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 7 Sep 2016 22:21:46 +0300 Subject: [PATCH 27/39] Snmp Version attribute corrected --- Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml index 28713c8..10b27d3 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml @@ -315,7 +315,11 @@ - + + v1 + v2c + v3 + From e22d60615808f74c6ecf31051fe0d375fac55b18 Mon Sep 17 00:00:00 2001 From: CoYe Date: Sun, 18 Dec 2016 18:28:08 +0200 Subject: [PATCH 28/39] adjustments to extended ipos shell --- .gitignore | 3 + .../Categories/categories.xml | 0 .../Configuration/shellconfig.xml | 0 .../DataModel/datamodel.xml | 104 +++++++++++++++++- .../Generic Ericsson IPOS Extended Driver.zip | Bin 0 -> 3461 bytes .../drivermetadata.xml | 4 +- .../ericsson_ipos_resource_driver.py | 4 +- .../requirements.txt | 0 .../metadata.xml | 0 .../version.txt | 0 __init__.py | 1 + .../ericsson/ipos/autoload/__init__.py | 1 - .../ericsson_ext_ipos_autoload_config.json | 97 ++++++++++++++++ ...> ericsson_extended_ipos_snmp_autoload.py} | 61 +++++----- ...> ericsson_extended_ipos_configuration.py} | 0 ...ericsson_extended_ipos_resource_driver.py} | 0 cloudshell/tests/__init__.py | 2 + cloudshell/tests/networking/__init__.py | 2 + .../tests/networking/ericsson/__init__.py | 0 .../networking/ericsson/autoload/__init__.py | 1 + requirements.txt | 2 +- setup.py | 4 +- 22 files changed, 251 insertions(+), 35 deletions(-) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/Categories/categories.xml (100%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/Configuration/shellconfig.xml (100%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/DataModel/datamodel.xml (85%) create mode 100644 Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/Generic Ericsson IPOS Extended Driver.zip rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml (98%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py (97%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt (100%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/metadata.xml (100%) rename {Ericsson_IPOS_Shell_Package => Ericsson_IPOS_Shell_Extended_Package}/version.txt (100%) create mode 100644 __init__.py create mode 100644 cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json rename cloudshell/networking/ericsson/ipos/autoload/{ericsson_ipos_snmp_autoload.py => ericsson_extended_ipos_snmp_autoload.py} (65%) rename cloudshell/networking/ericsson/ipos/{ericsson_ipos_configuration.py => ericsson_extended_ipos_configuration.py} (100%) rename cloudshell/networking/ericsson/ipos/{ericsson_ipos_resource_driver.py => ericsson_extended_ipos_resource_driver.py} (100%) create mode 100644 cloudshell/tests/__init__.py create mode 100644 cloudshell/tests/networking/__init__.py create mode 100644 cloudshell/tests/networking/ericsson/__init__.py create mode 100644 cloudshell/tests/networking/ericsson/autoload/__init__.py diff --git a/.gitignore b/.gitignore index c397d52..03169e5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ dist cloudshell_networking_ericsson_ipos.egg-info/ Ericsson_IPOS_Shell_Package/Ericsson-IPOS-Shell.zip cloudshell/networking/ericsson/ipos/autoload/test.py +cloudshell_networking_ericsson_ipos_extended.egg-info +Ericsson_IPOS_Shell_Extended_Package.zip +cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py diff --git a/Ericsson_IPOS_Shell_Package/Categories/categories.xml b/Ericsson_IPOS_Shell_Extended_Package/Categories/categories.xml similarity index 100% rename from Ericsson_IPOS_Shell_Package/Categories/categories.xml rename to Ericsson_IPOS_Shell_Extended_Package/Categories/categories.xml diff --git a/Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml b/Ericsson_IPOS_Shell_Extended_Package/Configuration/shellconfig.xml similarity index 100% rename from Ericsson_IPOS_Shell_Package/Configuration/shellconfig.xml rename to Ericsson_IPOS_Shell_Extended_Package/Configuration/shellconfig.xml diff --git a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml similarity index 85% rename from Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml rename to Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml index 10b27d3..3874038 100644 --- a/Ericsson_IPOS_Shell_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml @@ -245,6 +245,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -389,7 +413,7 @@ - Generic Ericsson IPOS Driver + Generic Ericsson IPOS Extended Driver @@ -437,11 +461,54 @@ + + + ge-40-port + 10ge-10-port + 1-10ge-20-4-port + 40-100ge-2-port + 1-10ge-20-port + 10-100ge-2-2-port + 1-10ge-40-port + ssc1 + ssc1-v2 + ssc2-a + ssc3 + sw + sw2 + alsw + alswt + alsw2 + rpsw + rpsw-v2 + rpsw2 + atm-oc3e-8-port + atm-oc12e-2-port + oc3e-8-port + oc12e-4-port + oc48e-4-port + oc192-1-port + ch-oc3oc12-8or2-port + fege-60-2-port + ge-10-port + ge-20-port + ge3-4-port + ge-5-port + ge2-10-port + ge4-20-port + 10ge-1-port + 10ge-4-port + 10ge-oc192-1-port + ase + sse + + + Generic Chassis @@ -452,6 +519,24 @@ + + + + + + + + + + + Generic Module + + + + + + + @@ -488,6 +573,18 @@ + + + + + + + + + + + + @@ -500,10 +597,15 @@ + + + + Generic Chassis Generic Module + PFE Generic Sub Module diff --git a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/Generic Ericsson IPOS Extended Driver.zip b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/Generic Ericsson IPOS Extended Driver.zip new file mode 100644 index 0000000000000000000000000000000000000000..4c02c77c93b935d1a8710c76aba25a9e1257ec57 GIT binary patch literal 3461 zcmai%cTf}B^2b9}klqEPg%Vom9jO7O1gW71DFFci30<0m4n_n-1w@f1Md_gQ0MZG) z_aX#P5NV;x(3J%=G_6%e7LsAUzPi_D=S`_TWH|hufAO zUbC_^zv0=J%h_VnPbNHDC^b`Zd@^g)>`-}qD&*A=O9-zqP_W@Qz5!Uo+=q0K^N#hP zL}6%?@OyLZ4Y?twTke*a6nEeYws z8v)=tCbGs3)lLxEPcc=yNapyZf)A93w?he+aX@+`Ox$sRhr_=!$C!U&uFy(A*&r)H zC->DDJh~>kY4j*26O!1gXo9{2Cvegw5+?s?-usGYnO_kfd{4E!rg%H(!=`Vih#jbj zYPpHtwU@8o)KW6NmQBgKg(eRQpEdpDMC=t+L|%K8RMyZHdgt>CXk={zdc&$y$K#{W zDx^nWWaVoa^+)*l#^=Z1d3aKx^_1SGR@j6dP;|BpcAC!g$Im5F9)|s{()lEO5Yd%B zw3gtJzaQx!XjAR3f+p&^+X;x&CIPuJPQ8iMW~n^iC4>q2N}HcCRG^vGWZRTJ|56XS zL`fiIYEKfT*)^U=>#|R)BW@9=gXGB=qTZ$4mgYZ8jeYUeX{$U?totZ`_9**-m@F!} z@a!&wv`xXU@>Z__S0X6AlJ!KhcuUS2Kx321W3Ph%+FhyS$Oghqu^16Fg3ALso= zkwXi2a(g-ibSE;1hYKI5zeJx!kSR6$k@b=jOG231ziX18*Lp9bkN!qMsZhS?J%Oa> z{*RfQ7k;-ZIS&NKVt;m{8g7=CZ2aVkz^}8|9PcPkwMGn|dle|+K9&bPt9#z?(O?u~i>VWCne zx~iA8Cz-)dSIvL5{*||!$_U&QVU|Na6ZJ8pOevE-oA+B&AdPk8bX1yJ(mMOgwz!~H zHn8lZF=*GAtW(mOK6+F(IS>u0HOOhlaNH~`3kDtlzNN3ny_3>oqZJM(_;{g@t8cZx z=G0J8#IttVJmKF;UNt^DXRtWGqi};-UhW&qnp0XLZ$SEVOg8p?ri#Gshn)5in$GoR z#}Pxdck|Ecgr%ch;<}!Ic=SOU$Lb1V7RyU_sOg;VTG~auN;?#K$zbz67V(+gcC^?x zQJ|&bTW#r*Cd)m8CzfAXLYJ_0!@AQiedr$m_PR8B3sJP~$uSor^^v<2KK&ZdKiHF_X>B6n7sLJyjh7%f#q{Y^)p8 z&yDJyIuNC@a7<)Vcm^SYd-R)PHGxi#+fzy;+p3F?h(e00ScD0!cj?aT^v9HGer1;2 zIG%EQ^90WKICF~ zK62#h7z!$$cg_Wbz5`3hZ(StL`$GmbpuB`T8|1!~RG|FbQ47J)6Ni!W)5_C*iSJw7 zF2@+wkj21y+bsrSR+Yln3+9kWv==DP-sR~aGL3_Fe%&ebAcjg)Hjr#VPa}Mp*^?&*qXjJ4SYk3o^N3_n z;&r}aUWAEanE!Adab=7+2t8Hz4`&c)LvEq$KA7@p2Pi-IT#F@Y^i#|>-%2d#8U z3J&{9d?iRDARm*^CI+Y3hw@}F+JFu;p@FmcXJgMrnQ^*(I(Zv!izkEZDW^Ls>4YkY zn4Gi+Y@x^s3M047N($Vsr?0ytTVx>2H&Vz;6!hL6{H~jGZOxC>>$utFEvzRND>;}j zv_qL68ghJa;Cs2>9{V`F?lt377$r$^BLgj&qdFcEC2bDjmFIzd4b?oeNDZ?y3agHC z)LEBWL1C^vzbI%kHkvr@25RVrG;mP{6H=`}hPv8{K$if4y^)4TM5(T2pN??l1~EyUIQ9|6}U7j|63| zPse~-EhKNR;T5T1JLS_;JAG{RO0?J@kTMb)Tub>-{Ap2Yf4jGhlEb`DVyZ=7?(5;j zcxPu&vman6W9t2+ke8@M!^FbeT*$+2Lv7RERsTuzGLnj}^OMG1E283e86LLjo>=31 z#WHFw#76nu!&_9+q@CU+3Sa$dY^wRSo-Q?tXsZhYR6l(ArfF0@>3Qu7)Vmp2`7>Me z!GXJu)1ZmTHlO^6+fK*F+URxcKpY%KM64$Hu zrMujU$an&Ff-U&&VEKd>h0@^@ioXC`CA!PMb0AH)fFmS<=*A&Qz~h; zG5krBK>i)$QxIL5EYQ#@g0g-Fxl&Oqn*)4JL`A;mbiIPG#5eI2m}2nxJ_%ZN60=;%t z+wR%u+g(=MEYc&+LRz90Sto&Xi3Q4UMksg}k}4&aMPm46)7}W+=IIy0El1D@Il;m@ zk74e7qXeoK5(oN1)+@BB&t$^P;b|k7i0kd!*E7S7{LLhqc;j3mYZ7)Xvm8kiY#@Tk z#Y~%o&Yg~QbKMM5oz!yWMjE9~_KaK#8cTlcVHrRbKff{>C!vcWLFg|3v|^)S`X|*G zCVZH!ChjxY8f3q0kAg~wd=MlwrW@MC&Dcq5ZYnSh4YYsgzhu!+F3Non!$MoS;LA>_ zlmng7Oj};@JCgV@tR~7I%<5{FD2XDm&3JFBIpL1SNic~+h50soisF78QbwA!5KZ`( z>~KB;FG69i!N670$z8Z}Q~GTMmga3lQkA51T5E?uf#k^kB4TgBzj~4A zdLQFV7;_|_i3@PZ?-OhPT%m#fH7Z%Ss%h5p*}44$vaXlLYJM+6(ai3M%6n|_)Eq(34w!EIt5Y314TDPPW3{hh)&Gvs5XZUdI=rQhVs?6tN!-Ibl z8tM@casvJ@;lO(};Qx8J{`mh_Mv(t2LjYg_G{P?$bvQ-{Sk0W8x?unD|4sP2diX2B z_KNbqTH>#ah|Tjq7{A>d|6u&v|2O0BOX{x-E7JdeW&M?yEB9wt=cIpj^>1&eM{-pO R03f=$@&o{Y9K}DQe*o?uO)>xg literal 0 HcmV?d00001 diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml similarity index 98% rename from Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml rename to Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 024e9c5..813a34c 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -1,6 +1,6 @@ - diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py similarity index 97% rename from Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py rename to Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py index 49c5f37..2082491 100644 --- a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py @@ -14,9 +14,9 @@ import cloudshell.networking.ericsson.ipos.ericsson_ipos_configuration as driver_config -class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): +class EricssonIPOSExtendedResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): def __init__(self): - super(EricssonIPOSResourceDriver, self).__init__() + super(EricssonIPOSExtendedResourceDriver, self).__init__() bootstrap = DriverBootstrap() bootstrap.add_config(driver_config) bootstrap.initialize() diff --git a/Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt similarity index 100% rename from Ericsson_IPOS_Shell_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt rename to Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt diff --git a/Ericsson_IPOS_Shell_Package/metadata.xml b/Ericsson_IPOS_Shell_Extended_Package/metadata.xml similarity index 100% rename from Ericsson_IPOS_Shell_Package/metadata.xml rename to Ericsson_IPOS_Shell_Extended_Package/metadata.xml diff --git a/Ericsson_IPOS_Shell_Package/version.txt b/Ericsson_IPOS_Shell_Extended_Package/version.txt similarity index 100% rename from Ericsson_IPOS_Shell_Package/version.txt rename to Ericsson_IPOS_Shell_Extended_Package/version.txt diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..7d28c43 --- /dev/null +++ b/__init__.py @@ -0,0 +1 @@ +__author__ = 'CoYe' diff --git a/cloudshell/networking/ericsson/ipos/autoload/__init__.py b/cloudshell/networking/ericsson/ipos/autoload/__init__.py index a006e82..3ad9513 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/__init__.py +++ b/cloudshell/networking/ericsson/ipos/autoload/__init__.py @@ -1,3 +1,2 @@ -__author__ = 'coye' from pkgutil import extend_path __path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json new file mode 100644 index 0000000..adc4be8 --- /dev/null +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json @@ -0,0 +1,97 @@ +{ + "1.3.6.1.4.1.193.218.6.9.204" : { + "linecard_model" : "ge-40-port", + "pfe_0" : { + "1GE_ports" : [ + "1-40" + ] + } + }, + "1.3.6.1.4.1.193.218.6.9.205" : { + "linecard_model" : "10ge-10-port", + "pfe_0" : { + "10GE_ports" : [ + "1-10" + ] + } + }, + "1.3.6.1.4.1.193.218.6.9.211" : { + "linecard_model" : "1-10ge-20-4-port", + "pfe_0" : { + "1GE_ports" : [ + "1-10" + ], + "10GE_ports" : [ + "21", + "23" + ] + }, + "pfe_1" : { + "1GE_ports" : [ + "11-20" + ], + "10GE_ports" : [ + "22", + "24" + ] + } + }, + "1.3.6.1.4.1.193.218.6.9.212" : { + "linecard_model" : "40-100ge-2-port", + "pfe_0" : { + "40GE_ports" : [ + "1", "2" + ], + "100GE_ports" : ["1"] + } + }, + "1.3.6.1.4.1.193.218.6.9.213" : { + "linecard_model" : "1-10ge-20port", + "pfe_0" : { + "1GE_ports" : [ + "1-10" + ], + "10GE_ports" : [ + "1-10" + ] + }, + "pfe_1" : { + "1GE_ports" : [ + "11-20" + ], + "10GE_ports" : [ + "11-20" + ] + } + }, + "1.3.6.1.4.1.193.218.6.9.214" : { + "linecard_model" : "10-100ge-2-2-port", + "pfe_0" : { + "10GE_ports" : ["1"], + "100GE_ports" : ["3", "5"] + }, + "pfe_1" : { + "10GE_ports" : ["2"], + "100GE_ports" : ["4"] + } + }, + "1.3.6.1.4.1.193.218.6.9.215" : { + "linecard_model" : "1-10ge-40-port", + "pfe_0" : { + "1GE_ports" : [ + "1-20" + ], + "10GE_ports" : [ + "1-20" + ] + }, + "pfe_1" : { + "1GE_ports" : [ + "21-40" + ], + "10GE_ports" : [ + "21-40" + ] + } + } +} \ No newline at end of file diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py similarity index 65% rename from cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py rename to cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py index 3e1fd76..79fd279 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py @@ -1,23 +1,23 @@ +import json import os import time import inject from cloudshell.configuration.cloudshell_cli_binding_keys import CLI_SERVICE -from cloudshell.networking.ericsson.autoload.ericsson_generic_snmp_autoload import EricssonGenericSNMPAutoload +from cloudshell.networking.ericsson.extended.ericsson_extended_snmp_autoload import EricssonExtendedSNMPAutoload from cloudshell.shell.core.context_utils import get_attribute_by_name -class EricssonIPOSSNMPAutoload(EricssonGenericSNMPAutoload): +class EricssonExtendedIPOSSNMPAutoload(EricssonExtendedSNMPAutoload): def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, snmp_community=None): """Basic init with injected snmp handler and logger - :param snmp_handler: - :param logger: - :return: - """ - - EricssonGenericSNMPAutoload.__init__(self, snmp_handler, logger, supported_os) + :param snmp_handler: + :param logger: + :return: + """ + super(EricssonExtendedIPOSSNMPAutoload, self).__init__(snmp_handler, logger, supported_os) self.port_ethernet_vendor_type_pattern = r'port.*\d+ge|\S+.1.193.218.6.10.251|\S+Port.251' self._cli = cli self.snmp_view = 'qualiview' @@ -28,12 +28,21 @@ def __init__(self, snmp_handler=None, logger=None, supported_os=None, cli=None, self.interface_mapping_key = 'eriRouterIpBindIfIndex' self.interface_mapping_mib = 'ERICSSON-ROUTER-IP-BIND-MIB' self.load_mib_list = ['ERICSSON-ROUTER-PRODUCT-MIB'] + self._load_configuration() if not self.snmp_community: self.snmp_community = get_attribute_by_name('SNMP Read Community') or 'qualicommunity' def load_ericsson_mib(self): - path = os.path.abspath(os.path.join(os.path.dirname(__file__), '', 'mib')) - self.snmp.update_mib_sources(path) + local_path = os.path.dirname(__file__) + mib_path = os.path.abspath(os.path.join(local_path, '', 'mib')) + + self.snmp.update_mib_sources(mib_path) + + def _load_configuration(self): + local_path = os.path.dirname(__file__) + config_path = os.path.abspath(os.path.join(local_path, '', 'ericsson_ext_ipos_autoload_config.json')) + str_config = open(config_path, 'r').read() + self.configuration = json.loads(str_config) @property def cli(self): @@ -42,22 +51,22 @@ def cli(self): return self._cli def discover(self): - try: - self._enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' - self._disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' - except: - pass - - if self._enable_snmp: - self.enable_snmp() - try: - result = self.get_autoload_details() - except Exception as e: - self.logger.error('Autoload failed: {0}'.format(e.message)) - raise Exception('EricssonGenericSNMPAutoload', e.message) - finally: - if self._disable_snmp: - self.disable_snmp() + # try: + # self._enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + # self._disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + # except: + # pass + # + # if self._enable_snmp: + # self.enable_snmp() + # try: + result = self.get_autoload_details() + # except Exception as e: + # self.logger.error('Autoload failed: {0}'.format(e.message)) + # raise Exception('EricssonGenericSNMPAutoload', e.message) + # finally: + # if self._disable_snmp: + # self.disable_snmp() return result def enable_snmp(self): diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py b/cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_configuration.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/ericsson_ipos_configuration.py rename to cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_configuration.py diff --git a/cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py b/cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_resource_driver.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/ericsson_ipos_resource_driver.py rename to cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_resource_driver.py diff --git a/cloudshell/tests/__init__.py b/cloudshell/tests/__init__.py new file mode 100644 index 0000000..0bfb5a6 --- /dev/null +++ b/cloudshell/tests/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) \ No newline at end of file diff --git a/cloudshell/tests/networking/__init__.py b/cloudshell/tests/networking/__init__.py new file mode 100644 index 0000000..0bfb5a6 --- /dev/null +++ b/cloudshell/tests/networking/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) \ No newline at end of file diff --git a/cloudshell/tests/networking/ericsson/__init__.py b/cloudshell/tests/networking/ericsson/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/cloudshell/tests/networking/ericsson/autoload/__init__.py b/cloudshell/tests/networking/ericsson/autoload/__init__.py new file mode 100644 index 0000000..7d28c43 --- /dev/null +++ b/cloudshell/tests/networking/ericsson/autoload/__init__.py @@ -0,0 +1 @@ +__author__ = 'CoYe' diff --git a/requirements.txt b/requirements.txt index dcdb8af..7506029 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -cloudshell-networking-ericsson>=1.0,<1.1 +cloudshell-networking-ericsson-extended>=1.0,<1.1 cloudshell-cli>=2.1,<2.2 cloudshell-snmp>=2.1,<2.2 cloudshell-automation-api>=7.0,<7.1 diff --git a/setup.py b/setup.py index 9ab3fc5..b8ca54f 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ required_for_tests = f_tests.read().splitlines() setup( - name='cloudshell-networking-ericsson-ipos', + name='cloudshell-networking-ericsson-ipos-extended', url='http://www.qualisystems.com/', author='QualiSystems', author_email='info@qualisystems.com', @@ -19,6 +19,6 @@ install_requires=required, tests_require=required_for_tests, version=version_from_file, - description='QualiSystems networking Ericsson IPOS specific Package', + description='QualiSystems networking Ericsson IPOS extended Package', include_package_data = True ) \ No newline at end of file From 674f0811268a9f9815810c4a5a0383233dfff9d5 Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 19 Dec 2016 11:11:05 +0200 Subject: [PATCH 29/39] adjustments to extended shell --- .../DataModel/datamodel.xml | 6 +++ .../drivermetadata.xml | 2 +- ...ericsson_ipos_extended_resource_driver.py} | 7 ++- .../requirements.txt | 2 +- .../{ipos/autoload => extended}/__init__.py | 0 .../ericsson/{ => extended}/ipos/__init__.py | 1 - .../extended/ipos/autoload/__init__.py | 2 + .../ericsson_ext_ipos_autoload_config.json | 0 .../ericsson_extended_ipos_snmp_autoload.py | 32 ++++++------ .../mib/ERICSSON-ROUTER-IP-BIND-MIB.py | 0 .../mib/ERICSSON-ROUTER-PRODUCT-MIB.py | 0 .../ipos/autoload/mib/ERICSSON-ROUTER-SMI.py | 0 .../ipos/autoload/mib/ERICSSON-ROUTER-TC.py | 0 .../ipos/autoload/mib/ERICSSON-TOP-MIB.py | 0 .../extended/ipos/autoload/mib/__init__.py | 1 + .../ericsson_extended_ipos_configuration.py | 0 .../ericsson_extended_ipos_resource_driver.py | 50 ++++++++++++++----- .../ericsson/ipos/autoload/mib/__init__.py | 0 cloudshell/tests/__init__.py | 2 +- cloudshell/tests/networking/__init__.py | 2 +- .../tests/networking/ericsson/__init__.py | 2 + .../networking/ericsson/autoload/__init__.py | 3 +- 22 files changed, 73 insertions(+), 39 deletions(-) rename Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/{ericsson_ipos_resource_driver.py => ericsson_ipos_extended_resource_driver.py} (96%) rename cloudshell/networking/ericsson/{ipos/autoload => extended}/__init__.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/__init__.py (98%) create mode 100644 cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/ericsson_ext_ipos_autoload_config.json (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py (85%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/mib/ERICSSON-ROUTER-TC.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/autoload/mib/ERICSSON-TOP-MIB.py (100%) create mode 100644 cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py rename cloudshell/networking/ericsson/{ => extended}/ipos/ericsson_extended_ipos_configuration.py (100%) rename cloudshell/networking/ericsson/{ => extended}/ipos/ericsson_extended_ipos_resource_driver.py (82%) delete mode 100644 cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py diff --git a/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml index 3874038..ffbe1a3 100644 --- a/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml @@ -85,6 +85,12 @@ + + + + + + diff --git a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml index 813a34c..bfd5845 100644 --- a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml +++ b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/drivermetadata.xml @@ -1,6 +1,6 @@ diff --git a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_extended_resource_driver.py similarity index 96% rename from Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py rename to Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_extended_resource_driver.py index 2082491..36dbbbb 100644 --- a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_resource_driver.py +++ b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/ericsson_ipos_extended_resource_driver.py @@ -3,15 +3,14 @@ from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_run_command_operations import EricssonRunCommandOperations from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations -from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload - +from cloudshell.networking.ericsson.extended.ipos.autoload.ericsson_extended_ipos_snmp_autoload import EricssonExtendedIPOSSNMPAutoload from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock -import cloudshell.networking.ericsson.ipos.ericsson_ipos_configuration as driver_config +import cloudshell.networking.ericsson.extended.ipos.ericsson_extended_ipos_configuration as driver_config class EricssonIPOSExtendedResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): @@ -98,7 +97,7 @@ def get_inventory(self, context): :rtype: string """ - autoload_operations = EricssonIPOSSNMPAutoload() + autoload_operations = EricssonExtendedIPOSSNMPAutoload() autoload_operations.logger.info('Autoload started') response = autoload_operations.discover() autoload_operations.logger.info('Autoload completed') diff --git a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt index a6bebab..094b19a 100644 --- a/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt +++ b/Ericsson_IPOS_Shell_Extended_Package/Resource Drivers - Python/Generic Ericsson IPOS Driver/requirements.txt @@ -1 +1 @@ -cloudshell-networking-ericsson-ipos>=1.0,<1.1 \ No newline at end of file +cloudshell-networking-ericsson-ipos-extended>=1.0,<1.1 \ No newline at end of file diff --git a/cloudshell/networking/ericsson/ipos/autoload/__init__.py b/cloudshell/networking/ericsson/extended/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/__init__.py rename to cloudshell/networking/ericsson/extended/__init__.py diff --git a/cloudshell/networking/ericsson/ipos/__init__.py b/cloudshell/networking/ericsson/extended/ipos/__init__.py similarity index 98% rename from cloudshell/networking/ericsson/ipos/__init__.py rename to cloudshell/networking/ericsson/extended/ipos/__init__.py index 34da70a..3ad9513 100644 --- a/cloudshell/networking/ericsson/ipos/__init__.py +++ b/cloudshell/networking/ericsson/extended/ipos/__init__.py @@ -1,3 +1,2 @@ from pkgutil import extend_path __path__ = extend_path(__path__, __name__) - diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py b/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py new file mode 100644 index 0000000..3ad9513 --- /dev/null +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/ericsson_ext_ipos_autoload_config.json rename to cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json diff --git a/cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py similarity index 85% rename from cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py index 79fd279..fd616e0 100644 --- a/cloudshell/networking/ericsson/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py @@ -51,22 +51,22 @@ def cli(self): return self._cli def discover(self): - # try: - # self._enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' - # self._disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' - # except: - # pass - # - # if self._enable_snmp: - # self.enable_snmp() - # try: - result = self.get_autoload_details() - # except Exception as e: - # self.logger.error('Autoload failed: {0}'.format(e.message)) - # raise Exception('EricssonGenericSNMPAutoload', e.message) - # finally: - # if self._disable_snmp: - # self.disable_snmp() + try: + self._enable_snmp = (get_attribute_by_name('Enable SNMP') or 'true').lower() == 'true' + self._disable_snmp = (get_attribute_by_name('Disable SNMP') or 'false').lower() == 'true' + except: + pass + + if self._enable_snmp: + self.enable_snmp() + try: + result = self.get_autoload_details() + except Exception as e: + self.logger.error('Autoload failed: {0}'.format(e.message)) + raise Exception('EricssonGenericSNMPAutoload', e.message) + finally: + if self._disable_snmp: + self.disable_snmp() return result def enable_snmp(self): diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-ROUTER-TC.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/autoload/mib/ERICSSON-TOP-MIB.py rename to cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py new file mode 100644 index 0000000..7d28c43 --- /dev/null +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py @@ -0,0 +1 @@ +__author__ = 'CoYe' diff --git a/cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_configuration.py b/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py similarity index 100% rename from cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_configuration.py rename to cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py diff --git a/cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_resource_driver.py b/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py similarity index 82% rename from cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_resource_driver.py rename to cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py index 3af60ec..36dbbbb 100644 --- a/cloudshell/networking/ericsson/ipos/ericsson_extended_ipos_resource_driver.py +++ b/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py @@ -3,20 +3,19 @@ from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations from cloudshell.networking.ericsson.ericsson_run_command_operations import EricssonRunCommandOperations from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations -from cloudshell.networking.ericsson.ipos.autoload.ericsson_ipos_snmp_autoload import EricssonIPOSSNMPAutoload - +from cloudshell.networking.ericsson.extended.ipos.autoload.ericsson_extended_ipos_snmp_autoload import EricssonExtendedIPOSSNMPAutoload from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface from cloudshell.shell.core.context_utils import context_from_args from cloudshell.shell.core.driver_bootstrap import DriverBootstrap from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface from cloudshell.shell.core.driver_utils import GlobalLock -import cloudshell.networking.ericsson.ipos.ericsson_ipos_configuration as driver_config +import cloudshell.networking.ericsson.extended.ipos.ericsson_extended_ipos_configuration as driver_config -class EricssonIPOSResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): +class EricssonIPOSExtendedResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): def __init__(self): - super(EricssonIPOSResourceDriver, self).__init__() + super(EricssonIPOSExtendedResourceDriver, self).__init__() bootstrap = DriverBootstrap() bootstrap.add_config(driver_config) bootstrap.initialize() @@ -98,7 +97,7 @@ def get_inventory(self, context): :rtype: string """ - autoload_operations = EricssonIPOSSNMPAutoload() + autoload_operations = EricssonExtendedIPOSSNMPAutoload() autoload_operations.logger.info('Autoload started') response = autoload_operations.discover() autoload_operations.logger.info('Autoload completed') @@ -120,7 +119,7 @@ def load_firmware(self, context, path, vrf_management_name=None): firmware_operations.logger.info(response) @context_from_args - def send_custom_command(self, context, custom_command): + def run_custom_command(self, context, custom_command): """Send custom command :return: result @@ -128,9 +127,30 @@ def send_custom_command(self, context, custom_command): """ send_command_operations = EricssonRunCommandOperations() - response = send_command_operations.send_command(command=custom_command) + response = send_command_operations.run_custom_command(command=custom_command) return response + @context_from_args + def health_check(self, context): + """Performs device health check + + """ + + state_operations = EricssonStateOperations() + return state_operations.health_check() + + @context_from_args + def run_custom_config_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + result_str = send_command_operations.run_custom_config_command(command=custom_command) + return result_str + @GlobalLock.lock @context_from_args def update_firmware(self, context, remote_host, file_path): @@ -147,13 +167,16 @@ def update_firmware(self, context, remote_host, file_path): firmware_operations.logger.info(response) @context_from_args - def health_check(self, context): - """Performs device health check + def send_custom_command(self, context, custom_command): + """Send custom command in configuration mode + :return: result + :rtype: string """ - state_operations = EricssonStateOperations() - return state_operations.health_check() + send_command_operations = EricssonRunCommandOperations() + response = send_command_operations.run_custom_command(command=custom_command) + return response @context_from_args def send_custom_config_command(self, context, custom_command): @@ -162,8 +185,9 @@ def send_custom_config_command(self, context, custom_command): :return: result :rtype: string """ + send_command_operations = EricssonRunCommandOperations() - result_str = send_command_operations.send_config_command(command=custom_command) + result_str = send_command_operations.run_custom_config_command(command=custom_command) return result_str @context_from_args diff --git a/cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py b/cloudshell/networking/ericsson/ipos/autoload/mib/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/cloudshell/tests/__init__.py b/cloudshell/tests/__init__.py index 0bfb5a6..3ad9513 100644 --- a/cloudshell/tests/__init__.py +++ b/cloudshell/tests/__init__.py @@ -1,2 +1,2 @@ from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) \ No newline at end of file +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/tests/networking/__init__.py b/cloudshell/tests/networking/__init__.py index 0bfb5a6..3ad9513 100644 --- a/cloudshell/tests/networking/__init__.py +++ b/cloudshell/tests/networking/__init__.py @@ -1,2 +1,2 @@ from pkgutil import extend_path -__path__ = extend_path(__path__, __name__) \ No newline at end of file +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/tests/networking/ericsson/__init__.py b/cloudshell/tests/networking/ericsson/__init__.py index e69de29..3ad9513 100644 --- a/cloudshell/tests/networking/ericsson/__init__.py +++ b/cloudshell/tests/networking/ericsson/__init__.py @@ -0,0 +1,2 @@ +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) diff --git a/cloudshell/tests/networking/ericsson/autoload/__init__.py b/cloudshell/tests/networking/ericsson/autoload/__init__.py index 7d28c43..3ad9513 100644 --- a/cloudshell/tests/networking/ericsson/autoload/__init__.py +++ b/cloudshell/tests/networking/ericsson/autoload/__init__.py @@ -1 +1,2 @@ -__author__ = 'CoYe' +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__) From b6628cd42323a402f2add819a2f7b01f98ea73cc Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 19 Dec 2016 11:19:23 +0200 Subject: [PATCH 30/39] added run_ipos to git_ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 03169e5..013ea53 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ cloudshell/networking/ericsson/ipos/autoload/test.py cloudshell_networking_ericsson_ipos_extended.egg-info Ericsson_IPOS_Shell_Extended_Package.zip cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py +cloudshell/networking/ericsson/extended/ipos/run_ipos.py From 49cfa860eaf9e2091631583c54314ce9dd308188 Mon Sep 17 00:00:00 2001 From: CoYe Date: Mon, 19 Dec 2016 18:43:50 +0200 Subject: [PATCH 31/39] change config --- MANIFEST.in | 3 ++- .../autoload/ericsson_ext_ipos_autoload_config.json | 12 ++++++++++++ version.txt | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 048e252..9b1e748 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,3 @@ include *.txt -global-include *.ini \ No newline at end of file +global-include *.ini +global-include *.json diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json index adc4be8..8a12c88 100644 --- a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json @@ -36,6 +36,18 @@ ] } }, + "1.3.6.1.4.1.193.218.6.9.252" : { + "linecard_model" : "1-100ge-24-2-port", + "pfe_0" : { + "1GE_ports" : [ + "1-24" + ], + "100GE_ports" : [ + "23", + "24" + ] + } + }, "1.3.6.1.4.1.193.218.6.9.212" : { "linecard_model" : "40-100ge-2-port", "pfe_0" : { diff --git a/version.txt b/version.txt index afaf360..7f20734 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.0 \ No newline at end of file +1.0.1 \ No newline at end of file From e971914733e45179e3f26edcb04f855ff9b0598a Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 16:07:39 +0200 Subject: [PATCH 32/39] updated mibs --- .../DataModel/datamodel.xml | 21 +- .../mib/ERICSSON-ROUTER-PRODUCT-MIB.py | 390 +++++++++++++++++- .../ipos/autoload/mib/ERICSSON-ROUTER-SMI.py | 38 +- .../ipos/autoload/mib/ERICSSON-TOP-MIB.py | 31 +- 4 files changed, 419 insertions(+), 61 deletions(-) diff --git a/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml index ffbe1a3..aaefa6b 100644 --- a/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml +++ b/Ericsson_IPOS_Shell_Extended_Package/DataModel/datamodel.xml @@ -476,6 +476,7 @@ 1-10ge-20-port 10-100ge-2-2-port 1-10ge-40-port + 1-100ge-24-2-port ssc1 ssc1-v2 ssc2-a @@ -485,28 +486,10 @@ alsw alswt alsw2 + rp rpsw rpsw-v2 rpsw2 - atm-oc3e-8-port - atm-oc12e-2-port - oc3e-8-port - oc12e-4-port - oc48e-4-port - oc192-1-port - ch-oc3oc12-8or2-port - fege-60-2-port - ge-10-port - ge-20-port - ge3-4-port - ge-5-port - ge2-10-port - ge4-20-port - 10ge-1-port - 10ge-4-port - 10ge-oc192-1-port - ase - sse diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py index 94bdc7b..73389ed 100644 --- a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py @@ -1,18 +1,97 @@ # # PySNMP MIB module ERICSSON-ROUTER-PRODUCT-MIB (http://pysnmp.sf.net) -# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-PRODUCT-MIB.my -# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# ASN.1 source file://C:\MIBS\text_mibs\ERICSSON-ROUTER-PRODUCT-MIB.my +# Produced by pysmi-0.0.6 at Tue Dec 20 11:45:36 2016 # On host ? platform ? version ? by user ? -# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# Using Python version 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] # -( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") -( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") -( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") -( eriRouterProducts, eriRouterEntities, eriRouterModules, ) = mibBuilder.importSymbols("ERICSSON-ROUTER-SMI", "eriRouterProducts", "eriRouterEntities", "eriRouterModules") -( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") -( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") -( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") -eriRouterProductMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5, 1)).setRevisions(("2016-05-19 18:00", "2015-01-14 18:00", "2014-09-22 18:00", "2013-10-17 18:00", "2013-09-16 18:00", "2013-06-19 18:00", "2013-04-18 18:00", "2013-01-14 18:00", "2012-06-25 18:00", "2012-03-19 18:00", "2012-02-10 18:00", "2011-06-02 18:00", "2011-01-19 18:00", "2010-10-01 00:00", "2010-08-27 00:00", "2010-04-01 00:00", "2010-01-27 00:00", "2009-10-05 00:00", "2009-09-24 00:00", "2009-09-13 00:00", "2009-09-10 00:00", "2009-07-16 00:00", "2009-02-04 00:00", "2009-01-20 00:00", "2008-09-23 00:00", "2008-07-02 00:00", "2008-05-20 00:00", "2008-05-08 00:00", "2007-09-20 00:00", "2007-08-08 00:00", "2007-05-09 00:00", "2007-02-28 00:00", "2007-02-14 00:00", "2007-02-05 00:00", "2005-12-27 00:00", "2005-03-01 00:00", "2004-11-05 00:00", "2004-05-11 00:00", "2003-09-25 00:00", "2003-07-24 00:00", "2003-05-19 17:00", "2003-05-05 00:00", "2003-03-25 00:00", "2002-06-13 00:00", "2002-06-06 00:00", "2001-12-12 00:00", "2001-09-26 17:00", "2001-07-25 10:00", "2001-05-15 15:07", "2001-05-04 16:42", "2001-02-13 18:57", "2001-02-13 10:07", "2001-02-01 17:07", "2001-01-05 18:34", "2000-12-28 17:04", "2000-11-15 17:04", "2000-11-02 14:54", "2000-10-25 15:23", "2000-10-20 17:30", "2000-09-26 13:30", "2000-09-25 11:20", "2000-07-19 15:44", "2000-07-06 21:50", "2000-06-16 17:00", "2000-06-13 17:00", "2000-05-18 00:00", "1999-07-08 17:12", "1998-08-05 19:00",)) +(Integer, ObjectIdentifier, OctetString,) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", + "OctetString") +(NamedValues,) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +(ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, + ValueRangeConstraint,) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", + "ConstraintsIntersection", "ValueSizeConstraint", + "ValueRangeConstraint") +(eriRouterProducts, eriRouterEntities, eriRouterModules,) = mibBuilder.importSymbols("ERICSSON-ROUTER-SMI", + "eriRouterProducts", + "eriRouterEntities", + "eriRouterModules") +(NotificationGroup, ModuleCompliance,) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", + "ModuleCompliance") +(Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, + Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32,) = mibBuilder.importSymbols( + "SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", + "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", + "ObjectIdentity", "Bits", "Counter32") +(DisplayString, TextualConvention,) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterProductMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5, 1)).setRevisions(("2015-08-25 18:00", + "2015-01-14 18:00", + "2014-09-22 18:00", + "2013-10-17 18:00", + "2013-09-16 18:00", + "2013-06-19 18:00", + "2013-04-18 18:00", + "2013-01-14 18:00", + "2012-06-25 18:00", + "2012-03-19 18:00", + "2012-02-10 18:00", + "2011-06-02 18:00", + "2011-01-19 18:00", + "2010-10-01 00:00", + "2010-08-27 00:00", + "2010-04-01 00:00", + "2010-01-27 00:00", + "2009-10-05 00:00", + "2009-09-24 00:00", + "2009-09-13 00:00", + "2009-09-10 00:00", + "2009-07-16 00:00", + "2009-02-04 00:00", + "2009-01-20 00:00", + "2008-09-23 00:00", + "2008-07-02 00:00", + "2008-05-20 00:00", + "2008-05-08 00:00", + "2007-09-20 00:00", + "2007-08-08 00:00", + "2007-05-09 00:00", + "2007-02-28 00:00", + "2007-02-14 00:00", + "2007-02-05 00:00", + "2005-12-27 00:00", + "2005-03-01 00:00", + "2004-11-05 00:00", + "2004-05-11 00:00", + "2003-09-25 00:00", + "2003-07-24 00:00", + "2003-05-19 17:00", + "2003-05-05 00:00", + "2003-03-25 00:00", + "2002-06-13 00:00", + "2002-06-06 00:00", + "2001-12-12 00:00", + "2001-09-26 17:00", + "2001-07-25 10:00", + "2001-05-15 15:07", + "2001-05-04 16:42", + "2001-02-13 18:57", + "2001-02-13 10:07", + "2001-02-01 17:07", + "2001-01-05 18:34", + "2000-12-28 17:04", + "2000-11-15 17:04", + "2000-11-02 14:54", + "2000-10-25 15:23", + "2000-10-20 17:30", + "2000-09-26 13:30", + "2000-09-25 11:20", + "2000-07-19 15:44", + "2000-07-06 21:50", + "2000-06-16 17:00", + "2000-06-13 17:00", + "2000-05-18 00:00", + "1999-07-08 17:12", + "1998-08-05 19:00",)) eriRouterSMS1000 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 1)) eriRouterSMS500 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 2)) eriRouterSMS1800 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 3)) @@ -29,7 +108,9 @@ eriRouterSSR8004 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 19)) eriRouterSP415 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 20)) eriRouterSP420 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 21)) -eriRouterEVR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 22)) +eriRouterIposRefChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 22)) +eriRouterIposRefPizza = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 23)) +eriRouterSSR8801 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1, 30)) eriRouterEntityTypeOther = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 1)) eriRouterEntityTypeUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 2)) eriRouterEntityTypeChassis = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3)) @@ -50,7 +131,6 @@ eriRouterEntChassisSSR8004 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 16)) eriRouterEntChassisSP415 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 17)) eriRouterEntChassisSP420 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 18)) -eriRouterEntChassisEVR = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 3, 19)) eriRouterEntityTypeBackplane = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4)) eriRouterEntBackplaneSMS1000Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 1)) eriRouterEntBackplaneSMS1000Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 2)) @@ -72,7 +152,6 @@ eriRouterEntBackplaneSSR8004Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 20)) eriRouterEntBackplaneSP415Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 21)) eriRouterEntBackplaneSP420Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 22)) -eriRouterEntBackplaneEVRVirtual = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 4, 23)) eriRouterEntityTypeContainer = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5)) eriRouterEntContainerSMS1000Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 1)) eriRouterEntContainerSMS1000Power = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 2)) @@ -105,7 +184,6 @@ eriRouterEntContainerSPSC1FanTray = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 32)) eriRouterEntContainerSPSC1PowerModule = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 33)) eriRouterEntContainerSPSC1Data = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 34)) -eriRouterEntContainerEVRData = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 5, 35)) eriRouterEntityTypePowerSupply = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6)) eriRouterEntPowerSupplyUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 1)) eriRouterEntPowerSupplySMS1000AC = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 6, 2)) @@ -233,8 +311,6 @@ eriRouterEntModuleSPSC116Port1GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 215)) eriRouterEntModuleSPSC120and2Port1and10GE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 216)) eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 217)) -eriRouterEntModuleEVR1PortVirtualForwarder = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 219)) -eriRouterEntModuleEVRVirtualSmartServicesCard = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 9, 222)) eriRouterEntityTypePort = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10)) eriRouterEntPortUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 1)) eriRouterEntPortSMSCE1MGMT = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 16)) @@ -307,7 +383,6 @@ eriRouterEntPortSPSC1AlarmIn = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 210)) eriRouterEntPortSPSC1AlarmOut = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 211)) eriRouterEntPortSSR20POSOCorOC12orOC48orOC192 = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 212)) -eriRouterEntPortEVRVirtual = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 10, 213)) eriRouterEntityTypeStack = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 11)) eriRouterEntityTypeCPU = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 12)) eriRouterEntCpuUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 12, 1)) @@ -316,5 +391,280 @@ eriRouterEntDiskUnknown = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 13, 1)) eriRouterEntDiskSSE = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 13, 2)) eriRouterEntityTypeMemory = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6, 14)) -mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSMSAIME3=eriRouterEntPortSMSAIME3, eriRouterEntModuleSE100FXMIC=eriRouterEntModuleSE100FXMIC, eriRouterEntModuleSM20PortGIGE=eriRouterEntModuleSM20PortGIGE, eriRouterEntPortSMSAIMDS3=eriRouterEntPortSMSAIMDS3, eriRouterEntContainerSMS10000Fabric=eriRouterEntContainerSMS10000Fabric, eriRouterEntPortSEE1=eriRouterEntPortSEE1, eriRouterEntFanSM480=eriRouterEntFanSM480, eriRouterEntFanSE600=eriRouterEntFanSE600, eriRouterEntContainerEVRData=eriRouterEntContainerEVRData, eriRouterEntPortSPSC1SCMgmt=eriRouterEntPortSPSC1SCMgmt, eriRouterEntityTypeFan=eriRouterEntityTypeFan, eriRouterEntFanSE1200=eriRouterEntFanSE1200, eriRouterEntModuleSMSEIM=eriRouterEntModuleSMSEIM, eriRouterEntContainerSE800Data=eriRouterEntContainerSE800Data, eriRouterEntPortSMSPIMDS1=eriRouterEntPortSMSPIMDS1, eriRouterSmartEdge1200=eriRouterSmartEdge1200, eriRouterEntPortSECHSTM1E1=eriRouterEntPortSECHSTM1E1, eriRouterSMS1000=eriRouterSMS1000, eriRouterEntModuleSEPos4xOC12=eriRouterEntModuleSEPos4xOC12, eriRouterEntChassisSP420=eriRouterEntChassisSP420, eriRouterEntBackplaneSMS1800Power=eriRouterEntBackplaneSMS1800Power, eriRouterEntModuleSEXC3=eriRouterEntModuleSEXC3, eriRouterEntChassisSE1200H=eriRouterEntChassisSE1200H, eriRouterEntModuleSSRALSW=eriRouterEntModuleSSRALSW, eriRouterEntPortSMSCE2MGMT=eriRouterEntPortSMSCE2MGMT, eriRouterEntityTypeSensor=eriRouterEntityTypeSensor, eriRouterEntPortSEGIGETM=eriRouterEntPortSEGIGETM, eriRouterEntModuleSMSIPSEC=eriRouterEntModuleSMSIPSEC, eriRouterEntBackplaneSP420Data=eriRouterEntBackplaneSP420Data, eriRouterEntPortSMSPIMHSSI=eriRouterEntPortSMSPIMHSSI, eriRouterEntityTypeContainer=eriRouterEntityTypeContainer, eriRouterEntModuleSM8OR2PORTCHOC3OC12=eriRouterEntModuleSM8OR2PORTCHOC3OC12, eriRouterEntPortUnknown=eriRouterEntPortUnknown, eriRouterEntModuleSEAIMOC12=eriRouterEntModuleSEAIMOC12, eriRouterEntChassisSM240=eriRouterEntChassisSM240, eriRouterEntPortSPSC1AlarmIn=eriRouterEntPortSPSC1AlarmIn, eriRouterEntModuleSEE1=eriRouterEntModuleSEE1, eriRouterEntPortSEE3=eriRouterEntPortSEE3, eriRouterEntModuleSMRP2=eriRouterEntModuleSMRP2, eriRouterEntContainerSE100Carrier=eriRouterEntContainerSE100Carrier, eriRouterEntModuleSM10GIGEIM=eriRouterEntModuleSM10GIGEIM, eriRouterEntChassisSE100=eriRouterEntChassisSE100, eriRouterEntContainerSSR8010PowerModule=eriRouterEntContainerSSR8010PowerModule, eriRouterEntModuleSMSAIME3=eriRouterEntModuleSMSAIME3, eriRouterEntPortSEPOSOC12=eriRouterEntPortSEPOSOC12, eriRouterEntModuleSEPos8xOC3=eriRouterEntModuleSEPos8xOC3, eriRouterSMS10000=eriRouterSMS10000, eriRouterEntModuleSEXC4=eriRouterEntModuleSEXC4, eriRouterEntPortSMSPOSOC12=eriRouterEntPortSMSPOSOC12, eriRouterEntFanTrayAlarmIOSPSC1=eriRouterEntFanTrayAlarmIOSPSC1, eriRouterEntContainerSSR8020Data=eriRouterEntContainerSSR8020Data, eriRouterEntPortSM10GIGEIM=eriRouterEntPortSM10GIGEIM, eriRouterEntPortSEAIMOC12=eriRouterEntPortSEAIMOC12, eriRouterEntBackplaneSE800Data=eriRouterEntBackplaneSE800Data, eriRouterEntPortSECHDS3=eriRouterEntPortSECHDS3, eriRouterEntModuleSMSCE3=eriRouterEntModuleSMSCE3, eriRouterEntityTypePowerSupply=eriRouterEntityTypePowerSupply, eriRouterEntPortSSR40GEor100GE=eriRouterEntPortSSR40GEor100GE, eriRouterEntModuleSPSC18PortCES=eriRouterEntModuleSPSC18PortCES, eriRouterEntModuleSMSFE1=eriRouterEntModuleSMSFE1, eriRouterEntPowerSupplySMS1800DC=eriRouterEntPowerSupplySMS1800DC, eriRouterEntModuleSMSSM=eriRouterEntModuleSMSSM, eriRouterEntPowerSupplySMS1000AC=eriRouterEntPowerSupplySMS1000AC, eriRouterEntBackplaneSSR8004Data=eriRouterEntBackplaneSSR8004Data, eriRouterEntContainerSMS1000Data=eriRouterEntContainerSMS1000Data, eriRouterEntBackplaneSMS1000Power=eriRouterEntBackplaneSMS1000Power, eriRouterEntityTypeModule=eriRouterEntityTypeModule, eriRouterEntPortSSRRPSWMgmt=eriRouterEntPortSSRRPSWMgmt, eriRouterEntCpuUnknown=eriRouterEntCpuUnknown, eriRouterEntBackplaneSM240Data=eriRouterEntBackplaneSM240Data, eriRouterEntContainerSE1200Data=eriRouterEntContainerSE1200Data, eriRouterEntContainerSPSC1FanTray=eriRouterEntContainerSPSC1FanTray, eriRouterEntContainerSE400Data=eriRouterEntContainerSE400Data, eriRouterEntModuleSEPOSOC48=eriRouterEntModuleSEPOSOC48, eriRouterEntModuleSMSXFE=eriRouterEntModuleSMSXFE, eriRouterEntModuleSEAIMOC3=eriRouterEntModuleSEAIMOC3, eriRouterEntModuleSMSPIMHSSI=eriRouterEntModuleSMSPIMHSSI, eriRouterEntPortSMSAIME1=eriRouterEntPortSMSAIME1, eriRouterEntPortSEXC4MGMT=eriRouterEntPortSEXC4MGMT, eriRouterEntBackplaneSE400Data=eriRouterEntBackplaneSE400Data, eriRouterEntModuleSMGIGEIM=eriRouterEntModuleSMGIGEIM, eriRouterEntModuleSMSAIMDS3=eriRouterEntModuleSMSAIMDS3, eriRouterEntFanTraySPSC1=eriRouterEntFanTraySPSC1, eriRouterEntModuleSMSPIMCDS3=eriRouterEntModuleSMSPIMCDS3, eriRouterSMS1800=eriRouterSMS1800, eriRouterEntContainerSMS1800Power=eriRouterEntContainerSMS1800Power, eriRouterEntPortSMSAIMT1=eriRouterEntPortSMSAIMT1, eriRouterSmartEdge800=eriRouterSmartEdge800, eriRouterEntFanSE400=eriRouterEntFanSE400, eriRouterEntModuleSE4PortOC48=eriRouterEntModuleSE4PortOC48, eriRouterEntContainerSPSC1PowerModule=eriRouterEntContainerSPSC1PowerModule, eriRouterEntModuleEVR1PortVirtualForwarder=eriRouterEntModuleEVR1PortVirtualForwarder, eriRouterEntPortSE100AIMOC3=eriRouterEntPortSE100AIMOC3, eriRouterEntPortSSR1GE=eriRouterEntPortSSR1GE, eriRouterEntModuleSMSAIMOC12=eriRouterEntModuleSMSAIMOC12, eriRouterEntFanSE800=eriRouterEntFanSE800, eriRouterEntPortSECHOC12DS1=eriRouterEntPortSECHOC12DS1, eriRouterEntBackplaneSM480Data=eriRouterEntBackplaneSM480Data, eriRouterEntDiskSSE=eriRouterEntDiskSSE, eriRouterEntModuleUnknown=eriRouterEntModuleUnknown, eriRouterEntModuleSMGIGETM=eriRouterEntModuleSMGIGETM, eriRouterEntPortSMCHOC3OC12=eriRouterEntPortSMCHOC3OC12, eriRouterSmartEdge100=eriRouterSmartEdge100, eriRouterEntPowerSupplySMS500DC=eriRouterEntPowerSupplySMS500DC, eriRouterEntModuleSEAIMDS3=eriRouterEntModuleSEAIMDS3, eriRouterEntPortSMSAIMOC12=eriRouterEntPortSMSAIMOC12, eriRouterEntModuleSECHDS3=eriRouterEntModuleSECHDS3, eriRouterEntContainerSM240Data=eriRouterEntContainerSM240Data, eriRouterEntPortSE100GEFXIM=eriRouterEntPortSE100GEFXIM, eriRouterSmartEdge600=eriRouterSmartEdge600, eriRouterEntChassisEVR=eriRouterEntChassisEVR, eriRouterEntPortSEEIM=eriRouterEntPortSEEIM, eriRouterEntChassisSM480=eriRouterEntChassisSM480, eriRouterEntPortSE10GIGETM=eriRouterEntPortSE10GIGETM, eriRouterEntPortSE100FXIM=eriRouterEntPortSE100FXIM, eriRouterEntChassisSE800=eriRouterEntChassisSE800, eriRouterEntModuleSMSPIME1=eriRouterEntModuleSMSPIME1, eriRouterEntityTypeDisk=eriRouterEntityTypeDisk, eriRouterEntContainerSSR8010Data=eriRouterEntContainerSSR8010Data, eriRouterSMS500=eriRouterSMS500, eriRouterEntPortSEPOSOC192=eriRouterEntPortSEPOSOC192, eriRouterEntModuleSE8PortOC3=eriRouterEntModuleSE8PortOC3, eriRouterEntModuleSEPOSOC12=eriRouterEntModuleSEPOSOC12, eriRouterProductMIB=eriRouterProductMIB, eriRouterEntBackplaneSMS1800Data=eriRouterEntBackplaneSMS1800Data, eriRouterEntPortSMCHOC3=eriRouterEntPortSMCHOC3, eriRouterEntBackplaneSP415Data=eriRouterEntBackplaneSP415Data, eriRouterEntContainerSMS1000Power=eriRouterEntContainerSMS1000Power, eriRouterEntityTypeOther=eriRouterEntityTypeOther, eriRouterEntPowerModuleSPSC1DC=eriRouterEntPowerModuleSPSC1DC, eriRouterEntModuleSMSPOSOC3=eriRouterEntModuleSMSPOSOC3, eriRouterSM240=eriRouterSM240, eriRouterEntModuleSPSC120and2Port1and10GE=eriRouterEntModuleSPSC120and2Port1and10GE, eriRouterEntModuleSPSC116Port1GE=eriRouterEntModuleSPSC116Port1GE, eriRouterEntModuleSSR20Port1GEor10GE=eriRouterEntModuleSSR20Port1GEor10GE, eriRouterEntBackplaneSE1200HData=eriRouterEntBackplaneSE1200HData, eriRouterEntContainerSSR8010FanTray=eriRouterEntContainerSSR8010FanTray, eriRouterEntPortSEAIMOC3=eriRouterEntPortSEAIMOC3, eriRouterEntPortSMSCE1MGMT=eriRouterEntPortSMSCE1MGMT, eriRouterEntPortSE100EIM=eriRouterEntPortSE100EIM, eriRouterEntModuleSECHOC12DS1=eriRouterEntModuleSECHOC12DS1, eriRouterEntPortSEAIMDS3=eriRouterEntPortSEAIMDS3, eriRouterEntChassisSSR8004=eriRouterEntChassisSSR8004, eriRouterEntChassisSE400=eriRouterEntChassisSE400, eriRouterEntSensorAlarmSM240=eriRouterEntSensorAlarmSM240, eriRouterEntPowerSupplySMS1000DC=eriRouterEntPowerSupplySMS1000DC, eriRouterEntModuleSEPOSOC192=eriRouterEntModuleSEPOSOC192, eriRouterEntContainerSSR8020PowerModule=eriRouterEntContainerSSR8020PowerModule, eriRouterEntModuleSE100EMIC=eriRouterEntModuleSE100EMIC, eriRouterEntModuleSM4Port10GIGE=eriRouterEntModuleSM4Port10GIGE, eriRouterEntPortSMSPOSOC3=eriRouterEntPortSMSPOSOC3, eriRouterEntSensorAlarmSE600=eriRouterEntSensorAlarmSE600, eriRouterEntityTypeChassis=eriRouterEntityTypeChassis, eriRouterEntModuleSE100AIMOC3MIC=eriRouterEntModuleSE100AIMOC3MIC, eriRouterEntModuleSM1Port10GEOC192=eriRouterEntModuleSM1Port10GEOC192, eriRouterEntContainerSSR8020FanTray=eriRouterEntContainerSSR8020FanTray, eriRouterEntSensorAlarmSE400=eriRouterEntSensorAlarmSE400, eriRouterSP420=eriRouterSP420, eriRouterEntPortSM10GIGETM=eriRouterEntPortSM10GIGETM, eriRouterEntModuleSSC2=eriRouterEntModuleSSC2, eriRouterEntChassisSE1200=eriRouterEntChassisSE1200, eriRouterEntPowerModuleSPSC1AC=eriRouterEntPowerModuleSPSC1AC, eriRouterEntModuleSE100GERJMIC=eriRouterEntModuleSE100GERJMIC, eriRouterEntPortSMSEIM=eriRouterEntPortSMSEIM, eriRouterEntPortSE10GIGEIM=eriRouterEntPortSE10GIGEIM, eriRouterEntBackplaneSMS500Power=eriRouterEntBackplaneSMS500Power, eriRouterEntPortSPSC1AlarmOut=eriRouterEntPortSPSC1AlarmOut, eriRouterEntModuleSEASE=eriRouterEntModuleSEASE, eriRouterEntPortSEAIMOC12E=eriRouterEntPortSEAIMOC12E, eriRouterEntModuleSMSFABRIC=eriRouterEntModuleSMSFABRIC, eriRouterEntDiskUnknown=eriRouterEntDiskUnknown, eriRouterEntModuleSSR2Port40GEor100GE=eriRouterEntModuleSSR2Port40GEor100GE, eriRouterEntPowerSupplySMS500AC=eriRouterEntPowerSupplySMS500AC, eriRouterSM480=eriRouterSM480, eriRouterEntModuleSEAtm2xOC12=eriRouterEntModuleSEAtm2xOC12, eriRouterEntBackplaneSMS1000Data=eriRouterEntBackplaneSMS1000Data, eriRouterEntModuleSMSPIMDS1=eriRouterEntModuleSMSPIMDS1, eriRouterEntModuleSMSFE2=eriRouterEntModuleSMSFE2, eriRouterEntPortSEPOSOC48=eriRouterEntPortSEPOSOC48, eriRouterEntPortSSR40GE=eriRouterEntPortSSR40GE, eriRouterEntContainerSSR8004PowerModule=eriRouterEntContainerSSR8004PowerModule, eriRouterEntPortSE100XCMGMT=eriRouterEntPortSE100XCMGMT, eriRouterEntModuleSMSAIMOC3=eriRouterEntModuleSMSAIMOC3, eriRouterEntContainerSM480Data=eriRouterEntContainerSM480Data, eriRouterEntPowerSupplyUnknown=eriRouterEntPowerSupplyUnknown, eriRouterEntityTypeMemory=eriRouterEntityTypeMemory, eriRouterEntContainerSMS10000IO=eriRouterEntContainerSMS10000IO, eriRouterEntModuleSSR20Port1GEor4Port10GE=eriRouterEntModuleSSR20Port1GEor4Port10GE, eriRouterEntityTypeBackplane=eriRouterEntityTypeBackplane, eriRouterSmartEdge400=eriRouterSmartEdge400, eriRouterEntPortSEGIGEIM=eriRouterEntPortSEGIGEIM, eriRouterEntModuleSMSFE3=eriRouterEntModuleSMSFE3, eriRouterEntBackplaneSMS500Data=eriRouterEntBackplaneSMS500Data, eriRouterEntModuleSSC1=eriRouterEntModuleSSC1, eriRouterEntModuleSE10GIGETM=eriRouterEntModuleSE10GIGETM, eriRouterEntContainerSMS500Data=eriRouterEntContainerSMS500Data, eriRouterEntModuleSMSGIGEIM=eriRouterEntModuleSMSGIGEIM, eriRouterEntContainerSSR8004Data=eriRouterEntContainerSSR8004Data, eriRouterEntModuleSEEIM=eriRouterEntModuleSEEIM, eriRouterEntityTypeUnknown=eriRouterEntityTypeUnknown, eriRouterEntModuleSEPOSOC3=eriRouterEntModuleSEPOSOC3, eriRouterEntBackplaneSSR8010Data=eriRouterEntBackplaneSSR8010Data, eriRouterEntPortSMGIGEIM=eriRouterEntPortSMGIGEIM, eriRouterEntChassisSSR8010=eriRouterEntChassisSSR8010, eriRouterEntPortSECHOC12DS3=eriRouterEntPortSECHOC12DS3, eriRouterSSR8010=eriRouterSSR8010, eriRouterEntityTypeStack=eriRouterEntityTypeStack, eriRouterEntBackplaneEVRVirtual=eriRouterEntBackplaneEVRVirtual, eriRouterEntModuleSMSCE1=eriRouterEntModuleSMSCE1, eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192=eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192, eriRouterEntModuleSECHOC12DS3=eriRouterEntModuleSECHOC12DS3, eriRouterEntContainerSPSC1Data=eriRouterEntContainerSPSC1Data, eriRouterEntModuleSMSCM=eriRouterEntModuleSMSCM, eriRouterEntPortSMEIM=eriRouterEntPortSMEIM, eriRouterEntModuleSEXC=eriRouterEntModuleSEXC, eriRouterEntModuleSECHSTM1E1=eriRouterEntModuleSECHSTM1E1, eriRouterEntPowerSupplySMS1800AC=eriRouterEntPowerSupplySMS1800AC, eriRouterEntContainerSMS1800Data=eriRouterEntContainerSMS1800Data, eriRouterEntModuleSMSAIME1=eriRouterEntModuleSMSAIME1, eriRouterEntPortSMSAIMOC3=eriRouterEntPortSMSAIMOC3, eriRouterEntPortSMSPIME1=eriRouterEntPortSMSPIME1, eriRouterEntContainerSSR8004FanTray=eriRouterEntContainerSSR8004FanTray, eriRouterEntPowerModuleSSR=eriRouterEntPowerModuleSSR, eriRouterEntCpuOcteon=eriRouterEntCpuOcteon, eriRouterEntPortSMSCE3MGMT=eriRouterEntPortSMSCE3MGMT, eriRouterEntModuleSMSPIMDS3=eriRouterEntModuleSMSPIMDS3, eriRouterEntModuleSEFE60GE2=eriRouterEntModuleSEFE60GE2, eriRouterEntModuleSE4Port10GIGE=eriRouterEntModuleSE4Port10GIGE, eriRouterEntModuleSE5PortGIGE=eriRouterEntModuleSE5PortGIGE, eriRouterEntContainerSE100Data=eriRouterEntContainerSE100Data, eriRouterEntityTypeCPU=eriRouterEntityTypeCPU, eriRouterEntChassisSMS10000=eriRouterEntChassisSMS10000, eriRouterEntModuleSMSCE2=eriRouterEntModuleSMSCE2, eriRouterEntModuleSSRSW=eriRouterEntModuleSSRSW, eriRouterEntPortSEPOSOC3=eriRouterEntPortSEPOSOC3, eriRouterEntModuleSEAIMOC12E=eriRouterEntModuleSEAIMOC12E, eriRouterEntContainerSMS10000Timing=eriRouterEntContainerSMS10000Timing, eriRouterEntModuleSM10PortGIGEDDR2=eriRouterEntModuleSM10PortGIGEDDR2, eriRouterEntModuleSE10PortGIGEDDR2=eriRouterEntModuleSE10PortGIGEDDR2, eriRouterEntPortSPSC11GE=eriRouterEntPortSPSC11GE, eriRouterEntModuleSM10GIGETM=eriRouterEntModuleSM10GIGETM, eriRouterEntModuleSESSE=eriRouterEntModuleSESSE, eriRouterEntModuleSE10GIGEIM=eriRouterEntModuleSE10GIGEIM, eriRouterEntPortSECHOC3=eriRouterEntPortSECHOC3, eriRouterEntPortSMSPIME3=eriRouterEntPortSMSPIME3, eriRouterEntFanTraySSR=eriRouterEntFanTraySSR, eriRouterEntModuleSE100GEFXMIC=eriRouterEntModuleSE100GEFXMIC, eriRouterEntPortSMGIGETM=eriRouterEntPortSMGIGETM, eriRouterEntPortSMSPIMDS3=eriRouterEntPortSMSPIMDS3, eriRouterEntModuleSMSPIME3=eriRouterEntModuleSMSPIME3, eriRouterEntPortSE100GERJIM=eriRouterEntPortSE100GERJIM, eriRouterEntBackplaneSE1200Data=eriRouterEntBackplaneSE1200Data, eriRouterEntPortSPSC110GE=eriRouterEntPortSPSC110GE, eriRouterEntChassisSMS500=eriRouterEntChassisSMS500) -mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSECHOC3OC12=eriRouterEntPortSECHOC3OC12, eriRouterEntBackplaneSSR8020Data=eriRouterEntBackplaneSSR8020Data, eriRouterEntPortSSR100GE=eriRouterEntPortSSR100GE, eriRouterEVR=eriRouterEVR, eriRouterEntBackplaneSE600Data=eriRouterEntBackplaneSE600Data, eriRouterEntContainerSMS10000SMCM=eriRouterEntContainerSMS10000SMCM, PYSNMP_MODULE_ID=eriRouterProductMIB, eriRouterEntPortSMSPIMCDS3=eriRouterEntPortSMSPIMCDS3, eriRouterEntChassisSMS1000=eriRouterEntChassisSMS1000, eriRouterSSR8004=eriRouterSSR8004, eriRouterEntContainerSMS500Power=eriRouterEntContainerSMS500Power, eriRouterEntityTypePort=eriRouterEntityTypePort, eriRouterEntModuleSE1Port10GEOC192=eriRouterEntModuleSE1Port10GEOC192, eriRouterEntPortSSR20POSOCorOC12orOC48orOC192=eriRouterEntPortSSR20POSOCorOC12orOC48orOC192, eriRouterEntModuleEVRVirtualSmartServicesCard=eriRouterEntModuleEVRVirtualSmartServicesCard, eriRouterSSR8020=eriRouterSSR8020, eriRouterEntModuleSE100XC=eriRouterEntModuleSE100XC, eriRouterSP415=eriRouterSP415, eriRouterEntModuleSMSAIMT1=eriRouterEntModuleSMSAIMT1, eriRouterEntModuleSSRRPSW=eriRouterEntModuleSSRRPSW, eriRouterEntChassisSSR8020=eriRouterEntChassisSSR8020, eriRouterEntPortEVRVirtual=eriRouterEntPortEVRVirtual, eriRouterEntContainerSE1200HData=eriRouterEntContainerSE1200HData, eriRouterEntContainerSE600Data=eriRouterEntContainerSE600Data, eriRouterEntModuleSMFE60GE2=eriRouterEntModuleSMFE60GE2, eriRouterEntPortSEXCMGMT=eriRouterEntPortSEXCMGMT, eriRouterEntPortSSR10GE=eriRouterEntPortSSR10GE, eriRouterEntChassisSE600=eriRouterEntChassisSE600, eriRouterEntPortSMRPMGMT=eriRouterEntPortSMRPMGMT, eriRouterEntBackplaneSMS10000Midplane=eriRouterEntBackplaneSMS10000Midplane, eriRouterEntPortSEXC3MGMT=eriRouterEntPortSEXC3MGMT, eriRouterEntModuleSPSC11Port10GE=eriRouterEntModuleSPSC11Port10GE, eriRouterEntModuleSEDS3=eriRouterEntModuleSEDS3, eriRouterEntModuleSSR40Port1GE=eriRouterEntModuleSSR40Port1GE, eriRouterEntModuleSPSC1SC=eriRouterEntModuleSPSC1SC, eriRouterEntModuleSEASE2=eriRouterEntModuleSEASE2, eriRouterEntPortSMSGIGEIM=eriRouterEntPortSMSGIGEIM, eriRouterEntFanSM240=eriRouterEntFanSM240, eriRouterEntModuleSE8OR2PORTCHOC3OC12=eriRouterEntModuleSE8OR2PORTCHOC3OC12, eriRouterEntBackplaneSE100Data=eriRouterEntBackplaneSE100Data, eriRouterEntModuleSSR10Port10GE=eriRouterEntModuleSSR10Port10GE, eriRouterEntModuleSE20PortGIGE=eriRouterEntModuleSE20PortGIGE, eriRouterEntModuleSMSTIMING=eriRouterEntModuleSMSTIMING, eriRouterEntModuleSEGIGETM=eriRouterEntModuleSEGIGETM, eriRouterEntModuleSMSPOSOC12=eriRouterEntModuleSMSPOSOC12, eriRouterEntModuleSEE3=eriRouterEntModuleSEE3, eriRouterEntModuleSEGIGEIM=eriRouterEntModuleSEGIGEIM, eriRouterEntPortSEDS3=eriRouterEntPortSEDS3, eriRouterEntFanSE1200H=eriRouterEntFanSE1200H, eriRouterEntChassisSMS1800=eriRouterEntChassisSMS1800, eriRouterEntChassisSP415=eriRouterEntChassisSP415) +mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSMSAIME3=eriRouterEntPortSMSAIME3, + eriRouterEntModuleSE100FXMIC=eriRouterEntModuleSE100FXMIC, + eriRouterEntModuleSM20PortGIGE=eriRouterEntModuleSM20PortGIGE, + eriRouterEntPortSMSAIMDS3=eriRouterEntPortSMSAIMDS3, + eriRouterEntContainerSMS10000Fabric=eriRouterEntContainerSMS10000Fabric, + eriRouterEntPortSEE1=eriRouterEntPortSEE1, eriRouterEntFanSM480=eriRouterEntFanSM480, + eriRouterEntFanSE600=eriRouterEntFanSE600, + eriRouterEntPortSPSC1SCMgmt=eriRouterEntPortSPSC1SCMgmt, + eriRouterEntityTypeFan=eriRouterEntityTypeFan, eriRouterEntFanSE1200=eriRouterEntFanSE1200, + eriRouterEntModuleSMSEIM=eriRouterEntModuleSMSEIM, + eriRouterEntContainerSE800Data=eriRouterEntContainerSE800Data, + eriRouterEntPortSMSPIMDS1=eriRouterEntPortSMSPIMDS1, + eriRouterSmartEdge1200=eriRouterSmartEdge1200, + eriRouterEntPortSECHSTM1E1=eriRouterEntPortSECHSTM1E1, eriRouterSMS1000=eriRouterSMS1000, + eriRouterEntModuleSEPos4xOC12=eriRouterEntModuleSEPos4xOC12, + eriRouterEntChassisSP420=eriRouterEntChassisSP420, + eriRouterEntBackplaneSMS1800Power=eriRouterEntBackplaneSMS1800Power, + eriRouterEntModuleSEXC3=eriRouterEntModuleSEXC3, + eriRouterEntChassisSE1200H=eriRouterEntChassisSE1200H, + eriRouterEntModuleSSRALSW=eriRouterEntModuleSSRALSW, + eriRouterEntPortSMSCE2MGMT=eriRouterEntPortSMSCE2MGMT, + eriRouterEntityTypeSensor=eriRouterEntityTypeSensor, + eriRouterEntPortSEGIGETM=eriRouterEntPortSEGIGETM, + eriRouterEntModuleSMSIPSEC=eriRouterEntModuleSMSIPSEC, + eriRouterEntBackplaneSP420Data=eriRouterEntBackplaneSP420Data, + eriRouterEntPortSMSPIMHSSI=eriRouterEntPortSMSPIMHSSI, + eriRouterEntityTypeContainer=eriRouterEntityTypeContainer, + eriRouterEntModuleSM8OR2PORTCHOC3OC12=eriRouterEntModuleSM8OR2PORTCHOC3OC12, + eriRouterEntPortUnknown=eriRouterEntPortUnknown, + eriRouterEntModuleSEAIMOC12=eriRouterEntModuleSEAIMOC12, + eriRouterEntChassisSM240=eriRouterEntChassisSM240, + eriRouterEntPortSPSC1AlarmIn=eriRouterEntPortSPSC1AlarmIn, + eriRouterEntModuleSEE1=eriRouterEntModuleSEE1, eriRouterEntPortSEE3=eriRouterEntPortSEE3, + eriRouterEntModuleSMRP2=eriRouterEntModuleSMRP2, + eriRouterEntContainerSE100Carrier=eriRouterEntContainerSE100Carrier, + eriRouterEntModuleSM10GIGEIM=eriRouterEntModuleSM10GIGEIM, + eriRouterEntChassisSE100=eriRouterEntChassisSE100, + eriRouterEntContainerSSR8010PowerModule=eriRouterEntContainerSSR8010PowerModule, + eriRouterEntModuleSMSAIME3=eriRouterEntModuleSMSAIME3, + eriRouterEntPortSEPOSOC12=eriRouterEntPortSEPOSOC12, + eriRouterEntModuleSEPos8xOC3=eriRouterEntModuleSEPos8xOC3, eriRouterSMS10000=eriRouterSMS10000, + eriRouterEntModuleSEXC4=eriRouterEntModuleSEXC4, + eriRouterEntPortSMSPOSOC12=eriRouterEntPortSMSPOSOC12, + eriRouterEntFanTrayAlarmIOSPSC1=eriRouterEntFanTrayAlarmIOSPSC1, + eriRouterEntContainerSSR8020Data=eriRouterEntContainerSSR8020Data, + eriRouterEntPortSM10GIGEIM=eriRouterEntPortSM10GIGEIM, + eriRouterEntPortSEAIMOC12=eriRouterEntPortSEAIMOC12, + eriRouterEntBackplaneSE800Data=eriRouterEntBackplaneSE800Data, + eriRouterEntityTypeStack=eriRouterEntityTypeStack, + eriRouterEntModuleSMSCE3=eriRouterEntModuleSMSCE3, + eriRouterEntityTypePowerSupply=eriRouterEntityTypePowerSupply, + eriRouterEntPortSSR40GEor100GE=eriRouterEntPortSSR40GEor100GE, + eriRouterEntModuleSPSC18PortCES=eriRouterEntModuleSPSC18PortCES, + eriRouterEntModuleSMSFE1=eriRouterEntModuleSMSFE1, + eriRouterEntPowerSupplySMS1800DC=eriRouterEntPowerSupplySMS1800DC, + eriRouterEntModuleSMSSM=eriRouterEntModuleSMSSM, + eriRouterEntPowerSupplySMS1000AC=eriRouterEntPowerSupplySMS1000AC, + eriRouterEntBackplaneSSR8004Data=eriRouterEntBackplaneSSR8004Data, + eriRouterEntContainerSMS1000Data=eriRouterEntContainerSMS1000Data, + eriRouterEntBackplaneSMS1000Power=eriRouterEntBackplaneSMS1000Power, + eriRouterEntityTypeModule=eriRouterEntityTypeModule, + eriRouterEntPortSSRRPSWMgmt=eriRouterEntPortSSRRPSWMgmt, + eriRouterEntCpuUnknown=eriRouterEntCpuUnknown, + eriRouterEntBackplaneSM240Data=eriRouterEntBackplaneSM240Data, + eriRouterEntContainerSE1200Data=eriRouterEntContainerSE1200Data, + eriRouterEntContainerSPSC1FanTray=eriRouterEntContainerSPSC1FanTray, + eriRouterEntContainerSE400Data=eriRouterEntContainerSE400Data, + eriRouterEntModuleSEPOSOC48=eriRouterEntModuleSEPOSOC48, + eriRouterEntModuleSMSXFE=eriRouterEntModuleSMSXFE, + eriRouterEntModuleSEAIMOC3=eriRouterEntModuleSEAIMOC3, + eriRouterEntModuleSMSPIMHSSI=eriRouterEntModuleSMSPIMHSSI, + eriRouterEntPortSMSAIME1=eriRouterEntPortSMSAIME1, + eriRouterEntPortSEXC4MGMT=eriRouterEntPortSEXC4MGMT, + eriRouterEntBackplaneSE400Data=eriRouterEntBackplaneSE400Data, + eriRouterEntModuleSMGIGEIM=eriRouterEntModuleSMGIGEIM, + eriRouterEntModuleSMSAIMDS3=eriRouterEntModuleSMSAIMDS3, + eriRouterIposRefChassis=eriRouterIposRefChassis, + eriRouterEntModuleSMSPIMCDS3=eriRouterEntModuleSMSPIMCDS3, eriRouterSMS1800=eriRouterSMS1800, + eriRouterEntContainerSMS1800Power=eriRouterEntContainerSMS1800Power, + eriRouterEntPortSMSAIMT1=eriRouterEntPortSMSAIMT1, eriRouterSmartEdge800=eriRouterSmartEdge800, + eriRouterEntFanSE400=eriRouterEntFanSE400, + eriRouterEntModuleSE4PortOC48=eriRouterEntModuleSE4PortOC48, + eriRouterEntContainerSPSC1PowerModule=eriRouterEntContainerSPSC1PowerModule, + eriRouterEntPortSECHOC3=eriRouterEntPortSECHOC3, + eriRouterEntPortSE100AIMOC3=eriRouterEntPortSE100AIMOC3, + eriRouterEntPortSSR1GE=eriRouterEntPortSSR1GE, + eriRouterEntModuleSMSAIMOC12=eriRouterEntModuleSMSAIMOC12, + eriRouterEntFanSE800=eriRouterEntFanSE800, + eriRouterEntPortSECHOC12DS1=eriRouterEntPortSECHOC12DS1, + eriRouterEntBackplaneSM480Data=eriRouterEntBackplaneSM480Data, + eriRouterEntDiskSSE=eriRouterEntDiskSSE, eriRouterEntModuleUnknown=eriRouterEntModuleUnknown, + eriRouterEntModuleSMGIGETM=eriRouterEntModuleSMGIGETM, + eriRouterEntPortSMCHOC3OC12=eriRouterEntPortSMCHOC3OC12, + eriRouterSmartEdge100=eriRouterSmartEdge100, + eriRouterEntPowerSupplySMS500DC=eriRouterEntPowerSupplySMS500DC, + eriRouterEntModuleSEAIMDS3=eriRouterEntModuleSEAIMDS3, + eriRouterEntPortSMSAIMOC12=eriRouterEntPortSMSAIMOC12, + eriRouterEntModuleSECHDS3=eriRouterEntModuleSECHDS3, + eriRouterEntContainerSM240Data=eriRouterEntContainerSM240Data, + eriRouterEntPortSE100GEFXIM=eriRouterEntPortSE100GEFXIM, + eriRouterSmartEdge600=eriRouterSmartEdge600, eriRouterEntPortSECHDS3=eriRouterEntPortSECHDS3, + eriRouterEntPortSEEIM=eriRouterEntPortSEEIM, eriRouterEntChassisSE800=eriRouterEntChassisSE800, + eriRouterEntPortSE10GIGETM=eriRouterEntPortSE10GIGETM, + eriRouterEntPortSE100FXIM=eriRouterEntPortSE100FXIM, + eriRouterEntChassisSM480=eriRouterEntChassisSM480, + eriRouterEntModuleSMSPIME1=eriRouterEntModuleSMSPIME1, + eriRouterEntityTypeDisk=eriRouterEntityTypeDisk, + eriRouterEntContainerSSR8010Data=eriRouterEntContainerSSR8010Data, + eriRouterSMS500=eriRouterSMS500, eriRouterEntPortSEPOSOC192=eriRouterEntPortSEPOSOC192, + eriRouterEntModuleSE8PortOC3=eriRouterEntModuleSE8PortOC3, + eriRouterEntModuleSEPOSOC12=eriRouterEntModuleSEPOSOC12, + eriRouterEntPortSM10GIGETM=eriRouterEntPortSM10GIGETM, eriRouterProductMIB=eriRouterProductMIB, + eriRouterEntBackplaneSMS1800Data=eriRouterEntBackplaneSMS1800Data, + eriRouterEntPortSMCHOC3=eriRouterEntPortSMCHOC3, + eriRouterEntBackplaneSP415Data=eriRouterEntBackplaneSP415Data, + eriRouterEntContainerSMS1000Power=eriRouterEntContainerSMS1000Power, + eriRouterEntityTypeOther=eriRouterEntityTypeOther, + eriRouterEntFanTraySPSC1=eriRouterEntFanTraySPSC1, + eriRouterEntPowerModuleSPSC1DC=eriRouterEntPowerModuleSPSC1DC, + eriRouterEntModuleSMSPOSOC3=eriRouterEntModuleSMSPOSOC3, eriRouterSM240=eriRouterSM240, + eriRouterEntModuleSPSC120and2Port1and10GE=eriRouterEntModuleSPSC120and2Port1and10GE, + eriRouterEntModuleSPSC116Port1GE=eriRouterEntModuleSPSC116Port1GE, + eriRouterEntModuleSSR20Port1GEor10GE=eriRouterEntModuleSSR20Port1GEor10GE, + eriRouterEntBackplaneSE1200HData=eriRouterEntBackplaneSE1200HData, + eriRouterEntContainerSSR8010FanTray=eriRouterEntContainerSSR8010FanTray, + eriRouterEntPortSEAIMOC3=eriRouterEntPortSEAIMOC3, + eriRouterEntPortSMSCE1MGMT=eriRouterEntPortSMSCE1MGMT, + eriRouterEntPortSE100EIM=eriRouterEntPortSE100EIM, + eriRouterEntModuleSECHOC12DS1=eriRouterEntModuleSECHOC12DS1, + eriRouterEntPortSEAIMDS3=eriRouterEntPortSEAIMDS3, + eriRouterEntChassisSSR8004=eriRouterEntChassisSSR8004, + eriRouterEntChassisSE400=eriRouterEntChassisSE400, + eriRouterEntSensorAlarmSM240=eriRouterEntSensorAlarmSM240, + eriRouterEntPowerSupplySMS1000DC=eriRouterEntPowerSupplySMS1000DC, + eriRouterEntModuleSEPOSOC192=eriRouterEntModuleSEPOSOC192, + eriRouterEntContainerSSR8020PowerModule=eriRouterEntContainerSSR8020PowerModule, + eriRouterEntModuleSE100EMIC=eriRouterEntModuleSE100EMIC, + eriRouterEntModuleSM4Port10GIGE=eriRouterEntModuleSM4Port10GIGE, + eriRouterEntPortSMSPOSOC3=eriRouterEntPortSMSPOSOC3, + eriRouterEntSensorAlarmSE600=eriRouterEntSensorAlarmSE600, + eriRouterEntityTypeChassis=eriRouterEntityTypeChassis, + eriRouterEntModuleSE100AIMOC3MIC=eriRouterEntModuleSE100AIMOC3MIC, + eriRouterEntModuleSM1Port10GEOC192=eriRouterEntModuleSM1Port10GEOC192, + eriRouterEntContainerSSR8020FanTray=eriRouterEntContainerSSR8020FanTray, + eriRouterEntSensorAlarmSE400=eriRouterEntSensorAlarmSE400, eriRouterSP420=eriRouterSP420, + eriRouterEntModuleSE4Port10GIGE=eriRouterEntModuleSE4Port10GIGE, + eriRouterEntModuleSSC2=eriRouterEntModuleSSC2, + eriRouterEntChassisSE1200=eriRouterEntChassisSE1200, + eriRouterEntPowerModuleSPSC1AC=eriRouterEntPowerModuleSPSC1AC, + eriRouterEntModuleSE100GERJMIC=eriRouterEntModuleSE100GERJMIC, + eriRouterEntPortSMSEIM=eriRouterEntPortSMSEIM, + eriRouterEntPortSE10GIGEIM=eriRouterEntPortSE10GIGEIM, + eriRouterEntBackplaneSMS500Power=eriRouterEntBackplaneSMS500Power, + eriRouterEntPortSPSC1AlarmOut=eriRouterEntPortSPSC1AlarmOut, + eriRouterEntModuleSEASE=eriRouterEntModuleSEASE, + eriRouterEntPortSEAIMOC12E=eriRouterEntPortSEAIMOC12E, + eriRouterEntModuleSMSFABRIC=eriRouterEntModuleSMSFABRIC, + eriRouterEntDiskUnknown=eriRouterEntDiskUnknown, + eriRouterEntModuleSSR2Port40GEor100GE=eriRouterEntModuleSSR2Port40GEor100GE, + eriRouterEntPowerSupplySMS500AC=eriRouterEntPowerSupplySMS500AC, eriRouterSM480=eriRouterSM480, + eriRouterEntModuleSEAtm2xOC12=eriRouterEntModuleSEAtm2xOC12, + eriRouterEntBackplaneSMS1000Data=eriRouterEntBackplaneSMS1000Data, + eriRouterEntModuleSMSPIMDS1=eriRouterEntModuleSMSPIMDS1, + eriRouterEntModuleSMSFE2=eriRouterEntModuleSMSFE2, + eriRouterEntPortSEPOSOC48=eriRouterEntPortSEPOSOC48, + eriRouterEntPortSSR40GE=eriRouterEntPortSSR40GE, + eriRouterEntContainerSSR8004PowerModule=eriRouterEntContainerSSR8004PowerModule, + eriRouterEntPortSE100XCMGMT=eriRouterEntPortSE100XCMGMT, + eriRouterEntModuleSMSAIMOC3=eriRouterEntModuleSMSAIMOC3, + eriRouterEntContainerSM480Data=eriRouterEntContainerSM480Data, + eriRouterEntPowerSupplyUnknown=eriRouterEntPowerSupplyUnknown, + eriRouterEntityTypeMemory=eriRouterEntityTypeMemory, + eriRouterEntContainerSMS10000IO=eriRouterEntContainerSMS10000IO, + eriRouterEntModuleSSR20Port1GEor4Port10GE=eriRouterEntModuleSSR20Port1GEor4Port10GE, + eriRouterEntityTypeBackplane=eriRouterEntityTypeBackplane, + eriRouterSmartEdge400=eriRouterSmartEdge400, eriRouterEntPortSEGIGEIM=eriRouterEntPortSEGIGEIM, + eriRouterEntModuleSMSFE3=eriRouterEntModuleSMSFE3, + eriRouterEntBackplaneSMS500Data=eriRouterEntBackplaneSMS500Data, + eriRouterEntModuleSSC1=eriRouterEntModuleSSC1, + eriRouterEntModuleSE10GIGETM=eriRouterEntModuleSE10GIGETM, + eriRouterEntContainerSMS500Data=eriRouterEntContainerSMS500Data, + eriRouterEntModuleSMSGIGEIM=eriRouterEntModuleSMSGIGEIM, + eriRouterEntContainerSSR8004Data=eriRouterEntContainerSSR8004Data, + eriRouterEntModuleSEEIM=eriRouterEntModuleSEEIM, + eriRouterEntityTypeUnknown=eriRouterEntityTypeUnknown, + eriRouterEntModuleSEPOSOC3=eriRouterEntModuleSEPOSOC3, + eriRouterEntBackplaneSSR8010Data=eriRouterEntBackplaneSSR8010Data, + eriRouterEntPortSMGIGEIM=eriRouterEntPortSMGIGEIM, + eriRouterEntChassisSSR8010=eriRouterEntChassisSSR8010, + eriRouterEntPortSECHOC12DS3=eriRouterEntPortSECHOC12DS3, eriRouterSSR8010=eriRouterSSR8010, + eriRouterEntModuleSMSCE1=eriRouterEntModuleSMSCE1, + eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192=eriRouterEntModuleSSR20PortOC3orOC12orOC48orOC192, + eriRouterEntModuleSECHOC12DS3=eriRouterEntModuleSECHOC12DS3, + eriRouterEntContainerSPSC1Data=eriRouterEntContainerSPSC1Data, + eriRouterEntModuleSMSCM=eriRouterEntModuleSMSCM, eriRouterEntPortSMEIM=eriRouterEntPortSMEIM, + eriRouterEntModuleSEXC=eriRouterEntModuleSEXC, + eriRouterEntModuleSECHSTM1E1=eriRouterEntModuleSECHSTM1E1, + eriRouterEntPowerSupplySMS1800AC=eriRouterEntPowerSupplySMS1800AC, + eriRouterEntContainerSMS1800Data=eriRouterEntContainerSMS1800Data, + eriRouterEntModuleSMSAIME1=eriRouterEntModuleSMSAIME1, + eriRouterEntPortSMSAIMOC3=eriRouterEntPortSMSAIMOC3, + eriRouterEntPortSMSPIME1=eriRouterEntPortSMSPIME1, + eriRouterEntContainerSSR8004FanTray=eriRouterEntContainerSSR8004FanTray, + eriRouterEntPowerModuleSSR=eriRouterEntPowerModuleSSR, + eriRouterEntCpuOcteon=eriRouterEntCpuOcteon, + eriRouterEntPortSMSCE3MGMT=eriRouterEntPortSMSCE3MGMT, + eriRouterEntModuleSMSPIMDS3=eriRouterEntModuleSMSPIMDS3, + eriRouterEntModuleSEFE60GE2=eriRouterEntModuleSEFE60GE2, + eriRouterIposRefPizza=eriRouterIposRefPizza, + eriRouterEntModuleSE5PortGIGE=eriRouterEntModuleSE5PortGIGE, + eriRouterEntContainerSE100Data=eriRouterEntContainerSE100Data, + eriRouterEntityTypeCPU=eriRouterEntityTypeCPU, + eriRouterEntChassisSMS10000=eriRouterEntChassisSMS10000, + eriRouterEntModuleSMSCE2=eriRouterEntModuleSMSCE2, + eriRouterEntModuleSSRSW=eriRouterEntModuleSSRSW, + eriRouterEntPortSEPOSOC3=eriRouterEntPortSEPOSOC3, + eriRouterEntModuleSEAIMOC12E=eriRouterEntModuleSEAIMOC12E, + eriRouterEntContainerSMS10000Timing=eriRouterEntContainerSMS10000Timing, + eriRouterEntModuleSM10PortGIGEDDR2=eriRouterEntModuleSM10PortGIGEDDR2, + eriRouterEntModuleSE10PortGIGEDDR2=eriRouterEntModuleSE10PortGIGEDDR2, + eriRouterEntPortSPSC11GE=eriRouterEntPortSPSC11GE, + eriRouterEntModuleSM10GIGETM=eriRouterEntModuleSM10GIGETM, + eriRouterEntModuleSESSE=eriRouterEntModuleSESSE, + eriRouterEntModuleSE10GIGEIM=eriRouterEntModuleSE10GIGEIM, + eriRouterEntPortSMSPIME3=eriRouterEntPortSMSPIME3, + eriRouterEntFanTraySSR=eriRouterEntFanTraySSR, + eriRouterEntModuleSE100GEFXMIC=eriRouterEntModuleSE100GEFXMIC, + eriRouterEntPortSMGIGETM=eriRouterEntPortSMGIGETM, + eriRouterEntPortSMSPIMDS3=eriRouterEntPortSMSPIMDS3, + eriRouterEntModuleSMSPIME3=eriRouterEntModuleSMSPIME3, + eriRouterEntPortSE100GERJIM=eriRouterEntPortSE100GERJIM, + eriRouterEntBackplaneSE1200Data=eriRouterEntBackplaneSE1200Data, + eriRouterEntPortSPSC110GE=eriRouterEntPortSPSC110GE, + eriRouterEntChassisSMS500=eriRouterEntChassisSMS500, + eriRouterEntPortSECHOC3OC12=eriRouterEntPortSECHOC3OC12, + eriRouterEntBackplaneSSR8020Data=eriRouterEntBackplaneSSR8020Data) +mibBuilder.exportSymbols("ERICSSON-ROUTER-PRODUCT-MIB", eriRouterEntPortSSR100GE=eriRouterEntPortSSR100GE, + eriRouterEntBackplaneSE600Data=eriRouterEntBackplaneSE600Data, + eriRouterSSR8801=eriRouterSSR8801, + eriRouterEntContainerSMS10000SMCM=eriRouterEntContainerSMS10000SMCM, + PYSNMP_MODULE_ID=eriRouterProductMIB, eriRouterEntPortSMSPIMCDS3=eriRouterEntPortSMSPIMCDS3, + eriRouterEntChassisSMS1000=eriRouterEntChassisSMS1000, eriRouterSSR8004=eriRouterSSR8004, + eriRouterEntContainerSMS500Power=eriRouterEntContainerSMS500Power, + eriRouterEntityTypePort=eriRouterEntityTypePort, + eriRouterEntModuleSE1Port10GEOC192=eriRouterEntModuleSE1Port10GEOC192, + eriRouterEntPortSSR20POSOCorOC12orOC48orOC192=eriRouterEntPortSSR20POSOCorOC12orOC48orOC192, + eriRouterSSR8020=eriRouterSSR8020, eriRouterEntModuleSE100XC=eriRouterEntModuleSE100XC, + eriRouterSP415=eriRouterSP415, eriRouterEntModuleSMSAIMT1=eriRouterEntModuleSMSAIMT1, + eriRouterEntModuleSSRRPSW=eriRouterEntModuleSSRRPSW, + eriRouterEntChassisSSR8020=eriRouterEntChassisSSR8020, + eriRouterEntContainerSE1200HData=eriRouterEntContainerSE1200HData, + eriRouterEntContainerSE600Data=eriRouterEntContainerSE600Data, + eriRouterEntModuleSMFE60GE2=eriRouterEntModuleSMFE60GE2, + eriRouterEntPortSEXCMGMT=eriRouterEntPortSEXCMGMT, + eriRouterEntPortSSR10GE=eriRouterEntPortSSR10GE, + eriRouterEntChassisSE600=eriRouterEntChassisSE600, + eriRouterEntPortSMRPMGMT=eriRouterEntPortSMRPMGMT, + eriRouterEntBackplaneSMS10000Midplane=eriRouterEntBackplaneSMS10000Midplane, + eriRouterEntPortSEXC3MGMT=eriRouterEntPortSEXC3MGMT, + eriRouterEntModuleSPSC11Port10GE=eriRouterEntModuleSPSC11Port10GE, + eriRouterEntModuleSEDS3=eriRouterEntModuleSEDS3, + eriRouterEntModuleSSR40Port1GE=eriRouterEntModuleSSR40Port1GE, + eriRouterEntModuleSPSC1SC=eriRouterEntModuleSPSC1SC, + eriRouterEntModuleSEASE2=eriRouterEntModuleSEASE2, + eriRouterEntPortSMSGIGEIM=eriRouterEntPortSMSGIGEIM, eriRouterEntFanSM240=eriRouterEntFanSM240, + eriRouterEntModuleSE8OR2PORTCHOC3OC12=eriRouterEntModuleSE8OR2PORTCHOC3OC12, + eriRouterEntBackplaneSE100Data=eriRouterEntBackplaneSE100Data, + eriRouterEntModuleSSR10Port10GE=eriRouterEntModuleSSR10Port10GE, + eriRouterEntModuleSE20PortGIGE=eriRouterEntModuleSE20PortGIGE, + eriRouterEntModuleSMSTIMING=eriRouterEntModuleSMSTIMING, + eriRouterEntModuleSEGIGETM=eriRouterEntModuleSEGIGETM, + eriRouterEntModuleSMSPOSOC12=eriRouterEntModuleSMSPOSOC12, + eriRouterEntModuleSEE3=eriRouterEntModuleSEE3, + eriRouterEntModuleSEGIGEIM=eriRouterEntModuleSEGIGEIM, + eriRouterEntPortSEDS3=eriRouterEntPortSEDS3, eriRouterEntFanSE1200H=eriRouterEntFanSE1200H, + eriRouterEntChassisSMS1800=eriRouterEntChassisSMS1800, + eriRouterEntChassisSP415=eriRouterEntChassisSP415) diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py index dea3869..493e091 100644 --- a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py @@ -1,18 +1,28 @@ # # PySNMP MIB module ERICSSON-ROUTER-SMI (http://pysnmp.sf.net) -# ASN.1 source file://\usr\share\snmp\ERICSSON-ROUTER-SMI.my -# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# ASN.1 source file://C:\MIBS\text_mibs\ERICSSON-ROUTER-SMI.my +# Produced by pysmi-0.0.6 at Tue Dec 20 11:45:36 2016 # On host ? platform ? version ? by user ? -# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# Using Python version 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] # -( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") -( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") -( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") -( ericsson, ) = mibBuilder.importSymbols("ERICSSON-TOP-MIB", "ericsson") -( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") -( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") -( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") -eriRouterSMI = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218)).setRevisions(("2015-01-14 18:00", "2011-01-19 18:00", "2002-06-06 00:00", "2001-06-27 00:00", "1998-04-18 23:00",)) +(Integer, ObjectIdentifier, OctetString,) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", + "OctetString") +(NamedValues,) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +(ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, + ValueRangeConstraint,) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", + "ConstraintsIntersection", "ValueSizeConstraint", + "ValueRangeConstraint") +(ericsson,) = mibBuilder.importSymbols("ERICSSON-TOP-MIB", "ericsson") +(NotificationGroup, ModuleCompliance,) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", + "ModuleCompliance") +(Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, + Counter64, Unsigned32, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32,) = mibBuilder.importSymbols( + "SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", + "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "iso", "Gauge32", "ModuleIdentity", + "ObjectIdentity", "Bits", "Counter32") +(DisplayString, TextualConvention,) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +eriRouterSMI = ModuleIdentity((1, 3, 6, 1, 4, 1, 193, 218)).setRevisions( + ("2015-01-14 18:00", "2011-01-19 18:00", "2002-06-06 00:00", "2001-06-27 00:00", "1998-04-18 23:00",)) eriRouterProducts = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 1)) eriRouterMgmt = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 2)) eriRouterExperiment = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 3)) @@ -20,4 +30,8 @@ eriRouterModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 5)) eriRouterEntities = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 6)) eriRouterInternal = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 218, 7)) -mibBuilder.exportSymbols("ERICSSON-ROUTER-SMI", eriRouterMgmt=eriRouterMgmt, eriRouterSMI=eriRouterSMI, eriRouterEntities=eriRouterEntities, eriRouterExperiment=eriRouterExperiment, eriRouterProducts=eriRouterProducts, eriRouterCapabilities=eriRouterCapabilities, PYSNMP_MODULE_ID=eriRouterSMI, eriRouterModules=eriRouterModules, eriRouterInternal=eriRouterInternal) +mibBuilder.exportSymbols("ERICSSON-ROUTER-SMI", eriRouterMgmt=eriRouterMgmt, eriRouterSMI=eriRouterSMI, + eriRouterEntities=eriRouterEntities, eriRouterExperiment=eriRouterExperiment, + eriRouterProducts=eriRouterProducts, eriRouterCapabilities=eriRouterCapabilities, + PYSNMP_MODULE_ID=eriRouterSMI, eriRouterModules=eriRouterModules, + eriRouterInternal=eriRouterInternal) diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py index f27aeb0..3a5efa7 100644 --- a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py @@ -1,16 +1,27 @@ # # PySNMP MIB module ERICSSON-TOP-MIB (http://pysnmp.sf.net) -# ASN.1 source file://\usr\share\snmp\ERICSSON-TOP-MIB.my -# Produced by pysmi-0.0.6 at Tue Aug 02 15:20:36 2016 +# ASN.1 source file://C:\MIBS\text_mibs\ERICSSON-TOP-MIB.my +# Produced by pysmi-0.0.6 at Tue Dec 20 11:45:36 2016 # On host ? platform ? version ? by user ? -# Using Python version 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)] +# Using Python version 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] # -( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") -( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") -( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") -( NotificationGroup, ModuleCompliance, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance") -( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, enterprises, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "enterprises", "iso", "Gauge32", "ModuleIdentity", "ObjectIdentity", "Bits", "Counter32") -( DisplayString, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") +(Integer, ObjectIdentifier, OctetString,) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", + "OctetString") +(NamedValues,) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") +(ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, + ValueRangeConstraint,) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", + "ConstraintsIntersection", "ValueSizeConstraint", + "ValueRangeConstraint") +(NotificationGroup, ModuleCompliance,) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", + "ModuleCompliance") +(Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, + Counter64, Unsigned32, enterprises, iso, Gauge32, ModuleIdentity, ObjectIdentity, Bits, + Counter32,) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", + "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", + "Counter64", "Unsigned32", "enterprises", "iso", "Gauge32", "ModuleIdentity", + "ObjectIdentity", "Bits", "Counter32") +(DisplayString, TextualConvention,) = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") ericsson = ModuleIdentity((1, 3, 6, 1, 4, 1, 193)).setRevisions(("2008-10-17 00:00", "2002-05-28 00:00",)) ericssonModules = ObjectIdentity((1, 3, 6, 1, 4, 1, 193, 183)) -mibBuilder.exportSymbols("ERICSSON-TOP-MIB", PYSNMP_MODULE_ID=ericsson, ericssonModules=ericssonModules, ericsson=ericsson) +mibBuilder.exportSymbols("ERICSSON-TOP-MIB", PYSNMP_MODULE_ID=ericsson, ericssonModules=ericssonModules, + ericsson=ericsson) From 3df439c0a8885f97204c3dba8f05689dfa107d68 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 16:08:35 +0200 Subject: [PATCH 33/39] fixed pfe configuration --- .../ipos/autoload/ericsson_ext_ipos_autoload_config.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json index 8a12c88..ba38aff 100644 --- a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json +++ b/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json @@ -48,7 +48,7 @@ ] } }, - "1.3.6.1.4.1.193.218.6.9.212" : { + "1.3.6.1.4.1.193.218.6.9.210" : { "linecard_model" : "40-100ge-2-port", "pfe_0" : { "40GE_ports" : [ @@ -57,7 +57,7 @@ "100GE_ports" : ["1"] } }, - "1.3.6.1.4.1.193.218.6.9.213" : { + "1.3.6.1.4.1.193.218.6.9.209" : { "linecard_model" : "1-10ge-20port", "pfe_0" : { "1GE_ports" : [ @@ -76,7 +76,7 @@ ] } }, - "1.3.6.1.4.1.193.218.6.9.214" : { + "1.3.6.1.4.1.193.218.6.9.218" : { "linecard_model" : "10-100ge-2-2-port", "pfe_0" : { "10GE_ports" : ["1"], From 623bc88dbd370c7edb067cbaa90cd45f08c54ec9 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 16:52:13 +0200 Subject: [PATCH 34/39] recreated shell package using shellfoundry --- ericsson_ipos_extended_shell/.gitignore | 60 ++ .../datamodel/datamodel.xml | 578 ++++++++++++++++++ .../datamodel/metadata.xml | 6 + .../datamodel/shell_model.xml | 144 +++++ .../datamodel/shellconfig.xml | 40 ++ ericsson_ipos_extended_shell/deployment.xml | 53 ++ ericsson_ipos_extended_shell/docs/readme.rst | 3 + ericsson_ipos_extended_shell/readme.rst | 1 + ericsson_ipos_extended_shell/shell.yml | 8 + ericsson_ipos_extended_shell/src/driver.py | 255 ++++++++ .../src/drivermetadata.xml | 74 +++ .../ericsson_ipos_extended_resource_driver.py | 0 .../src/requirements.txt | 2 + .../test_requirements.txt | 7 + .../tests/__init__.py | 1 + .../test_ericsson_ipos_extended_shell.py | 27 + ericsson_ipos_extended_shell/version.txt | 1 + .../cloudshell}/__init__.py | 0 .../cloudshell}/networking/__init__.py | 0 .../networking/ericsson/__init__.py | 0 .../networking/ericsson/extended/__init__.py | 0 .../ericsson/extended/ipos/__init__.py | 0 .../extended/ipos/autoload/__init__.py | 0 .../ericsson_ext_ipos_autoload_config.json | 0 .../ericsson_extended_ipos_snmp_autoload.py | 0 .../mib/ERICSSON-ROUTER-IP-BIND-MIB.py | 0 .../mib/ERICSSON-ROUTER-PRODUCT-MIB.py | 0 .../ipos/autoload/mib/ERICSSON-ROUTER-SMI.py | 0 .../ipos/autoload/mib/ERICSSON-ROUTER-TC.py | 0 .../ipos/autoload/mib/ERICSSON-TOP-MIB.py | 0 .../extended/ipos/autoload/mib/__init__.py | 0 .../ericsson_extended_ipos_configuration.py | 0 .../ericsson_extended_ipos_resource_driver.py | 195 ++++++ .../ericsson/extended/ipos/run_ipos.py | 29 + .../cloudshell}/tests/__init__.py | 0 .../cloudshell}/tests/networking/__init__.py | 0 .../tests/networking/ericsson/__init__.py | 0 .../networking/ericsson/autoload/__init__.py | 0 ...s_ericsson_ext_ipos_autoload_unit_tests.py | 98 +++ 39 files changed, 1582 insertions(+) create mode 100644 ericsson_ipos_extended_shell/.gitignore create mode 100644 ericsson_ipos_extended_shell/datamodel/datamodel.xml create mode 100644 ericsson_ipos_extended_shell/datamodel/metadata.xml create mode 100644 ericsson_ipos_extended_shell/datamodel/shell_model.xml create mode 100644 ericsson_ipos_extended_shell/datamodel/shellconfig.xml create mode 100644 ericsson_ipos_extended_shell/deployment.xml create mode 100644 ericsson_ipos_extended_shell/docs/readme.rst create mode 100644 ericsson_ipos_extended_shell/readme.rst create mode 100644 ericsson_ipos_extended_shell/shell.yml create mode 100644 ericsson_ipos_extended_shell/src/driver.py create mode 100644 ericsson_ipos_extended_shell/src/drivermetadata.xml rename cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py => ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py (100%) create mode 100644 ericsson_ipos_extended_shell/src/requirements.txt create mode 100644 ericsson_ipos_extended_shell/test_requirements.txt create mode 100644 ericsson_ipos_extended_shell/tests/__init__.py create mode 100644 ericsson_ipos_extended_shell/tests/test_ericsson_ipos_extended_shell.py create mode 100644 ericsson_ipos_extended_shell/version.txt rename {cloudshell => package/cloudshell}/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/autoload/mib/__init__.py (100%) rename {cloudshell => package/cloudshell}/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py (100%) create mode 100644 package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py create mode 100644 package/cloudshell/networking/ericsson/extended/ipos/run_ipos.py rename {cloudshell => package/cloudshell}/tests/__init__.py (100%) rename {cloudshell => package/cloudshell}/tests/networking/__init__.py (100%) rename {cloudshell => package/cloudshell}/tests/networking/ericsson/__init__.py (100%) rename {cloudshell => package/cloudshell}/tests/networking/ericsson/autoload/__init__.py (100%) create mode 100644 package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py diff --git a/ericsson_ipos_extended_shell/.gitignore b/ericsson_ipos_extended_shell/.gitignore new file mode 100644 index 0000000..1e1a44c --- /dev/null +++ b/ericsson_ipos_extended_shell/.gitignore @@ -0,0 +1,60 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +env/ +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +*.egg-info/ +.installed.cfg +*.egg + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*,cover +.hypothesis/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ +cloudshell_config.yml diff --git a/ericsson_ipos_extended_shell/datamodel/datamodel.xml b/ericsson_ipos_extended_shell/datamodel/datamodel.xml new file mode 100644 index 0000000..7e821bd --- /dev/null +++ b/ericsson_ipos_extended_shell/datamodel/datamodel.xml @@ -0,0 +1,578 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Router + + + + + + + + + + + + + + + + + + + + + + + + + ge-40-port + 10ge-10-port + 1-10ge-20-4-port + 40-100ge-2-port + 1-10ge-20-port + 10-100ge-2-2-port + 1-10ge-40-port + 1-100ge-24-2-port + ssc1 + ssc1-v2 + ssc2-a + ssc3 + sw + sw2 + alsw + alswt + alsw2 + rp + rpsw + rpsw-v2 + rpsw2 + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + Generic Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + Generic Module + PFE + Generic Sub Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Module + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Chassis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Ericsson IPOS Router + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/datamodel/metadata.xml b/ericsson_ipos_extended_shell/datamodel/metadata.xml new file mode 100644 index 0000000..dc55ce7 --- /dev/null +++ b/ericsson_ipos_extended_shell/datamodel/metadata.xml @@ -0,0 +1,6 @@ + + + 2016-1-22 + 7.0 + CloudShellPackage + \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/datamodel/shell_model.xml b/ericsson_ipos_extended_shell/datamodel/shell_model.xml new file mode 100644 index 0000000..0b78e55 --- /dev/null +++ b/ericsson_ipos_extended_shell/datamodel/shell_model.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + v1 + v2c + v3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generic Ericsson IPOS Extended Driver + + + + + + diff --git a/ericsson_ipos_extended_shell/datamodel/shellconfig.xml b/ericsson_ipos_extended_shell/datamodel/shellconfig.xml new file mode 100644 index 0000000..fb93b4c --- /dev/null +++ b/ericsson_ipos_extended_shell/datamodel/shellconfig.xml @@ -0,0 +1,40 @@ + + + + + The networking Shell template will create a resource of this type in CloudShell. Once the Router is modeled correctly in CloudShell it will be possible to use it in Sandboxes and for connectivity. + + Discovers the device structure and populate its attributes. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/deployment.xml b/ericsson_ipos_extended_shell/deployment.xml new file mode 100644 index 0000000..dbc8412 --- /dev/null +++ b/ericsson_ipos_extended_shell/deployment.xml @@ -0,0 +1,53 @@ + + + + + localhost + + + 8029 + + + YOUR_USERNAME + YOUR_PASSWORD + Global + + + dont_upload_me.xml + + + + + + + + + + src + + + EricssonIposExtendedShellDriver + + + + + + + \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/docs/readme.rst b/ericsson_ipos_extended_shell/docs/readme.rst new file mode 100644 index 0000000..4dc0eb5 --- /dev/null +++ b/ericsson_ipos_extended_shell/docs/readme.rst @@ -0,0 +1,3 @@ +.. _readme: + +.. include:: ../README.rst diff --git a/ericsson_ipos_extended_shell/readme.rst b/ericsson_ipos_extended_shell/readme.rst new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ericsson_ipos_extended_shell/readme.rst @@ -0,0 +1 @@ + diff --git a/ericsson_ipos_extended_shell/shell.yml b/ericsson_ipos_extended_shell/shell.yml new file mode 100644 index 0000000..7ee14c4 --- /dev/null +++ b/ericsson_ipos_extended_shell/shell.yml @@ -0,0 +1,8 @@ +shell: + name: Ericsson-IPOS-Extended-Shell + author: Anonymous + email: info@quali.com + description: Describe the purpose of your CloudShell shell + version: 0.1.0 + driver_name: EricssonIposExtendedShellDriver + networking_standard_version: 4.0.1 \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/src/driver.py b/ericsson_ipos_extended_shell/src/driver.py new file mode 100644 index 0000000..bf02280 --- /dev/null +++ b/ericsson_ipos_extended_shell/src/driver.py @@ -0,0 +1,255 @@ +import datetime +import json + +from cloudshell.networking.apply_connectivity.apply_connectivity_operation import apply_connectivity_changes +from cloudshell.networking.apply_connectivity.models.connectivity_result import ConnectivitySuccessResponse +from cloudshell.shell.core.interfaces.save_restore import OrchestrationSaveResult, OrchestrationSavedArtifact, \ + OrchestrationSavedArtifactInfo, OrchestrationRestoreRules +from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface +from cloudshell.shell.core.driver_context import InitCommandContext, ResourceCommandContext, AutoLoadResource, \ + AutoLoadAttribute, AutoLoadDetails, CancellationContext + +class EricssonIposExtendedShellDriver (ResourceDriverInterface): + + def __init__(self): + """ + ctor must be without arguments, it is created with reflection at run time + """ + pass + + def initialize(self, context): + """ + Initialize the driver session, this function is called everytime a new instance of the driver is created + This is a good place to load and cache the driver configuration, initiate sessions etc. + :param InitCommandContext context: the context the command runs on + """ + pass + + # + def restore(self, context, cancellation_context, path, configuration_type, restore_method, vrf_management_name): + """ + Restores a configuration file + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str path: The path to the configuration file, including the configuration file name. + :param str restore_method: Determines whether the restore should append or override the current configuration. + :param str configuration_type: Specify whether the file should update the startup or running config. + :param str vrf_management_name: Optional. Virtual routing and Forwarding management name + """ + pass + + def save(self, context, cancellation_context, folder_path, configuration_type, vrf_management_name): + """ + Creates a configuration file and saves it to the provided destination + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str configuration_type: Specify whether the file should update the startup or running config. Value can one + :param str folder_path: The path to the folder in which the configuration file will be saved. + :param str vrf_management_name: Optional. Virtual routing and Forwarding management name + :return The configuration file name. + :rtype: str + """ + pass + + def load_firmware(self, context, cancellation_context, path, vrf_management_name): + """ + Upload and updates firmware on the resource + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param str path: path to tftp server where firmware file is stored + :param str vrf_management_name: Optional. Virtual routing and Forwarding management name + """ + pass + + def run_custom_command(self, context, cancellation_context, custom_command): + """ + Executes a custom command on the device + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str custom_command: The command to run. Note that commands that require a response are not supported. + :return: the command result text + :rtype: str + """ + pass + + def run_custom_config_command(self, context, cancellation_context, custom_command): + """ + Executes a custom command on the device in configuration mode + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str custom_command: The command to run. Note that commands that require a response are not supported. + :return: the command result text + :rtype: str + """ + pass + + def shutdown(self, context, cancellation_context): + """ + Sends a graceful shutdown to the device + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + """ + pass + + # + + # + def orchestration_save(self, context, cancellation_context, mode, custom_params): + """ + Saves the Shell state and returns a description of the saved artifacts and information + This command is intended for API use only by sandbox orchestration scripts to implement + a save and restore workflow + :param ResourceCommandContext context: the context object containing resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str mode: Snapshot save mode, can be one of two values 'shallow' (default) or 'deep' + :param str custom_params: Set of custom parameters for the save operation + :return: SavedResults serialized as JSON + :rtype: OrchestrationSaveResult + """ + + # See below an example implementation, here we use jsonpickle for serialization, + # to use this sample, you'll need to add jsonpickle to your requirements.txt file + # The JSON schema is defined at: https://github.com/QualiSystems/sandbox_orchestration_standard/blob/master/save%20%26%20restore/saved_artifact_info.schema.json + # You can find more information and examples examples in the spec document at https://github.com/QualiSystems/sandbox_orchestration_standard/blob/master/save%20%26%20restore/save%20%26%20restore%20standard.md + ''' + # By convention, all dates should be UTC + created_date = datetime.datetime.utcnow() + + # This can be any unique identifier which can later be used to retrieve the artifact + # such as filepath etc. + + # By convention, all dates should be UTC + created_date = datetime.datetime.utcnow() + + # This can be any unique identifier which can later be used to retrieve the artifact + # such as filepath etc. + identifier = created_date.strftime('%y_%m_%d %H_%M_%S_%f') + + orchestration_saved_artifact = OrchestrationSavedArtifact('REPLACE_WITH_ARTIFACT_TYPE', identifier) + + saved_artifacts_info = OrchestrationSavedArtifactInfo( + resource_name="some_resource", + created_date=created_date, + restore_rules=OrchestrationRestoreRules(requires_same_resource=True), + saved_artifact=orchestration_saved_artifact) + + return OrchestrationSaveResult(saved_artifacts_info) + ''' + pass + + def orchestration_restore(self, context, cancellation_context, saved_artifact_info, custom_params): + """ + Restores a saved artifact previously saved by this Shell driver using the orchestration_save function + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well + :param str saved_artifact_info: A JSON string representing the state to restore including saved artifacts and info + :param str custom_params: Set of custom parameters for the restore operation + :return: None + """ + ''' + # The saved_details JSON will be defined according to the JSON Schema and is the same object returned via the + # orchestration save function. + # Example input: + # { + # "saved_artifact": { + # "artifact_type": "REPLACE_WITH_ARTIFACT_TYPE", + # "identifier": "16_08_09 11_21_35_657000" + # }, + # "resource_name": "some_resource", + # "restore_rules": { + # "requires_same_resource": true + # }, + # "created_date": "2016-08-09T11:21:35.657000" + # } + + # The example code below just parses and prints the saved artifact identifier + saved_details_object = json.loads(saved_details) + return saved_details_object[u'saved_artifact'][u'identifier'] + ''' + pass + + # + + # + + ''' + # The ApplyConnectivityChanges function is intended to be used for using switches as connectivity providers + # for other devices. If the Switch shell is intended to be used a DUT only there is no need to implement it + + def ApplyConnectivityChanges(self, context, request): + """ + Configures VLANs on multiple ports or port-channels + :param ResourceCommandContext context: The context object for the command with resource and reservation info + :param str request: A JSON object with the list of requested connectivity changes + :return: a json object with the list of connectivity changes which were carried out by the switch + :rtype: str + """ + + return apply_connectivity_changes(request=request, + add_vlan_action=lambda x: ConnectivitySuccessResponse(x,'Success'), + remove_vlan_action=lambda x: ConnectivitySuccessResponse(x,'Success')) + + + + ''' + + # + + # + + def get_inventory(self, context): + """ + Discovers the resource structure and attributes. + :param AutoLoadCommandContext context: the context the command runs on + :return Attribute and sub-resource information for the Shell resource you can return an AutoLoadDetails object + :rtype: AutoLoadDetails + """ + # See below some example code demonstrating how to return the resource structure + # and attributes. In real life, of course, if the actual values are not static, + # this code would be preceded by some SNMP/other calls to get the actual resource information + ''' + # Add sub resources details + sub_resources = [ AutoLoadResource(model ='Generic Chassis',name= 'Chassis 1', relative_address='1'), + AutoLoadResource(model='Generic Module',name= 'Module 1',relative_address= '1/1'), + AutoLoadResource(model='Generic Port',name= 'Port 1', relative_address='1/1/1'), + AutoLoadResource(model='Generic Port', name='Port 2', relative_address='1/1/2'), + AutoLoadResource(model='Generic Power Port', name='Power Port', relative_address='1/PP1')] + + + attributes = [ AutoLoadAttribute(relative_address='', attribute_name='Location', attribute_value='Santa Clara Lab'), + AutoLoadAttribute('', 'Model', 'Catalyst 3850'), + AutoLoadAttribute('', 'Vendor', 'Cisco'), + AutoLoadAttribute('1', 'Serial Number', 'JAE053002JD'), + AutoLoadAttribute('1', 'Model', 'WS-X4232-GB-RJ'), + AutoLoadAttribute('1/1', 'Model', 'WS-X4233-GB-EJ'), + AutoLoadAttribute('1/1', 'Serial Number', 'RVE056702UD'), + AutoLoadAttribute('1/1/1', 'MAC Address', 'fe80::e10c:f055:f7f1:bb7t16'), + AutoLoadAttribute('1/1/1', 'IPv4 Address', '192.168.10.7'), + AutoLoadAttribute('1/1/2', 'MAC Address', 'te67::e40c:g755:f55y:gh7w36'), + AutoLoadAttribute('1/1/2', 'IPv4 Address', '192.168.10.9'), + AutoLoadAttribute('1/PP1', 'Model', 'WS-X4232-GB-RJ'), + AutoLoadAttribute('1/PP1', 'Port Description', 'Power'), + AutoLoadAttribute('1/PP1', 'Serial Number', 'RVE056702UD')] + + return AutoLoadDetails(sub_resources,attributes) + ''' + pass + + # + + # + + def health_check(self,cancellation_context): + """ + Checks if the device is up and connectable + :return: str: Success or fail message + """ + pass + + # + + def cleanup(self): + """ + Destroy the driver session, this function is called everytime a driver instance is destroyed + This is a good place to close any open sessions, finish writing to log files + """ + pass diff --git a/ericsson_ipos_extended_shell/src/drivermetadata.xml b/ericsson_ipos_extended_shell/src/drivermetadata.xml new file mode 100644 index 0000000..edd22c0 --- /dev/null +++ b/ericsson_ipos_extended_shell/src/drivermetadata.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py b/ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py rename to ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py diff --git a/ericsson_ipos_extended_shell/src/requirements.txt b/ericsson_ipos_extended_shell/src/requirements.txt new file mode 100644 index 0000000..76b77e4 --- /dev/null +++ b/ericsson_ipos_extended_shell/src/requirements.txt @@ -0,0 +1,2 @@ +cloudshell-shell-core>=2.3.0,<2.4.0 +cloudshell-networking>=4.0.0,<4.1.0 \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/test_requirements.txt b/ericsson_ipos_extended_shell/test_requirements.txt new file mode 100644 index 0000000..7d963ba --- /dev/null +++ b/ericsson_ipos_extended_shell/test_requirements.txt @@ -0,0 +1,7 @@ +nose +coverage +unittest2 +mock +teamcity-messages +jsonpickle +nose-exclude \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/tests/__init__.py b/ericsson_ipos_extended_shell/tests/__init__.py new file mode 100644 index 0000000..40a96af --- /dev/null +++ b/ericsson_ipos_extended_shell/tests/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/ericsson_ipos_extended_shell/tests/test_ericsson_ipos_extended_shell.py b/ericsson_ipos_extended_shell/tests/test_ericsson_ipos_extended_shell.py new file mode 100644 index 0000000..7b6ed12 --- /dev/null +++ b/ericsson_ipos_extended_shell/tests/test_ericsson_ipos_extended_shell.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Tests for `EricssonIposExtendedShellDriver` +""" + +import unittest + +from driver import EricssonIposExtendedShellDriver + + +class TestEricssonIposExtendedShellDriver(unittest.TestCase): + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_000_something(self): + pass + + +if __name__ == '__main__': + import sys + sys.exit(unittest.main()) diff --git a/ericsson_ipos_extended_shell/version.txt b/ericsson_ipos_extended_shell/version.txt new file mode 100644 index 0000000..afaf360 --- /dev/null +++ b/ericsson_ipos_extended_shell/version.txt @@ -0,0 +1 @@ +1.0.0 \ No newline at end of file diff --git a/cloudshell/__init__.py b/package/cloudshell/__init__.py similarity index 100% rename from cloudshell/__init__.py rename to package/cloudshell/__init__.py diff --git a/cloudshell/networking/__init__.py b/package/cloudshell/networking/__init__.py similarity index 100% rename from cloudshell/networking/__init__.py rename to package/cloudshell/networking/__init__.py diff --git a/cloudshell/networking/ericsson/__init__.py b/package/cloudshell/networking/ericsson/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/__init__.py rename to package/cloudshell/networking/ericsson/__init__.py diff --git a/cloudshell/networking/ericsson/extended/__init__.py b/package/cloudshell/networking/ericsson/extended/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/extended/__init__.py rename to package/cloudshell/networking/ericsson/extended/__init__.py diff --git a/cloudshell/networking/ericsson/extended/ipos/__init__.py b/package/cloudshell/networking/ericsson/extended/ipos/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/__init__.py rename to package/cloudshell/networking/ericsson/extended/ipos/__init__.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/__init__.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-IP-BIND-MIB.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-PRODUCT-MIB.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-SMI.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-ROUTER-TC.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/ERICSSON-TOP-MIB.py diff --git a/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py rename to package/cloudshell/networking/ericsson/extended/ipos/autoload/mib/__init__.py diff --git a/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py b/package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py similarity index 100% rename from cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py rename to package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_configuration.py diff --git a/package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py b/package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py new file mode 100644 index 0000000..36dbbbb --- /dev/null +++ b/package/cloudshell/networking/ericsson/extended/ipos/ericsson_extended_ipos_resource_driver.py @@ -0,0 +1,195 @@ +from cloudshell.networking.ericsson.ericsson_configuration_operations import EricssonConfigurationOperations +from cloudshell.networking.ericsson.ericsson_connectivity_operations import EricssonConnectivityOperations +from cloudshell.networking.ericsson.ericsson_firmware_operations import EricssonFirmwareOperations +from cloudshell.networking.ericsson.ericsson_run_command_operations import EricssonRunCommandOperations +from cloudshell.networking.ericsson.ericsson_state_operations import EricssonStateOperations +from cloudshell.networking.ericsson.extended.ipos.autoload.ericsson_extended_ipos_snmp_autoload import EricssonExtendedIPOSSNMPAutoload +from cloudshell.networking.networking_resource_driver_interface import NetworkingResourceDriverInterface +from cloudshell.shell.core.context_utils import context_from_args +from cloudshell.shell.core.driver_bootstrap import DriverBootstrap +from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface +from cloudshell.shell.core.driver_utils import GlobalLock + +import cloudshell.networking.ericsson.extended.ipos.ericsson_extended_ipos_configuration as driver_config + + +class EricssonIPOSExtendedResourceDriver(ResourceDriverInterface, NetworkingResourceDriverInterface, GlobalLock): + def __init__(self): + super(EricssonIPOSExtendedResourceDriver, self).__init__() + bootstrap = DriverBootstrap() + bootstrap.add_config(driver_config) + bootstrap.initialize() + + @context_from_args + def initialize(self, context): + """Initialize method + :type context: cloudshell.shell.core.context.driver_context.InitCommandContext + """ + + return 'Finished initializing' + + def cleanup(self): + pass + + @context_from_args + def ApplyConnectivityChanges(self, context, request): + connectivity_operations = EricssonConnectivityOperations() + connectivity_operations.logger.info('Start applying connectivity changes, request is: {0}'.format(str(request))) + response = connectivity_operations.apply_connectivity_changes(request) + connectivity_operations.logger.info('Finished applying connectivity changes, responce is: {0}'.format(str( + response))) + connectivity_operations.logger.info('Apply Connectivity changes completed') + return response + + @GlobalLock.lock + @context_from_args + def restore(self, context, path, configuration_type='running', restore_method='override', vrf_management_name=None): + """Restore selected file to the provided destination + + :param path: source config file + :param configuration_type: running or startup configs + :param restore_method: append or override methods + :param vrf_management_name: VRF management Name + """ + + configuration_operations = EricssonConfigurationOperations() + response = configuration_operations.restore(path=path, restore_method=restore_method, + configuration_type=configuration_type, + vrf_management_name=vrf_management_name) + configuration_operations.logger.info('Restore completed') + configuration_operations.logger.info(response) + + @context_from_args + def save(self, context, folder_path, configuration_type, vrf_management_name=None): + """Save selected file to the provided destination + + :param configuration_type: source file, which will be saved + :param folder_path: destination path where file will be saved + :param vrf_management_name: VRF management Name + """ + + configuration_operations = EricssonConfigurationOperations() + response = configuration_operations.save(folder_path, configuration_type, vrf_management_name) + configuration_operations.logger.info('Save completed') + return response + + @context_from_args + def orchestration_save(self, context, mode="shallow", custom_params=None): + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration save started') + response = configuration_operations.orchestration_save(mode=mode, custom_params=custom_params) + configuration_operations.logger.info('Orchestration save completed') + return response + + @context_from_args + def orchestration_restore(self, context, saved_artifact_info, custom_params=None): + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Orchestration restore started') + configuration_operations.orchestration_restore(saved_artifact_info=saved_artifact_info, + custom_params=custom_params) + configuration_operations.logger.info('Orchestration restore completed') + + @context_from_args + def get_inventory(self, context): + """Return device structure with all standard attributes + + :return: response + :rtype: string + """ + + autoload_operations = EricssonExtendedIPOSSNMPAutoload() + autoload_operations.logger.info('Autoload started') + response = autoload_operations.discover() + autoload_operations.logger.info('Autoload completed') + return response + + @GlobalLock.lock + @context_from_args + def load_firmware(self, context, path, vrf_management_name=None): + """Upload and updates firmware on the resource + + :param path: full path to firmware file, i.e. tftp://10.10.10.1/firmware.tar + :param vrf_management_name: VRF management Name + :return: result + :rtype: string + """ + + firmware_operations = EricssonFirmwareOperations() + response = firmware_operations.load_firmware(path=path, vrf_management_name=vrf_management_name) + firmware_operations.logger.info(response) + + @context_from_args + def run_custom_command(self, context, custom_command): + """Send custom command + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + response = send_command_operations.run_custom_command(command=custom_command) + return response + + @context_from_args + def health_check(self, context): + """Performs device health check + + """ + + state_operations = EricssonStateOperations() + return state_operations.health_check() + + @context_from_args + def run_custom_config_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + result_str = send_command_operations.run_custom_config_command(command=custom_command) + return result_str + + @GlobalLock.lock + @context_from_args + def update_firmware(self, context, remote_host, file_path): + """Upload and updates firmware on the resource + + :param remote_host: path to firmware file location on ftp or tftp server + :param file_path: firmware file name + :return: result + :rtype: string + """ + + firmware_operations = EricssonFirmwareOperations() + response = firmware_operations.load_firmware(path=remote_host) + firmware_operations.logger.info(response) + + @context_from_args + def send_custom_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + response = send_command_operations.run_custom_command(command=custom_command) + return response + + @context_from_args + def send_custom_config_command(self, context, custom_command): + """Send custom command in configuration mode + + :return: result + :rtype: string + """ + + send_command_operations = EricssonRunCommandOperations() + result_str = send_command_operations.run_custom_config_command(command=custom_command) + return result_str + + @context_from_args + def shutdown(self, context): + pass diff --git a/package/cloudshell/networking/ericsson/extended/ipos/run_ipos.py b/package/cloudshell/networking/ericsson/extended/ipos/run_ipos.py new file mode 100644 index 0000000..29ecee1 --- /dev/null +++ b/package/cloudshell/networking/ericsson/extended/ipos/run_ipos.py @@ -0,0 +1,29 @@ +from threading import Thread +import time +from cloudshell.networking.ericsson.extended.ipos.ericsson_extended_ipos_resource_driver import \ + EricssonIPOSExtendedResourceDriver +from cloudshell.shell.core.context import ResourceCommandContext, ResourceContextDetails, ReservationContextDetails + +tt = EricssonIPOSExtendedResourceDriver() + +context = ResourceCommandContext() +context.resource = ResourceContextDetails() +context.resource.name = 'dsada' +context.reservation = ReservationContextDetails() +context.reservation.reservation_id = 'c3b410cb-70bd-4437-ae32-15ea17c33a74' +context.resource.attributes = dict() +context.resource.attributes['User'] = 'root' +context.resource.attributes['SNMP Version'] = '2' +context.resource.attributes['SNMP Read Community'] = 'public' +context.resource.attributes['Password'] = 'P0G8gOpDHL0c52ROLdsaVQ==' # 'NuCpFxP8cJMCic8ePJokug==' +context.resource.attributes['Enable Password'] = 'NuCpFxP8cJMCic8ePJokug==' +context.resource.attributes['Enable SNMP'] = 'False' +context.resource.attributes['Disable SNMP'] = 'False' +context.resource.attributes['CLI Connection Type'] = 'ssh' +context.resource.attributes['VRF Management Name'] = '' +context.resource.attributes['Sessions Concurrency Limit'] = '1' +context.resource.attributes['CLI TCP Port'] = '0' +context.resource.address = '192.168.73.70' +context.resource.name = '2950' + +Thread(target=tt.get_inventory, args=(context, )).start() diff --git a/cloudshell/tests/__init__.py b/package/cloudshell/tests/__init__.py similarity index 100% rename from cloudshell/tests/__init__.py rename to package/cloudshell/tests/__init__.py diff --git a/cloudshell/tests/networking/__init__.py b/package/cloudshell/tests/networking/__init__.py similarity index 100% rename from cloudshell/tests/networking/__init__.py rename to package/cloudshell/tests/networking/__init__.py diff --git a/cloudshell/tests/networking/ericsson/__init__.py b/package/cloudshell/tests/networking/ericsson/__init__.py similarity index 100% rename from cloudshell/tests/networking/ericsson/__init__.py rename to package/cloudshell/tests/networking/ericsson/__init__.py diff --git a/cloudshell/tests/networking/ericsson/autoload/__init__.py b/package/cloudshell/tests/networking/ericsson/autoload/__init__.py similarity index 100% rename from cloudshell/tests/networking/ericsson/autoload/__init__.py rename to package/cloudshell/tests/networking/ericsson/autoload/__init__.py diff --git a/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py b/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py new file mode 100644 index 0000000..bb3714d --- /dev/null +++ b/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py @@ -0,0 +1,98 @@ +from unittest import TestCase +from cloudshell.networking.ericsson.extended.ipos.autoload.ericsson_extended_ipos_snmp_autoload import \ + EricssonExtendedIPOSSNMPAutoload + +from cloudshell.snmp.quali_snmp import QualiSnmp +from mock import MagicMock +from cloudshell.core.logger.qs_logger import get_qs_logger + + +class TestEricssonAutoload(TestCase): + def _check_relative_path(self, resources): + relative_path = [] + for resource in resources: + if resource.relative_address in relative_path: + return False + else: + relative_path.append(resource.relative_address) + return True + + def test_is_loads_SSR8020_correctly(self): + print '-----------SSR80020------------' + ip = '192.168.73.50' + community = 'public' + logger = get_qs_logger(log_file_prefix=ip) + cli = MagicMock() + snmp = QualiSnmp(ip=ip, snmp_community=community, logger=logger) + handler = EricssonExtendedIPOSSNMPAutoload(snmp_handler=snmp, cli=cli, logger=logger, + supported_os=["IP[ -]?OS"], + snmp_community=community) + result = handler.discover() + self.assertIsNotNone(result) + self.assertIsNotNone(result.resources) + self.assertIsNotNone(result.attributes) + chassis = [resource for resource in result.resources if 'Chassis' in resource.name] + modules = [resource for resource in result.resources if resource.model == 'Generic Module'] + ports = [resource for resource in result.resources if resource.model == 'Generic Port'] + port_channels = [resource for resource in result.resources if resource.model == 'Generic Port Channel'] + power_ports = [resource for resource in result.resources if resource.model == 'Generic Power Port'] + sub_modules = [resource for resource in result.resources if 'Sub Module' in resource.name] + trash_chrs = [attribute for attribute in result.attributes if type(attribute.attribute_value) is str and + '\\s' in attribute.attribute_value] + if len(trash_chrs) > 0: + for char in trash_chrs: + print char.relative_address + ': ' + char.attribute_name + ' = ' + char.attribute_value + self.assertTrue(len(chassis) == 1) + self.assertTrue(len(ports) == 62) + # self.assertTrue(len(modules) == 2) + self.assertTrue(len(sub_modules) == 0) + self.assertTrue(len(port_channels) == 0) + self.assertTrue(len(power_ports) == 4) + self.assertFalse(len(trash_chrs) > 0) + self.assertTrue(self._check_relative_path(result.resources)) + print len(chassis) + print len(ports) + print len(modules) + print len(sub_modules) + print len(port_channels) + print str(len(power_ports)) + '\n' + + def test_is_loads_NightHawk_correctly(self): + print '-----------NightHawk------------' + ip = '192.168.73.51' + community = 'public' + logger = get_qs_logger(log_file_prefix=ip) + cli = MagicMock() + snmp = QualiSnmp(ip=ip, snmp_community=community, logger=logger) + handler = EricssonExtendedIPOSSNMPAutoload(snmp_handler=snmp, cli=cli, logger=logger, + supported_os=["IP[ -]?OS"], + snmp_community=community) + result = handler.discover() + self.assertIsNotNone(result) + self.assertIsNotNone(result.resources) + self.assertIsNotNone(result.attributes) + chassis = [resource for resource in result.resources if 'Chassis' in resource.name] + modules = [resource for resource in result.resources if resource.model == 'Generic Module'] + ports = [resource for resource in result.resources if resource.model == 'Generic Port'] + port_channels = [resource for resource in result.resources if resource.model == 'Generic Port Channel'] + power_ports = [resource for resource in result.resources if resource.model == 'Generic Power Port'] + sub_modules = [resource for resource in result.resources if 'Sub Module' in resource.name] + trash_chrs = [attribute for attribute in result.attributes if type(attribute.attribute_value) is str and + '\\s' in attribute.attribute_value] + if len(trash_chrs) > 0: + for char in trash_chrs: + print char.relative_address + ': ' + char.attribute_name + ' = ' + char.attribute_value + self.assertTrue(len(chassis) == 1) + self.assertTrue(len(ports) == 24) + #self.assertTrue(len(modules) == 1) + self.assertTrue(len(sub_modules) == 0) + self.assertTrue(len(port_channels) == 0) + self.assertTrue(len(power_ports) == 1) + self.assertFalse(len(trash_chrs) > 0) + self.assertTrue(self._check_relative_path(result.resources)) + print len(chassis) + print len(ports) + print len(modules) + print len(sub_modules) + print len(port_channels) + print str(len(power_ports)) + '\n' From 889ef7bc08a5c131d428bb91e79fe10ff3b91830 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 16:53:42 +0200 Subject: [PATCH 35/39] moved setup.py --- __init__.py | 1 - LICENSE.htm => package/LICENSE.htm | 0 MANIFEST.in => package/MANIFEST.in | 0 README.md => package/README.md | 0 README.txt => package/README.txt | 0 requirements.txt => package/requirements.txt | 0 setup.py => package/setup.py | 0 test_requirements.txt => package/test_requirements.txt | 0 version.txt => package/version.txt | 0 9 files changed, 1 deletion(-) delete mode 100644 __init__.py rename LICENSE.htm => package/LICENSE.htm (100%) rename MANIFEST.in => package/MANIFEST.in (100%) rename README.md => package/README.md (100%) rename README.txt => package/README.txt (100%) rename requirements.txt => package/requirements.txt (100%) rename setup.py => package/setup.py (100%) rename test_requirements.txt => package/test_requirements.txt (100%) rename version.txt => package/version.txt (100%) diff --git a/__init__.py b/__init__.py deleted file mode 100644 index 7d28c43..0000000 --- a/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__author__ = 'CoYe' diff --git a/LICENSE.htm b/package/LICENSE.htm similarity index 100% rename from LICENSE.htm rename to package/LICENSE.htm diff --git a/MANIFEST.in b/package/MANIFEST.in similarity index 100% rename from MANIFEST.in rename to package/MANIFEST.in diff --git a/README.md b/package/README.md similarity index 100% rename from README.md rename to package/README.md diff --git a/README.txt b/package/README.txt similarity index 100% rename from README.txt rename to package/README.txt diff --git a/requirements.txt b/package/requirements.txt similarity index 100% rename from requirements.txt rename to package/requirements.txt diff --git a/setup.py b/package/setup.py similarity index 100% rename from setup.py rename to package/setup.py diff --git a/test_requirements.txt b/package/test_requirements.txt similarity index 100% rename from test_requirements.txt rename to package/test_requirements.txt diff --git a/version.txt b/package/version.txt similarity index 100% rename from version.txt rename to package/version.txt From bd524f16aa90739e89ecce351211c128cb367968 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 16:59:18 +0200 Subject: [PATCH 36/39] removed unicode symbols --- ericsson_ipos_extended_shell/datamodel/datamodel.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ericsson_ipos_extended_shell/datamodel/datamodel.xml b/ericsson_ipos_extended_shell/datamodel/datamodel.xml index 7e821bd..e918a69 100644 --- a/ericsson_ipos_extended_shell/datamodel/datamodel.xml +++ b/ericsson_ipos_extended_shell/datamodel/datamodel.xml @@ -116,7 +116,7 @@ - + @@ -275,7 +275,7 @@ - From e7049a8da4a15ece1c19ea5e5f7248dc8a487c84 Mon Sep 17 00:00:00 2001 From: CoYe Date: Tue, 20 Dec 2016 17:45:22 +0200 Subject: [PATCH 37/39] change version --- package/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/version.txt b/package/version.txt index 7f20734..afaf360 100644 --- a/package/version.txt +++ b/package/version.txt @@ -1 +1 @@ -1.0.1 \ No newline at end of file +1.0.0 \ No newline at end of file From b7295466ed8292cee7092d72c375afbf488d1158 Mon Sep 17 00:00:00 2001 From: CoYe Date: Wed, 21 Dec 2016 10:31:11 +0200 Subject: [PATCH 38/39] added reboot command --- ericsson_ipos_extended_shell/src/driver.py | 255 ------------------ .../src/drivermetadata.xml | 108 ++++---- .../ericsson_ipos_extended_resource_driver.py | 12 + .../src/requirements.txt | 3 +- ...s_ericsson_ext_ipos_autoload_unit_tests.py | 2 +- 5 files changed, 77 insertions(+), 303 deletions(-) delete mode 100644 ericsson_ipos_extended_shell/src/driver.py diff --git a/ericsson_ipos_extended_shell/src/driver.py b/ericsson_ipos_extended_shell/src/driver.py deleted file mode 100644 index bf02280..0000000 --- a/ericsson_ipos_extended_shell/src/driver.py +++ /dev/null @@ -1,255 +0,0 @@ -import datetime -import json - -from cloudshell.networking.apply_connectivity.apply_connectivity_operation import apply_connectivity_changes -from cloudshell.networking.apply_connectivity.models.connectivity_result import ConnectivitySuccessResponse -from cloudshell.shell.core.interfaces.save_restore import OrchestrationSaveResult, OrchestrationSavedArtifact, \ - OrchestrationSavedArtifactInfo, OrchestrationRestoreRules -from cloudshell.shell.core.resource_driver_interface import ResourceDriverInterface -from cloudshell.shell.core.driver_context import InitCommandContext, ResourceCommandContext, AutoLoadResource, \ - AutoLoadAttribute, AutoLoadDetails, CancellationContext - -class EricssonIposExtendedShellDriver (ResourceDriverInterface): - - def __init__(self): - """ - ctor must be without arguments, it is created with reflection at run time - """ - pass - - def initialize(self, context): - """ - Initialize the driver session, this function is called everytime a new instance of the driver is created - This is a good place to load and cache the driver configuration, initiate sessions etc. - :param InitCommandContext context: the context the command runs on - """ - pass - - # - def restore(self, context, cancellation_context, path, configuration_type, restore_method, vrf_management_name): - """ - Restores a configuration file - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str path: The path to the configuration file, including the configuration file name. - :param str restore_method: Determines whether the restore should append or override the current configuration. - :param str configuration_type: Specify whether the file should update the startup or running config. - :param str vrf_management_name: Optional. Virtual routing and Forwarding management name - """ - pass - - def save(self, context, cancellation_context, folder_path, configuration_type, vrf_management_name): - """ - Creates a configuration file and saves it to the provided destination - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str configuration_type: Specify whether the file should update the startup or running config. Value can one - :param str folder_path: The path to the folder in which the configuration file will be saved. - :param str vrf_management_name: Optional. Virtual routing and Forwarding management name - :return The configuration file name. - :rtype: str - """ - pass - - def load_firmware(self, context, cancellation_context, path, vrf_management_name): - """ - Upload and updates firmware on the resource - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param str path: path to tftp server where firmware file is stored - :param str vrf_management_name: Optional. Virtual routing and Forwarding management name - """ - pass - - def run_custom_command(self, context, cancellation_context, custom_command): - """ - Executes a custom command on the device - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str custom_command: The command to run. Note that commands that require a response are not supported. - :return: the command result text - :rtype: str - """ - pass - - def run_custom_config_command(self, context, cancellation_context, custom_command): - """ - Executes a custom command on the device in configuration mode - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str custom_command: The command to run. Note that commands that require a response are not supported. - :return: the command result text - :rtype: str - """ - pass - - def shutdown(self, context, cancellation_context): - """ - Sends a graceful shutdown to the device - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - """ - pass - - # - - # - def orchestration_save(self, context, cancellation_context, mode, custom_params): - """ - Saves the Shell state and returns a description of the saved artifacts and information - This command is intended for API use only by sandbox orchestration scripts to implement - a save and restore workflow - :param ResourceCommandContext context: the context object containing resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str mode: Snapshot save mode, can be one of two values 'shallow' (default) or 'deep' - :param str custom_params: Set of custom parameters for the save operation - :return: SavedResults serialized as JSON - :rtype: OrchestrationSaveResult - """ - - # See below an example implementation, here we use jsonpickle for serialization, - # to use this sample, you'll need to add jsonpickle to your requirements.txt file - # The JSON schema is defined at: https://github.com/QualiSystems/sandbox_orchestration_standard/blob/master/save%20%26%20restore/saved_artifact_info.schema.json - # You can find more information and examples examples in the spec document at https://github.com/QualiSystems/sandbox_orchestration_standard/blob/master/save%20%26%20restore/save%20%26%20restore%20standard.md - ''' - # By convention, all dates should be UTC - created_date = datetime.datetime.utcnow() - - # This can be any unique identifier which can later be used to retrieve the artifact - # such as filepath etc. - - # By convention, all dates should be UTC - created_date = datetime.datetime.utcnow() - - # This can be any unique identifier which can later be used to retrieve the artifact - # such as filepath etc. - identifier = created_date.strftime('%y_%m_%d %H_%M_%S_%f') - - orchestration_saved_artifact = OrchestrationSavedArtifact('REPLACE_WITH_ARTIFACT_TYPE', identifier) - - saved_artifacts_info = OrchestrationSavedArtifactInfo( - resource_name="some_resource", - created_date=created_date, - restore_rules=OrchestrationRestoreRules(requires_same_resource=True), - saved_artifact=orchestration_saved_artifact) - - return OrchestrationSaveResult(saved_artifacts_info) - ''' - pass - - def orchestration_restore(self, context, cancellation_context, saved_artifact_info, custom_params): - """ - Restores a saved artifact previously saved by this Shell driver using the orchestration_save function - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param CancellationContext cancellation_context: Object to signal a request for cancellation. Must be enabled in drivermetadata.xml as well - :param str saved_artifact_info: A JSON string representing the state to restore including saved artifacts and info - :param str custom_params: Set of custom parameters for the restore operation - :return: None - """ - ''' - # The saved_details JSON will be defined according to the JSON Schema and is the same object returned via the - # orchestration save function. - # Example input: - # { - # "saved_artifact": { - # "artifact_type": "REPLACE_WITH_ARTIFACT_TYPE", - # "identifier": "16_08_09 11_21_35_657000" - # }, - # "resource_name": "some_resource", - # "restore_rules": { - # "requires_same_resource": true - # }, - # "created_date": "2016-08-09T11:21:35.657000" - # } - - # The example code below just parses and prints the saved artifact identifier - saved_details_object = json.loads(saved_details) - return saved_details_object[u'saved_artifact'][u'identifier'] - ''' - pass - - # - - # - - ''' - # The ApplyConnectivityChanges function is intended to be used for using switches as connectivity providers - # for other devices. If the Switch shell is intended to be used a DUT only there is no need to implement it - - def ApplyConnectivityChanges(self, context, request): - """ - Configures VLANs on multiple ports or port-channels - :param ResourceCommandContext context: The context object for the command with resource and reservation info - :param str request: A JSON object with the list of requested connectivity changes - :return: a json object with the list of connectivity changes which were carried out by the switch - :rtype: str - """ - - return apply_connectivity_changes(request=request, - add_vlan_action=lambda x: ConnectivitySuccessResponse(x,'Success'), - remove_vlan_action=lambda x: ConnectivitySuccessResponse(x,'Success')) - - - - ''' - - # - - # - - def get_inventory(self, context): - """ - Discovers the resource structure and attributes. - :param AutoLoadCommandContext context: the context the command runs on - :return Attribute and sub-resource information for the Shell resource you can return an AutoLoadDetails object - :rtype: AutoLoadDetails - """ - # See below some example code demonstrating how to return the resource structure - # and attributes. In real life, of course, if the actual values are not static, - # this code would be preceded by some SNMP/other calls to get the actual resource information - ''' - # Add sub resources details - sub_resources = [ AutoLoadResource(model ='Generic Chassis',name= 'Chassis 1', relative_address='1'), - AutoLoadResource(model='Generic Module',name= 'Module 1',relative_address= '1/1'), - AutoLoadResource(model='Generic Port',name= 'Port 1', relative_address='1/1/1'), - AutoLoadResource(model='Generic Port', name='Port 2', relative_address='1/1/2'), - AutoLoadResource(model='Generic Power Port', name='Power Port', relative_address='1/PP1')] - - - attributes = [ AutoLoadAttribute(relative_address='', attribute_name='Location', attribute_value='Santa Clara Lab'), - AutoLoadAttribute('', 'Model', 'Catalyst 3850'), - AutoLoadAttribute('', 'Vendor', 'Cisco'), - AutoLoadAttribute('1', 'Serial Number', 'JAE053002JD'), - AutoLoadAttribute('1', 'Model', 'WS-X4232-GB-RJ'), - AutoLoadAttribute('1/1', 'Model', 'WS-X4233-GB-EJ'), - AutoLoadAttribute('1/1', 'Serial Number', 'RVE056702UD'), - AutoLoadAttribute('1/1/1', 'MAC Address', 'fe80::e10c:f055:f7f1:bb7t16'), - AutoLoadAttribute('1/1/1', 'IPv4 Address', '192.168.10.7'), - AutoLoadAttribute('1/1/2', 'MAC Address', 'te67::e40c:g755:f55y:gh7w36'), - AutoLoadAttribute('1/1/2', 'IPv4 Address', '192.168.10.9'), - AutoLoadAttribute('1/PP1', 'Model', 'WS-X4232-GB-RJ'), - AutoLoadAttribute('1/PP1', 'Port Description', 'Power'), - AutoLoadAttribute('1/PP1', 'Serial Number', 'RVE056702UD')] - - return AutoLoadDetails(sub_resources,attributes) - ''' - pass - - # - - # - - def health_check(self,cancellation_context): - """ - Checks if the device is up and connectable - :return: str: Success or fail message - """ - pass - - # - - def cleanup(self): - """ - Destroy the driver session, this function is called everytime a driver instance is destroyed - This is a good place to close any open sessions, finish writing to log files - """ - pass diff --git a/ericsson_ipos_extended_shell/src/drivermetadata.xml b/ericsson_ipos_extended_shell/src/drivermetadata.xml index edd22c0..4e15f1e 100644 --- a/ericsson_ipos_extended_shell/src/drivermetadata.xml +++ b/ericsson_ipos_extended_shell/src/drivermetadata.xml @@ -1,74 +1,92 @@ - + + - - + + + - + - + - + - - - + + - + - - - + + + + + + + + + + + + + - - - + - + - + + + + + - - - + + + - + - - - - + + + + - + - - + + - + \ No newline at end of file diff --git a/ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py b/ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py index 36dbbbb..38e5292 100644 --- a/ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py +++ b/ericsson_ipos_extended_shell/src/ericsson_ipos_extended_resource_driver.py @@ -73,6 +73,18 @@ def save(self, context, folder_path, configuration_type, vrf_management_name=Non configuration_operations.logger.info('Save completed') return response + @GlobalLock.lock + @context_from_args + def reboot(self, context): + """Reboot device + + """ + + configuration_operations = EricssonConfigurationOperations() + configuration_operations.logger.info('Reboot started') + configuration_operations.reload() + configuration_operations.logger.info('Reboot completed') + @context_from_args def orchestration_save(self, context, mode="shallow", custom_params=None): configuration_operations = EricssonConfigurationOperations() diff --git a/ericsson_ipos_extended_shell/src/requirements.txt b/ericsson_ipos_extended_shell/src/requirements.txt index 76b77e4..094b19a 100644 --- a/ericsson_ipos_extended_shell/src/requirements.txt +++ b/ericsson_ipos_extended_shell/src/requirements.txt @@ -1,2 +1 @@ -cloudshell-shell-core>=2.3.0,<2.4.0 -cloudshell-networking>=4.0.0,<4.1.0 \ No newline at end of file +cloudshell-networking-ericsson-ipos-extended>=1.0,<1.1 \ No newline at end of file diff --git a/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py b/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py index bb3714d..6d64211 100644 --- a/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py +++ b/package/cloudshell/tests/networking/ericsson/autoload/tests_ericsson_ext_ipos_autoload_unit_tests.py @@ -7,7 +7,7 @@ from cloudshell.core.logger.qs_logger import get_qs_logger -class TestEricssonAutoload(TestCase): +class TestEricssonIPOSAutoload(TestCase): def _check_relative_path(self, resources): relative_path = [] for resource in resources: From 2cf9e759aeec85d1ef9ce5a402910811551f717d Mon Sep 17 00:00:00 2001 From: CoYe Date: Thu, 22 Dec 2016 12:05:29 +0200 Subject: [PATCH 39/39] added printing of configuration file full path to the logs --- .../ipos/autoload/ericsson_ext_ipos_autoload_config.json | 2 +- .../ipos/autoload/ericsson_extended_ipos_snmp_autoload.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json index ba38aff..58c8eaa 100644 --- a/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json +++ b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_ext_ipos_autoload_config.json @@ -58,7 +58,7 @@ } }, "1.3.6.1.4.1.193.218.6.9.209" : { - "linecard_model" : "1-10ge-20port", + "linecard_model" : "1-10ge-20-port", "pfe_0" : { "1GE_ports" : [ "1-10" diff --git a/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py index fd616e0..de6cc01 100644 --- a/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py +++ b/package/cloudshell/networking/ericsson/extended/ipos/autoload/ericsson_extended_ipos_snmp_autoload.py @@ -40,8 +40,9 @@ def load_ericsson_mib(self): def _load_configuration(self): local_path = os.path.dirname(__file__) - config_path = os.path.abspath(os.path.join(local_path, '', 'ericsson_ext_ipos_autoload_config.json')) - str_config = open(config_path, 'r').read() + self.configuration_file_path = os.path.abspath(os.path.join(local_path, '', + 'ericsson_ext_ipos_autoload_config.json')) + str_config = open(self.configuration_file_path, 'r').read() self.configuration = json.loads(str_config) @property