ipam

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

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:

  1. tenant_id: In case of OpenStack, this is the project's UUID.
  2. segment_id: In case of OpenStack, this is the value of the metadata tag whose name is 'romanaSegment'
  3. host_id: In case of OpenStack, this is the value of 'binding:host_id' field of port object.
  4. name is optional.

On success, the same structure is returned with two more fields:

  1. id, containing the auto-generated ID of the newly allocated endpoint's IP

  2. 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 *IPAM) CreateSchema(overwrite bool) error

func (*IPAM) Initialize added in v0.8.2

func (ipam *IPAM) Initialize(client *common.RestClient) error

Initialize implements Initialize method of Service interface

func (*IPAM) Name added in v0.8.2

func (ipam *IPAM) Name() string

Name provides name of this service.

func (*IPAM) Routes added in v0.8.2

func (ipam *IPAM) Routes() common.Routes

Routes provided by ipam.

func (*IPAM) SetConfig added in v0.8.2

func (ipam *IPAM) SetConfig(config common.ServiceConfig) error

SetConfig implements SetConfig function of the Service interface. Returns an error if cannot connect to the data store

Directories

Path Synopsis
Command for running the IPAM service.
Command for running the IPAM service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL