response

package
v0.0.0-...-f1610be Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package response Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Package response Copyright 2020-2021 Author.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Mustafa mbayramo@vmware.com

Index

Constants

View Source
const (
	// ExtensionTypeRepository Type Repository extension
	ExtensionTypeRepository = "Repository"

	// ExtensionEnabled extension state enabled
	ExtensionEnabled = "ENABLED"
)
View Source
const (
	ActiveRepo = "ENABLED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditField

type AuditField struct {
	// CreationUser who created uuid
	CreationUser      string `json:"creationUser" yaml:"creationUser"`
	CreationTimestamp string `json:"creationTimestamp" yaml:"creationTimestamp"`
}

type ClusterConfigSpec

type ClusterConfigSpec struct {
	Cni []struct {
		Name       string `json:"name" yaml:"name"`
		Properties struct {
		} `json:"properties" yaml:"properties"`
	} `json:"cni" yaml:"cni"`
	Csi []struct {
		Name       string `json:"name" yaml:"name"`
		Properties struct {
			Name      string `json:"name" yaml:"name"`
			IsDefault bool   `json:"isDefault" yaml:"isDefault"`
			Timeout   string `json:"timeout" yaml:"timeout"`
		} `json:"properties" yaml:"properties"`
	} `json:"csi" yaml:"csi"`
	KubernetesVersion string `json:"kubernetesVersion" yaml:"kubernetesVersion"`
	Tools             []struct {
		Name    string `json:"name" yaml:"name"`
		Version string `json:"version" yaml:"version"`
	} `json:"tools" yaml:"tools"`
}

ClusterConfigSpec cluster config spec hols CNI/CSI and K8S version

func (*ClusterConfigSpec) GetField

func (t *ClusterConfigSpec) GetField(field string) string

GetField - return field from ClusterSpec Spec struct

type ClusterEndpoint

type ClusterEndpoint struct {
	Cluster string
	IsIP    bool
}

type ClusterNodeConfigList

type ClusterNodeConfigList struct {
	Labels           []string `json:"labels" yaml:"labels"`
	Id               string   `json:"id" yaml:"id"`
	Name             string   `json:"name" yaml:"name"`
	Status           string   `json:"status" yaml:"status"`
	ActiveTasksCount int      `json:"activeTasksCount" yaml:"activeTasksCount"`
	Compatible       bool     `json:"compatible" yaml:"compatible"`
}

type ClusterNodeSpec

type ClusterNodeSpec struct {
	Cpu       int                `json:"cpu" yaml:"cpu"`
	Memory    int                `json:"memory" yaml:"memory"`
	Name      string             `json:"name" yaml:"name"`
	Networks  []models.Networks  `json:"networks" yaml:"networks"`
	Storage   int                `json:"storage" yaml:"storage"`
	Replica   int                `json:"replica" yaml:"replica"`
	Labels    []string           `json:"labels" yaml:"labels"`
	CloneMode string             `json:"cloneMode" yaml:"clone_mode"`
	Config    *models.NodeConfig `json:"config" yaml:"config"`
}

type ClusterNotFound

type ClusterNotFound struct {
	ErrMsg string
}

func (*ClusterNotFound) Error

func (m *ClusterNotFound) Error() string

type ClusterSpec

type ClusterSpec struct {
	// Id cluster ID user internal
	Id string `json:"id" yaml:"id"`
	// Cluster name
	ClusterName string `json:"clusterName" yaml:"cluster_name"`
	// Cluster Type VC or Kube
	ClusterType         string               `json:"clusterType" yaml:"clusterType"`
	VsphereClusterName  string               `json:"vsphereClusterName" yaml:"vsphereClusterName"`
	ManagementClusterId string               `json:"managementClusterId" yaml:"managementClusterId"`
	HcxUUID             string               `json:"hcxUUID" yaml:"hcxUUID"`
	Status              string               `json:"status" yaml:"status"`
	ActiveTasksCount    int                  `json:"activeTasksCount" yaml:"activeTasksCount"`
	ClusterTemplate     *ClusterSpecTemplate `json:"clusterTemplate" yaml:"clusterTemplate"`
	ClusterId           string               `json:"clusterId" yaml:"clusterId"`
	ClusterUrl          string               `json:"clusterUrl" yaml:"cluster_url"`
	KubeConfig          string               `json:"kubeConfig" yaml:"kube_config"`
	EndpointIP          string               `json:"endpointIP" yaml:"endpoint_ip"`
	MasterNodes         []ClusterNodeSpec    `json:"masterNodes" yaml:"masterNodes"`
	WorkerNodes         []ClusterNodeSpec    `json:"workerNodes" yaml:"workerNodes"`
	VimId               string               `json:"vimId" yaml:"vimId"`
	Error               string               `json:"error" yaml:"error"`
}

ClusterSpec - hold cluster specs

func ClusterSpecsFromFile

func ClusterSpecsFromFile(fileName string) (*ClusterSpec, error)

ClusterSpecsFromFile - reads tenant cluster spec from file and return ClusterSpec instance

func ClusterSpecsFromString

func ClusterSpecsFromString(str string) (*ClusterSpec, error)

ClusterSpecsFromString take string that hold entire spec passed to reader and return ClusterSpec instance

func NewClusterSpecs

func NewClusterSpecs(r io.Reader) (*ClusterSpec, error)

NewClusterSpecs create spec from reader

func ReadClusterSpec

func ReadClusterSpec(b io.Reader) (*ClusterSpec, error)

ReadClusterSpec - Read cluster spec from io interface detects format and use either yaml or json parse

func (*ClusterSpec) GetField

func (c *ClusterSpec) GetField(field string) string

GetField - return field from Cluster Spec struct

func (*ClusterSpec) GetFields

func (c *ClusterSpec) GetFields() (map[string]interface{}, error)

func (ClusterSpec) InstanceSpecsFromString

func (c ClusterSpec) InstanceSpecsFromString(s string) (interface{}, error)

InstanceSpecsFromString method return instance form string

type ClusterSpecTemplate

type ClusterSpecTemplate struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Id      string `json:"id"`
}

ClusterSpecTemplate template id/name.

type ClusterSuccess

type ClusterSuccess struct {
	Id          string `json:"id"`
	OperationId string `json:"operationId"`
}

type ClusterTemplateSpec

type ClusterTemplateSpec struct {
	ClusterType   string             `json:"clusterType" yaml:"clusterType" validate:"required"`
	ClusterConfig *ClusterConfigSpec `json:"clusterConfig,omitempty" yaml:"clusterConfig,omitempty" validate:"required"`
	Description   string             `json:"description" yaml:"description"`
	MasterNodes   []struct {
		Cpu       int                `json:"cpu" yaml:"cpu" validate:"required"`
		Memory    int                `json:"memory" yaml:"memory" validate:"required"`
		Name      string             `json:"name" yaml:"name"`
		Networks  []TemplateNetworks `json:"networks" yaml:"networks" validate:"required"`
		Storage   int                `json:"storage" yaml:"storage" validate:"required"`
		Replica   int                `json:"replica" yaml:"replica" validate:"required"`
		Labels    []string           `json:"labels" yaml:"labels"`
		CloneMode string             `json:"cloneMode" yaml:"cloneMode" validate:"required"`
	} `json:"masterNodes" yaml:"masterNodes"`
	Name        string `json:"name" yaml:"name" validate:"required"`
	Id          string `json:"id" yaml:"id"`
	Tags        []Tags `json:"tags,omitempty" yaml:"tags,omitempty"`
	WorkerNodes []struct {
		Cpu      int    `json:"cpu" yaml:"cpu" validate:"required"`
		Memory   int    `json:"memory" yaml:"memory" validate:"required"`
		Name     string `json:"name" yaml:"name" validate:"required"`
		Networks []struct {
			Label string `json:"label" yaml:"label" validate:"required"`
		} `json:"networks" yaml:"networks" validate:"required"`
		Storage   int      `json:"storage" yaml:"storage" validate:"required"`
		Replica   int      `json:"replica" yaml:"replica" validate:"required"`
		Labels    []string `json:"labels" yaml:"labels" validate:"required"`
		CloneMode string   `json:"cloneMode" yaml:"cloneMode" validate:"required"`
		Config    struct {
			CpuManagerPolicy *CpuManagerPolicy `json:"cpuManagerPolicy,omitempty" yaml:"cpuManagerPolicy,omitempty"`
			HealthCheckSpec  *HealthCheckSpec  `json:"healthCheck,omitempty" yaml:"healthCheck,omitempty"`
		} `json:"config,omitempty" yaml:"config,omitempty"`
	} `json:"workerNodes,omitempty" yaml:"workerNodes,omitempty"`
}

ClusterTemplateSpec - cluster template

func (*ClusterTemplateSpec) GetField

func (t *ClusterTemplateSpec) GetField(field string) string

GetField - return field from ClusterSpec Spec struct

func (*ClusterTemplateSpec) ValidateSpec

func (t *ClusterTemplateSpec) ValidateSpec(spec *specs.SpecCluster) (bool, error)

ValidateSpec - validate cluster specs contains all required node pool based on template spec

type ClusterTemplates

type ClusterTemplates struct {
	ClusterTemplates []ClusterTemplateSpec
}

func (*ClusterTemplates) Filter

Filter filters respond based on filter type and pass to callback

func (*ClusterTemplates) GetTemplate

func (t *ClusterTemplates) GetTemplate(idOrName string) (*ClusterTemplateSpec, error)

GetTemplate return cluster template , lookup by name or id

func (*ClusterTemplates) GetTemplateId

func (t *ClusterTemplates) GetTemplateId(q string) (string, error)

GetTemplateId return cluster template id

type Clusters

type Clusters struct {
	Clusters []ClusterSpec
}

Clusters - a list of all clusters

func ClustersSpecsFromString

func ClustersSpecsFromString(str string) (*Clusters, error)

ClustersSpecsFromString take string that hold entire spec passed to reader and return ClusterSpec instance

func NewClustersSpecs

func NewClustersSpecs(r io.Reader) (*Clusters, error)

NewClustersSpecs create cluster spec from reader

func ReadClustersSpec

func ReadClustersSpec(b io.Reader) (*Clusters, error)

ReadClustersSpec - Read cluster spec from io interface detects format and use either yaml or json parse

func (*Clusters) FuzzyGetClusterSpec

func (c *Clusters) FuzzyGetClusterSpec(cluster string) (*ClusterSpec, map[float32]string, error)

func (*Clusters) GetClusterIPs

func (c *Clusters) GetClusterIPs() map[string]ClusterEndpoint

GetClusterIPs return all cluster IP

func (*Clusters) GetClusterId

func (c *Clusters) GetClusterId(cluster string) (string, error)

GetClusterId return cluster id.

func (*Clusters) GetClusterIds

func (c *Clusters) GetClusterIds() ([]string, error)

GetClusterIds -return list of all cluster ids

func (*Clusters) GetClusterSpec

func (c *Clusters) GetClusterSpec(cluster string) (*ClusterSpec, error)

GetClusterSpec return cluster information, loop up up by name or id, if not found return error

func (Clusters) InstanceSpecsFromString

func (c Clusters) InstanceSpecsFromString(s string) (interface{}, error)

InstanceSpecsFromString method return instance form string

type CnfFilterType

type CnfFilterType int32

CnfFilterType - cnf filter types

const (
	// FilterCnfCID by cnf id
	FilterCnfCID CnfFilterType = 0

	// FilerVnfInstanceName filer by vnf instance name
	FilerVnfInstanceName CnfFilterType = 1

	// FilterVnfdID by vnfd id
	FilterVnfdID CnfFilterType = 2

	// FilterVnfCatalogName filters by vnf catalog name
	FilterVnfCatalogName CnfFilterType = 3
)

type CnfInstancesError

type CnfInstancesError struct {
	Type     string `json:"type" yaml:"type"`
	Title    string `json:"title" yaml:"title"`
	Status   int    `json:"status" yaml:"status"`
	Detail   string `json:"detail" yaml:"detail"`
	Instance string `json:"instance" yaml:"instance"`
}

type CnfInstantiateEntry

type CnfInstantiateEntry struct {
	DispatchType       string `json:"dispatchType" yaml:"dispatch_type"`
	Namespace          string `json:"namespace" yaml:"namespace"`
	ChartName          string `json:"chartName" yaml:"chartName"`
	ChartVersion       string `json:"chartVersion" yaml:"chartVersion"`
	RepoURL            string `json:"repoUrl" yaml:"repoUrl"`
	Username           string `json:"username" yaml:"username"`
	Password           string `json:"password" yaml:"password"`
	HelmVersion        string `json:"helmVersion" yaml:"helmVersion"`
	VduID              string `json:"vduId" yaml:"vduId"`
	EntityID           string `json:"entityId" yaml:"entityId"`
	DeploymentName     string `json:"deploymentName" yaml:"deploymentName"`
	InstantiationState string `json:"instantiationState" yaml:"instantiationState"`
}

CnfInstantiateEntry VNFD Charts detail

type CnfLcmExtended

type CnfLcmExtended struct {
	RespId                 RespondID                      `json:"_id" yaml:"resp_id"`
	CID                    string                         `json:"id" yaml:"cid"`
	VnfInstanceName        string                         `json:"vnfInstanceName" yaml:"vnfInstanceName"`
	VnfInstanceDescription string                         `json:"vnfInstanceDescription" yaml:"vnfInstanceDescription"`
	VnfdID                 string                         `json:"vnfdId" yaml:"vnfdId"`
	VnfPkgID               string                         `json:"vnfPkgId" yaml:"vnfPkgId"`
	VnfCatalogName         string                         `json:"vnfCatalogName" yaml:"vnfCatalogName"`
	VnfProvider            string                         `json:"vnfProvider" yaml:"vnfProvider"`
	VnfProductName         string                         `json:"vnfProductName" yaml:"vnfProductName"`
	VnfSoftwareVersion     string                         `json:"vnfSoftwareVersion" yaml:"vnfSoftwareVersion"`
	VnfdVersion            string                         `json:"vnfdVersion" yaml:"vnfdVersion"`
	OnboardedVnfPkgInfoID  string                         `json:"onboardedVnfPkgInfoId" yaml:"onboardedVnfPkgInfoId"`
	InstantiationState     string                         `json:"instantiationState" yaml:"instantiationState"`
	ManagedBy              *models.InternalManagedBy      `json:"managedBy,omitempty" yaml:"managedBy,omitempty"`
	NfType                 string                         `json:"nfType" yaml:"nf_type"`
	Links                  models.PolicyLinks             `json:"_links" yaml:"_links"`
	LastUpdated            time.Time                      `json:"lastUpdated" yaml:"lastUpdated"`
	LastUpdateEnterprise   string                         `json:"lastUpdateEnterprise" yaml:"lastUpdateEnterprise"`
	LastUpdateOrganization string                         `json:"lastUpdateOrganization" yaml:"lastUpdateOrganization"`
	LastUpdateUser         string                         `json:"lastUpdateUser" yaml:"lastUpdateUser"`
	CreationDate           time.Time                      `json:"creationDate" yaml:"creationDate"`
	CreationEnterprise     string                         `json:"creationEnterprise" yaml:"creationEnterprise"`
	CreationOrganization   string                         `json:"creationOrganization" yaml:"creationOrganization"`
	CreationUser           string                         `json:"creationUser" yaml:"creationUser"`
	IsDeleted              bool                           `json:"isDeleted" yaml:"isDeleted"`
	VimConnectionInfo      []models.VimConnectionInfo     `json:"vimConnectionInfo" yaml:"vimConnectionInfo"`
	LcmOperation           string                         `json:"lcmOperation" yaml:"lcmOperation"`
	LcmOperationState      string                         `json:"lcmOperationState" yaml:"lcmOperationState"`
	RowType                string                         `json:"rowType" yaml:"rowType"`
	InstantiatedNfInfo     map[string]CnfInstantiateEntry `json:"instantiatedNfInfo,omitempty" yaml:"instantiatedNfInfo"`
	InstantiatedVnfInfo    map[string]CnfInstantiateEntry `json:"instantiatedVnfInfo,omitempty" yaml:"instantiatedVnfInfo"`
	IsUsedByNS             bool                           `json:"isUsedByNS" yaml:"isUsedByNS"`
	AttachedNSCount        int                            `json:"attachedNSCount" yaml:"attachedNSCount"`
	Meta                   CnfMetadata                    `json:"metadata,omitempty" yaml:"meta"`
}

func (*CnfLcmExtended) GetField

func (e *CnfLcmExtended) GetField(field string) string

GetField - return struct field value

func (*CnfLcmExtended) GetFields

func (e *CnfLcmExtended) GetFields() (map[string]interface{}, error)

GetFields return VduPackage fields name as map[string], each key is field name

func (*CnfLcmExtended) IsFailed

func (e *CnfLcmExtended) IsFailed() bool

func (*CnfLcmExtended) IsInCluster

func (e *CnfLcmExtended) IsInCluster(vimName string) bool

IsInCluster return true if cnf in cluster indicated vimName.

func (*CnfLcmExtended) IsInstantiated

func (e *CnfLcmExtended) IsInstantiated() bool

func (*CnfLcmExtended) IsStarting

func (e *CnfLcmExtended) IsStarting() bool

func (*CnfLcmExtended) IsStateRollback

func (e *CnfLcmExtended) IsStateRollback() bool

func (*CnfLcmExtended) LastOperation

func (e *CnfLcmExtended) LastOperation() string

type CnfMetadata

type CnfMetadata struct {
	VnfPkgID          string                   `json:"vnfPkgId" yaml:"vnfPkgId"`
	VnfCatalogName    string                   `json:"vnfCatalogName" yaml:"vnfCatalogName"`
	ManagedBy         models.InternalManagedBy `json:"managedBy" yaml:"managedBy"`
	NfType            string                   `json:"nfType" yaml:"nfType"`
	LcmOperation      string                   `json:"lcmOperation" yaml:"lcmOperation"`
	LcmOperationState string                   `json:"lcmOperationState" yaml:"lcmOperationState"`
	IsUsedByNS        string                   `json:"isUsedByNS" yaml:"isUsedByNS"`
	AttachedNSCount   string                   `json:"attachedNSCount" yaml:"attachedNSCount"`
}

CnfMetadata Metadata information attached to respond for cnflcm req

type CnfNotFound

type CnfNotFound struct {
	// contains filtered or unexported fields
}

CnfNotFound error raised if cnf not found

func (*CnfNotFound) Error

func (m *CnfNotFound) Error() string

type CnfPolicyUri

type CnfPolicyUri struct {
	Href string `json:"href,omitempty"`
}

CnfPolicyUri CNF policy URI

type Cnfs

type Cnfs struct {
	CnfLcms []LcmInfo
}

Cnfs - list of CNF LCM respond

type CnfsExtended

type CnfsExtended struct {
	CnfLcms []CnfLcmExtended
}

CnfsExtended - list of CNF LCM respond

func (*CnfsExtended) Filter

func (c *CnfsExtended) Filter(q CnfFilterType, f func(string) bool) ([]CnfLcmExtended, error)

Filter filters respond based on filter type and pass to callback

func (*CnfsExtended) FindByName

func (c *CnfsExtended) FindByName(s string) (*CnfLcmExtended, error)

FindByName - tries to find CNF by product name, id.

func (*CnfsExtended) GetByCatalogName

func (c *CnfsExtended) GetByCatalogName(name string) ([]CnfLcmExtended, error)

GetByCatalogName - tries to find all instance based on catalog name

func (*CnfsExtended) ResolveFromName

func (c *CnfsExtended) ResolveFromName(name string) (*CnfLcmExtended, error)

ResolveFromName - tries to find CNF by product name or id.

type CpuManagerPolicy

type CpuManagerPolicy struct {
	Type                      string `json:"type,omitempty" yaml:"type,omitempty"`
	Policy                    string `json:"policy,omitempty" yaml:"policy,omitempty"`
	*CpuManagerSpecProperties `json:"properties,omitempty" yaml:"properties,omitempty"`
}

CpuManagerPolicy - overwrite CPU mgmt policy

type CpuManagerSpecProperties

type CpuManagerSpecProperties struct {
	KubeReserved struct {
		Cpu         int `json:"cpu,omitempty" yaml:"cpu,omitempty"`
		MemoryInGiB int `json:"memoryInGiB,omitempty" yaml:"memoryInGiB,omitempty"`
	} `json:"kubeReserved,omitempty" yaml:"kubeReserved,omitempty"`
	SystemReserved struct {
		Cpu         int `json:"cpu,omitempty" yaml:"cpu,omitempty"`
		MemoryInGiB int `json:"memoryInGiB,omitempty" yaml:"memoryInGiB,omitempty"`
	} `json:"systemReserved,omitempty" yaml:"systemReserved,omitempty"`
}

CpuManagerSpecProperties -CpuManagerPolicy properties

type ExtendedMetadata

type ExtendedMetadata struct {
	VnfPkgId       string `json:"vnfPkgId" yaml:"vnf_pkg_id"`
	VnfCatalogName string `json:"vnfCatalogName" yaml:"vnf_catalog_name"`
	ManagedBy      struct {
		ExtensionSubtype string `json:"extensionSubtype" yaml:"extension_subtype"`
		ExtensionName    string `json:"extensionName" yaml:"extension_name"`
	} `json:"managedBy" yaml:"managed_by"`
	NfType            string `json:"nfType" yaml:"nf_type"`
	LcmOperation      string `json:"lcmOperation" yaml:"lcm_operation"`
	LcmOperationState string `json:"lcmOperationState" yaml:"lcm_operation_state"`
	IsUsedByNS        string `json:"isUsedByNS" yaml:"is_used_by_ns"`
	AttachedNSCount   string `json:"attachedNSCount" yaml:"attached_ns_count"`
	ExtVirtualLinks   []struct {
		Id                 string `json:"id" yaml:"id"`
		VimConnectionId    string `json:"vimConnectionId" yaml:"vim_connection_id"`
		ResourceProviderId string `json:"resourceProviderId" yaml:"resource_provider_id"`
		ResourceId         string `json:"resourceId" yaml:"resource_id"`
		ExtCps             []struct {
			CpdId    string `json:"cpdId" yaml:"cpd_id"`
			CpConfig []struct {
				CpInstanceId   string `json:"cpInstanceId" yaml:"cp_instance_id"`
				LinkPortId     string `json:"linkPortId" yaml:"link_port_id"`
				CpProtocolData []struct {
					LayerProtocol  string `json:"layerProtocol" yaml:"layer_protocol"`
					IpOverEthernet struct {
						MacAddress  string `json:"macAddress" yaml:"mac_address"`
						IpAddresses []struct {
							Type                string   `json:"type" yaml:"type"`
							FixedAddresses      []string `json:"fixedAddresses" yaml:"fixed_addresses"`
							NumDynamicAddresses int      `json:"numDynamicAddresses" yaml:"num_dynamic_addresses"`
							AddressRange        struct {
								MinAddress string `json:"minAddress" yaml:"min_address"`
								MaxAddress string `json:"maxAddress" yaml:"max_address"`
							} `json:"addressRange" yaml:"address_range"`
							SubnetId string `json:"subnetId" yaml:"subnet_id"`
						} `json:"ipAddresses" yaml:"ip_addresses"`
					} `json:"ipOverEthernet" yaml:"ip_over_ethernet"`
				} `json:"cpProtocolData" yaml:"cp_protocol_data"`
			} `json:"cpConfig" yaml:"cp_config"`
		} `json:"extCps" yaml:"ext_cps"`
		ExtLinkPorts []struct {
			Id             string `json:"id" yaml:"id"`
			ResourceHandle struct {
				VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id"`
				ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id"`
				ResourceId           string `json:"resourceId" yaml:"resource_id"`
				VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type"`
			} `json:"resourceHandle" yaml:"resource_handle"`
		} `json:"extLinkPorts" yaml:"ext_link_ports"`
	} `json:"extVirtualLinks" yaml:"ext_virtual_links"`
	Tags []struct {
		Name        string `json:"name" yaml:"name"`
		AutoCreated bool   `json:"autoCreated" yaml:"auto_created"`
	} `json:"tags" yaml:"tags"`
}

ExtendedMetadata

type Extension

type Extension struct {
	ExtensionId          string                         `json:"extensionId" yaml:"extensionId"`
	Name                 string                         `json:"name" yaml:"name"`
	Type                 string                         `json:"type" yaml:"type"`
	ExtensionKey         string                         `json:"extensionKey" yaml:"extensionKey"`
	Description          string                         `json:"description" yaml:"description"`
	InterfaceInfo        *ExtensionInterfaceInfo        `json:"interfaceInfo" yaml:"interfaceInfo"`
	AccessInfo           *ExtensionAccessInfo           `json:"accessInfo" yaml:"accessInfo"`
	AdditionalParameters *ExtensionAdditionalParameters `json:"additionalParameters" yaml:"additional_parameters"`
	State                string                         `json:"state" yaml:"state"`
	ExtensionSubtype     string                         `json:"extensionSubtype" yaml:"extension_subtype"`
	Products             []interface{}                  `json:"products" yaml:"products"`
	VimInfo              []ExtensionVimInfo             `json:"vimInfo" yaml:"vim_info"`
	Version              string                         `json:"version" yaml:"version"`
	VnfCount             int                            `json:"vnfCount" yaml:"vnf_count"`
	VnfCatalogCount      int                            `json:"vnfCatalogCount" yaml:"vnfCatalogCount"`
	Error                string                         `json:"error" yaml:"error"`
	AutoScaleEnabled     bool                           `json:"autoScaleEnabled" yaml:"autoScaleEnabled"`
	AutoHealEnabled      bool                           `json:"autoHealEnabled" yaml:"autoHealEnabled"`
}

func (*Extension) IsEnabled

func (e *Extension) IsEnabled() bool

type ExtensionAccessInfo

type ExtensionAccessInfo struct {
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
}

ExtensionAccessInfo for Harbor it username and password

type ExtensionAdditionalParameters

type ExtensionAdditionalParameters struct {
	TrustAllCerts bool `json:"trustAllCerts" yaml:"trustAllCerts"`
	RepoSyncVim   struct {
		VimName       string `json:"vimName" yaml:"vimName"`
		VimId         string `json:"vimId" yaml:"vim_id"`
		VimSystemUUID string `json:"vimSystemUUID" yaml:"vim_system_uuid"`
	} `json:"repoSyncVim" yaml:"repo_sync_vim"`
}

ExtensionAdditionalParameters contains data where it attached to.

type ExtensionInterfaceInfo

type ExtensionInterfaceInfo struct {
	Url                string `json:"url" yaml:"url"`
	Description        string `json:"description" yaml:"description"`
	TrustedCertificate string `json:"trustedCertificate" yaml:"trustedCertificate"`
}

ExtensionInterfaceInfo contains url for harbor , cert

type ExtensionVimInfo

type ExtensionVimInfo struct {
	VimName       string `json:"vimName" yaml:"vimName"`
	VimId         string `json:"vimId" yaml:"vimId"`
	VimSystemUUID string `json:"vimSystemUUID" yaml:"vimSystemUUID"`
}

type Extensions

type Extensions struct {
	ExtensionsList []Extension `json:"extensions"`
}

func (*Extensions) FindExtension

func (e *Extensions) FindExtension(NameOrId string) (*Extension, error)

FindExtension find repository Extension by name or extension id

func (*Extensions) FindRepo

func (e *Extensions) FindRepo(q string) (*Extension, error)

FindRepo find repository Extension

func (*Extensions) GetAllRepositories

func (e *Extensions) GetAllRepositories() (*Extension, error)

GetAllRepositories return all repository Extension

func (*Extensions) GetRepositoryByUrl

func (e *Extensions) GetRepositoryByUrl(url string) (*Extension, error)

GetRepositoryByUrl return all repository by url

func (*Extensions) GetVimAttached

func (e *Extensions) GetVimAttached(ext string, vs ...string) ([]ExtensionVimInfo, error)

GetVimAttached return list all vim extension ext attached to. ext can be a name or id.

type HarborRepos

type HarborRepos struct {
	ArtifactCount int       `json:"artifact_count"`
	CreationTime  time.Time `json:"creation_time"`
	Id            int       `json:"id"`
	Name          string    `json:"name"`
	ProjectId     int       `json:"project_id"`
	PullCount     int       `json:"pull_count"`
	UpdateTime    time.Time `json:"update_time"`
}

type HealthCheckSpec

type HealthCheckSpec struct {
	NodeStartupTimeout  string `json:"nodeStartupTimeout,omitempty" yaml:"nodeStartupTimeout,omitempty"`
	UnhealthyConditions []struct {
		Type    string `json:"type,omitempty" yaml:"type,omitempty"`
		Status  string `json:"status,omitempty" yaml:"status,omitempty"`
		Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
	} `json:"unhealthyConditions,omitempty" yaml:"unhealthyConditions,omitempty"`
}

HealthCheckSpec - specs Type

type HelmChart

type HelmChart struct {
	Name          string    `json:"name"`
	TotalVersions int       `json:"total_versions"`
	LatestVersion string    `json:"latest_version"`
	Created       time.Time `json:"created"`
	Updated       time.Time `json:"updated"`
	Icon          string    `json:"icon"`
	Home          string    `json:"home"`
	Deprecated    bool      `json:"deprecated"`
}

type InfraRequirements

type InfraRequirements struct {
	NodeComponents struct {
		Kernel struct {
			KernelType struct {
				Name    string `json:"name" yaml:"name"`
				Version string `json:"version" yaml:"version"`
			} `json:"kernel_type" yaml:"kernel_type"`
		} `json:"kernel" yaml:"kernel"`
	}
}

InfraRequirements csar section

type InstanceUpdate

type InstanceUpdate struct {
	Id                    string `json:"id" yaml:"id"`
	TaskId                string `json:"taskId" yaml:"taskId"`
	OperationState        string `json:"operationState" yaml:"operationState"`
	StateEnteredTime      int64  `json:"stateEnteredTime" yaml:"stateEnteredTime"`
	StartTime             int64  `json:"startTime" yaml:"startTime"`
	InstanceId            string `json:"instanceId" yaml:"instanceId"`
	Operation             string `json:"operation" yaml:"operation"`
	IsAutomaticInvocation bool   `json:"isAutomaticInvocation" yaml:"isAutomaticInvocation"`
	OperationParams       struct {
		FlavourId        string `json:"flavourId" yaml:"flavourId"`
		AdditionalParams struct {
			VimId               string `json:"vimId" yaml:"vimId"`
			NodePoolId          string `json:"nodePoolId" yaml:"nodePoolId"`
			SkipGrant           bool   `json:"skipGrant" yaml:"skipGrant"`
			IgnoreGrantFailure  bool   `json:"ignoreGrantFailure" yaml:"ignoreGrantFailure"`
			DisableAutoRollback bool   `json:"disableAutoRollback" yaml:"disableAutoRollback"`
			DisableGrant        bool   `json:"disableGrant" yaml:"disableGrant"`
			UseVAppTemplates    bool   `json:"useVAppTemplates" yaml:"useVAppTemplates"`
		} `json:"additionalParams" yaml:"additional_params"`
		VimId        string `json:"vimId" yaml:"vimId"`
		NfInstanceId string `json:"nfInstanceId" yaml:"nfInstanceId"`
		Id           string `json:"id" yaml:"id"`
	} `json:"operationParams" yaml:"operationParams"`
	IsCancelPending        bool      `json:"isCancelPending" yaml:"is_cancel_pending"`
	EntityName             string    `json:"entityName" yaml:"entityName"`
	EntityType             string    `json:"entityType" yaml:"entityType"`
	LastUpdated            time.Time `json:"lastUpdated" yaml:"lastUpdated"`
	LastUpdateEnterprise   string    `json:"lastUpdateEnterprise" yaml:"lastUpdateEnterprise"`
	LastUpdateOrganization string    `json:"lastUpdateOrganization" yaml:"lastUpdateOrganization"`
	LastUpdateUser         string    `json:"lastUpdateUser" yaml:"last_update_user"`
	CreationDate           time.Time `json:"creationDate" yaml:"creationDate"`
	CreationEnterprise     string    `json:"creationEnterprise" yaml:"creationEnterprise"`
	CreationOrganization   string    `json:"creationOrganization" yaml:"creationOrganization"`
	CreationUser           string    `json:"creationUser" yaml:"creation_user"`
	IsDeleted              bool      `json:"isDeleted" yaml:"is_deleted"`
	EndTime                int64     `json:"endTime" yaml:"end_time"`
	Error                  string    `json:"error" yaml:"error"`
}

type InstantiatedVnfInfo

type InstantiatedVnfInfo struct {
	FlavourId   string `json:"flavourId" yaml:"flavourId" yaml:"flavour_id"`
	VnfState    string `json:"vnfState" yaml:"vnfState" yaml:"vnf_state"`
	ScaleStatus []struct {
		AspectId   string `json:"aspectId" yaml:"aspect_id" yaml:"aspect_id"`
		ScaleLevel int    `json:"scaleLevel" yaml:"scale_level" yaml:"scale_level"`
	} `json:"scaleStatus" yaml:"scaleStatus" yaml:"scale_status"`
	MaxScaleLevels []struct {
		AspectId   string `json:"aspectId" yaml:"aspectId" yaml:"aspect_id"`
		ScaleLevel int    `json:"scaleLevel" yaml:"scaleLevel" yaml:"scale_level"`
	} `json:"maxScaleLevels" yaml:"maxScaleLevels" yaml:"max_scale_levels"`
	ExtCpInfo []struct {
		Id             string `json:"id" yaml:"id" yaml:"id"`
		CpdId          string `json:"cpdId" yaml:"cpdId" yaml:"cpd_id"`
		CpProtocolInfo []struct {
			LayerProtocol  string `json:"layerProtocol" yaml:"layerProtocol" yaml:"layer_protocol"`
			IpOverEthernet struct {
				MacAddress  string `json:"macAddress" yaml:"mac_address" yaml:"mac_address"`
				IpAddresses []struct {
					Type         string   `json:"type" yaml:"type" yaml:"type"`
					Addresses    []string `json:"addresses" yaml:"addresses" yaml:"addresses"`
					IsDynamic    bool     `json:"isDynamic" yaml:"isDynamic" yaml:"is_dynamic"`
					AddressRange struct {
						MinAddress string `json:"minAddress" yaml:"minAddress" yaml:"min_address"`
						MaxAddress string `json:"maxAddress" yaml:"maxAddress" yaml:"max_address"`
					} `json:"addressRange" yaml:"addressRange" yaml:"address_range"`
					SubnetId string `json:"subnetId" yaml:"subnetId" yaml:"subnet_id"`
				} `json:"ipAddresses" yaml:"ipAddresses" yaml:"ip_addresses"`
			} `json:"ipOverEthernet" yaml:"ipOverEthernet" yaml:"ip_over_ethernet"`
		} `json:"cpProtocolInfo" yaml:"cpProtocolInfo" yaml:"cp_protocol_info"`
		ExtLinkPortId string `json:"extLinkPortId" yaml:"extLinkPortId" yaml:"ext_link_port_id"`
		Metadata      struct {
		} `json:"metadata" yaml:"metadata" yaml:"metadata"`
		AssociatedVnfcCpId         string `json:"associatedVnfcCpId" yaml:"associatedVnfcCpId" yaml:"associated_vnfc_cp_id"`
		AssociatedVnfVirtualLinkId string `json:"associatedVnfVirtualLinkId" yaml:"associatedVnfVirtualLinkId" yaml:"associated_vnf_virtual_link_id"`
	} `json:"extCpInfo" yaml:"ext_cp_info" yaml:"ext_cp_info"`
	ExtVirtualLinkInfo []struct {
		Id             string `json:"id" yaml:"id" yaml:"id"`
		ResourceHandle struct {
			VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
			ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
			ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
			VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
		} `json:"resourceHandle" yaml:"resource_handle" yaml:"resource_handle"`
		ExtLinkPorts []struct {
			Id             string `json:"id" yaml:"id" yaml:"id"`
			ResourceHandle struct {
				VimConnectionId      string `json:"vimConnectionId" yaml:"vimConnectionId" yaml:"vim_connection_id"`
				ResourceProviderId   string `json:"resourceProviderId" yaml:"resourceProviderId" yaml:"resource_provider_id"`
				ResourceId           string `json:"resourceId" yaml:"resourceId" yaml:"resource_id"`
				VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vimLevelResourceType" yaml:"vim_level_resource_type"`
			} `json:"resourceHandle" yaml:"resource_handle" yaml:"resource_handle"`
			CpInstanceId string `json:"cpInstanceId" yaml:"cp_instance_id" yaml:"cp_instance_id"`
		} `json:"extLinkPorts" yaml:"ext_link_ports" yaml:"ext_link_ports"`
	} `json:"extVirtualLinkInfo" yaml:"ext_virtual_link_info" yaml:"ext_virtual_link_info"`
	ExtManagedVirtualLinkInfo []struct {
		Id                   string `json:"id" yaml:"id" yaml:"id"`
		VnfVirtualLinkDescId string `json:"vnfVirtualLinkDescId" yaml:"vnf_virtual_link_desc_id" yaml:"vnf_virtual_link_desc_id"`
		NetworkResource      struct {
			VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
			ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
			ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
			VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
		} `json:"networkResource" yaml:"network_resource" yaml:"network_resource"`
		VnfLinkPorts []struct {
			Id             string `json:"id" yaml:"id" yaml:"id"`
			ResourceHandle struct {
				VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
				ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
				ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
				VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
			} `json:"resourceHandle" yaml:"resource_handle" yaml:"resource_handle"`
			CpInstanceId   string `json:"cpInstanceId" yaml:"cp_instance_id" yaml:"cp_instance_id"`
			CpInstanceType string `json:"cpInstanceType" yaml:"cp_instance_type" yaml:"cp_instance_type"`
		} `json:"vnfLinkPorts" yaml:"vnf_link_ports" yaml:"vnf_link_ports"`
	} `json:"extManagedVirtualLinkInfo" yaml:"ext_managed_virtual_link_info" yaml:"ext_managed_virtual_link_info"`
	MonitoringParameters []struct {
		Id                string `json:"id" yaml:"id" yaml:"id"`
		Name              string `json:"name" yaml:"name" yaml:"name"`
		PerformanceMetric string `json:"performanceMetric" yaml:"performance_metric" yaml:"performance_metric"`
	} `json:"monitoringParameters" yaml:"monitoring_parameters" yaml:"monitoring_parameters"`
	LocalizationLanguage string `json:"localizationLanguage" yaml:"localization_language" yaml:"localization_language"`
	VnfcResourceInfo     []struct {
		Id              string `json:"id" yaml:"id" yaml:"id"`
		VduId           string `json:"vduId" yaml:"vdu_id" yaml:"vdu_id"`
		ComputeResource struct {
			VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
			ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
			ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
			VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
		} `json:"computeResource" yaml:"compute_resource" yaml:"compute_resource"`
		ZoneId             string   `json:"zoneId" yaml:"zone_id" yaml:"zone_id"`
		StorageResourceIds []string `json:"storageResourceIds" yaml:"storage_resource_ids" yaml:"storage_resource_ids"`
		ReservationId      string   `json:"reservationId" yaml:"reservation_id" yaml:"reservation_id"`
		VnfcCpInfo         []struct {
			Id             string `json:"id" yaml:"id" yaml:"id"`
			CpdId          string `json:"cpdId" yaml:"cpd_id" yaml:"cpd_id"`
			VnfExtCpId     string `json:"vnfExtCpId" yaml:"vnf_ext_cp_id" yaml:"vnf_ext_cp_id"`
			CpProtocolInfo []struct {
				LayerProtocol  string `json:"layerProtocol" yaml:"layer_protocol" yaml:"layer_protocol"`
				IpOverEthernet struct {
					MacAddress  string `json:"macAddress" yaml:"mac_address" yaml:"mac_address"`
					IpAddresses []struct {
						Type         string   `json:"type" yaml:"type" yaml:"type"`
						Addresses    []string `json:"addresses" yaml:"addresses" yaml:"addresses"`
						IsDynamic    bool     `json:"isDynamic" yaml:"is_dynamic" yaml:"is_dynamic"`
						AddressRange struct {
							MinAddress string `json:"minAddress" yaml:"min_address" yaml:"min_address"`
							MaxAddress string `json:"maxAddress" yaml:"max_address" yaml:"max_address"`
						} `json:"addressRange" yaml:"address_range" yaml:"address_range"`
						SubnetId string `json:"subnetId" yaml:"subnet_id" yaml:"subnet_id"`
					} `json:"ipAddresses" yaml:"ip_addresses" yaml:"ip_addresses"`
				} `json:"ipOverEthernet" yaml:"ip_over_ethernet" yaml:"ip_over_ethernet"`
			} `json:"cpProtocolInfo" yaml:"cp_protocol_info" yaml:"cp_protocol_info"`
			VnfLinkPortId string `json:"vnfLinkPortId" yaml:"vnf_link_port_id" yaml:"vnf_link_port_id"`
			Metadata      struct {
			} `json:"metadata" yaml:"metadata" yaml:"metadata"`
		} `json:"vnfcCpInfo" yaml:"vnfc_cp_info" yaml:"vnfc_cp_info"`
		Metadata struct {
		} `json:"metadata" yaml:"metadata" yaml:"metadata"`
	} `json:"vnfcResourceInfo" yaml:"vnfc_resource_info" yaml:"vnfc_resource_info"`
	VirtualLinkResourceInfo []struct {
		Id                   string `json:"id" yaml:"id" yaml:"id"`
		VnfVirtualLinkDescId string `json:"vnfVirtualLinkDescId" yaml:"vnf_virtual_link_desc_id" yaml:"vnf_virtual_link_desc_id"`
		NetworkResource      struct {
			VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
			ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
			ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
			VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
		} `json:"networkResource" yaml:"network_resource" yaml:"network_resource"`
		ZoneId        string `json:"zoneId" yaml:"zone_id" yaml:"zone_id"`
		ReservationId string `json:"reservationId" yaml:"reservation_id" yaml:"reservation_id"`
		VnfLinkPorts  []struct {
			Id             string `json:"id" yaml:"id" yaml:"id"`
			ResourceHandle struct {
				VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
				ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
				ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
				VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
			} `json:"resourceHandle" yaml:"resource_handle" yaml:"resource_handle"`
			CpInstanceId   string `json:"cpInstanceId" yaml:"cp_instance_id" yaml:"cp_instance_id"`
			CpInstanceType string `json:"cpInstanceType" yaml:"cp_instance_type" yaml:"cp_instance_type"`
		} `json:"vnfLinkPorts" yaml:"vnf_link_ports" yaml:"vnf_link_ports"`
		Metadata struct {
		} `json:"metadata" yaml:"metadata" yaml:"metadata"`
	} `json:"virtualLinkResourceInfo" yaml:"virtual_link_resource_info" yaml:"virtual_link_resource_info"`
	VirtualStorageResourceInfo []struct {
		Id                   string `json:"id" yaml:"id" yaml:"id"`
		VirtualStorageDescId string `json:"virtualStorageDescId" yaml:"virtual_storage_desc_id" yaml:"virtual_storage_desc_id"`
		StorageResource      struct {
			VimConnectionId      string `json:"vimConnectionId" yaml:"vim_connection_id" yaml:"vim_connection_id"`
			ResourceProviderId   string `json:"resourceProviderId" yaml:"resource_provider_id" yaml:"resource_provider_id"`
			ResourceId           string `json:"resourceId" yaml:"resource_id" yaml:"resource_id"`
			VimLevelResourceType string `json:"vimLevelResourceType" yaml:"vim_level_resource_type" yaml:"vim_level_resource_type"`
		} `json:"storageResource" yaml:"storage_resource" yaml:"storage_resource"`
		ZoneId        string `json:"zoneId" yaml:"zone_id" yaml:"zone_id"`
		ReservationId string `json:"reservationId" yaml:"reservation_id" yaml:"reservation_id"`
		Metadata      struct {
		} `json:"metadata" yaml:"metadata" yaml:"metadata"`
	} `json:"virtualStorageResourceInfo" yaml:"virtual_storage_resource_info" yaml:"virtual_storage_resource_info"`
}

InstantiatedVnfInfo - Extended Info

type InvalidClusterSpec

type InvalidClusterSpec struct {
	// contains filtered or unexported fields
}

InvalidClusterSpec error if specs invalid

func (*InvalidClusterSpec) Error

func (m *InvalidClusterSpec) Error() string

type InvalidTenantSpec

type InvalidTenantSpec struct {
	// contains filtered or unexported fields
}

InvalidTenantSpec error if specs invalid

func (*InvalidTenantSpec) Error

func (m *InvalidTenantSpec) Error() string

type InvalidTenantsSpec

type InvalidTenantsSpec struct {
	// contains filtered or unexported fields
}

InvalidTenantsSpec error if specs invalid

func (*InvalidTenantsSpec) Error

func (m *InvalidTenantsSpec) Error() string

type LcmInfo

type LcmInfo struct {
	Id                        string `json:"id" yaml:"id"`
	VnfInstanceName           string `json:"vnfInstanceName" yaml:"vnf_instance_name"`
	VnfInstanceDescription    string `json:"vnfInstanceDescription" yaml:"vnfInstanceDescription"`
	VnfdId                    string `json:"vnfdId" yaml:"vnfdId"`
	VnfProvider               string `json:"vnfProvider" yaml:"vnfProvider"`
	VnfProductName            string `json:"vnfProductName" yaml:"vnfProductName"`
	VnfSoftwareVersion        string `json:"vnfSoftwareVersion" yaml:"vnfSoftwareVersion"`
	VnfdVersion               string `json:"vnfdVersion" yaml:"vnfdVersion"`
	VnfConfigurableProperties struct {
	} `json:"vnfConfigurableProperties,omitempty" yaml:"vnfConfigurableProperties"`
	VimConnectionInfo  []models.VimConnectionInfo `json:"vimConnectionInfo,omitempty" yaml:"vimConnectionInfo"`
	InstantiationState string                     `json:"instantiationState" yaml:"instantiationState"`
	VnfInfo            *InstantiatedVnfInfo       `json:"instantiatedVnfInfo,omitempty" yaml:"instantiatedVnfInfo"`
	Metadata           *ExtendedMetadata          `json:"metadata" yaml:"metadata"`
	Extensions         struct {
	} `json:"extensions" yaml:"extensions"`
	Links models.PolicyLinks `json:"_links" yaml:"_links"`
}

LcmInfo information about current state

func (*LcmInfo) IsFailed

func (i *LcmInfo) IsFailed() bool

func (*LcmInfo) IsInstantiated

func (i *LcmInfo) IsInstantiated() bool

type NodePool

type NodePool struct {
	// nodes spec
	Pools []NodesSpecs `json:"items" yaml:"items"`
}

NodePool - holds a list of NodePool

func NewNodePool

func NewNodePool(n *NodesSpecs) *NodePool

func (*NodePool) Filter

func (n *NodePool) Filter(q NodePoolFilterType, f func(string) bool) (*NodePool, error)

Filter filters respond based on filter type and pass to callback

func (*NodePool) GetIds

func (n *NodePool) GetIds() []string

GetIds - search pool by name or id

func (*NodePool) GetPool

func (n *NodePool) GetPool(q string) (*NodesSpecs, error)

GetPool - search for particular pool by name or id

func (*NodePool) GetPoolByName

func (n *NodePool) GetPoolByName(name string) (*NodesSpecs, error)

GetPoolByName - search for particular pool by name only

type NodePoolFilterType

type NodePoolFilterType int32

NodePoolFilterType - cnf filter types

const (
	// FilterPoolByID filter node pool by node pool type
	FilterPoolByID NodePoolFilterType = 0

	// FilterByLabel filters node pool by label
	FilterByLabel NodePoolFilterType = 1

	// FilterByStatus filters node pool by status
	FilterByStatus NodePoolFilterType = 2
)

type NodesSpecs

type NodesSpecs struct {
	// linked or not
	CloneMode        string                   `json:"cloneMode,omitempty" yaml:"cloneMode,omitempty"`
	Cpu              int                      `json:"cpu,omitempty" yaml:"cpu,omitempty"`
	Id               string                   `json:"id,omitempty" yaml:"id,omitempty"`
	Labels           []string                 `json:"labels,omitempty" yaml:"labels,omitempty"`
	Memory           int                      `json:"memory,omitempty" yaml:"memory,omitempty"`
	Name             string                   `json:"name,omitempty" yaml:"name,omitempty"`
	Networks         []models.Network         `json:"networks,omitempty" yaml:"networks,omitempty"`
	PlacementParams  []models.PlacementParams `json:"placementParams,omitempty" yaml:"placementParams,omitempty"`
	Replica          int                      `json:"replica,omitempty" yaml:"replica,omitempty"`
	Storage          int                      `json:"storage,omitempty" yaml:"storage,omitempty"`
	Config           *models.NodePoolConfig   `json:"config,omitempty" yaml:"config,omitempty"`
	Status           string                   `json:"status,omitempty" yaml:"status,omitempty"`
	ActiveTasksCount int                      `json:"activeTasksCount,omitempty" yaml:"activeTasksCount,omitempty"`
	// nodes that part of cluster.
	Nodes                         []models.Nodes `json:"nodes,omitempty" yaml:"nodes,omitempty"`
	IsNodeCustomizationDeprecated bool           `json:"isNodeCustomizationDeprecated,omitempty" yaml:"isNodeCustomizationDeprecated,omitempty"`
}

func NewNodePoolSpecs

func NewNodePoolSpecs(r io.Reader) (*NodesSpecs, error)

NewNodePoolSpecs create spec from reader

func NodeSpecsFromFile

func NodeSpecsFromFile(fileName string) (*NodesSpecs, error)

NodeSpecsFromFile - reads node specs from file and return TenantSpecs instance

func NodeSpecsFromString

func NodeSpecsFromString(str string) (*NodesSpecs, error)

NodeSpecsFromString take string that hold entire spec passed to reader and return TenantSpecs instance

func ReadNodeSpecs

func ReadNodeSpecs(b io.Reader) (*NodesSpecs, error)

ReadNodeSpecs - Read node spec from io interface detects format and use either yaml or json parse

func (*NodesSpecs) AsJsonString

func (n *NodesSpecs) AsJsonString() (string, error)

AsJsonString return object as json string, it mainly used for testing.

func (*NodesSpecs) AsYamlString

func (n *NodesSpecs) AsYamlString() (string, error)

AsYamlString return object as json yaml string, it mainly used for testing.

func (*NodesSpecs) GetField

func (n *NodesSpecs) GetField(field string) string

GetField - return struct field value

func (*NodesSpecs) GetFields

func (n *NodesSpecs) GetFields() (map[string]interface{}, error)

GetFields return VduPackage fields name as map[string], each key is field name

func (*NodesSpecs) GetNodesSpecs

func (n *NodesSpecs) GetNodesSpecs() []models.Nodes

func (NodesSpecs) InstanceSpecsFromString

func (n NodesSpecs) InstanceSpecsFromString(s string) (interface{}, error)

InstanceSpecsFromString method return instance form string

type PoolNotFound

type PoolNotFound struct {
	ErrMsg string
}

func (*PoolNotFound) Error

func (m *PoolNotFound) Error() string

type RepoSpec

type RepoSpec struct {
	ID    string  `json:"id" yaml:"id"`
	State string  `json:"state" yaml:"state"`
	Repos []Repos `json:"repos" yaml:"repos"`
	Error string  `json:"error" yaml:"error"`
}

RepoSpec - list entry in repos

type Repos

type Repos struct {
	Name string `json:"name" yaml:"name"`
	Type string `json:"type" yaml:"type"`
}

type ReposList

type ReposList struct {
	Items []RepoSpec `json:"items" yaml:"items"`
}

func (*ReposList) GetRepoId

func (r *ReposList) GetRepoId(repoUrl string) (string, error)

GetRepoId return repo uuid and lookup performed by repo url http://repo.cnfdemo.io/chartrepo/library

type RespondID

type RespondID struct {
	Timestamp         int `json:"timestamp" yaml:"timestamp"`
	MachineIdentifier int `json:"machineIdentifier" yaml:"machineIdentifier"`
	ProcessIdentifier int `json:"processIdentifier" yaml:"processIdentifier"`
	Counter           int `json:"counter" yaml:"counter"`
}

type Tags

type Tags struct {
	AutoCreated bool   `json:"autoCreated" yaml:"autoCreated"`
	Name        string `json:"name" yaml:"name"`
}

type TemplateFilterType

type TemplateFilterType int32
const (
	// FilterTemplateType by cnf id
	FilterTemplateType TemplateFilterType = 0

	// FilterTemplateKubeVersion filer by vnf instance name
	FilterTemplateKubeVersion TemplateFilterType = 1

	// FilterById filer by vnf instance name
	FilterById TemplateFilterType = 1
)

type TemplateNetworks

type TemplateNetworks struct {
	Label string `json:"label" yaml:"label" validate:"required"`
}

type TemplateNotFound

type TemplateNotFound struct {
	// contains filtered or unexported fields
}

func (*TemplateNotFound) Error

func (m *TemplateNotFound) Error() string

type TemplateType

type TemplateType int32

type TenantCloudFilter

type TenantCloudFilter int32
const (
	// FilterVimType filter by VIM type i.e CNF/VC
	FilterVimType TenantCloudFilter = 0

	// VimLocationCity filter by City
	VimLocationCity TenantCloudFilter = 1

	// VimLocationCountry filter by Country
	VimLocationCountry TenantCloudFilter = 2

	// FilterHcxUUID filter by Hcx UUID
	FilterHcxUUID TenantCloudFilter = 3

	// FilterName filter by name
	FilterName TenantCloudFilter = 4

	// FilterId filter by id
	FilterId TenantCloudFilter = 5

	// FilterVimId filter by vim id
	FilterVimId TenantCloudFilter = 6
)

type TenantCloudNotFound

type TenantCloudNotFound struct {
	// contains filtered or unexported fields
}

TenantCloudNotFound error raised if tenant cloud not found

func (*TenantCloudNotFound) Error

func (m *TenantCloudNotFound) Error() string

type TenantSpecs

type TenantSpecs struct {
	CloudOwner    string           `json:"cloud_owner" yaml:"cloud_owner"`
	CloudRegionId string           `json:"cloud_region_id" yaml:"cloud_region_id"`
	VimId         string           `json:"vimId" yaml:"vimId"`
	VimName       string           `json:"vimName" yaml:"vimName"`
	Tenants       []TenantsDetails `json:"tenants" yaml:"tenants"`
}

func NewTenantSpecs

func NewTenantSpecs(r io.Reader) (*TenantSpecs, error)

NewTenantSpecs create spec from reader

func ReadTenantSpec

func ReadTenantSpec(b io.Reader) (*TenantSpecs, error)

ReadTenantSpec - Read tenant spec from io interface detects format and use either yaml or json parse

func TenantSpecsFromFile

func TenantSpecsFromFile(fileName string) (*TenantSpecs, error)

TenantSpecsFromFile - reads tenant spec from file and return TenantSpecs instance

func TenantSpecsFromString

func TenantSpecsFromString(str string) (*TenantSpecs, error)

TenantSpecsFromString take string that hold entire spec passed to reader and return TenantSpecs instance

func (*TenantSpecs) GetFields

func (t *TenantSpecs) GetFields() (map[string]interface{}, error)

GetFields return all struct TenantSpecs fields in generic map. It used for output filters to capture specific value

func (*TenantSpecs) GetTenant

func (t *TenantSpecs) GetTenant(s string) (*TenantsDetails, error)

GetTenant return tenant details

func (TenantSpecs) InstanceSpecsFromString

func (t TenantSpecs) InstanceSpecsFromString(s string) (interface{}, error)

func (*TenantSpecs) NewInstance

func (t *TenantSpecs) NewInstance(r io.Reader) (*TenantSpecs, error)

type Tenants

type Tenants struct {
	TenantsList []TenantsDetails `json:"items" yaml:"items"`
}

Tenants list of Tenants

func ReadTenantsSpec

func ReadTenantsSpec(b io.Reader) (*Tenants, error)

ReadTenantsSpec - Read tenants spec from io interface detects format and use either yaml or json parse

func TenantsSpecsFromFile

func TenantsSpecsFromFile(fileName string) (*Tenants, error)

TenantsSpecsFromFile - reads tenant spec from file and return TenantSpecs instance

func TenantsSpecsFromString

func TenantsSpecsFromString(str string) (*Tenants, error)

TenantsSpecsFromString take string that hold entire spec passed to reader and return TenantSpecs instance

func (*Tenants) Contains

func (t *Tenants) Contains(s string) (*TenantsDetails, error)

Contains search for a cloud provider that contains name in either ID , or Vim Name or Vim ID. it partial match

func (*Tenants) Filter

func (t *Tenants) Filter(q TenantCloudFilter, f func(string) bool) []TenantsDetails

Filter filter on specific filed

func (t *Tenants) FindCloudLink(s string) (*TenantsDetails, error)

FindCloudLink search for a cloud provider cloud link

func (*Tenants) FindCloudProvider

func (t *Tenants) FindCloudProvider(s string) (*TenantsDetails, error)

FindCloudProvider search for a cloud provider

func (*Tenants) GetTenantClouds

func (t *Tenants) GetTenantClouds(s string, vimType string) (*TenantsDetails, error)

GetTenantClouds return list of tenant clouds

func (Tenants) InstanceSpecsFromString

func (t Tenants) InstanceSpecsFromString(s string) (interface{}, error)

InstanceSpecsFromString method return instance form string

type TenantsDetails

type TenantsDetails struct {
	// tenant id in TCA spec
	TenantID string `json:"tenantId" yaml:"tenantId"`
	// vim name
	VimName                       string                  `json:"vimName" yaml:"vimName"`
	TenantName                    string                  `json:"tenantName" yaml:"tenantName"`
	HcxCloudURL                   string                  `json:"hcxCloudUrl" yaml:"hcxCloudUrl"`
	Username                      string                  `json:"username" yaml:"username"`
	Password                      string                  `json:"password,omitempty" yaml:"password"`
	VimType                       string                  `json:"vimType" yaml:"vimType"`
	VimURL                        string                  `json:"vimUrl" yaml:"vimUrl"`
	HcxUUID                       string                  `json:"hcxUUID" yaml:"hcxUUID"`
	HcxTenantID                   string                  `json:"hcxTenantId" yaml:"hcxTenantId"`
	Location                      *models.Location        `json:"location" yaml:"location"`
	VimID                         string                  `json:"vimId" yaml:"vimId"`
	Audit                         AuditField              `json:"audit" yaml:"audit"`
	VimConn                       *models.VimConnection   `json:"connection,omitempty" yaml:"connection"`
	Compatible                    bool                    `json:"compatible" yaml:"compatible"`
	ID                            string                  `json:"id" yaml:"id"`
	Name                          string                  `json:"name" yaml:"name"`
	AuthType                      string                  `json:"authType,omitempty" yaml:"authType"`
	ClusterName                   string                  `json:"clusterName,omitempty" yaml:"clusterName"`
	ClusterList                   []ClusterNodeConfigList `json:"clusterNodeConfigList" yaml:"clusterNodeConfigList"`
	HasSupportedKubernetesVersion bool                    `json:"hasSupportedKubernetesVersion" yaml:"hasSupportedKubernetesVersion"`
	ClusterStatus                 string                  `json:"clusterStatus" yaml:"clusterStatus"`
	IsCustomizable                bool                    `json:"isCustomizable" yaml:"isCustomizable"`
}

TenantsDetails Tenant Cloud Details

func (*TenantsDetails) GetField

func (t *TenantsDetails) GetField(field string) string

GetField - return struct field value

func (*TenantsDetails) GetFields

func (t *TenantsDetails) GetFields() (map[string]interface{}, error)

GetFields return TenantsDetails fields name as map[string], each key is field name

func (*TenantsDetails) IsVMware

func (t *TenantsDetails) IsVMware() bool

IsVMware - return if cloud provider is Vmware

type ToscaProperties

type ToscaProperties struct {
	// DescriptorId main id to identify vdu
	DescriptorId       string             `json:"descriptor_id" yaml:"descriptor_id"`
	Provider           string             `json:"provider" yaml:"provider"`
	ProductName        string             `json:"product_name" yaml:"product_name"`
	Version            string             `json:"version" yaml:"version"`
	Id                 string             `json:"id" yaml:"id"`
	SoftwareVersion    string             `json:"software_version" yaml:"software_version"`
	DescriptorVersion  string             `json:"descriptor_version" yaml:"descriptor_version"`
	FlavourId          string             `json:"flavour_id" yaml:"flavour_id"`
	FlavourDescription string             `json:"flavour_description" yaml:"flavour_description"`
	VnfmInfo           []string           `json:"vnfm_info" yaml:"vnfm_info"`
	InfraRequirements  *InfraRequirements `json:"infra_requirements,omitempty" yaml:"infra_requirements,omitempty"`
}

func (*ToscaProperties) GetField

func (t *ToscaProperties) GetField(field string) string

GetField - return struct field value

func (*ToscaProperties) GetFields

func (t *ToscaProperties) GetFields() (map[string]interface{}, error)

GetFields return VduPackage fields name as map[string], each key is field name

type VNFInstantiate

type VNFInstantiate struct {
	Id                     string `json:"id" yaml:"id"`
	VnfInstanceName        string `json:"vnfInstanceName" yaml:"vnfInstanceName"`
	VnfInstanceDescription string `json:"vnfInstanceDescription" yaml:"vnfInstanceDescription"`
	VnfdId                 string `json:"vnfdId" yaml:"vnfdId"`
	VnfProvider            string `json:"vnfProvider" yaml:"vnfProvider"`
	VnfProductName         string `json:"vnfProductName" yaml:"vnfProductName"`
	VnfSoftwareVersion     string `json:"vnfSoftwareVersion" yaml:"vnfSoftwareVersion"`
	VnfdVersion            string `json:"vnfdVersion" yaml:"vnfdVersion"`
	InstantiationState     string `json:"instantiationState" yaml:"instantiationState"`
	Metadata               struct {
		VnfPkgId       string `json:"vnfPkgId" yaml:"vnf_pkg_id"`
		VnfCatalogName string `json:"vnfCatalogName" yaml:"vnfCatalogName"`
		ManagedBy      struct {
			ExtensionSubtype string `json:"extensionSubtype" yaml:"extensionSubtype"`
			ExtensionName    string `json:"extensionName" yaml:"extensionName"`
		} `json:"managedBy,omitempty" yaml:"managed_by"`
		NfType            string `json:"nfType" yaml:"nf_type"`
		LcmOperation      string `json:"lcmOperation" yaml:"lcm_operation"`
		LcmOperationState string `json:"lcmOperationState" yaml:"lcm_operation_state"`
		IsUsedByNS        string `json:"isUsedByNS" yaml:"is_used_by_ns"`
	} `json:"metadata,omitempty" yaml:"metadata"`
}

type VduPackage

type VduPackage struct {
	Description string `json:"description" yaml:"description"`
	Vnf         struct {
		Properties   *ToscaProperties `json:"properties" yaml:"properties"`
		Requirements struct {
		} `json:"requirements" yaml:"requirements"`
		Capabilities struct {
		} `json:"capabilities" yaml:"capabilities"`
		Metadata struct {
		} `json:"metadata" yaml:"metadata"`
		Interfaces struct {
			Vnflcm struct {
			} `json:"Vnflcm" yaml:"vnflcm"`
		} `json:"interfaces" yaml:"interfaces"`
		NodeType string `json:"nodeType" yaml:"node_type"`
		NodeSpec struct {
		} `json:"node_spec" yaml:"node_spec"`
	} `json:"vnf" yaml:"vnf"`
	Metadata struct {
	} `json:"metadata" yaml:"metadata"`
	Inputs struct {
	} `json:"inputs" yaml:"inputs"`
	Policies []struct {
		Type       string `json:"type" yaml:"type"`
		Properties struct {
			InterfaceName string `json:"interface_name" yaml:"interface_name"`
			InterfaceType string `json:"interface_type" yaml:"interface_type"`
			IsEnabled     bool   `json:"isEnabled" yaml:"is_enabled"`
		} `json:"properties" yaml:"properties"`
	} `json:"policies" yaml:"policies"`
	Groups struct {
	} `json:"groups" yaml:"groups"`
	Basepath       string        `json:"basepath" yaml:"basepath"`
	VolumeStorages []interface{} `json:"volume_storages" yaml:"volume_storages"`
	Vdus           []struct {
		VduId       string `json:"vdu_id" yaml:"vdu_id"`
		Type        string `json:"type" yaml:"type"`
		Description string `json:"description" yaml:"description"`
		Properties  struct {
			Name         string `json:"name" yaml:"name"`
			Description  string `json:"description" yaml:"description"`
			ChartName    string `json:"chartName" yaml:"chart_name"`
			ChartVersion string `json:"chartVersion" yaml:"chart_version"`
			HelmVersion  string `json:"helmVersion" yaml:"helm_version"`
		} `json:"properties" yaml:"properties"`
		VirtualStorages []interface{} `json:"virtual_storages" yaml:"virtual_storages"`
		Dependencies    []interface{} `json:"dependencies" yaml:"dependencies"`
		Vls             []interface{} `json:"vls" yaml:"vls"`
		Cps             []interface{} `json:"cps" yaml:"cps"`
		Artifacts       []interface{} `json:"artifacts" yaml:"artifacts"`
	} `json:"vdus" yaml:"vdus"`
	Vls        []interface{} `json:"vls" yaml:"vls"`
	Cps        []interface{} `json:"cps" yaml:"cps"`
	VnfExposed struct {
		ExternalCps []interface{} `json:"external_cps" yaml:"external_cps"`
		ForwardCps  []interface{} `json:"forward_cps" yaml:"forward_cps"`
	} `json:"vnf_exposed" yaml:"vnf_exposed"`
	Graph struct {
		MwcApp02 []interface{} `json:"mwc_app02" yaml:"mwc_app_02"`
	} `json:"graph" yaml:"graph"`
	VduDependencyDetails struct {
		Field1 []string `json:"0" yaml:"field_1"`
	} `json:"vduDependencyDetails" yaml:"vdu_dependency_details"`
}

VduPackage - vdu package

func (*VduPackage) GetField

func (t *VduPackage) GetField(field string) string

GetField - return struct field value

func (*VduPackage) GetFields

func (t *VduPackage) GetFields() (map[string]interface{}, error)

GetFields return VduPackage fields name as map[string], each key is field name

type Vims

type Vims struct {
	Items []struct {
		TenantId    string `json:"tenantId"`
		VimName     string `json:"vimName"`
		TenantName  string `json:"tenantName"`
		HcxCloudUrl string `json:"hcxCloudUrl"`
		Username    string `json:"username"`
		Tags        []struct {
			Name struct {
			} `json:"name"`
			AutoCreated bool `json:"autoCreated"`
		} `json:"tags"`
		VimType  string `json:"vimType"`
		VimUrl   string `json:"vimUrl"`
		Location struct {
			City      string `json:"city"`
			Country   string `json:"country"`
			CityAscii string `json:"cityAscii"`
			Latitude  string `json:"latitude"`
			Longitude string `json:"longitude"`
		} `json:"location"`
		VimId string `json:"vimId"`
		Audit struct {
			CreationUser      string `json:"creationUser"`
			CreationTimestamp string `json:"creationTimestamp"`
		} `json:"audit"`
		Connection struct {
			Status       string `json:"status"`
			RemoteStatus string `json:"remoteStatus"`
		} `json:"connection"`
		Compatible         bool `json:"compatible"`
		VnfInstancesCounts []struct {
			TotalSize int    `json:"totalSize"`
			State     string `json:"state"`
		} `json:"vnfInstancesCounts"`
		Stats struct {
			Cpu struct {
				Used      int    `json:"used"`
				Available int    `json:"available"`
				Unit      string `json:"unit"`
				Capacity  int    `json:"capacity"`
			} `json:"cpu"`
			Memory struct {
				Used      int    `json:"used"`
				Available int    `json:"available"`
				Unit      string `json:"unit"`
				Capacity  int    `json:"capacity"`
			} `json:"memory"`
			Storage struct {
				Used      int    `json:"used"`
				Available int    `json:"available"`
				Unit      string `json:"unit"`
				Capacity  int    `json:"capacity"`
			} `json:"storage"`
		} `json:"stats"`
		Id   string `json:"id"`
		Name string `json:"name"`
	} `json:"items"`
}

type VnfPackage

type VnfPackage struct {
	PID                string                  `json:"id" yaml:"pid"`
	VnfdID             string                  `json:"vnfdId" yaml:"vnfdId"`
	VnfProvider        string                  `json:"vnfProvider" yaml:"vnfProvider"`
	VnfProductName     string                  `json:"vnfProductName" yaml:"vnfProductName"`
	VnfSoftwareVersion string                  `json:"vnfSoftwareVersion" yaml:"vnfSoftwareVersion"`
	VnfdVersion        string                  `json:"vnfdVersion" yaml:"vnfdVersion"`
	OnboardingState    string                  `json:"onboardingState" yaml:"onboardingState"`
	OperationalState   string                  `json:"operationalState" yaml:"operationalState"`
	UsageState         string                  `json:"usageState" yaml:"usage_state"`
	VnfmInfo           []interface{}           `json:"vnfmInfo" yaml:"vnfmInfo"`
	UserDefinedData    *models.UserDefinedData `json:"userDefinedData" yaml:"userDefinedData"`
}

VnfPackage - TCA VNF Package TCA format

func (*VnfPackage) GetField

func (p *VnfPackage) GetField(field string) string

GetField - return struct field value

func (*VnfPackage) GetFields

func (p *VnfPackage) GetFields() (map[string]interface{}, error)

GetFields return VduPackage fields name as map[string], each key is field name

func (*VnfPackage) IsCnf

func (p *VnfPackage) IsCnf() bool

IsCnf return true if catalog entity is CNF

func (*VnfPackage) IsEnabled

func (p *VnfPackage) IsEnabled() bool

IsEnabled return true if catalog entity enabled

func (*VnfPackage) IsOnboarded

func (p *VnfPackage) IsOnboarded() bool

IsOnboarded return true if successfully onboarded

type VnfPackages

type VnfPackages struct {
	Entity []VnfPackage
}

VnfPackages - list of VnfPackage

func (*VnfPackages) Filter

func (v *VnfPackages) Filter(q VnfdFilterType, f func(string) bool) ([]VnfPackage, error)

Filter filters respond based on filter type and pass to callback

func (*VnfPackages) FindByCatalogName

func (v *VnfPackages) FindByCatalogName(q string) (*VnfPackage, error)

FindByCatalogName - find by either VnfdID or ProductName, id the main objective to resolve some name to catalog entity.

func (*VnfPackages) GetVnfdID

func (v *VnfPackages) GetVnfdID(NameOrId string) (*VnfPackage, error)

GetVnfdID - find by either VnfdID or ProductName, id or user defined data, the main objective to resolve some name to catalog entity.

type VnfPackagesError

type VnfPackagesError struct {
	Type     string `json:"type" yaml:"type"`
	Title    string `json:"title" yaml:"title"`
	Status   int    `json:"status" yaml:"status"`
	Detail   string `json:"detail" yaml:"detail"`
	Instance string `json:"instance" yaml:"instance"`
}

VnfPackagesError - TCA Error rest API error response format

type VnfdFilterType

type VnfdFilterType int32

VnfdFilterType - vnfd filter types

const (

	// VnfProductName filter by VNF/CNF product name
	VnfProductName VnfdFilterType = 0

	// VnfdId filter by VNFD id
	VnfdId VnfdFilterType = 1

	// OperationalState filter type Operation Status in Catalog
	OperationalState VnfdFilterType = 2
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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