Getting Information About the Net of a Project

You can get information about the Net of a project using OKS CLI.

Getting Information About the Net of a Project Using octl

The GetProjectNets command retrieves the Net details for a specific project by its ID. Returns the Net information associated with the specified project.

Request sample
$ octl kube api GetProjectNets <project_id> --profile "default"

The GetProjectNets command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the API request.

  • Nets: Net details associated with the project.

    • DhcpOptionsSetId: The ID of the DHCP options set.

    • IpRange: The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16)

    • NetId: The ID of the Net.

    • State: The state of the Net (pending | available | deleting).

    • Tenancy: The VM tenancy in the Net.

Result sample
{
  "ResponseContext": {
    "RequestId": "string"
  },
  "Nets": [
    {
      "DhcpOptionsSetId": "string",
      "IpRange": "string",
      "NetId": "string",
      "State": "string",
      "Tenancy": "string"
    }
  ]
}

Getting Information About the Net of a Project Using OKS CLI

The project nets command allows you to retrieve the Net of a project:

Request sample
$ oks-cli project nets \
    --project-name NAME_OF_PROJECT \
    --output json

This command contains the following options that you need to specify:

  • project-name: The name of the project you want to retrieve Nets information from.

  • (optional) output: The output format for the response (json | yaml | table). By default, the response format is JSON.

The project nets command returns the following elements:

  • DhcpOptionsSetId: The ID of the DHCP options set.

  • IpRange: The IP range for the Net, in CIDR notation (for example, 10.0.0.0/16).

  • NetId: The ID of the Net.

  • State: The state of the Net (pending | available | deleting).

  • Tenancy: The VM tenancy in the Net.

Result sample
[
    {
        "DhcpOptionsSetId": "dopt-123a4bcd",
        "IpRange": "10.0.0.0/16",
        "NetId": "vpc-a1bc2345",
        "State": "available",
        "Tenancy": "default"
    }
]

Related Pages

Corresponding API Method