Skip to content

Commit

Permalink
Finished DCMI portion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Roy authored and Tony Roy committed Mar 12, 2021
1 parent 278c3b8 commit 80dc580
Show file tree
Hide file tree
Showing 40 changed files with 2,199 additions and 4 deletions.
56 changes: 56 additions & 0 deletions src/Api/Cables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class Cables extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/dcim/cables/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/dcim/cables/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/dcim/cables/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/dcim/cables/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/dcim/cables/".$id."/", $params);
}
}
56 changes: 56 additions & 0 deletions src/Api/CircuitProviders.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class CircuitProviders extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/circuits/providers/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/circuits/providers/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/circuits/providers/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/circuits/providers/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/circuits/providers/".$id."/", $params);
}
}
56 changes: 56 additions & 0 deletions src/Api/CircuitTerminations.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class CircuitTerminations extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/circuits/circuit-terminations/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/circuits/circuit-terminations/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/circuits/circuit-terminations/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/circuits/circuit-terminations/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/circuits/circuit-terminations/".$id."/", $params);
}
}
56 changes: 56 additions & 0 deletions src/Api/CircuitTypes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class CircuitTypes extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/circuits/circuit-types/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/circuits/circuit-types/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/circuits/circuit-types/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/circuits/circuit-types/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/circuits/circuit-types/".$id."/", $params);
}
}
56 changes: 56 additions & 0 deletions src/Api/Circuits.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class Circuits extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/circuits/circuits/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/circuits/circuits/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/circuits/circuits/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/circuits/circuits/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/circuits/circuits/".$id."/", $params);
}
}
16 changes: 16 additions & 0 deletions src/Api/ConnectedDevices.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace wickedsoft\NetBox\Api;

class Cables extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/dcim/connected-device/", $params);
}
}
16 changes: 16 additions & 0 deletions src/Api/ConsoleConnections.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace wickedsoft\NetBox\Api;

class ConsoleConnections extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/dcim/console-connections/", $params);
}
}
56 changes: 56 additions & 0 deletions src/Api/ConsolePortTemplates.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?php

namespace wickedsoft\NetBox\Api;

class ConsolePortTemplates extends AbstractApi
{
/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function add($params=[])
{
return $this->post("/dcim/console-port-templates/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function delete($id, $params=[])
{
return $this->delete("/dcim/console-port-templates/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function edit($id, $params=[])
{
return $this->put("/dcim/console-port-templates/".$id."/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function list($params=[])
{
return $this->get("/dcim/console-port-templates/", $params);
}

/**
* @param $params
* @return mixed
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function show($id, $params=[])
{
return $this->get("/dcim/console-port-templates/".$id."/", $params);
}
}
Loading

0 comments on commit 80dc580

Please sign in to comment.