Documentation
¶
Index ¶
- Variables
- func Marshal(msg NFVMessage) ([]byte, error)
- type NFVMessage
- type OrAllocateResources
- type OrError
- type OrGeneric
- type OrGrantLifecycleOperation
- type OrHealVNFRequest
- type OrInstantiate
- type OrScaling
- type OrStartStop
- type OrUpdate
- type SenderType
- type VNFMAllocateResources
- type VNFMError
- type VNFMGeneric
- type VNFMGrantLifecycleOperation
- type VNFMHealed
- type VNFMInstantiate
- type VNFMScaled
- type VNFMScaling
- type VNFMStartStop
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMalformedMessage = errors.New("received JSON is malformed")
)
Functions ¶
func Marshal ¶
func Marshal(msg NFVMessage) ([]byte, error)
Types ¶
type NFVMessage ¶
type NFVMessage interface {
Action() catalogue.Action
Content() interface{}
From() SenderType
}
func New ¶
func New(params ...interface{}) (NFVMessage, error)
New creates dynamically a new NFVMessage from the given parameters. The function accepts a message body and an optional catalogue.Action before, such as in messages.NewMessage(catalogue.ActionError, &VNFMError{}). If no Action is specified, it is inferred using the DefaultAction() method of the body.
func Unmarshal ¶
func Unmarshal(msgBytes []byte, from SenderType) (NFVMessage, error)
type OrAllocateResources ¶
type OrAllocateResources struct {
VDUSet []*catalogue.VirtualDeploymentUnit `json:"vduSet,omitempty"`
// contains filtered or unexported fields
}
func (OrAllocateResources) DefaultAction ¶
func (OrAllocateResources) DefaultAction() catalogue.Action
func (OrAllocateResources) From ¶
func (OrAllocateResources) From() SenderType
type OrError ¶
type OrError struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"vnfr,omitempty"`
Message string `json:"message,omitempty"`
// contains filtered or unexported fields
}
func (OrError) DefaultAction ¶
func (OrError) From ¶
func (OrError) From() SenderType
type OrGeneric ¶
type OrGeneric struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"vnfr,omitempty"`
VNFRDependency *catalogue.VNFRecordDependency `json:"vnfrd,omitempty"`
// contains filtered or unexported fields
}
func (OrGeneric) DefaultAction ¶
func (OrGeneric) From ¶
func (OrGeneric) From() SenderType
type OrGrantLifecycleOperation ¶
type OrGrantLifecycleOperation struct {
GrantAllowed bool `json:"grantAllowed"`
VDUVIM map[string]*catalogue.VIMInstance `json:"vduVim,omitempty"`
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
// contains filtered or unexported fields
}
func (OrGrantLifecycleOperation) DefaultAction ¶
func (OrGrantLifecycleOperation) DefaultAction() catalogue.Action
func (OrGrantLifecycleOperation) From ¶
func (OrGrantLifecycleOperation) From() SenderType
type OrHealVNFRequest ¶
type OrHealVNFRequest struct {
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
Cause string `json:"cause,omitempty"`
// contains filtered or unexported fields
}
func (OrHealVNFRequest) DefaultAction ¶
func (OrHealVNFRequest) DefaultAction() catalogue.Action
func (OrHealVNFRequest) From ¶
func (OrHealVNFRequest) From() SenderType
type OrInstantiate ¶
type OrInstantiate struct {
VNFD *catalogue.VirtualNetworkFunctionDescriptor `json:"vnfd,omitempty"`
VNFDFlavour *catalogue.VNFDeploymentFlavour `json:"vnfdf,omitempty"`
VNFInstanceName string `json:"vnfInstanceName,omitempty"`
VLRs []*catalogue.VirtualLinkRecord `json:"vlrs,omitempty"`
Extension map[string]string `json:"extension,omitempty"`
VIMInstances map[string][]*catalogue.VIMInstance `json:"vimInstances,omitempty"`
VNFPackage *catalogue.VNFPackage `json:"vnfPackage,omitempty"`
Keys []*catalogue.Key `json:"keys,omitempty"`
// contains filtered or unexported fields
}
func (OrInstantiate) DefaultAction ¶
func (OrInstantiate) DefaultAction() catalogue.Action
func (OrInstantiate) From ¶
func (OrInstantiate) From() SenderType
type OrScaling ¶
type OrScaling struct {
Component *catalogue.VNFComponent `json:"component,omitempty"`
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
VIMInstance *catalogue.VIMInstance `json:"vimInstance,omitempty"`
VNFPackage *catalogue.VNFPackage `json:"vnfPackage,omitempty"`
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
Dependency *catalogue.VNFRecordDependency `json:"dependency,omitempty"`
Mode string `json:"mode,omitempty"`
Extension map[string]string `json:"extension,omitempty"`
// contains filtered or unexported fields
}
func (OrScaling) DefaultAction ¶
func (OrScaling) From ¶
func (OrScaling) From() SenderType
type OrStartStop ¶
type OrStartStop struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
VNFRDependency *catalogue.VNFRecordDependency `json:"vnfrDependency,omitempty"`
// contains filtered or unexported fields
}
func (OrStartStop) DefaultAction ¶
func (OrStartStop) DefaultAction() catalogue.Action
func (OrStartStop) From ¶
func (OrStartStop) From() SenderType
type OrUpdate ¶
type OrUpdate struct {
Script *catalogue.Script `json:"script,omitempty"`
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"vnfr,omitempty"`
// contains filtered or unexported fields
}
func (OrUpdate) DefaultAction ¶
func (OrUpdate) From ¶
func (OrUpdate) From() SenderType
type SenderType ¶
type SenderType int
SenderType represents the type of the sender of the given message
const ( VNFM SenderType = iota NFVO )
type VNFMAllocateResources ¶
type VNFMAllocateResources struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VIMInstances map[string]*catalogue.VIMInstance `json:"vimInstances,omitempty"`
Userdata string `json:"userdata,omitempty"`
KeyPairs []*catalogue.Key `json:"keyPairs,omitempty"`
// contains filtered or unexported fields
}
func (VNFMAllocateResources) DefaultAction ¶
func (VNFMAllocateResources) DefaultAction() catalogue.Action
func (VNFMAllocateResources) From ¶
func (VNFMAllocateResources) From() SenderType
type VNFMError ¶
type VNFMError struct {
NSRID string `json:"nsrId,omitempty"`
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
Exception map[string]interface{} `json:"exception,omitempty"` // I don't know how to deserialize a Java exception
// contains filtered or unexported fields
}
func (VNFMError) DefaultAction ¶
func (VNFMError) From ¶
func (VNFMError) From() SenderType
type VNFMGeneric ¶
type VNFMGeneric struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VNFRecordDependency *catalogue.VNFRecordDependency `json:"vnfRecordDependency,omitempty"`
// contains filtered or unexported fields
}
func (VNFMGeneric) DefaultAction ¶
func (VNFMGeneric) DefaultAction() catalogue.Action
func (VNFMGeneric) From ¶
func (VNFMGeneric) From() SenderType
type VNFMGrantLifecycleOperation ¶
type VNFMGrantLifecycleOperation struct {
VNFD *catalogue.VirtualNetworkFunctionDescriptor `json:"virtualNetworkFunctionDescriptor,omitempty"`
VDUSet []*catalogue.VirtualDeploymentUnit `json:"vduSet,omitempty"`
DeploymentFlavourKey string `json:"deploymentFlavourKey,omitempty"`
// contains filtered or unexported fields
}
func (VNFMGrantLifecycleOperation) DefaultAction ¶
func (VNFMGrantLifecycleOperation) DefaultAction() catalogue.Action
func (VNFMGrantLifecycleOperation) From ¶
func (VNFMGrantLifecycleOperation) From() SenderType
type VNFMHealed ¶
type VNFMHealed struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
Cause string `json:"cause,omitempty"`
// contains filtered or unexported fields
}
func (VNFMHealed) DefaultAction ¶
func (VNFMHealed) DefaultAction() catalogue.Action
func (VNFMHealed) From ¶
func (VNFMHealed) From() SenderType
type VNFMInstantiate ¶
type VNFMInstantiate struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
// contains filtered or unexported fields
}
func (VNFMInstantiate) DefaultAction ¶
func (VNFMInstantiate) DefaultAction() catalogue.Action
func (VNFMInstantiate) From ¶
func (VNFMInstantiate) From() SenderType
type VNFMScaled ¶
type VNFMScaled struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
// contains filtered or unexported fields
}
func (VNFMScaled) DefaultAction ¶
func (VNFMScaled) DefaultAction() catalogue.Action
func (VNFMScaled) From ¶
func (VNFMScaled) From() SenderType
type VNFMScaling ¶
type VNFMScaling struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
UserData string `json:"userData,omitempty"`
// contains filtered or unexported fields
}
func (VNFMScaling) DefaultAction ¶
func (VNFMScaling) DefaultAction() catalogue.Action
func (VNFMScaling) From ¶
func (VNFMScaling) From() SenderType
type VNFMStartStop ¶
type VNFMStartStop struct {
VNFR *catalogue.VirtualNetworkFunctionRecord `json:"virtualNetworkFunctionRecord,omitempty"`
VNFCInstance *catalogue.VNFCInstance `json:"vnfcInstance,omitempty"`
VNFRDependency *catalogue.VNFRecordDependency `json:"vnfrDependency,omitempty"`
// contains filtered or unexported fields
}
func (VNFMStartStop) DefaultAction ¶
func (VNFMStartStop) DefaultAction() catalogue.Action
func (VNFMStartStop) From ¶
func (VNFMStartStop) From() SenderType
Click to show internal directories.
Click to hide internal directories.