VPC
The SDK interfaces based on the VPC v1 API are as follows. Invocation example: conn.vpc.create_network().
|
Interface |
Method |
API |
|---|---|---|
|
vpc |
vpcs(self, **query) |
GET /v1/{project_id}/vpcs |
|
get_vpc(self, vpc) |
GET /v1/{project_id}/vpcs/{vpc_id} |
|
|
create_vpc(self, **attrs) |
POST /v1/{project_id}/vpcs |
|
|
update_vpc(self, vpc, **attrs) |
PUT /v1/{project_id}/vpcs/{vpc_id} |
|
|
delete_vpc(self, vpc, ignore_missing=True) |
DELETE /v1/{project_id}/vpcs/{vpc_id} |
|
|
find_vpc(self, name_or_id, ignore_missing=True) |
||
|
subnet |
subnets(self, **query) |
GET /v1/{project_id}/subnets |
|
get_subnet(self, subnet) |
GET /v1/{project_id}/subnets/{subnet_id} |
|
|
create_subnet(self, **attrs) |
POST /v1/{project_id}/subnets |
|
|
update_subnet(self, subnet, vpc_id, **attrs) |
PUT /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} |
|
|
delete_subnet(self, subnet, vpc_id, ignore_missing=True) |
DELETE /v1/{project_id}/vpcs/{vpc_id}/subnets/{subnet_id} |
|
|
find_subnet(self, name_or_id, ignore_missing=True) |
||
|
public_ip |
public_ips(self, **query) |
GET /v1/{project_id}/publicips |
|
get_public_ip(self, public_ip) |
GET /v1/{project_id}/publicips/{publicip_id} |
|
|
create_public_ip(self, **attrs) |
POST /v1/{project_id}/publicips |
|
|
update_public_ip(self, public_ip, **attrs) |
PUT /v1/{project_id}/publicips/{publicip_id} |
|
|
delete_public_ip(self, public_ip, ignore_missing=True) |
DELETE /v1/{project_id}/publicips/{publicip_id} |
|
|
find_public_ip(self, name_or_id, ignore_missing=True) |
||
|
private_ip |
private_ips(self, subnet, **query) |
GET /v1/{project_id}/subnets/{subnet_id}/privateips |
|
get_private_ip(self, private_ip) |
GET /v1/{project_id}/privateips/{privateip_id} |
|
|
create_private_ip(self, **attrs) |
POST /v1/{project_id}/privateips |
|
|
create_private_ips(self, *private_ips) |
POST /v1/{project_id}/privateips |
|
|
delete_private_ip(self, private_ip, ignore_missing=True) |
DELETE /v1/{project_id}/privateips/{privateip_id} |
|
|
find_private_ip(self, name_or_id, subnet_id, ignore_missing=True) |
||
|
port |
ports(self, **query) |
GET /v1/{project_id}/ports |
|
get_port(self, port) |
GET /v1/{project_id}/ports/{port_id} |
|
|
create_port(self, **attrs) |
POST /v1/{project_id}/ports |
|
|
update_port(self, port, **attrs) |
PUT /v1/{project_id}/ports/{port_id} |
|
|
delete_port(self, port, ignore_missing=True) |
DELETE /v1/{project_id}/ports/{port_id} |
|
|
find_port(self, name_or_id, ignore_missing=True) |
||
|
bandwidth |
bandwidths(self, **query) |
GET /v1/{project_id}/bandwidths |
|
get_bandwidth(self, bandwidth) |
GET /v1/{project_id}/bandwidths/{bandwidth_id} |
|
|
update_bandwidth(self, bandwidth, **attrs) |
PUT /v1/{project_id}/bandwidths/{bandwidth_id} |
|
|
find_bandwidth(self, name_or_id, ignore_missing=True) |
||
|
security_group |
security_groups(self, **query) |
GET /v1/{project_id}/security-groups |
|
create_security_group(self, **attrs) |
POST /v1/{project_id}/security-groups |
|
|
delete_security_group(self, security_group, ignore_missing=True) |
DELETE /v1/{project_id}/security-groups/{security_group_id} |
|
|
get_security_group(self, security_group) |
GET /v1/{project_id}/security-groups/{security_group_id} |
|
|
find_security_group(self, name_or_id, ignore_missing=True) |
||
|
security_group_rule |
create_security_group_rule(self, **attrs) |
POST /v1/{project_id}/security-group-rules |
|
delete_security_group_rule(self, security_group_rule, ignore_missing=True) |
DELETE /v1/{project_id}/security-group-rules/{rules_security_groups_id} |
|
|
get_security_group_rule(self, security_group_rule) |
GET /v1/{project_id}/security-group-rules/{rules_security_groups_id} |
|
|
security_group_rules(self, **query) |
GET /v1/{project_id}/security-group-rules |
|
|
find_security_group_rule(self, name_or_id, ignore_missing=True) |
||
|
quota |
quotas(self, **query) |
GET /v1/{project_id}/quotas |
The SDK interfaces based on the VPC v2.0 API are as follows.
Invocation example: conn.vpc.create_publicip_ext()
|
Interface |
Method |
API |
|---|---|---|
|
sharebandwidth |
create_sharebandwidth(self, **data) |
POST /v2.0/{project_id}/bandwidths |
|
delete_sharebandwidth(self, bandwidth_id, ignore_missing=True) |
DELETE /v2.0/{project_id}/bandwidths/{bandwidth_id} |
|
|
create_batch_sharebandwidth(self, **data) |
POST /v2.0/{project_id}/batch-bandwidths |
|
|
insert_ip_to_bandwidth(self, bandwidth_id, **data) |
POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/insert |
|
|
remove_ip_from_bandwidth(self, bandwidth_id, **data) |
POST /v2.0/{project_id}/bandwidths/{bandwidth_id}/remove |
|
|
Eip Operations |
create_publicip_ext(self, **attrs) |
POST /v2.0/{project_id}/publicips |
|
Bandwidth Operations |
update_bandwidth_ext(self, bandwidth_id, **attrs) |
PUT /v2.0/{project_id}/bandwidths/{bandwidth_id} |
The SDK interfaces based on the Neutron v2.0 API are as follows.
Invocation example: conn.network.create_network ()
|
Interface |
Method |
API |
|---|---|---|
|
Floating IP Operations |
create_ip(self, **attrs) |
POST /v2.0/floatingips |
|
delete_ip(self, floating_ip, ignore_missing=True) |
DELETE /v2.0/floatingips/{floatingip_id} |
|
|
find_available_ip(self) |
GET /v2.0/floatingips |
|
|
find_ip(self, name_or_id, ignore_missing=True) |
GET /v2.0/floatingips |
|
|
get_ip(self, floating_ip) |
GET /v2.0/floatingips/{floatingip_id} |
|
|
ips(self, **query) |
GET /v2.0/floatingips |
|
|
update_ip(self, floating_ip, **attrs) |
PUT /v2.0/floatingips/{floatingip_id} |
|
|
Network Operations |
create_network(self, **attrs) |
POST /v2.0/networks |
|
delete_network(self, network, ignore_missing=True) |
DELETE /v2.0/networks/{network_id} |
|
|
find_network(self, name_or_id, ignore_missing=True) |
GET /v2.0/networks |
|
|
get_network(self, network) |
GET /v2.0/networks/{network_id} |
|
|
networks(self, **query) |
GET /v2.0/networks |
|
|
update_network(self, network, **attrs) |
PUT /v2.0/networks/{network_id} |
|
|
Port Operations |
create_port(self, **attrs) |
POST /v2.0/ports |
|
delete_port(self, port, ignore_missing=True) |
DELETE /v2.0/ports/{port_id} |
|
|
find_port(self, name_or_id, ignore_missing=True) |
GET /v2.0/ports |
|
|
get_port(self, port) |
GET /v2.0/ports/{port_id} |
|
|
ports(self, **query) |
GET /v2.0/ports |
|
|
update_port(self, port, **attrs) |
PUT /v2.0/ports/{port_id} |
|
|
Router Operations |
create_router(self, **attrs) |
POST /v2.0/router |
|
delete_router(self, router, ignore_missing=True) |
DELETE /v2.0/routers/{router_id} |
|
|
find_router(self, name_or_id, ignore_missing=True) |
GET /v2.0/routers |
|
|
get_router(self, router) |
GET /v2.0/routers/{router_id} |
|
|
routers(self, **query) |
GET /v2.0/routers |
|
|
update_router(self, router, **attrs) |
PUT /v2.0/routers/{router_id} |
|
|
add_interface_to_router(self, router, subnet_id=None, port_id=None) |
PUT /v2.0/routers/{router_id}/add_router_interface |
|
|
remove_interface_from_router(self, router, subnet_id=None, port_id=None) |
PUT /v2.0/routers/{router_id}/remove_router_interface |
|
|
Security Group Operations |
create_security_group(self, **attrs) |
POST /v2.0/security-groups |
|
delete_security_group(self, security_group, ignore_missing=True) |
DELETE /v2.0/security-groups/{security_group_id} |
|
|
find_security_group(self, name_or_id, ignore_missing=True) |
GET /v2.0/security-groups |
|
|
get_security_group(self, security_group) |
GET /v2.0/security-groups/{security_group_id} |
|
|
security_groups(self, **query) |
GET /v2.0/security-groups |
|
|
update_security_group(self, security_group, **attrs) |
PUT /v2.0/security-groups/{security_group_id} |
|
|
security_group_open_port(self, sgid, port, protocol='tcp') |
POST /v2.0/security-group-rules |
|
|
security_group_allow_ping(self, sgid) |
POST /v2.0/security-group-rules |
|
|
create_security_group_rule(self, **attrs) |
POST /v2.0/security-group-rules |
|
|
delete_security_group_rule(self, security_group_rule, ignore_missing=True) |
DELETE /v2.0/security-group-rules/{security_group_rule_id} |
|
|
find_security_group_rule(self, name_or_id, ignore_missing=True) |
GET /v2.0/security-group-rules |
|
|
get_security_group_rule(self, security_group_rule) |
GET /v2.0/security-group-rules/{security_group_rule_id} |
|
|
security_group_rules(self, **query) |
GET /v2.0/security-group-rules |
|
|
Subnet Operations |
create_subnet(self, **attrs) |
POST /v2.0/subnets |
|
delete_subnet(self, subnet, ignore_missing=True) |
DELETE /v2.0/subnets/{subnet_id} |
|
|
find_subnet(self, name_or_id, ignore_missing=True) |
GET /v2.0/subnets |
|
|
get_subnet(self, subnet) |
GET /v2.0/subnets/{subnet_id} |
|
|
subnets(self, **query) |
GET /v2.0/subnets |
|
|
get_subnet_ports(self, subnet_id) |
GET /v2.0/ports |
|
|
update_subnet(self, subnet, **attrs) |
PUT /v2.0/subnets/{subnet_id} |
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.