Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/merge-network-services' into mer…
Browse files Browse the repository at this point in the history
…ge-network-services
  • Loading branch information
k0ka committed Jan 21, 2024
2 parents 3b2ec58 + 81b864e commit ea71c10
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 49 deletions.
1 change: 1 addition & 0 deletions src/Networking/v2/Extensions/Layer3/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/**
* @deprecated Use Networking\v2\Api instead
*
* @internal
*/
class Api extends AbstractApi
Expand Down
29 changes: 15 additions & 14 deletions src/Networking/v2/Extensions/Layer3/ApiTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

/**
* @property \OpenStack\Networking\v2\Params $params
* @property string $pathPrefix
* @property string $pathPrefix
*
* @internal
*/
trait ApiTrait
Expand All @@ -15,7 +16,7 @@ public function postFloatingIps(): array
{
return [
'method' => 'POST',
'path' => $this->pathPrefix . '/floatingips',
'path' => $this->pathPrefix.'/floatingips',
'jsonKey' => 'floatingip',
'params' => [
'tenantId' => $this->params->tenantIdJson(),
Expand All @@ -31,7 +32,7 @@ public function getFloatingIps(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/floatingips',
'path' => $this->pathPrefix.'/floatingips',
'params' => [
'tenantId' => $this->params->queryTenantId(),
],
Expand All @@ -42,7 +43,7 @@ public function putFloatingIp(): array
{
return [
'method' => 'PUT',
'path' => $this->pathPrefix . '/floatingips/{id}',
'path' => $this->pathPrefix.'/floatingips/{id}',
'jsonKey' => 'floatingip',
'params' => [
'id' => $this->params->idPath(),
Expand All @@ -58,7 +59,7 @@ public function getFloatingIp(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/floatingips/{id}',
'path' => $this->pathPrefix.'/floatingips/{id}',
'params' => [
'id' => $this->params->idPath(),
'portId' => $this->params->portIdJson(),
Expand All @@ -70,7 +71,7 @@ public function deleteFloatingIp(): array
{
return [
'method' => 'DELETE',
'path' => $this->pathPrefix . '/floatingips/{id}',
'path' => $this->pathPrefix.'/floatingips/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -81,7 +82,7 @@ public function postRouters(): array
{
return [
'method' => 'POST',
'path' => $this->pathPrefix . '/routers',
'path' => $this->pathPrefix.'/routers',
'jsonKey' => 'router',
'params' => [
'name' => $this->params->nameJson(),
Expand All @@ -98,7 +99,7 @@ public function getRouters(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/routers',
'path' => $this->pathPrefix.'/routers',
'params' => [
'name' => $this->params->queryName(),
'tenantId' => $this->params->queryTenantId(),
Expand All @@ -110,7 +111,7 @@ public function putRouter(): array
{
return [
'method' => 'PUT',
'path' => $this->pathPrefix . '/routers/{id}',
'path' => $this->pathPrefix.'/routers/{id}',
'jsonKey' => 'router',
'params' => [
'id' => $this->params->idPath(),
Expand All @@ -125,7 +126,7 @@ public function getRouter(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/routers/{id}',
'path' => $this->pathPrefix.'/routers/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -136,7 +137,7 @@ public function deleteRouter(): array
{
return [
'method' => 'DELETE',
'path' => $this->pathPrefix . '/routers/{id}',
'path' => $this->pathPrefix.'/routers/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -147,7 +148,7 @@ public function putAddInterface(): array
{
return [
'method' => 'PUT',
'path' => $this->pathPrefix . '/routers/{id}/add_router_interface',
'path' => $this->pathPrefix.'/routers/{id}/add_router_interface',
'params' => [
'id' => $this->params->idPath(),
'subnetId' => $this->params->subnetId(),
Expand All @@ -160,12 +161,12 @@ public function putRemoveInterface(): array
{
return [
'method' => 'PUT',
'path' => $this->pathPrefix . '/routers/{id}/remove_router_interface',
'path' => $this->pathPrefix.'/routers/{id}/remove_router_interface',
'params' => [
'id' => $this->params->idPath(),
'subnetId' => $this->params->subnetId(),
'portId' => $this->params->portIdJson(),
],
];
}
}
}
1 change: 1 addition & 0 deletions src/Networking/v2/Extensions/Layer3/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/**
* @deprecated Use Networking\v2\Params instead
*
* @internal
*/
class Params extends \OpenStack\Networking\v2\Params
Expand Down
2 changes: 1 addition & 1 deletion src/Networking/v2/Extensions/Layer3/ParamsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ public function haJson(): array
'description' => 'If true, indicates a highly-available router.',
];
}
}
}
1 change: 1 addition & 0 deletions src/Networking/v2/Extensions/Layer3/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/**
* @property Api $api
*
* @deprecated Use Networking\v2\Service instead
*/
class Service extends AbstractService
Expand Down
5 changes: 3 additions & 2 deletions src/Networking/v2/Extensions/Layer3/ServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

/**
* @property \OpenStack\Networking\v2\Api $api
* @internal Please use the Networking\v2\Service instead of this one.
*
* @internal please use the Networking\v2\Service instead of this one
*/
trait ServiceTrait
{
Expand Down Expand Up @@ -56,4 +57,4 @@ public function listRouters(array $options = []): \Generator
{
return $this->router()->enumerate($this->api->getRouters(), $options);
}
}
}
1 change: 1 addition & 0 deletions src/Networking/v2/Extensions/SecurityGroups/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/**
* @deprecated Use Networking\v2\Api instead
*
* @internal
*/
class Api extends AbstractApi
Expand Down
41 changes: 12 additions & 29 deletions src/Networking/v2/Extensions/SecurityGroups/ApiTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@

/**
* @property \OpenStack\Networking\v2\Params $params
* @property string $pathPrefix
* @property string $pathPrefix
*
* @internal
*/
trait ApiTrait
{
/**
* Returns information about GET security-groups/{security_group_id} HTTP
* operation.
*
* @return array
*/
public function getSecurityGroups(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/security-groups',
'path' => $this->pathPrefix.'/security-groups',
'params' => [
'tenantId' => $this->params->queryTenantId(),
'name' => $this->params->filterName(),
Expand All @@ -29,14 +28,12 @@ public function getSecurityGroups(): array

/**
* Returns information about POST security-groups HTTP operation.
*
* @return array
*/
public function postSecurityGroups(): array
{
return [
'method' => 'POST',
'path' => $this->pathPrefix . '/security-groups',
'path' => $this->pathPrefix.'/security-groups',
'jsonKey' => 'security_group',
'params' => [
'description' => $this->params->descriptionJson(),
Expand All @@ -47,14 +44,12 @@ public function postSecurityGroups(): array

/**
* Returns information about PUT security-groups HTTP operation.
*
* @return array
*/
public function putSecurityGroups(): array
{
return [
'method' => 'PUT',
'path' => $this->pathPrefix . '/security-groups/{id}',
'path' => $this->pathPrefix.'/security-groups/{id}',
'jsonKey' => 'security_group',
'params' => [
'id' => $this->params->idPath(),
Expand All @@ -67,14 +62,12 @@ public function putSecurityGroups(): array
/**
* Returns information about GET security-groups/{security_group_id} HTTP
* operation.
*
* @return array
*/
public function getSecurityGroup(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/security-groups/{id}',
'path' => $this->pathPrefix.'/security-groups/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -84,14 +77,12 @@ public function getSecurityGroup(): array
/**
* Returns information about DELETE security-groups/{security_group_id} HTTP
* operation.
*
* @return array
*/
public function deleteSecurityGroup(): array
{
return [
'method' => 'DELETE',
'path' => $this->pathPrefix . '/security-groups/{id}',
'path' => $this->pathPrefix.'/security-groups/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -100,28 +91,24 @@ public function deleteSecurityGroup(): array

/**
* Returns information about GET security-group-rules HTTP operation.
*
* @return array
*/
public function getSecurityRules(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/security-group-rules',
'path' => $this->pathPrefix.'/security-group-rules',
'params' => [],
];
}

/**
* Returns information about POST security-group-rules HTTP operation.
*
* @return array
*/
public function postSecurityRules(): array
{
return [
'method' => 'POST',
'path' => $this->pathPrefix . '/security-group-rules',
'path' => $this->pathPrefix.'/security-group-rules',
'jsonKey' => 'security_group_rule',
'params' => [
'direction' => $this->params->directionJson(),
Expand All @@ -140,14 +127,12 @@ public function postSecurityRules(): array
/**
* Returns information about DELETE
* security-group-rules/{rules-security-groups-id} HTTP operation.
*
* @return array
*/
public function deleteSecurityRule(): array
{
return [
'method' => 'DELETE',
'path' => $this->pathPrefix . '/security-group-rules/{id}',
'path' => $this->pathPrefix.'/security-group-rules/{id}',
'params' => [
'id' => $this->params->idPath(),
],
Expand All @@ -157,17 +142,15 @@ public function deleteSecurityRule(): array
/**
* Returns information about GET
* security-group-rules/{rules-security-groups-id} HTTP operation.
*
* @return array
*/
public function getSecurityRule(): array
{
return [
'method' => 'GET',
'path' => $this->pathPrefix . '/security-group-rules/{id}',
'path' => $this->pathPrefix.'/security-group-rules/{id}',
'params' => [
'id' => $this->params->idPath(),
],
];
}
}
}
1 change: 1 addition & 0 deletions src/Networking/v2/Extensions/SecurityGroups/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

/**
* @deprecated Use Networking\v2\Params instead
*
* @internal
*/
class Params extends \OpenStack\Networking\v2\Params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ public function filterName(): array
'location' => self::QUERY,
];
}
}
}
2 changes: 2 additions & 0 deletions src/Networking/v2/Extensions/SecurityGroups/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

/**
* @property Api $api
*
* @deprecated Use Networking\v2\Service instead
*
* @internal
*/
class Service extends AbstractService
Expand Down
5 changes: 3 additions & 2 deletions src/Networking/v2/Extensions/SecurityGroups/ServiceTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

/**
* @property \OpenStack\Networking\v2\Api $api
* @internal Please use the Networking\v2\Service instead of this one.
*
* @internal please use the Networking\v2\Service instead of this one
*/
trait ServiceTrait
{
Expand Down Expand Up @@ -56,4 +57,4 @@ public function getSecurityGroupRule(string $id): SecurityGroupRule
{
return $this->securityGroupRule(['id' => $id]);
}
}
}
2 changes: 2 additions & 0 deletions src/OpenStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function networkingV2(array $options = []): Networking\v2\Service
* Creates a new Networking v2 Layer 3 service.
*
* @param array $options options that will be used in configuring the service
*
* @deprecated Use networkingV2 instead
*/
public function networkingV2ExtLayer3(array $options = []): Networking\v2\Extensions\Layer3\Service
Expand All @@ -112,6 +113,7 @@ public function networkingV2ExtLayer3(array $options = []): Networking\v2\Extens
* Creates a new Networking v2 Layer 3 service.
*
* @param array $options options that will be used in configuring the service
*
* @deprecated Use networkingV2 instead
*/
public function networkingV2ExtSecGroups(array $options = []): Networking\v2\Extensions\SecurityGroups\Service
Expand Down

0 comments on commit ea71c10

Please sign in to comment.