morpheus

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	USE_FORCE = (os.Getenv("USE_FORCE") == "true")
)

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolSlice

func BoolSlice(src []bool) []*bool

BoolSlice converts a slice of bool values into a slice of bool pointers

func BoolValue

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func BoolValueSlice

func BoolValueSlice(src []*bool) []bool

BoolValueSlice converts a slice of bool pointers into a slice of bool values

func FindInstanceLayoutByNameAndVersion added in v0.9.5

func FindInstanceLayoutByNameAndVersion(client *morpheus.Client, name string, version string) (*morpheus.Response, error)

func FindProvisionTypeByCode added in v0.4.3

func FindProvisionTypeByCode(client *morpheus.Client, code string) (*morpheus.Response, error)

FindPriceByName gets an existing price by name

func ListAllVirtualImages added in v0.10.0

func ListAllVirtualImages(client *morpheus.Client, max int, sortOrder string, source string) (images []morpheus.VirtualImage)

func Provider

func Provider() *schema.Provider

Types

type ArmAppBlueprint added in v0.5.0

type ArmAppBlueprint struct {
	Blueprint struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Type        string `json:"type"`
		Description string `json:"description"`
		Category    string `json:"category"`
		Config      struct {
			Name        string `json:"name"`
			Description string `json:"description"`
			Arm         struct {
				Configtype       string `json:"configType"`
				OsType           string `json:"osType"`
				CloudInitEnabled bool   `json:"cloudInitEnabled"`
				InstallAgent     bool   `json:"installAgent"`
				JSON             string `json:"json"`
				Git              struct {
					Path          string `json:"path"`
					RepoId        int    `json:"repoId"`
					IntegrationId int    `json:"integrationId"`
					Branch        string `json:"branch"`
				} `json:"git"`
			} `json:"arm"`
			Type     string `json:"type"`
			Category string `json:"category"`
			Image    string `json:"image"`
		} `json:"config"`
		Visibility         string `json:"visibility"`
		Resourcepermission struct {
			All      bool          `json:"all"`
			Sites    []interface{} `json:"sites"`
			AllPlans bool          `json:"allPlans"`
			Plans    []interface{} `json:"plans"`
		} `json:"resourcePermission"`
		Owner struct {
			ID       int    `json:"id"`
			Username string `json:"username"`
		} `json:"owner"`
		Tenant struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"tenant"`
	} `json:"blueprint"`
}

type ArmSpecTemplate added in v0.5.0

type ArmSpecTemplate struct {
	Spectemplate struct {
		ID      int `json:"id"`
		Account struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name string      `json:"name"`
		Code interface{} `json:"code"`
		Type struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"type"`
		Externalid   interface{} `json:"externalId"`
		Externaltype interface{} `json:"externalType"`
		Deploymentid interface{} `json:"deploymentId"`
		Status       interface{} `json:"status"`
		File         struct {
			ID          int         `json:"id"`
			Sourcetype  string      `json:"sourceType"`
			Contentref  interface{} `json:"contentRef"`
			Contentpath interface{} `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content string `json:"content"`
		} `json:"file"`
		Config struct {
		} `json:"config"`
		Createdby   string      `json:"createdBy"`
		Updatedby   interface{} `json:"updatedBy"`
		Datecreated time.Time   `json:"dateCreated"`
		Lastupdated time.Time   `json:"lastUpdated"`
	} `json:"specTemplate"`
}

type CloudFormationAppBlueprint added in v0.5.0

type CloudFormationAppBlueprint struct {
	Blueprint struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Type        string `json:"type"`
		Description string `json:"description"`
		Category    string `json:"category"`
		Config      struct {
			Name           string `json:"name"`
			Description    string `json:"description"`
			CloudFormation struct {
				Configtype       string `json:"configType"`
				CloudInitEnabled bool   `json:"cloudInitEnabled"`
				InstallAgent     bool   `json:"installAgent"`
				JSON             string `json:"json"`
				YAML             string `json:"yaml"`
				IAM              bool   `json:"IAM"`
				IAMNamed         bool   `json:"CAPABILITY_NAMED_IAM"`
				AutoExpand       bool   `json:"CAPABILITY_AUTO_EXPAND"`
				Git              struct {
					Path          string `json:"path"`
					RepoId        int    `json:"repoId"`
					IntegrationId int    `json:"integrationId"`
					Branch        string `json:"branch"`
				} `json:"git"`
			} `json:"cloudformation"`
			Type     string `json:"type"`
			Category string `json:"category"`
			Image    string `json:"image"`
		} `json:"config"`
		Visibility         string `json:"visibility"`
		Resourcepermission struct {
			All      bool          `json:"all"`
			Sites    []interface{} `json:"sites"`
			AllPlans bool          `json:"allPlans"`
			Plans    []interface{} `json:"plans"`
		} `json:"resourcePermission"`
		Owner struct {
			ID       int    `json:"id"`
			Username string `json:"username"`
		} `json:"owner"`
		Tenant struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"tenant"`
	} `json:"blueprint"`
}

type CloudFormationSpecTemplate added in v0.5.0

type CloudFormationSpecTemplate struct {
	Spectemplate struct {
		ID      int `json:"id"`
		Account struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name string      `json:"name"`
		Code interface{} `json:"code"`
		Type struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"type"`
		Externalid   interface{} `json:"externalId"`
		Externaltype interface{} `json:"externalType"`
		Deploymentid interface{} `json:"deploymentId"`
		Status       interface{} `json:"status"`
		File         struct {
			ID          int         `json:"id"`
			Sourcetype  string      `json:"sourceType"`
			Contentref  interface{} `json:"contentRef"`
			Contentpath interface{} `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content string `json:"content"`
		} `json:"file"`
		Config struct {
			CloudFormation struct {
				Iam                  string `json:"IAM"`
				CapabilityNamedIam   string `json:"CAPABILITY_NAMED_IAM"`
				CapabilityAutoExpand string `json:"CAPABILITY_AUTO_EXPAND"`
			} `json:"cloudformation"`
		} `json:"config"`
		Createdby   string      `json:"createdBy"`
		Updatedby   interface{} `json:"updatedBy"`
		Datecreated time.Time   `json:"dateCreated"`
		Lastupdated time.Time   `json:"lastUpdated"`
	} `json:"specTemplate"`
}

type CloudType added in v0.9.10

type CloudType struct {
	ID      int64  `json:"id"`
	Name    string `json:"name"`
	Enabled bool   `json:"enabled"`
}

type CloudTypes added in v0.9.10

type CloudTypes struct {
	ZoneTypes []CloudType       `json:"zoneTypes"`
	Message   string            `json:"msg"`
	Errors    map[string]string `json:"errors"`
}

type ClusterLayoutPayload added in v0.6.0

type ClusterLayoutPayload struct {
	ClusterLayout struct {
		ID      int64 `json:"id"`
		Account struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name                    string `json:"name"`
		Description             string `json:"description"`
		Code                    string `json:"code"`
		ComputeVersion          string `json:"computeVersion"`
		HasAutoScale            bool   `json:"hasAutoScale"`
		Creatable               bool   `json:"creatable"`
		MemoryRequirement       int64  `json:"memoryRequirement"`
		InstallContainerRuntime bool   `json:"installContainerRuntime"`
		ProvisionType           struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"provisionType"`
		GroupType struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"groupType"`
		TaskSets []struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
		} `json:"taskSets"`
		SpecTemplates []struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
		} `json:"specTemplates"`
		OptionTypes []struct {
			ID   int64  `json:"id"`
			Name string `json:"name"`
		} `json:"optionTypes"`
		EnvironmentVariables []struct {
			EvarName         string `json:"evarName"`
			Name             string `json:"name"`
			DefaultValue     string `json:"defaultValue"`
			DefaultValueHash string `json:"defaultValueHash"`
			ValueType        string `json:"valueType"`
			Export           bool   `json:"export"`
			Masked           bool   `json:"masked"`
		} `json:"environmentVariables"`
		ComputeServers []struct {
			ID                      int64       `json:"id"`
			PriorityOrder           int64       `json:"priorityOrder"`
			NodeCount               int64       `json:"nodeCount"`
			NodeType                string      `json:"nodeType"`
			MinNodeCount            int64       `json:"minNodeCount"`
			MaxNodeCount            interface{} `json:"maxNodeCount"`
			DynamicCount            bool        `json:"dynamicCount"`
			InstallContainerRuntime bool        `json:"installContainerRuntime"`
			InstallStorageRuntime   bool        `json:"installStorageRuntime"`
			Name                    string      `json:"name"`
			Code                    string      `json:"code"`
			Category                interface{} `json:"category"`
			Config                  interface{} `json:"config"`
			ContainertType          struct {
				ID               int64       `json:"id"`
				Account          interface{} `json:"account"`
				Name             string      `json:"name"`
				ShortName        string      `json:"shortName"`
				Code             string      `json:"code"`
				ContainerVersion string      `json:"containerVersion"`
				ProvisionType    struct {
					ID   int64  `json:"id"`
					Name string `json:"name"`
					Code string `json:"code"`
				} `json:"provisionType"`
				VirtualImage interface{} `json:"virtualImage"`
				Category     interface{} `json:"category"`
				Config       struct {
				} `json:"config"`
				ContainerPorts []struct {
					ID                  int64       `json:"id"`
					Name                string      `json:"name"`
					Port                int64       `json:"port"`
					LoadBalanceProtocol interface{} `json:"loadBalanceProtocol"`
					ExportName          string      `json:"exportName"`
				} `json:"containerPorts"`
				ContainerScripts   []interface{} `json:"containerScripts"`
				ContainerTemplates []struct {
					ID   int64  `json:"id"`
					Name string `json:"name"`
				} `json:"containerTemplates"`
				EnvironmentVariables []interface{} `json:"environmentVariables"`
			} `json:"containerType"`
			ComputeServerType struct {
				ID             interface{} `json:"id"`
				Code           interface{} `json:"code"`
				Name           interface{} `json:"name"`
				Managed        interface{} `json:"managed"`
				ExternalDelete interface{} `json:"externalDelete"`
			} `json:"computeServerType"`
			ProvisionService interface{} `json:"provisionService"`
			PlanCategory     interface{} `json:"planCategory"`
			NamePrefix       interface{} `json:"namePrefix"`
			NameSuffix       string      `json:"nameSuffix"`
			ForceNameIndex   bool        `json:"forceNameIndex"`
			LoadBalance      bool        `json:"loadBalance"`
		}
	} `json:"layout"`
}

type ClusterPackageCreateResult added in v0.9.7

type ClusterPackageCreateResult struct {
	ID      int64             `json:"id"`
	Message string            `json:"msg"`
	Errors  map[string]string `json:"errors"`
	Success bool              `json:"success"`
}

type CodeRepositories added in v0.7.0

type CodeRepositories struct {
	Success bool `json:"success"`
	Data    []struct {
		Name  string `json:"name"`
		Value int    `json:"value"`
	} `json:"data"`
}

type Config

type Config struct {
	Url             string
	AccessToken     string
	RefreshToken    string // optional and unused
	Username        string
	Password        string
	ClientId        string
	TenantSubdomain string

	Insecure bool
	// contains filtered or unexported fields
}

Config is the configuration structure used to instantiate the Morpheus provider. Only Url and AccessToken are required.

func (*Config) Client

func (c *Config) Client() (*morpheus.Client, diag.Diagnostics)

type CreateRoleResult added in v0.9.4

type CreateRoleResult struct {
	Success bool              `json:"success"`
	Message string            `json:"msg"`
	Errors  map[string]string `json:"errors"`
	Role    *morpheus.Role    `json:"role"`
}

type ExecuteSchedule added in v0.4.0

type ExecuteSchedule struct {
	Schedule struct {
		ID               int    `json:"id"`
		Name             string `json:"name"`
		Description      string `json:"description"`
		Enabled          bool   `json:"enabled"`
		Scheduletype     string `json:"scheduleType"`
		Scheduletimezone string `json:"scheduleTimezone"`
		Cron             string `json:"cron"`
		Datecreated      string `json:"dateCreated"`
		Lastupdated      string `json:"lastUpdated"`
	} `json:"schedule"`
}

type GroovyScript added in v0.5.0

type GroovyScript struct {
	Task struct {
		ID        int    `json:"id"`
		Accountid int    `json:"accountId"`
		Name      string `json:"name"`
		Code      string `json:"code"`
		Tasktype  struct {
			ID   int    `json:"id"`
			Code string `json:"code"`
			Name string `json:"name"`
		} `json:"taskType"`
		File struct {
			ID          int    `json:"id"`
			Sourcetype  string `json:"sourceType"`
			Contentref  string `json:"contentRef"`
			Contentpath string `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content interface{} `json:"content"`
		} `json:"file"`
		Resulttype        string    `json:"resultType"`
		Executetarget     string    `json:"executeTarget"`
		Retryable         bool      `json:"retryable"`
		Retrycount        int       `json:"retryCount"`
		Retrydelayseconds int       `json:"retryDelaySeconds"`
		Allowcustomconfig bool      `json:"allowCustomConfig"`
		Datecreated       time.Time `json:"dateCreated"`
		Lastupdated       time.Time `json:"lastUpdated"`
	} `json:"task"`
}

type HelmAppBlueprint added in v0.5.0

type HelmAppBlueprint struct {
	Blueprint struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Type        string `json:"type"`
		Description string `json:"description"`
		Category    string `json:"category"`
		Config      struct {
			Name        string `json:"name"`
			Description string `json:"description"`
			Helm        struct {
				Configtype string `json:"configType"`
				Git        struct {
					Path          string `json:"path"`
					RepoId        int    `json:"repoId"`
					IntegrationId int    `json:"integrationId"`
					Branch        string `json:"branch"`
				} `json:"git"`
			} `json:"helm"`
			Type     string `json:"type"`
			Category string `json:"category"`
			Image    string `json:"image"`
		} `json:"config"`
		Visibility         string `json:"visibility"`
		Resourcepermission struct {
			All      bool          `json:"all"`
			Sites    []interface{} `json:"sites"`
			AllPlans bool          `json:"allPlans"`
			Plans    []interface{} `json:"plans"`
		} `json:"resourcePermission"`
		Owner struct {
			ID       int    `json:"id"`
			Username string `json:"username"`
		} `json:"owner"`
		Tenant struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"tenant"`
	} `json:"blueprint"`
}

type HelmSpecTemplate added in v0.5.0

type HelmSpecTemplate struct {
	Spectemplate struct {
		ID      int `json:"id"`
		Account struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name string      `json:"name"`
		Code interface{} `json:"code"`
		Type struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"type"`
		Externalid   interface{} `json:"externalId"`
		Externaltype interface{} `json:"externalType"`
		Deploymentid interface{} `json:"deploymentId"`
		Status       interface{} `json:"status"`
		File         struct {
			ID          int         `json:"id"`
			Sourcetype  string      `json:"sourceType"`
			Contentref  interface{} `json:"contentRef"`
			Contentpath interface{} `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content string `json:"content"`
		} `json:"file"`
		Config struct {
		} `json:"config"`
		Createdby   string      `json:"createdBy"`
		Updatedby   interface{} `json:"updatedBy"`
		Datecreated time.Time   `json:"dateCreated"`
		Lastupdated time.Time   `json:"lastUpdated"`
	} `json:"specTemplate"`
}

type IPRange added in v0.9.4

type IPRange struct {
	ID           int64  `json:"id"`
	StartAddress string `json:"startAddress"`
	EndAddress   string `json:"endAddress"`
}

type InstanceLayoutPayload added in v0.6.0

type InstanceLayoutPayload struct {
	morpheus.InstanceLayout `json:"instanceTypeLayout"`
}

type InstanceTypePayload added in v0.6.0

type InstanceTypePayload struct {
	morpheus.InstanceType `json:"instanceType"`
}

type KubernetesAppBlueprint added in v0.5.0

type KubernetesAppBlueprint struct {
	Blueprint struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Type        string `json:"type"`
		Description string `json:"description"`
		Category    string `json:"category"`
		Config      struct {
			Name        string `json:"name"`
			Description string `json:"description"`
			Kubernetes  struct {
				Configtype string `json:"configType"`
				Git        struct {
					Path          string `json:"path"`
					RepoId        int    `json:"repoId"`
					IntegrationId int    `json:"integrationId"`
					Branch        string `json:"branch"`
				} `json:"git"`
			} `json:"kubernetes"`
			Config struct {
				Specs []struct {
					ID    int    `json:"id"`
					Value string `json:"value"`
					Name  string `json:"name"`
				} `json:"specs"`
			} `json:"config"`
			Type     string `json:"type"`
			Category string `json:"category"`
			Image    string `json:"image"`
		} `json:"config"`
		Visibility         string `json:"visibility"`
		Resourcepermission struct {
			All      bool          `json:"all"`
			Sites    []interface{} `json:"sites"`
			AllPlans bool          `json:"allPlans"`
			Plans    []interface{} `json:"plans"`
		} `json:"resourcePermission"`
		Owner struct {
			ID       int    `json:"id"`
			Username string `json:"username"`
		} `json:"owner"`
		Tenant struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"tenant"`
	} `json:"blueprint"`
}

type KubernetesSpecTemplate added in v0.5.0

type KubernetesSpecTemplate struct {
	Spectemplate struct {
		ID      int `json:"id"`
		Account struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name string      `json:"name"`
		Code interface{} `json:"code"`
		Type struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"type"`
		Externalid   interface{} `json:"externalId"`
		Externaltype interface{} `json:"externalType"`
		Deploymentid interface{} `json:"deploymentId"`
		Status       interface{} `json:"status"`
		File         struct {
			ID          int         `json:"id"`
			Sourcetype  string      `json:"sourceType"`
			Contentref  interface{} `json:"contentRef"`
			Contentpath interface{} `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content string `json:"content"`
		} `json:"file"`
		Config struct {
		} `json:"config"`
		Createdby   string      `json:"createdBy"`
		Updatedby   interface{} `json:"updatedBy"`
		Datecreated time.Time   `json:"dateCreated"`
		Lastupdated time.Time   `json:"lastUpdated"`
	} `json:"specTemplate"`
}

type LocalGetCypherResult added in v0.9.9

type LocalGetCypherResult struct {
	Success       bool              `json:"success"`
	Data          interface{}       `json:"data"`
	Type          string            `json:"type"`
	LeaseDuration int64             `json:"lease_duration"`
	Cypher        *morpheus.Cypher  `json:"cypher"`
	Message       string            `json:"msg"`
	Errors        map[string]string `json:"errors"`
}

type Mapping added in v0.9.4

type Mapping struct {
	ID       string `json:"id"`
	Code     string `json:"code"`
	Name     string `json:"name"`
	NowClass string `json:"nowClass"`
}

type MorpheusPlan added in v0.4.3

type MorpheusPlan struct {
	ServicePlan struct {
		ID                   int         `json:"id"`
		Name                 string      `json:"name"`
		Code                 string      `json:"code"`
		Active               bool        `json:"active"`
		Sortorder            int         `json:"sortOrder"`
		Description          string      `json:"description"`
		Maxstorage           int64       `json:"maxStorage"`
		Maxmemory            int         `json:"maxMemory"`
		Maxcpu               interface{} `json:"maxCpu"`
		Maxcores             int         `json:"maxCores"`
		Maxdisks             int         `json:"maxDisks"`
		Corespersocket       int         `json:"coresPerSocket"`
		Customcpu            bool        `json:"customCpu"`
		Customcores          bool        `json:"customCores"`
		Custommaxstorage     bool        `json:"customMaxStorage"`
		Custommaxdatastorage bool        `json:"customMaxDataStorage"`
		Custommaxmemory      bool        `json:"customMaxMemory"`
		Addvolumes           bool        `json:"addVolumes"`
		Memoryoptionsource   interface{} `json:"memoryOptionSource"`
		Cpuoptionsource      interface{} `json:"cpuOptionSource"`
		Datecreated          time.Time   `json:"dateCreated"`
		Lastupdated          time.Time   `json:"lastUpdated"`
		Regioncode           string      `json:"regionCode"`
		Visibility           string      `json:"visibility"`
		Editable             bool        `json:"editable"`
		Provisiontype        struct {
			ID                        int    `json:"id"`
			Name                      string `json:"name"`
			Code                      string `json:"code"`
			Rootdiskcustomizable      bool   `json:"rootDiskCustomizable"`
			Addvolumes                bool   `json:"addVolumes"`
			Customizevolume           bool   `json:"customizeVolume"`
			Hasconfigurablecpusockets bool   `json:"hasConfigurableCpuSockets"`
		} `json:"provisionType"`
		Tenants   string              `json:"tenants"`
		Pricesets []morpheus.PriceSet `json:"priceSets"`
		Config    struct {
			Storagesizetype string `json:"storageSizeType"`
			Memorysizetype  string `json:"memorySizeType"`
			Ranges          struct {
				Minstorage string `json:"minStorage"`
				Maxstorage string `json:"maxStorage"`
				Minmemory  int    `json:"minMemory"`
				Maxmemory  int    `json:"maxMemory"`
				Mincores   string `json:"minCores"`
				Maxcores   string `json:"maxCores"`
			} `json:"ranges"`
		} `json:"config"`
		Zones []struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"zones"`
		Permissions struct {
			Resourcepermissions struct {
				Defaultstore  bool `json:"defaultStore"`
				Allplans      bool `json:"allPlans"`
				Defaulttarget bool `json:"defaultTarget"`
				Canmanage     bool `json:"canManage"`
				All           bool `json:"all"`
				Account       struct {
					ID int `json:"id"`
				} `json:"account"`
				Sites []struct {
					ID      int    `json:"id"`
					Name    string `json:"name"`
					Default bool   `json:"default"`
				} `json:"sites"`
				Plans []interface{} `json:"plans"`
			} `json:"resourcePermissions"`
		} `json:"permissions"`
	} `json:"servicePlan"`
}

type MorpheusPrice added in v0.4.3

type MorpheusPrice struct {
	Price struct {
		ID                  int     `json:"id"`
		Name                string  `json:"name"`
		Code                string  `json:"code"`
		Active              bool    `json:"active"`
		Pricetype           string  `json:"priceType"`
		Priceunit           string  `json:"priceUnit"`
		Additionalpriceunit string  `json:"additionalPriceUnit"`
		Price               float64 `json:"price"`
		Customprice         float64 `json:"customPrice"`
		Markuptype          string  `json:"markupType"`
		Markup              float64 `json:"markup"`
		Markuppercent       float64 `json:"markupPercent"`
		Cost                float64 `json:"cost"`
		Currency            string  `json:"currency"`
		Incurcharges        string  `json:"incurCharges"`
		Platform            string  `json:"platform"`
		Software            string  `json:"software"`
		Volumetype          struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"volumeType"`
		Datastore struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"datastore"`
		Crosscloudapply bool `json:"crossCloudApply"`
		RestartUsage    bool `json:"restartUsage"`
		Account         struct {
			ID int `json:"id"`
		} `json:"account"`
	} `json:"price"`
}

type MorpheusPriceSet added in v0.4.3

type MorpheusPriceSet struct {
	Priceset struct {
		ID            int    `json:"id"`
		Name          string `json:"name"`
		Code          string `json:"code"`
		Active        bool   `json:"active"`
		Priceunit     string `json:"priceUnit"`
		Type          string `json:"type"`
		Regioncode    string `json:"regionCode"`
		Systemcreated bool   `json:"systemCreated"`
		Zone          struct {
			ID int `json:"id"`
		} `json:"zone"`
		Zonepool struct {
			ID int `json:"id"`
		} `json:"zonePool"`
		Account interface{} `json:"account"`
		Prices  []struct {
			ID                  int         `json:"id"`
			Name                string      `json:"name"`
			Code                string      `json:"code"`
			Pricetype           string      `json:"priceType"`
			Priceunit           string      `json:"priceUnit"`
			Additionalpriceunit string      `json:"additionalPriceUnit"`
			Price               float64     `json:"price"`
			Customprice         float64     `json:"customPrice"`
			Markuptype          interface{} `json:"markupType"`
			Markup              float64     `json:"markup"`
			Markuppercent       float64     `json:"markupPercent"`
			Cost                float64     `json:"cost"`
			Currency            string      `json:"currency"`
			Incurcharges        string      `json:"incurCharges"`
			Platform            interface{} `json:"platform"`
			Software            interface{} `json:"software"`
			Volumetype          struct {
				ID   int    `json:"id"`
				Code string `json:"code"`
				Name string `json:"name"`
			} `json:"volumeType"`
			Datastore       interface{} `json:"datastore"`
			Crosscloudapply interface{} `json:"crossCloudApply"`
			Account         interface{} `json:"account"`
		} `json:"prices"`
	} `json:"priceSet"`
}

type NodeTypePayload added in v0.6.0

type NodeTypePayload struct {
	morpheus.NodeType `json:"containerType"`
}

type PermissionSet added in v0.9.4

type PermissionSet struct {
	DefaultCloudPermission           string                      `json:"default_cloud_permission,omitempty"`
	DefaultGroupPermission           string                      `json:"default_group_permission,omitempty"`
	DefaultInstanceTypePermission    string                      `json:"default_instance_type_permission,omitempty"`
	DefaultBlueprintPermission       string                      `json:"default_blueprint_permission,omitempty"`
	DefaultReportTypePermission      string                      `json:"default_report_type_permission,omitempty"`
	DefaultPersonaPermission         string                      `json:"default_persona_permission,omitempty"`
	DefaultCatalogItemTypePermission string                      `json:"default_catalog_item_type_permission,omitempty"`
	DefaultVdiPoolPermission         string                      `json:"default_vdi_pool_permission,omitempty"`
	DefaultWorkflowPermission        string                      `json:"default_workflow_permission,omitempty"`
	DefaultTaskPermission            string                      `json:"default_task_permission,omitempty"`
	DefaultPersona                   string                      `json:"default_persona,omitempty"`
	FeaturePermissions               []featurePermission         `json:"feature_permissions,omitempty"`
	CloudPermissions                 []cloudPermission           `json:"cloud_permissions,omitempty"`
	GroupPermissions                 []groupPermission           `json:"group_permissions,omitempty"`
	InstanceTypePermissions          []instanceTypePermission    `json:"instance_type_permissions,omitempty"`
	BlueprintPermissions             []blueprintPermission       `json:"blueprint_permissions,omitempty"`
	ReportTypePermissions            []reportTypePermission      `json:"report_type_permissions,omitempty"`
	PersonaPermissions               []personaPermission         `json:"persona_permissions,omitempty"`
	CatalogItemTypePermissions       []catalogItemTypePermission `json:"catalog_item_type_permissions,omitempty"`
	VdiPoolPermissions               []vdiPoolPermission         `json:"vdi_pool_permissions,omitempty"`
	TaskPermissions                  []taskPermission            `json:"task_permissions,omitempty"`
	WorkflowPermissions              []workflowPermission        `json:"workflow_permissions,omitempty"`
}

type PolicyPayload added in v0.6.0

type PolicyPayload struct {
	Policy struct {
		Accounts    []interface{} `json:"accounts"`
		Config      []interface{} `json:"config"`
		Description string        `json:"description"`
		Eachuser    bool          `json:"eachUser"`
		Enabled     bool          `json:"enabled"`
		ID          int           `json:"id"`
		Name        string        `json:"name"`
		Owner       struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"owner"`
		Policytype struct {
			Code string `json:"code"`
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"policyType"`
		Refid   int    `json:"refId"`
		Reftype string `json:"refType"`
		Role    struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"role"`
		Site struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"site"`
		User struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"user"`
		Zone struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"zone"`
	}
}

type PowerShellScript added in v0.5.0

type PowerShellScript struct {
	Task struct {
		ID        int    `json:"id"`
		Accountid int    `json:"accountId"`
		Name      string `json:"name"`
		Code      string `json:"code"`
		Tasktype  struct {
			ID   int    `json:"id"`
			Code string `json:"code"`
			Name string `json:"name"`
		} `json:"taskType"`
		Taskoptions struct {
			Port              string `json:"port"`
			Host              string `json:"host"`
			Password          string `json:"password"`
			PasswordHash      string `json:"passwordHash"`
			Username          string `json:"username"`
			WinrmElevated     string `json:"winrm.elevated"`
			LocalScriptGitRef string `json:"localScriptGitRef"`
		}
		File struct {
			ID          int    `json:"id"`
			Sourcetype  string `json:"sourceType"`
			Contentref  string `json:"contentRef"`
			Contentpath string `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content interface{} `json:"content"`
		} `json:"file"`
		Resulttype        string    `json:"resultType"`
		Executetarget     string    `json:"executeTarget"`
		Retryable         bool      `json:"retryable"`
		Retrycount        int       `json:"retryCount"`
		Retrydelayseconds int       `json:"retryDelaySeconds"`
		Allowcustomconfig bool      `json:"allowCustomConfig"`
		Datecreated       time.Time `json:"dateCreated"`
		Lastupdated       time.Time `json:"lastUpdated"`
	} `json:"task"`
}

type ResourcePoolOptions added in v0.9.10

type ResourcePoolOptions struct {
	Success bool `json:"success"`
	Data    []struct {
		Id           int    `json:"id"`
		Name         string `json:"name"`
		IsGroup      bool   `json:"isGroup"`
		Group        string `json:"group"`
		IsDefault    bool   `json:"isDefault"`
		Type         string `json:"type"`
		ProviderType string `json:"providerType"`
		Value        string `json:"value"`
	} `json:"data"`
}

type RolePermissionPayload added in v0.9.4

type RolePermissionPayload struct {
	Name              string `json:"authority"`
	Description       string `json:"description"`
	Owner             int64  `json:"owner"`
	RoleType          string `json:"roleType"`
	Multitenant       bool   `json:"multitenant"`
	MultitenantLocked bool   `json:"multitenantLocked"`
	DefaultPersona    struct {
		Code string `json:"code"`
	} `json:"defaultPersona"`
	GlobalGroupAccess           string                      `json:"globalSiteAccess"`
	GlobalInstanceTypeAccess    string                      `json:"globalInstanceTypeAccess"`
	GlobalBlueprintAccess       string                      `json:"globalAppTemplateAccess"`
	GlobalReportTypeAccess      string                      `json:"globalReportTypeAccess"`
	GlobalPersonaAccess         string                      `json:"globalPersonaAccess"`
	GlobalCatalogItemTypeAccess string                      `json:"globalCatalogItemTypeAccess"`
	GlobalVDIPoolAccess         string                      `json:"globalVdiPoolAccess"`
	GlobalTaskAccess            string                      `json:"globalTaskAccess"`
	GlobalWorkflowAccess        string                      `json:"globalTaskSetAccess"`
	FeaturePermissions          []featurePermission         `json:"permissions"`
	GroupPermissions            []groupPermission           `json:"sites"`
	InstanceTypePermissions     []instanceTypePermission    `json:"instanceTypes"`
	BlueprintPermissions        []blueprintPermission       `json:"appTemplates"`
	ReportTypePermissions       []reportTypePermission      `json:"reportTypes"`
	PersonaPermissions          []personaPermission         `json:"personas"`
	CatalogItemTypePermissions  []catalogItemTypePermission `json:"catalogItemTypes"`
	VdiPoolPermissions          []vdiPoolPermission         `json:"vdiPools"`
	Tasks                       []taskPermission            `json:"tasks"`
	Workflows                   []workflowPermission        `json:"taskSets"`
}

type TaskOrder added in v0.9.3

type TaskOrder struct {
	Order int64  `json:"order"`
	ID    int64  `json:"id"`
	Phase string `json:"phase"`
}

type Tenant added in v0.9.7

type Tenant []struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	DefaultStore  bool   `json:"defaultStore"`
	DefaultTarget bool   `json:"defaultTarget"`
}

type TenantPermission added in v0.9.7

type TenantPermission struct {
	Accounts      []int `json:"accounts"`
	Defaulttarget []int `json:"defaultTarget"`
	Defaultstore  []int `json:"defaultStore"`
}

type TenantRolePermissionPayload added in v0.9.8

type TenantRolePermissionPayload struct {
	Name           string `json:"authority"`
	Description    string `json:"description"`
	Owner          int64  `json:"owner"`
	RoleType       string `json:"roleType"`
	DefaultPersona struct {
		Code string `json:"code"`
	} `json:"defaultPersona"`
	GlobalCloudAccess           string                      `json:"globalZoneAccess"`
	GlobalInstanceTypeAccess    string                      `json:"globalInstanceTypeAccess"`
	GlobalBlueprintAccess       string                      `json:"globalAppTemplateAccess"`
	GlobalReportTypeAccess      string                      `json:"globalReportTypeAccess"`
	GlobalPersonaAccess         string                      `json:"globalPersonaAccess"`
	GlobalCatalogItemTypeAccess string                      `json:"globalCatalogItemTypeAccess"`
	GlobalVDIPoolAccess         string                      `json:"globalVdiPoolAccess"`
	GlobalTaskAccess            string                      `json:"globalTaskAccess"`
	GlobalWorkflowAccess        string                      `json:"globalTaskSetAccess"`
	FeaturePermissions          []featurePermission         `json:"permissions"`
	CloudPermissions            []cloudPermission           `json:"zones"`
	InstanceTypePermissions     []instanceTypePermission    `json:"instanceTypes"`
	BlueprintPermissions        []blueprintPermission       `json:"appTemplates"`
	ReportTypePermissions       []reportTypePermission      `json:"reportTypes"`
	PersonaPermissions          []personaPermission         `json:"personas"`
	CatalogItemTypePermissions  []catalogItemTypePermission `json:"catalogItemTypes"`
	VdiPoolPermissions          []vdiPoolPermission         `json:"vdiPools"`
	Tasks                       []taskPermission            `json:"tasks"`
	Workflows                   []workflowPermission        `json:"taskSets"`
}

type TerraformAppBlueprint added in v0.5.0

type TerraformAppBlueprint struct {
	Blueprint struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Type        string `json:"type"`
		Description string `json:"description"`
		Category    string `json:"category"`
		Config      struct {
			Name        string `json:"name"`
			Description string `json:"description"`
			Terraform   struct {
				Tfversion      string `json:"tfVersion"`
				Tf             string `json:"tf"`
				Tfvarsecret    string `json:"tfvarSecret"`
				Commandoptions string `json:"commandOptions"`
				Configtype     string `json:"configType"`
				JSON           string `json:"json"`
				Git            struct {
					Path          string `json:"path"`
					RepoId        int    `json:"repoId"`
					IntegrationId int    `json:"integrationId"`
					Branch        string `json:"branch"`
				} `json:"git"`
			} `json:"terraform"`
			Config struct {
				Specs []struct {
					ID    int    `json:"id"`
					Value string `json:"value"`
					Name  string `json:"name"`
				} `json:"specs"`
			} `json:"config"`
			Type     string `json:"type"`
			Category string `json:"category"`
			Image    string `json:"image"`
		} `json:"config"`
		Visibility         string `json:"visibility"`
		Resourcepermission struct {
			All      bool          `json:"all"`
			Sites    []interface{} `json:"sites"`
			AllPlans bool          `json:"allPlans"`
			Plans    []interface{} `json:"plans"`
		} `json:"resourcePermission"`
		Owner struct {
			ID       int    `json:"id"`
			Username string `json:"username"`
		} `json:"owner"`
		Tenant struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"tenant"`
	} `json:"blueprint"`
}

type TerraformSpecTemplate added in v0.3.0

type TerraformSpecTemplate struct {
	Spectemplate struct {
		ID      int `json:"id"`
		Account struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
		} `json:"account"`
		Name string      `json:"name"`
		Code interface{} `json:"code"`
		Type struct {
			ID   int    `json:"id"`
			Name string `json:"name"`
			Code string `json:"code"`
		} `json:"type"`
		Externalid   interface{} `json:"externalId"`
		Externaltype interface{} `json:"externalType"`
		Deploymentid interface{} `json:"deploymentId"`
		Status       interface{} `json:"status"`
		File         struct {
			ID          int         `json:"id"`
			Sourcetype  string      `json:"sourceType"`
			Contentref  interface{} `json:"contentRef"`
			Contentpath interface{} `json:"contentPath"`
			Repository  struct {
				ID   int    `json:"id"`
				Name string `json:"name"`
			} `json:"repository"`
			Content string `json:"content"`
		} `json:"file"`
		Config struct {
		} `json:"config"`
		Createdby   string      `json:"createdBy"`
		Updatedby   interface{} `json:"updatedBy"`
		Datecreated time.Time   `json:"dateCreated"`
		Lastupdated time.Time   `json:"lastUpdated"`
	} `json:"specTemplate"`
}

type Volumes added in v0.11.0

type Volumes []struct {
	ID                   interface{} `json:"id"`
	Name                 string      `json:"name"`
	ShortName            string      `json:"shortName"`
	Description          string      `json:"description"`
	ControllerId         int64       `json:"controllerId"`
	ControllerMountPoint string      `json:"controllerMountPoint"`
	Resizeable           interface{} `json:"resizeable"`
	PlanResizable        interface{} `json:"planResizable"`
	Size                 interface{} `json:"size"`
	StorageType          interface{} `json:"storageType"`
	RootVolume           interface{} `json:"rootVolume"`
	UnitNumber           string      `json:"unitNumber"`
	DeviceName           string      `json:"deviceName"`
	DeviceDisplayName    string      `json:"deviceDisplayName"`
	Type                 struct {
		ID   int64  `json:"id"`
		Code string `json:"code"`
		Name string `json:"name"`
	} `json:"type"`
	TypeId           int64  `json:"typeId"`
	Category         string `json:"category"`
	Status           string `json:"status"`
	StatusMessage    string `json:"statusMessage"`
	ConfigurableIOPS bool   `json:"configurableIOPS"`
	MaxStorage       int64  `json:"maxStorage"`
	DisplayOrder     int64  `json:"displayOrder"`
	MaxIOPS          string `json:"maxIOPS"`
	Uuid             string `json:"uuid"`
	Active           bool   `json:"active"`
	Zone             struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
	} `json:"zone"`
	ZoneId    int64 `json:"zoneId"`
	Datastore struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
	} `json:"datastore"`
	DatastoreId   interface{} `json:"datastoreId"`
	StorageGroup  string      `json:"storageGroup"`
	Namespace     string      `json:"namespace"`
	StorageServer string      `json:"storageServer"`
	Source        string      `json:"source"`
	Owner         struct {
		ID   int64  `json:"id"`
		Name string `json:"name"`
	} `json:"owner"`
}

Source Files

Jump to

Keyboard shortcuts

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