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 with start and end 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 is false

    Possible values: true, false

  • --enable-dhcp <ENABLE_DHCP> — Indicates whether dhcp is enabled or disabled for the subnet. Default is true

    Possible values: true, false

  • --gateway-ip <GATEWAY_IP> — Gateway IP of this subnet. If the value is null 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 with destination and nexthop 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 when segment extension is enabled

  • --service-types <SERVICE_TYPES> — The service types associated with the subnet