Clean & reformat code
This commit is contained in:
parent
9e323171fd
commit
5180bf1d38
88 changed files with 4317 additions and 4408 deletions
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Cables extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/cables/", $params);
|
||||
}
|
||||
class Cables extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/cables/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/cables/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/cables/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/cables/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/cables/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/cables/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/cables/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/cables/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/cables/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,14 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConnectedDevices extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/connected-device/", $params);
|
||||
}
|
||||
class ConnectedDevices extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/connected-device/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,14 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConsoleConnections extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-connections/", $params);
|
||||
}
|
||||
class ConsoleConnections extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/console-connections/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConsolePortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/console-port-templates/", $params);
|
||||
}
|
||||
class ConsolePortTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/console-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/console-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/console-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/console-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/console-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-port-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/console-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/console-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConsolePorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/console-ports/", $params);
|
||||
}
|
||||
class ConsolePorts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/console-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/console-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/console-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/console-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/console-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/console-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/console-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-ports/" . $id . "/trace/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/console-ports/" . $id . "/trace/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConsoleServerPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/console-server-port-templates/", $params);
|
||||
}
|
||||
class ConsoleServerPortTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/console-server-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/console-server-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/console-server-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/console-server-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/console-server-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-server-port-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/console-server-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-server-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/console-server-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ConsoleServerPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/console-server-ports/", $params);
|
||||
}
|
||||
class ConsoleServerPorts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/console-server-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/console-server-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/console-server-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/console-server-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/console-server-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-server-ports/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/console-server-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/console-server-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/console-server-ports/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class DeviceBayTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/device-bay-templates/", $params);
|
||||
}
|
||||
class DeviceBayTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/device-bay-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/device-bay-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/device-bay-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/device-bay-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/device-bay-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-bay-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/device-bay-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-bay-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/device-bay-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class DeviceBays extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/device-bays/", $params);
|
||||
}
|
||||
class DeviceBays extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/device-bays/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/device-bays/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/device-bays/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/device-bays/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/device-bays/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-bays/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/device-bays/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-bays/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/device-bays/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class DeviceRoles extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/device-roles/", $params);
|
||||
}
|
||||
class DeviceRoles extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/device-roles/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/device-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/device-roles/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/device-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/device-roles/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-roles/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/device-roles/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/device-roles/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class DeviceTypes extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/device-types/", $params);
|
||||
}
|
||||
class DeviceTypes extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/device-types/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/device-types/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/device-types/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/device-types/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/device-types/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-types/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/device-types/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/device-types/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/device-types/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Devices extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/devices/", $params);
|
||||
}
|
||||
class Devices extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/devices/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/devices/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/devices/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/devices/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/devices/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/devices/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/devices/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/devices/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/devices/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function napalm(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/devices/" . $id . "/napalm/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function napalm( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/devices/" . $id . "/napalm/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class FrontPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/front-port-templates/", $params);
|
||||
}
|
||||
class FrontPortTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/front-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/front-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/front-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/front-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/front-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/front-port-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/front-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/front-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/front-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class FrontPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/front-ports/", $params);
|
||||
}
|
||||
class FrontPorts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/front-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/front-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/front-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/front-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/front-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/front-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/front-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function paths(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/front-ports/" . $id . "/paths/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function paths( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/front-ports/" . $id . "/paths/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,14 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class InterfaceConnections extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interface-connections/", $params);
|
||||
}
|
||||
class InterfaceConnections extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/interface-connections/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class InterfaceTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/interface-templates/", $params);
|
||||
}
|
||||
class InterfaceTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/interface-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/interface-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/interface-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/interface-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/interface-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interface-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/interface-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interface-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/interface-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Interfaces extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/interfaces/", $params);
|
||||
}
|
||||
class Interfaces extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/interfaces/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/interfaces/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/interfaces/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/interfaces/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/interfaces/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/interfaces/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/interfaces/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/interfaces/" . $id . "/trace/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/interfaces/" . $id . "/trace/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class InventoryItems extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/inventory-items/", $params);
|
||||
}
|
||||
class InventoryItems extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/inventory-items/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/inventory-items/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/inventory-items/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/inventory-items/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/inventory-items/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/inventory-items/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/inventory-items/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/inventory-items/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/inventory-items/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Manufacturers extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/manufacturers/", $params);
|
||||
}
|
||||
class Manufacturers extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/manufacturers/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/manufacturers/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/manufacturers/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/manufacturers/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/manufacturers/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/manufacturers/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/manufacturers/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/manufacturers/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/manufacturers/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class ModuleBays extends AbstractApi
|
||||
{
|
||||
class ModuleBays extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/module-bays/", $params);
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/module-bays/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/module-bays/" . $id . "/", $params);
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/module-bays/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/module-bays/" . $id . "/", $params);
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/module-bays/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/dcim/module-bays/" . $id . "/", $params);
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/dcim/module-bays/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/module-bays/", $params);
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/module-bays/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/module-bays/" . $id . "/", $params);
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/module-bays/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Modules extends AbstractApi
|
||||
{
|
||||
class Modules extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/modules/", $params);
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/modules/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/modules/" . $id . "/", $params);
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/modules/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/modules/" . $id . "/", $params);
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/modules/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/dcim/modules/" . $id . "/", $params);
|
||||
public function update( int $id, array $params = [] ): array {
|
||||
return $this->patch( "/dcim/modules/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/modules/", $params);
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/modules/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/modules/" . $id . "/", $params);
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/modules/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Platforms extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/platforms/", $params);
|
||||
}
|
||||
class Platforms extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/platforms/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/platforms/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/platforms/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/platforms/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/platforms/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/platforms/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/platforms/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerFeeds extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-feeds/", $params);
|
||||
}
|
||||
class PowerFeeds extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-feeds/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-feeds/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-feeds/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-feeds/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-feeds/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-feeds/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-feeds/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-feeds/" . $id . "/trace/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-feeds/" . $id . "/trace/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerOutletTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-outlet-templates/", $params);
|
||||
}
|
||||
class PowerOutletTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-outlet-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-outlet-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-outlet-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-outlet-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-outlet-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-outlet-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-outlet-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-outlet-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-outlet-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerOutlets extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-outlets/", $params);
|
||||
}
|
||||
class PowerOutlets extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-outlets/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-outlets/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-outlets/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-outlets/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-outlets/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-outlets/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-outlets/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-outlets/" . $id . "/trace/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-outlets/" . $id . "/trace/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerPanels extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-panels/", $params);
|
||||
}
|
||||
class PowerPanels extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-panels/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-panels/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-panels/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-panels/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-panels/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-panels/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-panels/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-panels/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-panels/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-port-templates/", $params);
|
||||
}
|
||||
class PowerPortTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-port-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class PowerPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/power-ports/", $params);
|
||||
}
|
||||
class PowerPorts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/power-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/power-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/power-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/power-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/power-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/power-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/power-ports/" . $id . "/trace/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function trace( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/power-ports/" . $id . "/trace/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class RackGroups extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/rack-groups/", $params);
|
||||
}
|
||||
class RackGroups extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/rack-groups/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/rack-groups/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/rack-groups/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/rack-groups/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/rack-groups/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-groups/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-groups/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-groups/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-groups/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class RackReservations extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/rack-reservations/", $params);
|
||||
}
|
||||
class RackReservations extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/rack-reservations/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/rack-reservations/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/rack-reservations/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/rack-reservations/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/rack-reservations/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-reservations/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-reservations/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-reservations/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-reservations/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class RackRoles extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/rack-roles/", $params);
|
||||
}
|
||||
class RackRoles extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/rack-roles/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/rack-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/rack-roles/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/rack-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/rack-roles/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-roles/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-roles/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rack-roles/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rack-roles/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Racks extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/racks/", $params);
|
||||
}
|
||||
class Racks extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/racks/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/racks/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/racks/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/racks/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/racks/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/racks/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/racks/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/racks/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/racks/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function elevation(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/racks/" . $id . "/elevation/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function elevation( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/racks/" . $id . "/elevation/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class RearPortTemplates extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/rear-port-templates/", $params);
|
||||
}
|
||||
class RearPortTemplates extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/rear-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/rear-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/rear-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/rear-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/rear-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rear-port-templates/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/rear-port-templates/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rear-port-templates/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rear-port-templates/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,69 +5,68 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class RearPorts extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/rear-ports/", $params);
|
||||
}
|
||||
class RearPorts extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/rear-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/rear-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/rear-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/rear-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/rear-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/rear-ports/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rear-ports/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function paths(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/rear-ports/" . $id . "/paths/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function paths( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/rear-ports/" . $id . "/paths/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Regions extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/regions/", $params);
|
||||
}
|
||||
class Regions extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/regions/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/regions/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/regions/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/regions/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/regions/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/regions/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/regions/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/regions/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/regions/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class Sites extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/sites/", $params);
|
||||
}
|
||||
class Sites extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/sites/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/sites/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/sites/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/sites/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/sites/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/sites/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/sites/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/sites/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/sites/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,58 +5,57 @@ namespace Hosterra\NetBox\Api\DCIM;
|
|||
use GuzzleHttp\Exception\GuzzleException;
|
||||
use Hosterra\NetBox\Api\AbstractApi;
|
||||
|
||||
class VirtualChassis extends AbstractApi
|
||||
{
|
||||
/**
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add(array $params = []): array
|
||||
{
|
||||
return $this->post("/dcim/virtual-chassis/", $params);
|
||||
}
|
||||
class VirtualChassis extends AbstractApi {
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function add( array $params = [] ): array {
|
||||
return $this->post( "/dcim/virtual-chassis/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove(int $id, array $params = []): bool
|
||||
{
|
||||
return $this->delete("/dcim/virtual-chassis/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function remove( int $id, array $params = [] ): bool {
|
||||
return $this->delete( "/dcim/virtual-chassis/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit(int $id, array $params = []): array
|
||||
{
|
||||
return $this->put("/dcim/virtual-chassis/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function edit( int $id, array $params = [] ): array {
|
||||
return $this->put( "/dcim/virtual-chassis/" . $id . "/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list(array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/virtual-chassis/", $params);
|
||||
}
|
||||
/**
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function list( array $params = [] ) {
|
||||
return $this->get( "/dcim/virtual-chassis/", $params );
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show(int $id, array $params = [])
|
||||
{
|
||||
return $this->get("/dcim/virtual-chassis/" . $id . "/", $params);
|
||||
}
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
*
|
||||
* @return mixed
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function show( int $id, array $params = [] ) {
|
||||
return $this->get( "/dcim/virtual-chassis/" . $id . "/", $params );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue