nokia / pysros Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
It seems that there is a problem setting empty leaf like in CPM actions:
example:
Container({'entry-id': Leaf(1195), 'description': Leaf('TWAMP_LIGHT_ALLOW_FOR_P2P'), 'match': Container({'protocol': Leaf('udp'), 'src-ip': Container({'ip-prefix-list': Leaf('prefix-p2p-backbone')}), 'src-port': Container({'eq': Leaf(862)})}), 'action': Container({'accept': Leaf(Empty)})})
The highlighted part always fail as "Invalid value"
Scenario
In my team's setup we use virtualized routers and connect to them using the hypervisors (Ubuntu) as jump hosts for SSH tunneling. We have used ncclient in the past and relied on it working with SSH Tunnels configured in ~/.ssh/config. This is currently not possible with pySROS though it could be.
Proposed change
Modify the definition of management::connect
Line 40 in 988434a
and the creation of a Connection object therein
Line 131 in 988434a
Advantages
It is a relatively small change and allows flexibility for users to use, test and develop scripts using pySROS through SSH tunnels.
When installing pysros on Win10, theres a lxml dependency which sometimes gives an error when trying to install.
The way around it for me was to download lxml version 4.9.0 for python 3.11 here and change the requirements.txt and setup.py files to support lxml version 4.9.0.
Is there a way to specify a commit comment using the commit()
function?
Thanks
At https://github.com/nokia/pysros/blob/main/pysros/wrappers.py#L74 some Python operators are overridden, but not all
For example:
cards = c.running.get("/nokia-state:state/card")
mdaType = cards[1]['mda'][1]['equipped-type'] # "s36-100gb-qsfp28"
print( 'qsfp' in mdaType ) # False(!)
mdaType is of type 'Leaf', it looks like a string when printed but it does not behave like a string
Hello,
I faced an issue that I cannot connect to the router with pySROS without checking SSH key. Connection fails with this message:
RuntimeError: Cannot create connection - Unknown host key [omitted] for [ip.add.re.ss]
as I do not have known_hosts file.
Tried to add 'hostkey_verify=False'
as a parameter to connect()
function, but it didn't work: TypeError: connect() got an unexpected keyword argument 'hostkey_verify'
Looks like adding 'hostkey_verify=False'
to Connection object here solves the issue.
Could you please implement that?
Some info about the setup:
python3.6
pysros==21.7.2
router IXR7250-e 21.7.R1
host "CentOS Linux 7 (Core)"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.