Brocade vRouter client

Build Status

Installation

Add this line to your application’s Gemfile:

ruby gem 'brocade_vrouter'

And then execute:

$ bundle

Usage

Configure

```ruby BrocadeVRouter.configure do |conf| conf.url ‘https://examplerouter.com’ conf.basic_auth [‘routeruser’, ‘routerpassword’] conf.ssl verify: false end

router = BrocadeVRouter::Client.new ```

Or pass config to client instance

ruby router = BrocadeVRouter::Client.new url: 'https://examplerouter.com', basic_auth: ['routeruser', 'routerpassword'], connection_options: {ssl: {verify: false}}

Example router configuration

```ruby router.configure do set security do vpn ‘l2tp remote-access authentication local-users’ do username ‘testuser’ do password ‘testpass’ static_ip ‘10.0.2.1’ end end

firewall name: :testfw do
  default_action :drop
  rule 100 do
    action :accept
    source address: '10.0.2.1'
    destination address: '10.0.2.0/24'
  end
end   end

commit end ```

CLI equivalent:

configure set security vpn l2tp remote-access authentication local-users username testuser password testpass set security vpn l2tp remote-access authentication local-users username testuser static-ip 10.0.2.1 set security firewall name testfw set security firewall name testfw default-action drop set security firewall name testfw rule 100 action accept set security firewall name testfw rule 100 source address 10.0.2.1 set security firewall name testfw rule 100 destination address 10.0.2.0/24 commit

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/serverscom/brocade_vrouter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.