finished all models and split them into folders to avoid dupes

This commit is contained in:
Tony Roy 2021-03-12 23:37:51 -04:00
commit f80e0692cd
76 changed files with 1886 additions and 92 deletions

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\Circuits;
class CircuitTerminations extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\Circuits;
class CircuitTypes extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\Circuits;
class Circuits extends AbstractApi
{

View file

@ -1,8 +1,8 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\Circuits;
class CircuitProviders extends AbstractApi
class Providers extends AbstractApi
{
/**
* @param $params

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Cables extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Cables extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class ConsoleConnections extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class ConsolePortTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class ConsolePorts extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class ConsoleServerPortTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class ConsoleServerPorts extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class DeviceBayTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class DeviceBays extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class DeviceRoles extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class DeviceTypes extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Devices extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class FrontPortTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class FrontPorts extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class InterfaceConnections extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class InterfaceTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Interfaces extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class InventoryItems extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Manufacturers extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Platforms extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerFeeds extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerOutletTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerOutlets extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerPanels extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerPortTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class PowerPorts extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class RackGroups extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class RackReservations extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class RackRoles extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Racks extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class RearPortTemplates extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class RearPorts extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Regions extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class Sites extends AbstractApi
{

View file

@ -1,6 +1,6 @@
<?php
namespace wickedsoft\NetBox\Api;
namespace wickedsoft\NetBox\Api\DCMI;
class VirtualChassis extends AbstractApi
{

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class ConfigContexts extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/extras/config-contexts/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/extras/config-contexts/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/extras/config-contexts/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/config-contexts/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/config-contexts/".$id."/", $params);
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class ContentTypes extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/content-types/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/content-types/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class CustomFields extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/extras/custom-fields/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/extras/custom-fields/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/extras/custom-fields/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/custom-fields/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/custom-fields/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class ExportTemplates extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/extras/export-templates/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/extras/export-templates/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/extras/export-templates/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/export-templates/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/export-templates/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class ImageAttachments extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/extras/image-attachments/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/extras/image-attachments/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/extras/image-attachments/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/image-attachments/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/image-attachments/".$id."/", $params);
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class JobResults extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/job-results/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/job-results/".$id."/", $params);
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class ObjectChanges extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/object-changes/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/object-changes/".$id."/", $params);
}
}

View file

@ -0,0 +1,36 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class Reports extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/reports/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/reports/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function run($id, $params=[])
{
return $this->post("/extras/reports/".$id."/", $params);
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class Scripts extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/scripts/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/scripts/".$id."/", $params);
}
}

56
src/Api/Extras/Tags.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Extras;
class Tags extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/extras/tags/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/extras/tags/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/extras/tags/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/extras/tags/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/extras/tags/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Aggregates extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/aggregates/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/aggregates/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/aggregates/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/aggregates/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/aggregates/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class IpAddresses extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/ip-addresses/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/ip-addresses/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/ip-addresses/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/ip-addresses/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/ip-addresses/".$id."/", $params);
}
}

96
src/Api/IPAM/Prefixes.php Normal file
View file

@ -0,0 +1,96 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Prefixes extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/prefixes/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/prefixes/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/prefixes/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/prefixes/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/prefixes/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function showAvailableIps($id, $params=[])
{
return $this->get("/ipam/prefixes/".$id."/available-ips/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function addAvailableIps($id, $params=[])
{
return $this->post("/ipam/prefixes/".$id."/available-ips/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function showAvailable($id, $params=[])
{
return $this->get("/ipam/prefixes/".$id."/available-prefixes/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function addAvailable($id, $params=[])
{
return $this->post("/ipam/prefixes/".$id."/available-prefixes/", $params);
}
}

56
src/Api/IPAM/Rirs.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Rirs extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/rirs/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/rirs/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/rirs/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/rirs/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/rirs/".$id."/", $params);
}
}

56
src/Api/IPAM/Roles.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Roles extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/roles/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/roles/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/roles/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/roles/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/roles/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class RouteTargets extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/route-targets/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/route-targets/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/route-targets/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/route-targets/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/route-targets/".$id."/", $params);
}
}

56
src/Api/IPAM/Services.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Services extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/services/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/services/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/services/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/services/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/services/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class VlanGroups extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/vlan-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/vlan-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/vlan-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/vlan-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/vlan-groups/".$id."/", $params);
}
}

56
src/Api/IPAM/Vlans.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Vlans extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/vlans/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/vlans/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/vlans/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/vlans/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/vlans/".$id."/", $params);
}
}

56
src/Api/IPAM/Vrfs.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\IPAM;
class Vrfs extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/ipam/vrfs/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/ipam/vrfs/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/ipam/vrfs/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/ipam/vrfs/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/ipam/vrfs/".$id."/", $params);
}
}

View file

@ -0,0 +1,16 @@
<?php
namespace wickedsoft\NetBox\Api\Secrets;
class KeyGen extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/secrets/generate-rsa-key-pair/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Secrets;
class SecretRoles extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/secrets/secret-roles/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/secrets/secret-roles/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/secrets/secret-roles/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/secrets/secret-roles/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/secrets/secret-roles/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Secrets;
class Secrets extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/secrets/secrets/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/secrets/secrets/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/secrets/secrets/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/secrets/secrets/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/secrets/secrets/".$id."/", $params);
}
}

View file

@ -0,0 +1,16 @@
<?php
namespace wickedsoft\NetBox\Api\Secrets;
class KeyGen extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/secrets/get-session-key/", $params);
}
}

16
src/Api/Status.php Normal file
View file

@ -0,0 +1,16 @@
<?php
namespace wickedsoft\NetBox\Api;
class Status extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($params=[])
{
return $this->get("/status/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Tenancy;
class TenantGroups extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/tenancy/tenant-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/tenancy/tenant-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/tenancy/tenant-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/tenancy/tenant-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/tenancy/tenant-groups/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Tenancy;
class Tenants extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/tenancy/tenants/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/tenancy/tenants/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/tenancy/tenants/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/tenancy/tenants/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/tenancy/tenants/".$id."/", $params);
}
}

16
src/Api/Users/Config.php Normal file
View file

@ -0,0 +1,16 @@
<?php
namespace wickedsoft\NetBox\Api\Users;
class Config extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/users/users/", $params);
}
}

56
src/Api/Users/Groups.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Users;
class Groups extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/users/groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/users/groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/users/groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/users/groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/users/groups/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Users;
class Permissions extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/users/permissions/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/users/permissions/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/users/permissions/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/users/permissions/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/users/permissions/".$id."/", $params);
}
}

56
src/Api/Users/Users.php Normal file
View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Users;
class Users extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/users/users/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/users/users/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/users/users/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/users/users/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/users/users/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Virtualization;
class ClusterGroups extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/virtualization/cluster-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/virtualization/cluster-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/virtualization/cluster-groups/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/virtualization/cluster-groups/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/virtualization/cluster-groups/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Virtualization;
class ClusterTypes extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/virtualization/cluster-types/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/virtualization/cluster-types/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/virtualization/cluster-types/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/virtualization/cluster-types/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/virtualization/cluster-types/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Virtualization;
class ClusterTypes extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/virtualization/clusters/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/virtualization/clusters/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/virtualization/clusters/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/virtualization/clusters/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/virtualization/clusters/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Virtualization;
class Interfaces extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/virtualization/interfaces/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/virtualization/interfaces/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/virtualization/interfaces/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/virtualization/interfaces/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/virtualization/interfaces/".$id."/", $params);
}
}

View file

@ -0,0 +1,56 @@
<?php
namespace wickedsoft\NetBox\Api\Virtualization;
class VirtualMachines extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/virtualization/virtual-machines/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/virtualization/virtual-machines/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/virtualization/virtual-machines/".$id."/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/virtualization/virtual-machines/", $params);
}
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/virtualization/virtual-machines/".$id."/", $params);
}
}