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

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