Finished DCMI portion.
This commit is contained in:
parent
278c3b8904
commit
80dc580e75
40 changed files with 2199 additions and 4 deletions
56
src/Api/Cables.php
Normal file
56
src/Api/Cables.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Cables extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/cables/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/cables/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/cables/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/cables/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/cables/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/CircuitProviders.php
Normal file
56
src/Api/CircuitProviders.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class CircuitProviders extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/circuits/providers/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/circuits/providers/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/circuits/providers/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/circuits/providers/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/circuits/providers/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/CircuitTerminations.php
Normal file
56
src/Api/CircuitTerminations.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class CircuitTerminations extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/circuits/circuit-terminations/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/circuits/circuit-terminations/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/circuits/circuit-terminations/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuit-terminations/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuit-terminations/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/CircuitTypes.php
Normal file
56
src/Api/CircuitTypes.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class CircuitTypes extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/circuits/circuit-types/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/circuits/circuit-types/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/circuits/circuit-types/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuit-types/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuit-types/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/Circuits.php
Normal file
56
src/Api/Circuits.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Circuits extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/circuits/circuits/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/circuits/circuits/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/circuits/circuits/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuits/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/circuits/circuits/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
16
src/Api/ConnectedDevices.php
Normal file
16
src/Api/ConnectedDevices.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Cables extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/connected-device/", $params);
|
||||
}
|
||||
}
|
||||
16
src/Api/ConsoleConnections.php
Normal file
16
src/Api/ConsoleConnections.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class ConsoleConnections extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-connections/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/ConsolePortTemplates.php
Normal file
56
src/Api/ConsolePortTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class ConsolePortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/console-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/console-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/console-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-port-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/ConsolePorts.php
Normal file
66
src/Api/ConsolePorts.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class ConsolePorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/console-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/console-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/console-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function trace($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/".$id."/trace/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/ConsoleServerPortTemplates.php
Normal file
56
src/Api/ConsoleServerPortTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class ConsoleServerPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/console-server-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/console-server-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/console-server-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-server-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-server-port-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/ConsoleServerPorts.php
Normal file
56
src/Api/ConsoleServerPorts.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class ConsoleServerPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/console-server-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/console-server-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/console-server-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-server-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/console-server-ports/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/DeviceBayTemplates.php
Normal file
56
src/Api/DeviceBayTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class DeviceBayTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/device-bay-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/device-bay-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/device-bay-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-bay-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-bay-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/DeviceBays.php
Normal file
56
src/Api/DeviceBays.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class DeviceBays extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/device-bays/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/device-bays/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/device-bays/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-bays/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-bays/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/DeviceRoles.php
Normal file
56
src/Api/DeviceRoles.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class DeviceRoles extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/device-roles/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/device-roles/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/device-roles/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-roles/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-roles/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/DeviceTypes.php
Normal file
56
src/Api/DeviceTypes.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class DeviceTypes extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/device-types/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/device-types/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/device-types/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-types/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/device-types/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/Devices.php
Normal file
66
src/Api/Devices.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Devices extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/devices/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/devices/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/devices/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/devices/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/devices/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function napalm($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/devices/".$id."/napalm/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/FrontPortTemplates.php
Normal file
56
src/Api/FrontPortTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class FrontPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/front-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/front-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/front-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/front-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/front-port-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/FrontPorts.php
Normal file
66
src/Api/FrontPorts.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class FrontPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/front-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/front-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/front-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function paths($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/".$id."/paths/", $params);
|
||||
}
|
||||
}
|
||||
16
src/Api/InterfaceConnections.php
Normal file
16
src/Api/InterfaceConnections.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class InterfaceConnections extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/interface-connections/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/InterfaceTemplates.php
Normal file
56
src/Api/InterfaceTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class InterfaceTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/interface-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/interface-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/interface-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/interface-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/interface-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/Interfaces.php
Normal file
66
src/Api/Interfaces.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Interfaces extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/interfaces/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/interfaces/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/interfaces/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function trace($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/".$id."/trace/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/InventoryItems.php
Normal file
56
src/Api/InventoryItems.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class InventoryItems extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/inventory-items/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/inventory-items/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/inventory-items/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/inventory-items/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/inventory-items/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/Manufacturers.php
Normal file
56
src/Api/Manufacturers.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Manufacturers extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/manufacturers/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/manufacturers/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/manufacturers/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/manufacturers/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/manufacturers/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/Platforms.php
Normal file
56
src/Api/Platforms.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Platforms extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/platforms/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/platforms/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/platforms/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/platforms/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/platforms/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/PowerFeeds.php
Normal file
66
src/Api/PowerFeeds.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerFeeds extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-feeds/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-feeds/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-feeds/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function trace($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/".$id."/trace/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/PowerOutletTemplates.php
Normal file
56
src/Api/PowerOutletTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerOutletTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-outlet-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-outlet-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-outlet-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-outlet-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-outlet-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/PowerOutlets.php
Normal file
66
src/Api/PowerOutlets.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerOutlets extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-outlets/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-outlets/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-outlets/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function trace($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/".$id."/trace/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/PowerPanels.php
Normal file
56
src/Api/PowerPanels.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerPanels extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-panels/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-panels/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-panels/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-panels/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-panels/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/PowerPortTemplates.php
Normal file
56
src/Api/PowerPortTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-port-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/PowerPorts.php
Normal file
66
src/Api/PowerPorts.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class PowerPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/power-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/power-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/power-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function trace($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/".$id."/trace/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/RackGroups.php
Normal file
56
src/Api/RackGroups.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class RackGroups extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/rack-groups/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/rack-groups/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/rack-groups/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-groups/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-groups/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/RackReservations.php
Normal file
56
src/Api/RackReservations.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class RackReservations extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/rack-reservations/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/rack-reservations/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/rack-reservations/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-reservations/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-reservations/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/RackRoles.php
Normal file
56
src/Api/RackRoles.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class RackRoles extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/rack-roles/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/rack-roles/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/rack-roles/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-roles/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rack-roles/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/Racks.php
Normal file
66
src/Api/Racks.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Racks extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/racks/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/racks/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/racks/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/racks/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/racks/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function elevation($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/racks/".$id."/elevation/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/RearPortTemplates.php
Normal file
56
src/Api/RearPortTemplates.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class RearPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/rear-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/rear-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/rear-port-templates/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/rear-port-templates/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rear-port-templates/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
66
src/Api/RearPorts.php
Normal file
66
src/Api/RearPorts.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class RearPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/rear-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/rear-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/rear-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function paths($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/".$id."/paths/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/Regions.php
Normal file
56
src/Api/Regions.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Regions extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/regions/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/regions/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/regions/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/regions/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/regions/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/Sites.php
Normal file
56
src/Api/Sites.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class Sites extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/sites/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/sites/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/sites/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/sites/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/sites/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
56
src/Api/VirtualChassis.php
Normal file
56
src/Api/VirtualChassis.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace wickedsoft\NetBox\Api;
|
||||
|
||||
class VirtualChassis extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function add($params=[])
|
||||
{
|
||||
return $this->post("/dcim/virtual-chassis/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function delete($id, $params=[])
|
||||
{
|
||||
return $this->delete("/dcim/virtual-chassis/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function edit($id, $params=[])
|
||||
{
|
||||
return $this->put("/dcim/virtual-chassis/".$id."/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function list($params=[])
|
||||
{
|
||||
return $this->get("/dcim/virtual-chassis/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $params
|
||||
* @return mixed
|
||||
* @throws \GuzzleHttp\Exception\GuzzleException
|
||||
*/
|
||||
public function show($id, $params=[])
|
||||
{
|
||||
return $this->get("/dcim/virtual-chassis/".$id."/", $params);
|
||||
}
|
||||
}
|
||||
|
|
@ -8,14 +8,55 @@ class Client
|
|||
{
|
||||
/** @var array */
|
||||
protected $classes = [
|
||||
'ip' => 'Ip',
|
||||
/*'providers' => 'Providers',
|
||||
//circuits
|
||||
'circuits' => 'Circuits',
|
||||
'circuitTypes' => 'CircuitTypes',
|
||||
'circuitTerminations' => 'CircuitTerminations',
|
||||
'providers' => 'CircuitProviders',
|
||||
'providers' => 'Providers',
|
||||
//dcim
|
||||
'cables' => 'Cables',
|
||||
'connectedDevices' => 'ConnectedDevices'
|
||||
'consoleConnections' => 'ConsoleConnections',
|
||||
'consolePortTemplates' => 'ConsolePortTemplates',
|
||||
'consolePorts' => 'ConsolePorts',
|
||||
'consoleServerPortTemplates' => 'ConsoleServerPortTemplates',
|
||||
'consoleServerPorts' => 'ConsoleServerPorts',
|
||||
'deviceBayTemplates' => 'DeviceBayTemplates',
|
||||
'deviceBays' => 'DeviceBays',
|
||||
'deviceRoles' => 'DeviceRoles',
|
||||
'deviceTypes' => 'DeviceTypes',
|
||||
'devices' => 'Devices',
|
||||
'frontPortTemplates' => 'FrontPortTemplates',
|
||||
'frontPorts' => 'FrontPorts',
|
||||
'interfaceConnections' => 'InterfaceConnections',
|
||||
'interfaceTemplates' => 'InterfaceTemplates',
|
||||
'interfaces' => 'Interfaces',
|
||||
'inventoryItems' => 'InventoryItems',
|
||||
'manufacturers' => 'Manufacturers',
|
||||
'platforms' => 'Platforms',
|
||||
'powerFeeds' => 'PowerFeeds',
|
||||
'powerOutlets' => 'PowerOutlets',
|
||||
'powerOutletTemplates' => 'PowerOutletTemplates',
|
||||
'powerPanels' => 'PowerPanels',
|
||||
'powerPorts' => 'PowerPorts',
|
||||
'powerPortTemplates' => 'PowerPortTemplates',
|
||||
'rackGroups' => 'RackGroups',
|
||||
'rackReservations' => 'RackReservations',
|
||||
'rackRoles' => 'RackRoles',
|
||||
'racks' => 'Racks',
|
||||
'rearPortTemplates' => 'RearPortTemplates',
|
||||
'rearPorts' => 'RearPorts',
|
||||
'regions' => 'Regions',
|
||||
'sites' => 'Sites',
|
||||
'virtualChassis' => 'VirtualChassis',
|
||||
//ipam
|
||||
'ip' => 'Ip',
|
||||
/*'sites' => 'Sites',
|
||||
'racks' => 'Racks',
|
||||
'devices' => 'Devices',
|
||||
'prefixes' => 'Prefixes',
|
||||
'cables' => 'Cables',
|
||||
|
||||
'interfaces' => 'Interfaces',
|
||||
'rirs' => 'Rirs',
|
||||
'vlans' => 'Vlans',
|
||||
|
|
@ -24,7 +65,7 @@ class Client
|
|||
'tenants' => 'Tenants',
|
||||
'users' => 'Users',
|
||||
'clusters' => 'Clusters',*/
|
||||
|
||||
|
||||
];
|
||||
|
||||
/** @var \wickedsoft\NetBox\HttpClient */
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue