vnfmsdk

package
v0.0.0-...-1d1d6d3 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

VNFM SDK for Open Baton VNFManagers. Uses the sdk package passing specific implementation of certain functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(confPath string, h HandlerVnfm, name string) error

Start the VNFM with config file

func StartWithConfig

func StartWithConfig(typ, description, username, password, loglevel, brokerIp string, brokerPort, workers, timeout int, allocate bool, h HandlerVnfm, name string) error

Start the VNFM with specific config

Types

type HandlerVnfm

type HandlerVnfm interface {
	// ActionForResume uses the given VNFR and VNFCInstance to return a valid
	// action for resume. NoSuchAction is returned in case no such Action exists.
	ActionForResume(vnfr *catalogue.VirtualNetworkFunctionRecord,
		vnfcInstance *catalogue.VNFCInstance) catalogue.Action

	// CheckInstantiationFeasibility allows the VNFM to verify if the VNF instantiation is possible.
	CheckInstantiationFeasibility() error

	Configure(vnfr *catalogue.VirtualNetworkFunctionRecord) (*catalogue.VirtualNetworkFunctionRecord, error)

	HandleError(vnfr *catalogue.VirtualNetworkFunctionRecord) error

	Heal(vnfr *catalogue.VirtualNetworkFunctionRecord,
		component *catalogue.VNFCInstance, cause string) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Instantiate allows to create a VNF instance.
	Instantiate(vnfr *catalogue.VirtualNetworkFunctionRecord, scripts interface{},
		vimInstances map[string][]interface{}) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Modify allows making structural changes (e.g.configuration, topology, behavior, redundancy model) to a VNF instance.
	Modify(vnfr *catalogue.VirtualNetworkFunctionRecord,
		dependency *catalogue.VNFRecordDependency) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Query allows retrieving a VNF instance state and attributes. (not implemented)
	Query() error

	Resume(vnfr *catalogue.VirtualNetworkFunctionRecord,
		vnfcInstance *catalogue.VNFCInstance,
		dependency *catalogue.VNFRecordDependency) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Scale allows scaling (out / in, up / down) a VNF instance.
	Scale(chosenVimInstance interface{},
		scaleInOrOut catalogue.Action,
		vnfr *catalogue.VirtualNetworkFunctionRecord,
		component catalogue.Component,
		scripts interface{},
		dependency *catalogue.VNFRecordDependency) (*catalogue.VirtualNetworkFunctionRecord, *catalogue.VNFCInstance, error)

	// Start starts a VNFR.
	Start(vnfr *catalogue.VirtualNetworkFunctionRecord) (*catalogue.VirtualNetworkFunctionRecord, error)

	StartVNFCInstance(vnfr *catalogue.VirtualNetworkFunctionRecord,
		vnfcInstance *catalogue.VNFCInstance) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Stop stops a previously created VNF instance.
	Stop(vnfr *catalogue.VirtualNetworkFunctionRecord) (*catalogue.VirtualNetworkFunctionRecord, error)

	StopVNFCInstance(vnfr *catalogue.VirtualNetworkFunctionRecord,
		vnfcInstance *catalogue.VNFCInstance) (*catalogue.VirtualNetworkFunctionRecord, error)

	// Terminate allows terminating gracefully or forcefully a previously created VNF instance.
	Terminate(vnfr *catalogue.VirtualNetworkFunctionRecord) (*catalogue.VirtualNetworkFunctionRecord, error)

	// UpdateSoftware allows applying a minor / limited software update(e.g.patch) to a VNF instance.
	UpdateSoftware(script *catalogue.Script,
		vnfr *catalogue.VirtualNetworkFunctionRecord) (*catalogue.VirtualNetworkFunctionRecord, error)

	// UpgradeSoftware allows deploying a new software release to a VNF instance.
	UpgradeSoftware() error

	// UserData returns a string containing UserData.
	UserData() string
}

The Handler interface defines an abstraction of the operations that a VNFM should provide.

type VnfmConfig

type VnfmConfig struct {
	Type        string `toml:"type"`
	Endpoint    string `toml:"endpoint"`
	Description string `toml:"description"`
	Workers     int    `toml:"workers"`
	Username    string `toml:"username"`
	Password    string `toml:"password"`
	Allocate    bool   `toml:"allocate"`
	LogLevel    string `toml:"logLevel"`
	BrokerIp    string `toml:"brokerIp"`
	BrokerPort  int    `toml:"brokerPort"`
	Timeout     int    `toml:"timeout"`
}

The VNFM config struct

Jump to

Keyboard shortcuts

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