Project

dhcpsapi

0.01
No commit activity in last 3 years
No release in over 3 years
Ruby wrappers for MS DHCP api
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 4.3
>= 0
>= 0

Runtime

>= 0
 Project Readme

Ruby bindings for MS DHCPS API

This repository contains ffi-based ruby bindings for MS DHCP server management API.

Installation

Install ruby-dhcpsapi gem from Rubygems:

gem install dhcpsapi

Usage

require 'dhcpsapi'

api = DhcpsApi::Server.new('127.0.0.1')

clients = @api.list_clients('192.168.42.0')

api.create_client('192.168.42.254', '255.255.255.0', '01:01:02:03:04:05', 'test_client_1',
                       'test client 1 comment', 0)

# etc...

Please see Integration tests for additional examples.

Development

Running integration tests requires a locally available MS DHCP server. These tests create and remove a variety of objects, including subnets, classes, options, option values, and clients are are probably better NOT executed against a production server.

License

This software is licensed under the Apache 2 license, quoted below.

Copyright (c) 2016 Dmitri Dolguikh <dmitri at appliedlogic dot ca>

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.