Provides a PHP client library and Symfony bundle for interacting with Infoblox Grid Manager
This project provides a PHP client library and Symfony bundle for interacting with Infoblox Grid Manager.
Open a command console, enter your project directory and execute:
$ composer require ias/infoblox
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require ias/infoblox
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new IAS\InfobloxBundle\IASInfobloxBundle(),
);
// ...
}
// ...
}
Configure the bundle by adding the following container parameters:
ib_grid_manager_url: 'https://ipam.example.com'
ib_username: username
ib_password: password
require 'vendor/autoload.php';
$client = new \GuzzleHttp\Client(['base_uri' => 'https://ipam.example.com/wapi/v2.7.1/', 'auth' => ['username', 'password']]);
$api = new \IAS\Infoblox\Wapi($client);
try {
$result = $api->get('ipv4address', ['ip_address' => '172.16.13.38']);
print_r($result);
} catch (\IAS\Infoblox\WapiException $e) {
print($e->getMessage());
}
$api = $this->container->get('infoblox.wapi');
try {
$result = $api->get('ipv4address', ['ip_address' => '172.16.13.38']);
print_r($result);
} catch (\IAS\Infoblox\WapiException $e) {
print($e->getMessage());
}
Although the infoblox.wapi
service is public it is recommended instead to inject
interface IAS\Infoblox\WapiInterface
into a service class.
composer build