Editing and deleting compute networks

You can edit the network name and network access, as well as delete a compute network that is not used by virtual machines.

Limitations

  • You cannot change IP management of a compute network.

Prerequisites

To view and edit parameters of a compute network

Admin panel

  1. On the Compute > Networks tab, click the network you want to edit.
  2. On the network right pane, click the pencil icon next to the required section, and then make your changes.

Command-line interface

Use the following command:

vinfra service compute network set [--rbac-policies <rbac-policies>]
                                   [--name <name>] <network>
--rbac-policies <rbac-policies>

Comma-separated list of RBAC policies in the format: <target>:<target_id>:<action> | none. Valid targets: project, domain. Valid actions: direct, full, routed. ‘*’ is valid target_id for all targets. Pass none to clear out all existing policies.

Example: domain:default:routed,project:uuid1:full

--name <name>
A new name for the network
<network>
Network ID or name

For example, to disable network access for the compute network mypubnet, run:

# vinfra service compute network set mypubnet --rbac-policies none
+------------------+--------------------------------------+
| Field            | Value                                |
+------------------+--------------------------------------+
| allocation_pools | 10.136.18.141-10.136.18.148          |
| cidr             | 10.136.16.0/22                       |
| dns_nameservers  | 10.35.11.7                           |
| enable_dhcp      | True                                 |
| gateway_ip       | 10.136.16.1                          |
| id               | 22674f9d-1c94-4953-b79b-7f6029ee9bd0 |
| ip_version       | 4                                    |
| ipam_enabled     | True                                 |
| name             | mypubnet                             |
| physical_network | Public                               |
| project_id       | c22613639b3147e0b22ef057b87698fe     |
| rbac_policies    | []                                   |
| router_external  | False                                |
| shared           | False                                |
| tags             | []                                   |
| type             | physical                             |
| vlan_id          |                                      |
+------------------+--------------------------------------+

To delete a compute network

Admin panel

  1. On the Compute > Networks tab, click the network you want to delete.
  2. On the network right pane, click Delete.

Command-line interface

Use the following command:

vinfra service compute network delete <network>
<network>
Network ID or name

For example, to delete the compute network myprivnet, run:

# vinfra service compute network delete myprivnet