Add Support for partial updates more broadly
This commit is contained in:
parent
9a5bb016bc
commit
61163df64a
30 changed files with 330 additions and 0 deletions
|
|
@ -39,6 +39,17 @@ class CircuitTerminations extends AbstractApi
|
|||
return $this->put("/circuits/circuit-terminations/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/circuits/circuit-terminations/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class CircuitTypes extends AbstractApi
|
|||
return $this->put("/circuits/circuit-types/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/circuits/circuit-types/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Circuits extends AbstractApi
|
|||
return $this->put("/circuits/circuits/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/circuits/circuits/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Providers extends AbstractApi
|
|||
return $this->put("/circuits/providers/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/circuits/providers/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class ConfigContexts extends AbstractApi
|
|||
return $this->put("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/config-contexts/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class CustomFields extends AbstractApi
|
|||
return $this->put("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/custom-fields/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class ExportTemplates extends AbstractApi
|
|||
return $this->put("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/export-templates/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class ImageAttachments extends AbstractApi
|
|||
return $this->put("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/image-attachments/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Tags extends AbstractApi
|
|||
return $this->put("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/extras/tags/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Aggregates extends AbstractApi
|
|||
return $this->put("/ipam/aggregates/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/aggregates/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class IpAddresses extends AbstractApi
|
|||
return $this->put("/ipam/ip-addresses/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/ip-addresses/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Rirs extends AbstractApi
|
|||
return $this->put("/ipam/rirs/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/rirs/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Roles extends AbstractApi
|
|||
return $this->put("/ipam/roles/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/roles/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class RouteTargets extends AbstractApi
|
|||
return $this->put("/ipam/route-targets/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/route-targets/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Services extends AbstractApi
|
|||
return $this->put("/ipam/services/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/services/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class VlanGroups extends AbstractApi
|
|||
return $this->put("/ipam/vlan-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/vlan-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Vlans extends AbstractApi
|
|||
return $this->put("/ipam/vlans/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/vlans/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Vrfs extends AbstractApi
|
|||
return $this->put("/ipam/vrfs/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/ipam/vrfs/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class SecretRoles extends AbstractApi
|
|||
return $this->put("/secrets/secret-roles/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/secrets/secret-roles/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Secrets extends AbstractApi
|
|||
return $this->put("/secrets/secrets/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/secrets/secrets/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class TenantGroups extends AbstractApi
|
|||
return $this->put("/tenancy/tenant-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/tenancy/tenant-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Tenants extends AbstractApi
|
|||
return $this->put("/tenancy/tenants/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/tenancy/tenants/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Groups extends AbstractApi
|
|||
return $this->put("/users/groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/users/groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Permissions extends AbstractApi
|
|||
return $this->put("/users/permissions/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/users/permissions/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -51,6 +51,17 @@ class Users extends AbstractApi
|
|||
return $this->put("/users/users/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/users/users/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class ClusterGroups extends AbstractApi
|
|||
return $this->put("/virtualization/cluster-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/virtualization/cluster-groups/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class ClusterTypes extends AbstractApi
|
|||
return $this->put("/virtualization/cluster-types/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/virtualization/cluster-types/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Clusters extends AbstractApi
|
|||
return $this->put("/virtualization/clusters/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/virtualization/clusters/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class Interfaces extends AbstractApi
|
|||
return $this->put("/virtualization/interfaces/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/virtualization/interfaces/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
|
|
@ -39,6 +39,17 @@ class VirtualMachines extends AbstractApi
|
|||
return $this->put("/virtualization/virtual-machines/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $id
|
||||
* @param array $params
|
||||
* @return array
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function update(int $id, array $params = []): array
|
||||
{
|
||||
return $this->patch("/virtualization/virtual-machines/" . $id . "/", $params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @return mixed
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue