Hamidreza74
Enthusiast
Enthusiast

Create VRF uplink with API

Jump to solution

I install NSX-T 3.1 and use this API base on DOC for creating an uplink interface for VRF :

Method:
PATCH
URI Path(s):  /policy/api/v1/infra/tier-0s/<tier-0-id>/locale-services/<locale-service-id>/interfaces/<interface-id>
 
{
  "segment_path": "/infra/segments/0001-Uplinkc2",
  "subnets": [
    {
      "ip_addresses": [ "35.1.1.1" ],
      "prefix_len": 24
    }
  ],
  "edge_path":"/infra/sites/default/enforcement-point/nsx/edge-clusters/969d4241-0b22-4bb2-96ce-d7bf549e44b5/edge-nodes/bffd4725-a2e4-4154-86d5-090b26ec0d0e",

  "type": "EXTERNAL"
}
I try with   "edge_path":"/infra/sites/default/enforcement-points/nsx/edge-clusters/ and   "edge_path":"/infra/sites/default/enforcement-point/default/edge-clusters/
but it doesn't work i get this error :
The path=[/infra/sites/default/enforcement-point/nsx/edge-clusters/969d4241-0b22-4bb2-96ce-d7bf549e44b5/edge-nodes/bffd4725-a2e4-4154-86d5-090b26ec0d0e] is invalid"
I get Edge node ID  from GUI and also API, but I got the same error.
anybody faced this problem?
0 Kudos
1 Solution

Accepted Solutions
Hamidreza74
Enthusiast
Enthusiast

Thanks, I get interface config with API  and then  re-use edge-path for creating and it's work 

/infra/sites/default/enforcement-points/default/edge-clusters/969d4241-0b22-4bb2-96ce-d7bf549e44b5/edge-nodes/2

View solution in original post

Tags (1)
0 Kudos
2 Replies
p0wertje
Hot Shot
Hot Shot

Hi,

You could try to create it in the GUI. Then do API call to /policy/api/v1/infra/tier-0s/<tier-0-id>/locale-services/<locale-service-id>/interfaces
Check the edge_path and use that as a reference.
Remove it again via GUI and try again via API.
It might be that you are using the wrong edge path.

Cheers,
p0wertje | VCIX6-NV | JNCIS-ENT | vExpert
Please kudo helpful posts and mark the thread as solved if solved
Hamidreza74
Enthusiast
Enthusiast

Thanks, I get interface config with API  and then  re-use edge-path for creating and it's work 

/infra/sites/default/enforcement-points/default/edge-clusters/969d4241-0b22-4bb2-96ce-d7bf549e44b5/edge-nodes/2
Tags (1)
0 Kudos