ias/infoblox

Provides a PHP client library and Symfony bundle for interacting with Infoblox Grid Manager

Installs: 2 910

Dependents: 0

Suggesters: 0

Security: 0

Type:symfony-bundle

4.1.0 2020-09-17 13:27 UTC

This package is auto-updated.

Last update: 2021-03-25 18:56:25 UTC


README

This project provides a PHP client library and Symfony bundle for interacting with Infoblox Grid Manager.

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

$ composer require ias/infoblox

Applications that don't use Symfony Flex

Step 1: Download the Bundle

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

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    IAS\InfobloxBundle\IASInfobloxBundle::class => ['all' => true],
];

Configure the bundle by adding the following container parameters:

ib_grid_manager_url: 'https://ipam.example.com'
ib_username: username
ib_password: password

Usage Example

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());
}

Symfony Bundle Usage Example

$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.

Developers

Requirements

Build

composer build