Create Metering Label Rule

 
MethodURIDescription
POST/metering-label-rules

Creates a l3 metering label rule.

This operation requires a request body.

The following table describes the required and optional attributes in the request body:

Table 4.18. Create Metering Label Rule Request Attributes
Attribute Required Description

direction

Optional

Ingress or egress: The direction in which metering rule is applied. Default: ingress

metering_label_id

Required

The meteting label ID to associate with this metering rule.

excluded

Optional

Specify whether the remote_ip_prefix will be excluded or not from traffic counters of the metering label, ie: to not count the traffic of a specific IP address of a range. Default: False

remote_ip_prefix

Required

The remote IP prefix to be associated with this metering rule. packet.

This operation returns a response body.

Normal response codes: 201

Error response codes: badRequest (400), unauthorized (401), itemNotFound (404), buildInProgress (409)

 Request

 

Example 4.226. Create Metering Label Rule Request: JSON

POST /v2.0/metering/metering-label-rules HTTP/1.1
Host: controlnode:9696
User-Agent: python-neutronclient
Content-Type: application/json
Accept: application/json
X-Auth-Token: c52a1b304fec4ca0ac85dc1741eec6e2

{
   "metering_label_rule":{
      "remote_ip_prefix":"10.0.1.0/24",
      "direction":"ingress",
      "metering_label_id":"e131d186-b02d-4c0b-83d5-0c0725c4f812"
   }
}

 Response

 

Example 4.227. Create Metering Label Rule Response: JSON

{
   "metering_label_rule":{
      "remote_ip_prefix":"10.0.1.0/24",
      "direction":"ingress",
      "metering_label_id":"e131d186-b02d-4c0b-83d5-0c0725c4f812",
      "id":"00e13b58-b4f2-4579-9c9c-7ac94615f9ae",
      "excluded":false
   }
}

Log a bug against this page


loading table of contents...