Documentation ¶
Overview ¶
Package ipam implements IPAM service.
IPAM REST API provides the following functionality:
1. Allocate an IP for an endpoint
To allocate an IP, POST to /endpoints with the following body:
{ "tenant_id" : "Tenant ID", "segment_id" : "Segment ID", "host_id" : "Host ID" "name" : "Endpoint name", }
Where:
- tenant_id: In case of OpenStack, this is the project's UUID.
- segment_id: In case of OpenStack, this is the value of the metadata tag whose name is 'romanaSegment'
- host_id: In case of OpenStack, this is the value of 'binding:host_id' field of port object.
- name is optional.
On success, the same structure is returned with two more fields:
id, containing the auto-generated ID of the newly allocated endpoint's IP
ip, containing the allocated IP:
{ "ip" : "10.0.0.3", "id" : 37, "tenant_id" : "Tenant ID", "segment_id" : "Segment ID", "host_id" : "Host ID" "name" : "Endpoint name", }
2. Deallocate an IP for an endpoint.
To deallocate an IP, issue a DELETE request to /endpoints/<ip>.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPAM ¶ added in v0.8.2
type IPAM struct {
// contains filtered or unexported fields
}
IPAM provides ipam service.
func (*IPAM) CreateSchema ¶ added in v1.0.0
func (*IPAM) Initialize ¶ added in v0.8.2
func (ipam *IPAM) Initialize(client *common.RestClient) error
Initialize implements Initialize method of Service interface