osc network subnet set
Updates a subnet.
Some attributes, such as IP version (ip_version), CIDR (cidr), and segment (segment_id) cannot be updated. Attempting to update these attributes results in a 400 Bad Request
error.
Normal response codes: 200
Error response codes: 400, 401, 403, 404, 412
Usage: osc network subnet set [OPTIONS] <ID>
Arguments:
<ID>
— subnet_id parameter for /v2.0/subnets/{subnet_id} API
Options:
-
--allocation-pools <JSON>
— Allocation pools withstart
andend
IP addresses for this subnet. If allocation_pools are not specified, OpenStack Networking automatically allocates pools for covering all IP addresses in the CIDR, excluding the address reserved for the subnet gateway by default -
--description <DESCRIPTION>
— A human-readable description for the resource. Default is an empty string -
--dns-nameservers <DNS_NAMESERVERS>
— List of dns name servers associated with the subnet. Default is an empty list -
--dns-publish-fixed-ip <DNS_PUBLISH_FIXED_IP>
— Whether to publish DNS records for IPs from this subnet. Default isfalse
Possible values:
true
,false
-
--enable-dhcp <ENABLE_DHCP>
— Indicates whether dhcp is enabled or disabled for the subnet. Default istrue
Possible values:
true
,false
-
--gateway-ip <GATEWAY_IP>
— Gateway IP of this subnet. If the value isnull
that implies no gateway is associated with the subnet. If the gateway_ip is not specified, OpenStack Networking allocates an address from the CIDR for the gateway for the subnet by default -
--host-routes <JSON>
— Additional routes for the subnet. A list of dictionaries withdestination
andnexthop
parameters. Default value is an empty list -
--name <NAME>
— Human-readable name of the resource -
--segment-id <SEGMENT_ID>
— The ID of a network segment the subnet is associated with. It is available whensegment
extension is enabled -
--service-types <SERVICE_TYPES>
— The service types associated with the subnet