vra7

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigInvalidError                = "The resource_configuration in the config file has invalid component name(s): %v "
	DestroyActionTemplateError        = "Error retrieving destroy action template for the deployment %v: %v "
	BusinessGroupIDNameNotMatchingErr = "The business group name %s and id %s does not belong to the same business group, provide either name or id"
	CatalogItemIDNameNotMatchingErr   = "The catalog item name %s and id %s does not belong to the same catalog item, provide either name or id"
)

error constants

Variables

This section is empty.

Functions

func AddValueToRequestTemplate added in v1.0.3

func AddValueToRequestTemplate(templateInterface map[string]interface{}, field string, value interface{}) map[string]interface{}

AddValueToRequestTemplate modeled after replaceValueInRequestTemplate for values being added to template vs updating existing ones

func ConvertToISO8601

func ConvertToISO8601(givenTime time.Time) string

ConvertToISO8601 converts time to the format ISO8601 (2020-04-16T00:15:44.700Z) that vRA 7.x understands

func GetActionNameIDMap

func GetActionNameIDMap(resourceActions []sdk.Operation) map[string]string

GetActionNameIDMap returns a map of Action name and id

func GetActionTemplateDataByComponent

func GetActionTemplateDataByComponent(actionTemplate map[string]interface{}, componentName string) map[string]interface{}

GetActionTemplateDataByComponent return the map corresponding the component name in the template data

func GetConfiguration added in v1.0.3

func GetConfiguration(componentName string, resourceConfiguration []sdk.ResourceConfigurationStruct) map[string]interface{}

GetConfiguration returns the configuration property for the componentName from the resource_configuration provided in the .tf file

func GetResourceByID

func GetResourceByID(resourceConfigStructList []sdk.ResourceConfigurationStruct, resourceID string) sdk.ResourceConfigurationStruct

GetResourceByID return the resoirce config struct object filtered by ID

func GetResourceConfigurationByComponent

func GetResourceConfigurationByComponent(resourceConfigurationList []sdk.ResourceConfigurationStruct, component string) sdk.ResourceConfigurationStruct

GetResourceConfigurationByComponent returns the resource_configuration corresponding the component

func Provider

func Provider() terraform.ResourceProvider

Provider - This function initializes the provider schema also the config function and resource mapping

func ReplaceValueInRequestTemplate added in v1.0.3

func ReplaceValueInRequestTemplate(templateInterface map[string]interface{}, field string, value interface{}) bool

ReplaceValueInRequestTemplate replaces the value for a given key in a catalog request template.

func ResourceMapper added in v1.0.3

func ResourceMapper() map[string]string

ResourceMapper returns the mapping of resource attributes from ResourceView APIs to Catalog Item Request Template APIs

func UpdateResourceConfigurationMap added in v1.0.3

func UpdateResourceConfigurationMap(
	resourceConfiguration map[string]interface{}, vmData map[string]map[string]interface{}) (map[string]interface{}, bool)

UpdateResourceConfigurationMap updates the resource configuration with the deployment resource data if there is difference between the config data and deployment data, return true

Types

type ProviderSchema

type ProviderSchema struct {
	CatalogItemName         string
	CatalogItemID           string
	Description             string
	Reasons                 string
	BusinessGroupID         string
	BusinessGroupName       string
	WaitTimeout             int
	RequestStatus           string
	DeploymentConfiguration map[string]interface{}
	DeploymentDestroy       bool
	Lease                   int
	DeploymentID            string
	ResourceConfiguration   []sdk.ResourceConfigurationStruct
}

ProviderSchema represents the information provided in the tf file

Jump to

Keyboard shortcuts

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