Documentation ¶
Index ¶
Constants ¶
const ( OperationCreate = "CREATE" OperationRead = "READ" OperationReadAll = "READALL" OperationUpdate = "UPDATE" OperationDelete = "DELETE" OperationReadCount = "READCOUNT" OperationAddInterface = "ADDINTERFACE" OperationDelInterface = "DELINTERFACE" )
Neutron API request operations
Variables ¶
This section is empty.
Functions ¶
func VncUUIDToNeutronID ¶
VncUUIDToNeutronID translates contrail vnc uuids into neutron id
Types ¶
type Data ¶
type Data struct { Filters Filters `json:"filters" yaml:"filters"` ID string `json:"id" yaml:"id"` Fields Fields `json:"fields" yaml:"fields"` Resource Resource `json:"resource" yaml:"resource"` FieldMask types.FieldMask }
Data defines API request data.
type Error ¶
type Error struct {
// contains filtered or unexported fields
}
Error structure.
func (*Error) MarshalJSON ¶
MarshalJSON custom marshalling code.
type Filters ¶
Filters used in Neutron read API
func (Filters) HaveKeys ¶
HaveKeys checks if one or more keys are present in filters. Will return true if at least one key has been defined and all keys are present and not empty.
func (Filters) HaveValues ¶
HaveValues check equality of values in filters struct under specific key and provided sequence of strings.
func (Filters) Match ¶
Match checks if filters should accept values for given key. If key does not exist then it accepts every value and Match returns true.
func (*Filters) UnmarshalJSON ¶
UnmarshalJSON Filters.
type Request ¶
type Request struct { Data Data `json:"data" yaml:"data"` Context RequestContext `json:"context" yaml:"context"` }
Request defines an API request.
func (*Request) UnmarshalJSON ¶
UnmarshalJSON performs custom unmarshalling of Request.
type RequestParameters ¶
type RequestParameters struct { RequestContext RequestContext ReadService services.ReadService WriteService services.WriteService UserAgentKV *asfservices.UserAgentKVPlugin FQNameService *asfservices.FQNameTranslationPlugin FieldMask types.FieldMask Log *logrus.Entry }
RequestParameters structure
type Resource ¶
type Resource interface { Create(ctx context.Context, rp RequestParameters) (Response, error) Update(ctx context.Context, rp RequestParameters, id string) (Response, error) Delete(ctx context.Context, rp RequestParameters, id string) (Response, error) Read(ctx context.Context, rp RequestParameters, id string) (Response, error) ReadAll(ctx context.Context, rp RequestParameters, filters Filters, fields Fields) (Response, error) ReadCount(ctx context.Context, rp RequestParameters, filters Filters) (Response, error) AddInterface(ctx context.Context, rp RequestParameters, id string) (Response, error) DeleteInterface(ctx context.Context, rp RequestParameters, id string) (Response, error) }
Resource interface defines Neutron API operations