i3s

package
v6.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package I3S for working with HPE ImageStreamer

Package i3s - Image Streamer 3.0 -

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactsBundle added in v0.8.2

type ArtifactsBundle struct {
	ArtifactsCount     int                      `json:"artifactsCount,omitempty"`     // "artifactsCount": 1,
	ArtifactsBundleID  string                   `json:"artifactsbundleID,omitempty"`  // "artifactsbundleID": "id",
	BackupService      bool                     `json:"backupService,omitempty"`      // "backupService": true,
	BuildPlans         []BuildPlanArtifact      `json:"buildPlans,omitempty"`         // "buildPlans": [],
	Category           string                   `json:"category,omitempty"`           // "category": "artifacts-bundle"
	CheckSum           string                   `json:"checkSum,omitempty"`           // "checkSum": "0",
	Created            string                   `json:"created,omitempty"`            // "20150831T154835.250Z",
	DeploymentPlans    []DeploymentPlanArtifact `json:"deploymentPlans,omitempty"`    // "deploymentPlans": [],
	Description        string                   `json:"description,omitempty"`        // "description": "Artifacts Bundle 1",
	DownloadURI        utils.Nstring            `json:"downloadURI,omitempty"`        // "downloadURI": "",
	ETAG               string                   `json:"eTag,omitempty"`               // "eTag": "1441036118675/8",
	GoldenImage        []GoldenImageArtifact    `json:"goldenimage,omitempty"`        // "goldenimage": [],
	ImportBundle       bool                     `json:"importbundle,omitempty"`       // "importbundle": true,
	LastBackUpDownload string                   `json:"lastBackUpDownload,omitempty"` // "lastBackUpDownload": "20150831T154835.250Z",
	Modified           string                   `json:"modified,omitempty"`           // "modified": "20150831T154835.250Z",
	Name               string                   `json:"name,omitempty"`               // "name": "Artifacts Bundle 1",
	PlanScripts        []PlanScriptArtifact     `json:"planScripts,omitempty"`        // "planScripts": [],
	ReadOnly           bool                     `json:"readOnly,omitempty"`           // "readOnly": true,
	RecoverBundle      bool                     `json:"recoverBundle,omitempty"`      // "recoverBundle": true,
	Size               int                      `json:"size,omitempty"`               // "size": 99,
	State              string                   `json:"state,omitempty"`              // "state": "Normal",
	Status             string                   `json:"status,omitempty"`             // "status": "Critical",
	Type               string                   `json:"type,omitempty"`               // "type": "ArtifactsBundle",
	URI                utils.Nstring            `json:"uri,omitempty"`                // "uri": "/rest/artifact-bundles/31e5dcba-b8ac-4f64-bbaa-7a4474f11994"
}

type ArtifactsBundleList added in v0.8.2

type ArtifactsBundleList struct {
	Total       int               `json:"total,omitempty"`       // "total": 1,
	Count       int               `json:"count,omitempty"`       // "count": 1,
	Start       int               `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring     `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring     `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring     `json:"uri,omitempty"`         // "uri": "/rest/server-profiles?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []ArtifactsBundle `json:"members,omitempty"`     // "members":[]
}

type AssociatedResource added in v0.8.2

type AssociatedResource struct {
	AssociationType  string        `json:"associationType,omitempty"`  // "associationType": "MANAGED_BY",
	ResourceCateogry string        `json:"resourceCategory,omitempty"` // "resourceCategory": "deployment-plan",
	ResourceName     utils.Nstring `json:"resourceName,omitempty"`     // "resourceName": "ubuntu 16.04",
	ResourceURI      utils.Nstring `json:"resourceUri,omitempty"`      // "resourceUri": "/rest/deployment-plans/30373237-3132-4D32-3235-303930524D57"
}

AssociatedResource associated resource

type AuthHeader added in v0.8.2

type AuthHeader struct {
	ContentType string `json:"Content-Type,omitempty"`
	XAPIVersion int    `json:"X-API-Version,omitempty"`
	Auth        string `json:"auth,omitempty"`
}

AuthHeader Marshal a json into a auth header

type BuildPlanArtifact added in v0.8.2

type BuildPlanArtifact struct {
	BPID           string `json:"bpID,omitempty"`           // "bpID": "build plan id",
	BuildPlanName  string `json:"buildPlanName,omitempty"`  // "buildPlanName": "build plan 1",
	Description    string `json:"description,omitempty"`    // "description": "build plan 1",
	PlanScriptName string `json:"planScriptName,omitempty"` // "planScriptName": "plan script 1",
	ReadOnly       bool   `json:"readOnly,omitempty"`       // "readOnly": true,
}

type BuildStep added in v0.8.2

type BuildStep struct {
	Parameters     string        `json:"parameters,omitempty"`     // "parameters": "anystring",
	PlanScriptName string        `json:"planScriptName,omitempty"` // "planScriptName": "script 1",
	PlanScriptURI  utils.Nstring `json:"planScriptUri,omitempty"`  // "planScriptUri": "/rest/plan-scripts/7dcd507c-09c4-48d0-b265-67f006b728ca",
	SerialNumber   string        `json:"serialNumber,omitempty"`   // "serialNumber": "1",
}

type CustomAttribute added in v0.8.2

type CustomAttribute struct {
	Constraints string `json:"constraints,omitempty"` // "constraints": "{\"unit\":\"KB\"}",
	Description string `json:"description,omitempty"` // "description": "custom attribute 1",
	Editable    bool   `json:"editable,omitempty"`    // "editable": false,
	ID          string `json:"id,omitempty"`          // "id": "1",
	Name        string `json:"name,omitempty"`        // "name": "volumesize",
	Type        string `json:"type,omitempty"`        // "type": "number",
	Value       string `json:"value,omitempty"`       // "value": "1045898",
	Visible     bool   `json:"visible,omitempty"`     // "visible": true,
}

type DependentArtifact added in v0.8.2

type DependentArtifact struct {
	Name string        `json:"name,omitempty"` // "name": "dependent artifact 1",
	URI  utils.Nstring `json:"uri,omitempty"`  // "uri": "/rest/artifact-bundles/9b8f7ec0-52b3-475e-84f4-c4eac51c2c20",
}

type DeploymentPlan added in v0.8.2

type DeploymentPlan struct {
	Category         string            `json:"category,omitempty"`         // "category": "oe-deployment-plan",
	Created          string            `json:"created,omitempty"`          // "created": "20150831T154835.250Z",
	CustomAttributes []CustomAttribute `json:"customAttributes,omitempty"` // "customAttributes": [],
	Description      utils.Nstring     `json:"description,omitempty"`      // "description": "Deployment Plan 1",
	ETAG             string            `json:"eTag,omitempty"`             // "eTag": "1441036118675/8",
	GoldenImageUri   utils.Nstring     `json:"goldenImageURI,omitempty"`   // "goldenImageUri": "",
	HPProvided       bool              `json:"hpProvided"`                 // "hpProvided": false,
	ID               string            `json:"id,omitempty"`               // "id": "1",
	Modified         string            `json:"modified,omitempty"`         // "modified": "20150831T154835.250Z",
	Name             string            `json:"name,omitempty"`             // "name": "Deployment Plan 1",
	OEBuildPlanURI   utils.Nstring     `json:"oeBuildPlanURI,omitempty"`   // "oeBuildPlanUri": "/rest/build-plans/4f907ab5-7133-4081-bb5a-4a6dea398046",
	State            string            `json:"state,omitempty"`            // "state": "Normal",
	Status           string            `json:"status,omitempty"`           // "status": "Critical",
	Type             string            `json:"type,omitempty"`             // "type": "OEDeploymentPlan",
	URI              utils.Nstring     `json:"uri,omitempty"`              // "uri": "/rest/deployment-plans/31e5dcba-b8ac-4f64-bbaa-7a4474f11994"
}

type DeploymentPlanArtifact added in v0.8.2

type DeploymentPlanArtifact struct {
	DeploymentPlanName string `json:"deploymentplanName,omitempty"` // "deploymentplanName": "deploy plan 1"
	Description        string `json:"description,omitempty"`        // "description": "deploy plan 1",
	DPId               string `json:"dpId,omitempty"`               // "dpId": "deploy plan id",
	GoldenImageName    string `json:"goldenImageName,omitempty"`    // "goldenImageName": "golden image 1",
	OEBPName           string `json:"oebpName,omitempty"`           // "oebpName": "oebp name 1",
	ReadOnly           bool   `json:"readOnly,omitempty"`           // "readOnly": true,
}

type DeploymentPlanList added in v0.8.2

type DeploymentPlanList struct {
	Total       int              `json:"total,omitempty"`       // "total": 1,
	Count       int              `json:"count,omitempty"`       // "count": 1,
	Start       int              `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring    `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring    `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring    `json:"uri,omitempty"`         // "uri": "/rest/server-profiles?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []DeploymentPlan `json:"members,omitempty"`     // "members":[]
}

type GoldenImage added in v0.8.2

type GoldenImage struct {
	ArtifactBundleCategory string              `json:"artifactBundleCategory,omitempty"` // "artifactBundleCategory": "artifact-category",
	BuildPlanCategory      string              `json:"buildPlanCategory,omitempty"`      // "buildPlanCategory": "buildplan-category",
	BuildPlanName          string              `json:"buildPlanName,omitempty"`          // "buildPlanName": "build plan 1",
	BuildPlanURI           utils.Nstring       `json:"buildPlanUri,omitempty"`           // "buildPlanUri": "/rest/build-planns/9b8f7ec0-52b3-475e-84f4-c4eac51c2c20"
	BundleName             string              `json:"bundleName,omitempty"`             // "bundleName": "bundle 1",
	BundleURI              utils.Nstring       `json:"bundleURI,omitempty"`              // "bundleURI": "/rest/artifact-bundles/9b8f7ec0-52b3-475e-84f4-c4eac51c2c20"
	Category               string              `json:"category,omitempty"`               // "category": "golden-images",
	CheckSum               string              `json:"checkSum,omitempty"`               // "checkSum": "1",
	Created                string              `json:"created,omitempty"`                // "created": "20150831T154835.250Z",
	DependentArtifacts     []DependentArtifact `json:"dependentArtifacts,omitempty"`     // "dependentArtifacts": [],
	Description            utils.Nstring       `json:"description,omitempty"`            // "description": "Golden Image 1",
	ETAG                   string              `json:"eTag,omitempty"`                   // "eTag": "1441036118675/8",
	ID                     string              `json:"id,omitempty"`                     // "id": "1",
	ImageCapture           bool                `json:"imageCapture,omitempty"`           // "imageCapture": true,
	ImportedFromBundle     bool                `json:"importedFromBundle,omitempty"`     // "importedFromBundle": true,
	Modified               string              `json:"modified,omitempty"`               // "modified": "20150831T154835.250Z",
	Name                   string              `json:"name,omitempty"`                   // "name": "Golden Image 1",
	OSVolumeCategory       string              `json:"osVolumeCategory,omitempty"`       // "osVolumeCategory": "os-volumes",
	OSVolumeName           string              `json:"osVolumeName,omitempty"`           // "osVolumeName": "os volume 1",
	OSVolumeURI            utils.Nstring       `json:"osVolumeURI,omitempty"`            // "osVolumeURI": "/rest/os-volumes/1234",
	ReadOnly               bool                `json:"readOnly,omitempty"`               // "readOnly": true,
	Size                   int                 `json:"size,omitempty"`                   // "size": 50
	State                  string              `json:"state,omitempty"`                  // "state": "Normal",
	Status                 string              `json:"status,omitempty"`                 // "status": "Critical",
	Type                   string              `json:"type,omitempty"`                   // "type": "GoldenImage",
	URI                    utils.Nstring       `json:"uri,omitempty"`                    // "uri": "/rest/golden-images/e2f0031b-52bd-4223-9ac1-d91cb519d548",
}

type GoldenImageArtifact added in v0.8.2

type GoldenImageArtifact struct {
	Description     string `json:"description,omitempty"`     // "description": "golden image 1",
	GIID            string `json:"giId,omitempty"`            // "giId": "golden image id",
	GoldenImageName string `json:"goldenimageName,omitempty"` // "goldenimageName": "golden image 1",
	ReadOnly        bool   `json:"readOnly,omitempty"`        // "readOnly": true,
}

type GoldenImageList added in v0.8.2

type GoldenImageList struct {
	Total       int           `json:"total,omitempty"`       // "total": 1,
	Count       int           `json:"count,omitempty"`       // "count": 1,
	Start       int           `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring `json:"uri,omitempty"`         // "uri": "/rest/golden-images?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []GoldenImage `json:"members,omitempty"`     // "members":[]
}

type I3SClient

type I3SClient struct {
	rest.Client
}

I3SClient - wrapper class for i3s api's

func (*I3SClient) CreateArtifactsBundle added in v0.8.2

func (c *I3SClient) CreateArtifactsBundle(artifactsBundle InputArtifactsBundle) error

func (*I3SClient) CreateDeploymentPlan added in v0.8.2

func (c *I3SClient) CreateDeploymentPlan(deploymentPlan DeploymentPlan) error

func (*I3SClient) CreateGoldenImage added in v0.8.2

func (c *I3SClient) CreateGoldenImage(goldenImage GoldenImage) error

func (*I3SClient) CreateOSBuildPlan added in v0.8.2

func (c *I3SClient) CreateOSBuildPlan(osBuildPlan OSBuildPlan) error

func (*I3SClient) CreatePlanScript added in v0.8.2

func (c *I3SClient) CreatePlanScript(planScript PlanScript) error

func (*I3SClient) DeleteArtifactsBundle added in v0.8.2

func (c *I3SClient) DeleteArtifactsBundle(name string) error

func (*I3SClient) DeleteDeploymentPlan added in v0.8.2

func (c *I3SClient) DeleteDeploymentPlan(name string) error

func (*I3SClient) DeleteGoldenImage added in v0.8.2

func (c *I3SClient) DeleteGoldenImage(name string) error

func (*I3SClient) DeleteOSBuildPlan added in v0.8.2

func (c *I3SClient) DeleteOSBuildPlan(name string) error

func (*I3SClient) DeletePlanScript added in v0.8.2

func (c *I3SClient) DeletePlanScript(name string) error

func (*I3SClient) GetArtifactsBundleByName added in v0.8.2

func (c *I3SClient) GetArtifactsBundleByName(name string) (ArtifactsBundle, error)

func (*I3SClient) GetArtifactsBundles added in v0.8.2

func (c *I3SClient) GetArtifactsBundles(filter string, sort string) (ArtifactsBundleList, error)

func (*I3SClient) GetAuthHeaderMap added in v0.8.2

func (c *I3SClient) GetAuthHeaderMap() map[string]string

GetAuthHeaderMap Generate an auth Header map

func (*I3SClient) GetAuthHeaderMapNoVer added in v0.8.2

func (c *I3SClient) GetAuthHeaderMapNoVer() map[string]string

GetAuthHeaderMapNoVer generate header without version

func (*I3SClient) GetDeploymentPlanByName added in v0.8.2

func (c *I3SClient) GetDeploymentPlanByName(name string) (DeploymentPlan, error)

func (*I3SClient) GetDeploymentPlans added in v0.8.2

func (c *I3SClient) GetDeploymentPlans(count string, filter string, query string, sort string, start string) (DeploymentPlanList, error)

func (*I3SClient) GetGoldenImageByName added in v0.8.2

func (c *I3SClient) GetGoldenImageByName(name string) (GoldenImage, error)

func (*I3SClient) GetGoldenImages added in v0.8.2

func (c *I3SClient) GetGoldenImages(filter string, sort string) (GoldenImageList, error)

func (*I3SClient) GetIdleTimeout added in v0.8.2

func (c *I3SClient) GetIdleTimeout() (int64, error)

GetIdleTimeout gets the current timeout for the logged on session returns timeout in milliseconds, or error when it fails

func (*I3SClient) GetOSBuildPlanByName added in v0.8.2

func (c *I3SClient) GetOSBuildPlanByName(name string) (OSBuildPlan, error)

func (*I3SClient) GetOSBuildPlans added in v0.8.2

func (c *I3SClient) GetOSBuildPlans(filter string, sort string) (OSBuildPlanList, error)

func (*I3SClient) GetOSVolumeByName added in v0.8.2

func (c *I3SClient) GetOSVolumeByName(name string) (OSVolume, error)

func (*I3SClient) GetOSVolumes added in v0.8.2

func (c *I3SClient) GetOSVolumes(filter string, sort string) (OSVolumeList, error)

func (*I3SClient) GetPlanScriptByName added in v0.8.2

func (c *I3SClient) GetPlanScriptByName(name string) (PlanScript, error)

func (*I3SClient) GetPlanScripts added in v0.8.2

func (c *I3SClient) GetPlanScripts(filter string, sort string) (PlanScriptList, error)

func (*I3SClient) NewI3SClient

func (c *I3SClient) NewI3SClient(endpoint string, sslverify bool, apiversion int, apiKey string) *I3SClient

new Client

func (*I3SClient) SetIdleTimeout added in v0.8.2

func (c *I3SClient) SetIdleTimeout(thetime int64) error

SetIdleTimeout sets the current timeout

func (*I3SClient) UpdateArtifactsBundle added in v0.8.2

func (c *I3SClient) UpdateArtifactsBundle(artifactsBundle ArtifactsBundle) error

func (*I3SClient) UpdateDeploymentPlan added in v0.8.2

func (c *I3SClient) UpdateDeploymentPlan(deploymentPlan DeploymentPlan) error

func (*I3SClient) UpdateGoldenImage added in v0.8.2

func (c *I3SClient) UpdateGoldenImage(goldenImage GoldenImage) error

func (*I3SClient) UpdateOSBuildPlan added in v0.8.2

func (c *I3SClient) UpdateOSBuildPlan(osBuildPlan OSBuildPlan) error

func (*I3SClient) UpdatePlanScript added in v0.8.2

func (c *I3SClient) UpdatePlanScript(planScript PlanScript) error

type InputArtifacts added in v0.8.2

type InputArtifacts struct {
	ReadOnly    bool          `json:"readOnly,omitempty"`    // "readyOnly": false,
	ResourceUri utils.Nstring `json:"resourceUri,omitempty"` // "resourceUri": "",
}

type InputArtifactsBundle added in v0.8.2

type InputArtifactsBundle struct {
	BuildPlans         []InputArtifacts `json:"buildPlans,omitempty"`         // "buildPlans": [],
	DeploymentClusters []string         `json:"deploymentClusters,omitempty"` // "deploymentClusters": [],
	DeploymentGroups   []string         `json:"deploymentGroups,omitempty"`   // "deploymentGroups": [],
	DeploymentPlans    []InputArtifacts `json:"deploymentPlans,omitempty"`    // "deploymentPlans": [],
	Description        string           `json:"description,omitempty"`        // "description": "Artifacts Bundle 1",
	GoldenImages       []InputArtifacts `json:"goldenImages,omitempty"`       // "goldenImages": [],
	GoldenVolumes      []string         `json:"goldenVolumes,omitempty"`      // "goldenVolumes": [],
	I3SAppliance       []string         `json:"i3sAppliance,omitempty"`       // "i3sAppliance": [],
	Name               string           `json:"name,omitempty"`               // "name": "Artifacts Bundle 1",
	OEVolumes          []string         `json:"oeVolumes,omitempty"`          // "oeVolumes": [],
	PlanScripts        []InputArtifacts `json:"planScripts,omitempty"`        // "planScripts": [],
	StatelessServers   []string         `json:"statelessServers,omitempty"`   // "statelessServers": [],
}

type OSBuildPlan added in v0.8.2

type OSBuildPlan struct {
	BuildPlanID        string              `json:"buildPlanid,omitempty"`        // "buildPlanid": "1",
	BuildSteps         []BuildStep         `json:"buildStep,omitempty"`          // "buildStep": [],
	Category           string              `json:"category,omitempty"`           // "category": "oe-deployment-plan",
	Created            string              `json:"created,omitempty"`            // "created": "20150831T154835.250Z",
	CustomAttributes   []CustomAttribute   `json:"customAttributes,omitempty"`   // "customAttributes": [],
	DependentArtifacts []DependentArtifact `json:"dependentArtifacts,omitempty"` // "dependentArtifacts": [],
	Description        string              `json:"description,omitempty"`        // "description": "Deployment Plan 1",
	OEBuildPlanETAG    string              `json:"eTag,omitempty"`               // "eTag": "1234",
	ETAG               string              `json:"etag,omitempty"`               // "etag": "1441036118675/8",
	HPProvided         bool                `json:"hpProvided,omitempty"`         // "hpProvided": false,
	Modified           string              `json:"modified,omitempty"`           // "modified": "20150831T154835.250Z",
	Name               string              `json:"name,omitempty"`               // "name": "Deployment Plan 1",
	OEBuildPlanType    string              `json:"oeBuildPlanType,omitempty"`    // "oeBuildPlanType": "type 1",
	Status             string              `json:"status,omitempty"`             // "status": "Critical",
	Type               string              `json:"type,omitempty"`               // "type": "OEDeploymentPlan",
	URI                utils.Nstring       `json:"uri,omitempty"`                // "uri": "/rest/deployment-plans/31e5dcba-b8ac-4f64-bbaa-7a4474f11994"
}

type OSBuildPlanList added in v0.8.2

type OSBuildPlanList struct {
	Total       int           `json:"total,omitempty"`       // "total": 1,
	Count       int           `json:"count,omitempty"`       // "count": 1,
	Start       int           `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring `json:"uri,omitempty"`         // "uri": "/rest/server-profiles?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []OSBuildPlan `json:"members,omitempty"`     // "members":[]
}

type OSVolume added in v0.8.2

type OSVolume struct {
	Category             string              `json:"category,omitempty"`             // "category": "os-volumes",
	Created              string              `json:"created,omitempty"`              // "created": "20150831T154835.250Z",
	DependentArtifacts   []DependentArtifact `json:"dependentArtifacts,omitempty"`   // "dependentArtifacts": [],
	DeploymentClusterUri utils.Nstring       `json:"deploymentClusterUri,omitempty"` // "deploymentClusterUri": "",
	Description          string              `json:"description,omitempty"`          // "description": "OS Volume 1",
	ETAG                 string              `json:"eTag,omitempty"`                 // "eTag": "1441036118675/8",
	GoldenVolumeUri      utils.Nstring       `json:"goldenVolumeUri,omitempty"`      // "goldenVolumeUri": "",
	Modified             string              `json:"modified,omitempty"`             // "modified": "20150831T154835.250Z",
	Name                 string              `json:"name,omitempty"`                 // "name": "OS Volume1 1",
	OEVolumeIQN          string              `json:"oeVolumeIQN,omitempty"`          // "",
	OEVolumeID           string              `json:"oeVolumeId,omitempty"`           // "",
	OEVolumeIp           string              `json:"oeVolumeIp,omitempty"`           // "",
	Size                 int                 `json:"size,omitempty"`                 // 99,
	State                string              `json:"state,omitempty"`                // "state": "Normal",
	StatelessServerUri   utils.Nstring       `json:"statelessServerUri,omitempty"`   // "statelessServerUri": "",
	Status               string              `json:"status,omitempty"`               // "status": "Critical",
	Type                 string              `json:"type,omitempty"`                 // "type": "OSVolume",
	URI                  utils.Nstring       `json:"uri,omitempty"`                  // "uri": "/rest/os-volumes/31e5dcba-b8ac-4f64-bbaa-7a4474f11994"
}

type OSVolumeList added in v0.8.2

type OSVolumeList struct {
	Total       int           `json:"total,omitempty"`       // "total": 1,
	Count       int           `json:"count,omitempty"`       // "count": 1,
	Start       int           `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring `json:"uri,omitempty"`         // "uri": "/rest/server-profiles?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []OSVolume    `json:"members,omitempty"`     // "members":[]
}

type PlanScript added in v0.8.2

type PlanScript struct {
	Category           string              `json:"category,omitempty"`           // "category": "PlanScript",
	Content            string              `json:"content,omitempty"`            // "content": "f"
	Created            string              `json:"created,omitempty"`            // "created": "20150831T154835.250Z",
	CustomAttributes   string              `json:"customAttributes,omitempty"`   // "customAttributes": "",
	DependentArtifacts []DependentArtifact `json:"dependentArtifacts,omitempty"` // "dependentArtifacts": [],
	Description        string              `json:"description,omitempty"`        // "description": "PlanScript 1",
	ETAG               string              `json:"eTag,omitempty"`               // "eTag": "1441036118675/8",
	HPProvided         bool                `json:"hpProvided,omitempty"`         // "hpProvided": false,
	ID                 string              `json:"id,omitempty"`                 // "id": "1",
	Modified           string              `json:"modified,omitempty"`           // "modified": "20150831T154835.250Z",
	Name               string              `json:"name,omitempty"`               // "name": "PlanScript 1",
	PlanType           string              `json:"planType,omitempty"`           // "planType": "Deploy",
	State              string              `json:"state,omitempty"`              // "state": "Normal",
	Status             string              `json:"status,omitempty"`             // "status": "Critical",
	Type               string              `json:"type,omitempty"`               // "type": "OEDeploymentPlan",
	URI                utils.Nstring       `json:"uri,omitempty"`                // "uri": "/rest/plan-scripts/31e5dcba-b8ac-4f64-bbaa-7a4474f11994"
}

type PlanScriptArtifact added in v0.8.2

type PlanScriptArtifact struct {
	Description    string `json:"description,omitempty"`    // "description": "plan script 1",
	PlanScriptName string `json:"planScriptName,omitempty"` // "planScriptName": "plan script 1",
	PSID           string `json:"psID,omitempty"`           // "psID": "plan script id",
	ReadOnly       bool   `json:"readOnly,omitempty"`       // "readOnly", false,
}

type PlanScriptList added in v0.8.2

type PlanScriptList struct {
	Total       int           `json:"total,omitempty"`       // "total": 1,
	Count       int           `json:"count,omitempty"`       // "count": 1,
	Start       int           `json:"start,omitempty"`       // "start": 0,
	PrevPageURI utils.Nstring `json:"prevPageUri,omitempty"` // "prevPageUri": null,
	NextPageURI utils.Nstring `json:"nextPageUri,omitempty"` // "nextPageUri": null,
	URI         utils.Nstring `json:"uri,omitempty"`         // "uri": "/rest/server-profiles?filter=connectionTemplateUri%20matches%7769cae0-b680-435b-9b87-9b864c81657fsort=name:asc"
	Members     []PlanScript  `json:"members,omitempty"`     // "members":[]
}

type ProgressUpdate added in v0.8.2

type ProgressUpdate struct {
	ID           int    `json:"id,omitempty"`           // "id":12566
	StatusUpdate string `json:"statusUpdate,omitempty"` // "statusUpdate":"Apply server settings.",
	TimeStamp    string `json:"timestamp,omitempty"`    // "timestamp":"2015-09-10T22:50:14.250Z",
}

ProgressUpdate - Task Progress Updates

type Session added in v0.8.2

type Session struct {
	ID string `json:"sessionID,omitempty"`
}

Session struct

type Task added in v0.8.2

type Task struct {
	AssociatedRes           AssociatedResource `json:"associatedResource,omitempty"`      // "associatedResource": { },
	AssociatedTaskURI       utils.Nstring      `json:"associatedTaskUri,omitempty"`       // "associatedTaskUri": null,
	Category                string             `json:"category,omitempty"`                // "category": "tasks",
	CompletedSteps          int                `json:"completedSteps,omitempty"`          // "completedSteps": 0,
	ComputedPercentComplete int                `json:"computedPercentComplete,omitempty"` // "computedPercentComplete": 0,
	Created                 string             `json:"created,omitempty"`                 // "created": "2015-09-07T03:25:54.844Z",
	Data                    TaskData           `json:"data,omitempty"`                    // "data": null,
	ETAG                    string             `json:"eTag,omitempty"`                    // "eTag": "0",
	ExpectedDuration        int                `json:"expectedDuration,omitempty"`        // "expectedDuration": 300,
	Hidden                  bool               `json:"hidden,omitempty"`                  // "hidden": false,
	Modified                string             `json:"modified,omitempty"`                // "modified": "2015-09-07T03:25:54.844Z",
	Name                    string             `json:"name,omitempty"`                    // "name": "Power off",
	Owner                   string             `json:"owner,omitempty"`                   // "owner": "i3sUser",
	ParentTaskURI           utils.Nstring      `json:"parentTaskUri,omitempty"`           // "parentTaskUri": null,
	PercentComplete         int                `json:"percentComplete,omitempty"`         // "percentComplete": 0,
	ProgressUpdates         []ProgressUpdate   `json:"progressUpdates,omitempty"`         // "progressUpdates": [],
	StateReason             string             `json:"stateReason,omitempty"`             // "stateReason": null,
	TaskErrors              []TaskError        `json:"taskErrors,omitempty"`              // "taskErrors": [],
	TaskOutput              []string           `json:"taskOutput,omitempty"`              // "taskOutput": [],
	TaskState               string             `json:"taskState,omitempty"`               // "taskState": "New",
	TaskStatus              string             `json:"taskStatus,omitempty"`              // "taskStatus": "Power off Server: se05, bay 16",
	TaskType                string             `json:"taskType,omitempty"`                // "taskType": "Appliance",
	TotalSteps              int                `json:"totalSteps,omitempty"`              // "totalSteps": 0,
	Type                    string             `json:"type,omitempty"`                    // "type": "TaskResourceV2",
	URI                     utils.Nstring      `json:"uri,omitempty"`                     // "uri": "/rest/tasks/145F808A-A8DD-4E1B-8C86-C2379C97B3B2"
	UserInitiated           bool               `json:"userInitiated,omitempty"`           // "userInitiated": true,
	TaskIsDone              bool               // when true, task are done
	Timeout                 int                // time before timeout on Executor
	WaitTime                time.Duration      // time between task checks
	Client                  *I3SClient
}

func (*Task) GetCurrentTaskStatus added in v0.8.2

func (t *Task) GetCurrentTaskStatus() error

GetCurrentTaskStatus - Get the current status

func (*Task) GetLastStatusUpdate added in v0.8.2

func (t *Task) GetLastStatusUpdate() string

GetLastStatusUpdate - get last detail updates from task

func (*Task) NewTask added in v0.8.2

func (t *Task) NewTask(c *I3SClient) *Task

NewTask - Create New Task

func (*Task) ResetTask added in v0.8.2

func (t *Task) ResetTask()

ResetTask - reset the power task back to off

func (*Task) Wait added in v0.8.2

func (t *Task) Wait() error

Wait - wait on task to complete

type TaskData added in v0.8.2

type TaskData struct {
	TaskCategory string `json:"task-category,omitempty"`
}

type TaskError added in v0.8.2

type TaskError struct {
	Data               map[string]interface{} `json:"data,omitempty"`               // "data":{},
	Details            string                 `json:"details,omitempty"`            // "details":"",
	ErrorCode          string                 `json:"errorCode,omitempty"`          // "errorCode":"MacTypeDiffGlobalMacType",
	ErrorSource        utils.Nstring          `json:"errorSource,omitempty"`        // "errorSource":null,
	Message            string                 `json:"message,omitempty"`            // "message":"When macType is not user defined, mac type should be same as the global Mac assignment Virtual."
	NestedErrors       []TaskError            `json:"nestedErrors,omitempty"`       // "nestedErrors":[],
	RecommendedActions []string               `json:"recommendedActions,omitempty"` // "recommendedActions":["Verify parameters and try again."],
}

TaskError struct

type TaskServer added in v0.8.2

type TaskServer struct {
	Name string `json:"name,omitempty"` // "Name to server
	URI  string `json:"uri,omitempty"`  // "URI to server
}

TaskServer Example: {"name":"deployment plan name", "uri":"/rest/deployment-plans/30373237-3132-4D32-3235-303930524D52"}

type TaskState added in v0.8.2

type TaskState int

TaskState task state

const (
	T_COMPLETED TaskState = 1 + iota
	T_ERROR
	T_INERRUPTED
	T_KILLED
	T_NEW
	T_PENDING
	T_RUNNING
	T_STARTING
	T_STOPPING
	T_SUSPENDED
	T_TERMINATED
	T_UNKNOWN
	T_WARNING
)

func (TaskState) Equal added in v0.8.2

func (ts TaskState) Equal(s string) bool

Equal for type

func (TaskState) String added in v0.8.2

func (ts TaskState) String() string

String for type

type TaskType added in v0.8.2

type TaskType int

TaskType - task type

const (
	T_APPLIANCE TaskType = 1 + iota
	T_BACKGROUND
	T_USER
)

func (TaskType) Equal added in v0.8.2

func (tt TaskType) Equal(s string) bool

Equal type

func (TaskType) String added in v0.8.2

func (tt TaskType) String() string

String return

type TimeOut added in v0.8.2

type TimeOut struct {
	IdleTimeout int64 `json:"idleTimeout"`
}

TimeOut structure

Jump to

Keyboard shortcuts

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