-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rewrite-docs
- Loading branch information
Showing
43 changed files
with
788 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace OpenStack\Common\Transport; | ||
|
||
/** | ||
* @deprecated use \OpenStack\Common\Transport\HandlerStackFactory instead | ||
*/ | ||
class HandlerStack | ||
{ | ||
public static function create(callable $handler = null): \GuzzleHttp\HandlerStack | ||
{ | ||
return HandlerStackFactory::create($handler); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OpenStack\Networking\v2\Extensions\Layer3; | ||
|
||
/** | ||
* @property \OpenStack\Networking\v2\Params $params | ||
* @property string $pathPrefix | ||
* | ||
* @internal | ||
*/ | ||
trait ApiTrait | ||
{ | ||
public function postFloatingIps(): array | ||
{ | ||
return [ | ||
'method' => 'POST', | ||
'path' => $this->pathPrefix.'/floatingips', | ||
'jsonKey' => 'floatingip', | ||
'params' => [ | ||
'tenantId' => $this->params->tenantIdJson(), | ||
'floatingNetworkId' => $this->params->floatingNetworkIdJson(), | ||
'fixedIpAddress' => $this->params->fixedIpAddressJson(), | ||
'floatingIpAddress' => $this->params->floatingIpAddressJson(), | ||
'portId' => $this->params->portIdJson(), | ||
], | ||
]; | ||
} | ||
|
||
public function getFloatingIps(): array | ||
{ | ||
return [ | ||
'method' => 'GET', | ||
'path' => $this->pathPrefix.'/floatingips', | ||
'params' => [ | ||
'tenantId' => $this->params->queryTenantId(), | ||
], | ||
]; | ||
} | ||
|
||
public function putFloatingIp(): array | ||
{ | ||
return [ | ||
'method' => 'PUT', | ||
'path' => $this->pathPrefix.'/floatingips/{id}', | ||
'jsonKey' => 'floatingip', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
'floatingNetworkId' => $this->notRequired($this->params->floatingNetworkIdJson()), | ||
'fixedIpAddress' => $this->params->fixedIpAddressJson(), | ||
'floatingIpAddress' => $this->params->floatingIpAddressJson(), | ||
'portId' => $this->params->portIdJson(), | ||
], | ||
]; | ||
} | ||
|
||
public function getFloatingIp(): array | ||
{ | ||
return [ | ||
'method' => 'GET', | ||
'path' => $this->pathPrefix.'/floatingips/{id}', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
'portId' => $this->params->portIdJson(), | ||
], | ||
]; | ||
} | ||
|
||
public function deleteFloatingIp(): array | ||
{ | ||
return [ | ||
'method' => 'DELETE', | ||
'path' => $this->pathPrefix.'/floatingips/{id}', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
], | ||
]; | ||
} | ||
|
||
public function postRouters(): array | ||
{ | ||
return [ | ||
'method' => 'POST', | ||
'path' => $this->pathPrefix.'/routers', | ||
'jsonKey' => 'router', | ||
'params' => [ | ||
'name' => $this->params->nameJson(), | ||
'externalGatewayInfo' => $this->params->externalGatewayInfo(), | ||
'adminStateUp' => $this->params->adminStateUp(), | ||
'tenantId' => $this->params->tenantId(), | ||
'distributed' => $this->params->distributedJson(), | ||
'ha' => $this->params->haJson(), | ||
], | ||
]; | ||
} | ||
|
||
public function getRouters(): array | ||
{ | ||
return [ | ||
'method' => 'GET', | ||
'path' => $this->pathPrefix.'/routers', | ||
'params' => [ | ||
'name' => $this->params->queryName(), | ||
'tenantId' => $this->params->queryTenantId(), | ||
], | ||
]; | ||
} | ||
|
||
public function putRouter(): array | ||
{ | ||
return [ | ||
'method' => 'PUT', | ||
'path' => $this->pathPrefix.'/routers/{id}', | ||
'jsonKey' => 'router', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
'name' => $this->params->nameJson(), | ||
'externalGatewayInfo' => $this->params->externalGatewayInfo(), | ||
'adminStateUp' => $this->params->adminStateUp(), | ||
], | ||
]; | ||
} | ||
|
||
public function getRouter(): array | ||
{ | ||
return [ | ||
'method' => 'GET', | ||
'path' => $this->pathPrefix.'/routers/{id}', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
], | ||
]; | ||
} | ||
|
||
public function deleteRouter(): array | ||
{ | ||
return [ | ||
'method' => 'DELETE', | ||
'path' => $this->pathPrefix.'/routers/{id}', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
], | ||
]; | ||
} | ||
|
||
public function putAddInterface(): array | ||
{ | ||
return [ | ||
'method' => 'PUT', | ||
'path' => $this->pathPrefix.'/routers/{id}/add_router_interface', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
'subnetId' => $this->params->subnetId(), | ||
'portId' => $this->params->portIdJson(), | ||
], | ||
]; | ||
} | ||
|
||
public function putRemoveInterface(): array | ||
{ | ||
return [ | ||
'method' => 'PUT', | ||
'path' => $this->pathPrefix.'/routers/{id}/remove_router_interface', | ||
'params' => [ | ||
'id' => $this->params->idPath(), | ||
'subnetId' => $this->params->subnetId(), | ||
'portId' => $this->params->portIdJson(), | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.