Giter Site home page Giter Site logo

netscaler's Introduction

Build Status codecov

Netscaler Gem

A gem that uses the Netscaler Nitro API to access configs and stats. This has been tested only on Netscaler 9.3. Hoping to have Netscaler 10.0 support added in the near future.

THIS IS PRE-ALPHA!!!

It is currently Pre-Alpha hence the 0-dot version and is susceptible to methods, classes and modules being renamed, added or deleted. I will try my best to back support as much as I can but will provide release notes of changes. Would love to get community support, I have access to a Netscaler and will add this to the spec as well down the road.

How it works

Connecting to a Netscaler

All params are hash keys. So to create a new connection to a netscaler:

conn = Netscaler::Connection :hostname => 'netscaler01', :username => 'foo', :password => 'bar'

If you want to disable ssl verification provide the optional param :verify_ssl => false

conn = Netscaler::Connection :hostname => 'netscaler01', :username => 'foo', :password => 'bar', :verify_ssl => false

Disabling and Enabling a Service

We try to keep the classes and methods match the command groups that are in the netscaler cli. So if you are familiar with this then it should be pretty easy to guess what the methods will look like. Such as:

disable service service01

conn.service.disable(:name => 'service01')

enable service service01

conn.service.enable(:name => 'service01')

TODO

  • Classes and methods for Rewrite policies and actions
  • Classes and methods for Responder policies and actions
  • Classes and methods for Content Switching policies
  • Add new definitions for deleting netscaler object entities
  • Add stats
  • Add support for Nitro 10.0, 10.1

Contributing to Netscaler Gem

When writing a new class or method we want to try to follow the same names as the command(s) that is in the NSCLI. For instance:

NSCLI

add server <name> (<IPAddress> | (<domain>)

RUBY

conn.server.add :name => 'foo', :domain => '1.1.1.1'

Here is another example, adding an lb vserver. We created a sub class of Lb called Netscaler::Lb::Vserver. So it would look something like:

NSCLI

add lb vserver vip1 HTTP 1.1.1.1 80

RUBY

conn.lb.vserver.add :name => 'vip1', :serviceType => HTTP, :ipv46 => '1.1.1.1', :port => '80'

Otherwise if there are features that are missing or bugs in the code that need fixing, pull requests are welcome. I am mostly using this for disabling and enabling services but new features are welcome so long as they follow this convention to keep consistency.

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2017 Jarrett Irons. See LICENSE.txt for further details.

netscaler's People

Contributors

bitflingr avatar burnettk avatar jcustenborder avatar krutisfood avatar leonkyneur avatar mcculloughsean avatar pdion891 avatar ptierno avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.