Juniper/ruby-junos-ez-srx

Name: ruby-junos-ez-srx

Owner: Juniper Networks

Description: Ruby libraries support Junos automation via NETCONF - "SRX library"

Created: 2013-04-04 11:50:33.0

Updated: 2017-04-07 21:57:17.0

Pushed: 2013-08-19 14:10:09.0

Homepage:

Size: 260

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

OVERVIEW

NOTE: Work in progress - not yet in RubyGems.org

A collection of Ruby classes to make Junos SRX automation Easy. This library supports the following resources:

For more information about each topic, please refer to the README_xyz.md files.

EXAMPLE USAGE

ire 'pry'
ire 'yaml'
ire 'net/netconf/jnpr'
ire 'junos-ez/stdlib'
ire 'junos-ez/srx'

gin information for NETCONF session 

n = { :target => 'vsrx', :username => 'jeremy',  :password => 'jeremy1',  }

reate a NETCONF object to manage the device and open the connection ...

 = Netconf::SSH.new( login )
out.print "Connecting to device #{login[:target]} ... "
.open
out.puts "OK!"

ow bind providers to the device object.
he 'Junos::Ez::Provider' must be first before all others
his provider will setup the device 'facts'.  The other providers
llow you to define the instance variables; so this example
s using 'l1_ports' and 'ip_ports', but you could name them
hat you like, yo!

s::Ez::Provider( ndev )
s::Ez::L1ports::Provider( ndev, :l1_ports )
s::Ez::IPports::Provider( ndev, :ip_ports )
s::Ez::SRX::Zones::Provider( ndev, :zones )
s::Ez::SRX::Policies::Provider( ndev, :policies )

rop into interactive mode to play around ... let's look
t what the device has for facts ...

 ndev.facts.list
 ndev.facts.catalog
 ndev.fact :version

ow look at specific providers like the zones and policies

ndev.zones.list
ndev.zones.catalog

ing.pry

.close

DEPENDENCIES

INSTALLATION

CONTRIBUTORS

LICENSES

BSD-2, See LICENSE file


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.