Reading a Network

Function

This API is used to read a specified network.

URI

GET /apis/networking.cci.io/v1beta1/namespaces/{namespace}/networks/{name}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

namespace

Yes

String

Namespace to which the network you are querying belongs.

name

Yes

String

Name of the network you want to query.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

pretty

No

String

If 'true', then the output is pretty printed.

exact

No

Boolean

Should the export be exact. Exact export maintains cluster-specific fields like Namespace.

export

No

Boolean

Should this value be exported. Export strips fields that a user cannot specify.

Request

N/A

Response

Response parameters

For the description about response parameters, see Creating a Network.

Example response

{
    "kind": "Network",
    "apiVersion": "networking.cci.io/v1beta1",
    "metadata": {
        "name": "namespace-test-dc1-default-network",
        "namespace": "namespace-test",
        "selfLink": "/apis/networking.cci.io/v1beta1/namespaces/namespace-test/networks/namespace-test-dc1-default-network",
        "uid": "6fb85414-af6b-11e8-b6ef-f898ef6c78b4",
        "resourceVersion": "5016899",
        "creationTimestamp": "2018-09-03T11:21:00Z",
        "annotations": {
            "network.alpha.kubernetes.io/project-id": "51bf52609f2a49c68bfda3398817b376",
            "network.alpha.kubernetes.io/default-security-group": "19c5d024-aed5-4856-b958-c0f65ce70855",
            "network.alpha.kubernetes.io/domain-id": "aadb43c0b14c4cafbccfff483d075987"
        },
        "enable": true
    },
    "spec": {
        "cidr": "192.168.244.0/23",
        "attachedVPC": "0d4080e5-546a-46c4-86fe-f3e26d685177",
        "networkType": "underlay_neutron",
        "physicalNetwork": "phy_net0",
        "networkID": "0022e356-f730-4226-802e-9cdaa6e7da17",
        "subnetID": "1ffd839d-e534-4fa8-a59d-42356335bf74",
        "availableZone": "cn-north-1a"
    },
    "status": {
        "state": "Active"
    }
}

Status Code

Table 3 Status code

Status Code

Description

200

This operation succeeds, and a Network resource object is returned.

For more status codes, see Status Codes.