mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/vcd: Updated dependencies to use ukcloud/govcloudair (#11535)
* OS-131 Updated dependencies to use ukcloud/govcloudair instead of hmrc/vmware-govcd * OS-131 Fixed failing tests by adding package name to imports of ukcloud/govcloudair * OS-131 Minor change to force Travis to re-build the PR
This commit is contained in:
parent
9de405ca31
commit
eb6c0f8d0b
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair" // Forked from vmware/govcloudair
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccVcdDNAT_Basic(t *testing.T) {
|
func TestAccVcdDNAT_Basic(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
func resourceVcdFirewallRules() *schema.Resource {
|
func resourceVcdFirewallRules() *schema.Resource {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccVcdFirewallRules_basic(t *testing.T) {
|
func TestAccVcdFirewallRules_basic(t *testing.T) {
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/hashicorp/terraform/helper/hashcode"
|
"github.com/hashicorp/terraform/helper/hashcode"
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
func resourceVcdNetwork() *schema.Resource {
|
func resourceVcdNetwork() *schema.Resource {
|
||||||
|
@ -8,7 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccVcdNetwork_Basic(t *testing.T) {
|
func TestAccVcdNetwork_Basic(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccVcdSNAT_Basic(t *testing.T) {
|
func TestAccVcdSNAT_Basic(t *testing.T) {
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
func resourceVcdVApp() *schema.Resource {
|
func resourceVcdVApp() *schema.Resource {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/terraform"
|
"github.com/hashicorp/terraform/terraform"
|
||||||
"github.com/hmrc/vmware-govcd"
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAccVcdVApp_PowerOff(t *testing.T) {
|
func TestAccVcdVApp_PowerOff(t *testing.T) {
|
||||||
|
@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/hashicorp/terraform/helper/resource"
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
"github.com/hashicorp/terraform/helper/schema"
|
"github.com/hashicorp/terraform/helper/schema"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
func expandIPRange(configured []interface{}) types.IPRanges {
|
func expandIPRange(configured []interface{}) types.IPRanges {
|
||||||
|
60
vendor/github.com/hmrc/vmware-govcd/README.md
generated
vendored
60
vendor/github.com/hmrc/vmware-govcd/README.md
generated
vendored
@ -1,60 +0,0 @@
|
|||||||
## vmware-govcd
|
|
||||||
|
|
||||||
This package was originally forked from [github.com/vmware/govcloudair](https://github.com/vmware/govcloudair) before pulling in [rickard-von-essen's](https://github.com/rickard-von-essen)
|
|
||||||
great changes to allow using a [vCloud Director API](https://github.com/rickard-von-essen/govcloudair/tree/vcd-5.5). On top of this I have added features as needed for a terraform provider for vCloud Director
|
|
||||||
|
|
||||||
### Example ###
|
|
||||||
|
|
||||||
```go
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"net/url"
|
|
||||||
"os"
|
|
||||||
|
|
||||||
"github.com/hmrc/vmware-govcd"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Config struct {
|
|
||||||
User string
|
|
||||||
Password string
|
|
||||||
Org string
|
|
||||||
Href string
|
|
||||||
VDC string
|
|
||||||
Insecure bool
|
|
||||||
}
|
|
||||||
|
|
||||||
func (c *Config) Client() (*govcd.VCDClient, error) {
|
|
||||||
u, err := url.ParseRequestURI(c.Href)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("Unable to pass url: %s", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
vcdclient := govcd.NewVCDClient(*u, c.Insecure)
|
|
||||||
org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("Unable to authenticate: %s", err)
|
|
||||||
}
|
|
||||||
vcdclient.Org = org
|
|
||||||
vcdclient.OrgVdc = vcd
|
|
||||||
return vcdclient, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
config := Config{
|
|
||||||
User: "Username",
|
|
||||||
Password: "password",
|
|
||||||
Org: "vcd org",
|
|
||||||
Href: "vcd api url",
|
|
||||||
VDC: "vcd virtual datacenter name",
|
|
||||||
}
|
|
||||||
|
|
||||||
client, err := config.Client() // We now have a client
|
|
||||||
if err != nil {
|
|
||||||
fmt.Println(err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
fmt.Printf("Org URL: %s\n", client.OrgHREF.String())
|
|
||||||
}
|
|
||||||
```
|
|
65
vendor/github.com/ukcloud/govcloudair/README.md
generated
vendored
Normal file
65
vendor/github.com/ukcloud/govcloudair/README.md
generated
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
# govcloudair [](https://ci.vmware.run/ukcloud/govcloudair) [](https://travis-ci.org/ukcloud/govcloudair) [](https://coveralls.io/github/ukcloud/govcloudair?branch=master) [](http://godoc.org/github.com/ukcloud/govcloudair) [](https://gitter.im/ukcloud/govcloudair?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
This repo provides the `govcloudair` package which offers an interface to the vCloud Air 5.6 and 5.7 API and vCloud Director 5.5 API.
|
||||||
|
|
||||||
|
It serves as a foundation for a project currently in development, there are plans to make it a general purpose API in the future. The `govcloudair` package is used by the Terraform provider for vCloud Director.
|
||||||
|
|
||||||
|
The API is currently under heavy development, its coverage is extremely limited at the moment.
|
||||||
|
|
||||||
|
The bindings now support both Subscription and On-demand accounts and vCloud Director 5.5
|
||||||
|
|
||||||
|
### Example ###
|
||||||
|
|
||||||
|
```go
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/url"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
govcd "github.com/ukcloud/govcloudair"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Config struct {
|
||||||
|
User string
|
||||||
|
Password string
|
||||||
|
Org string
|
||||||
|
Href string
|
||||||
|
VDC string
|
||||||
|
Insecure bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *Config) Client() (*govcd.VCDClient, error) {
|
||||||
|
u, err := url.ParseRequestURI(c.Href)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("Unable to pass url: %s", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
vcdclient := govcd.NewVCDClient(*u, c.Insecure)
|
||||||
|
org, vcd, err := vcdclient.Authenticate(c.User, c.Password, c.Org, c.VDC)
|
||||||
|
if err != nil {
|
||||||
|
return nil, fmt.Errorf("Unable to authenticate: %s", err)
|
||||||
|
}
|
||||||
|
vcdclient.Org = org
|
||||||
|
vcdclient.OrgVdc = vcd
|
||||||
|
return vcdclient, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
config := Config{
|
||||||
|
User: "Username",
|
||||||
|
Password: "password",
|
||||||
|
Org: "vcd org",
|
||||||
|
Href: "vcd api url",
|
||||||
|
VDC: "vcd virtual datacenter name",
|
||||||
|
}
|
||||||
|
|
||||||
|
client, err := config.Client() // We now have a client
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
fmt.Printf("Org URL: %s\n", client.OrgHREF.String())
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Package govcloudair provides a simple binding for vCloud Air / vCloud Director REST APIs.
|
// Package govcloudair provides a simple binding for vCloud Air / vCloud Director REST APIs.
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
@ -13,7 +13,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client provides a client to vCloud Air, values can be populated automatically using the Authenticate method.
|
// Client provides a client to vCloud Air, values can be populated automatically using the Authenticate method.
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -11,7 +11,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Client provides a client to vCloud Air, values can be populated automatically using the Authenticate method.
|
// Client provides a client to vCloud Air, values can be populated automatically using the Authenticate method.
|
@ -1,4 +1,4 @@
|
|||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
@ -2,13 +2,13 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Catalog struct {
|
type Catalog struct {
|
@ -2,13 +2,13 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CatalogItem struct {
|
type CatalogItem struct {
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -15,7 +15,7 @@ import (
|
|||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EdgeGateway struct {
|
type EdgeGateway struct {
|
@ -2,13 +2,13 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Org struct {
|
type Org struct {
|
@ -2,13 +2,13 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
@ -2,12 +2,12 @@
|
|||||||
* Copyright 2016 Skyscape Cloud Services. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2016 Skyscape Cloud Services. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Results struct {
|
type Results struct {
|
@ -2,14 +2,14 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Task struct {
|
type Task struct {
|
75
vendor/github.com/ukcloud/govcloudair/types/v56/constants.go
generated
vendored
Normal file
75
vendor/github.com/ukcloud/govcloudair/types/v56/constants.go
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
const (
|
||||||
|
// PublicCatalog Name
|
||||||
|
PublicCatalog = "Public Catalog"
|
||||||
|
|
||||||
|
// DefaultCatalog Name
|
||||||
|
DefaultCatalog = "Default Catalog"
|
||||||
|
|
||||||
|
// JSONMimeV57 the json mime for version 5.7 of the API
|
||||||
|
JSONMimeV57 = "application/json;version=5.7"
|
||||||
|
// AnyXMLMime511 the wildcard xml mime for version 5.11 of the API
|
||||||
|
AnyXMLMime511 = "application/*+xml;version=5.11"
|
||||||
|
// Version511 the 5.11 version
|
||||||
|
Version511 = "5.11"
|
||||||
|
// Version is the default version number
|
||||||
|
Version = Version511
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// NsOvf the ovf xml namespace url
|
||||||
|
NsOvf = "http://schemas.dmtf.org/ovf/envelope/1"
|
||||||
|
// NsXMLSchema the xml schema namespace url
|
||||||
|
NsXMLSchema = "http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
// NsVCloud vcloud xml namespace url
|
||||||
|
NsVCloud = "http://www.vmware.com/vcloud/v1.5"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// MimeOrgList mime for org list
|
||||||
|
MimeOrgList = "application/vnd.vmware.vcloud.orgList+xml"
|
||||||
|
// MimeOrg mime for org
|
||||||
|
MimeOrg = "application/vnd.vmware.vcloud.org+xml"
|
||||||
|
// MimeCatalog mime for catalog
|
||||||
|
MimeCatalog = "application/vnd.vmware.vcloud.catalog+xml"
|
||||||
|
// MimeCatalogItem mime for catalog item
|
||||||
|
MimeCatalogItem = "application/vnd.vmware.vcloud.catalogItem+xml"
|
||||||
|
// MimeVDC mime for a VDC
|
||||||
|
MimeVDC = "application/vnd.vmware.vcloud.vdc+xml"
|
||||||
|
// MimeVAppTemplate mime for a vapp template
|
||||||
|
MimeVAppTemplate = "application/vnd.vmware.vcloud.vAppTemplate+xml"
|
||||||
|
// MimeInstantiateVAppTemplate mime fore instantiate VApp template params
|
||||||
|
MimeInstantiateVAppTemplate = "application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml"
|
||||||
|
// MimeVApp mime for a vApp
|
||||||
|
MimeVApp = "application/vnd.vmware.vcloud.vApp+xml"
|
||||||
|
// MimeQueryRecords mime for the query records
|
||||||
|
MimeQueryRecords = "application/vnd.vmware.vchs.query.records+xml"
|
||||||
|
// MimeAPIExtensibility mime for api extensibility
|
||||||
|
MimeAPIExtensibility = "application/vnd.vmware.vcloud.apiextensibility+xml"
|
||||||
|
// MimeEntity mime for vcloud entity
|
||||||
|
MimeEntity = "application/vnd.vmware.vcloud.entity+xml"
|
||||||
|
// MimeQueryList mime for query list
|
||||||
|
MimeQueryList = "application/vnd.vmware.vcloud.query.queryList+xml"
|
||||||
|
// MimeSession mime for a session
|
||||||
|
MimeSession = "application/vnd.vmware.vcloud.session+xml"
|
||||||
|
// MimeTask mime for task
|
||||||
|
MimeTask = "application/vnd.vmware.vcloud.task+xml"
|
||||||
|
// MimeError mime for error
|
||||||
|
MimeError = "application/vnd.vmware.vcloud.error+xml"
|
||||||
|
// MimeNetwork mime for a network
|
||||||
|
MimeNetwork = "application/vnd.vmware.vcloud.network+xml"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// HTTPGet the http GET method
|
||||||
|
HTTPGet = "GET"
|
||||||
|
// HTTPPost the http POST method
|
||||||
|
HTTPPost = "POST"
|
||||||
|
// HTTPPut the http PUT method
|
||||||
|
HTTPPut = "PUT"
|
||||||
|
// HTTPPatch the http PATCH method
|
||||||
|
HTTPPatch = "PATCH"
|
||||||
|
// HTTPDelete the http DELETE method
|
||||||
|
HTTPDelete = "DELETE"
|
||||||
|
)
|
212
vendor/github.com/ukcloud/govcloudair/types/v56/link.go
generated
vendored
Normal file
212
vendor/github.com/ukcloud/govcloudair/types/v56/link.go
generated
vendored
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
// LinkPredicate is a predicate for finding links in a link list
|
||||||
|
type LinkPredicate func(*Link) bool
|
||||||
|
|
||||||
|
func byTypeAndRel(tpe, rel string) LinkPredicate {
|
||||||
|
if rel == "" {
|
||||||
|
rel = RelDown
|
||||||
|
}
|
||||||
|
return func(lnk *Link) bool {
|
||||||
|
return lnk != nil && lnk.Type == tpe && lnk.Rel == rel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func byNameTypeAndRel(nme, tpe, rel string) LinkPredicate {
|
||||||
|
tpePred := byTypeAndRel(tpe, rel)
|
||||||
|
return func(lnk *Link) bool {
|
||||||
|
return tpePred(lnk) && lnk.Name == nme
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// LinkList represents a list of links
|
||||||
|
type LinkList []*Link
|
||||||
|
|
||||||
|
// Find the first occurrence that matches the predicate
|
||||||
|
func (l LinkList) Find(predicate LinkPredicate) *Link {
|
||||||
|
for _, lnk := range l {
|
||||||
|
if predicate(lnk) {
|
||||||
|
return lnk
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ForType finds a link for a given type
|
||||||
|
func (l LinkList) ForType(tpe, rel string) *Link {
|
||||||
|
return l.Find(byTypeAndRel(tpe, rel))
|
||||||
|
}
|
||||||
|
|
||||||
|
// ForName finds a link for a given name and type
|
||||||
|
func (l LinkList) ForName(name, tpe, rel string) *Link {
|
||||||
|
return l.Find(byNameTypeAndRel(name, tpe, rel))
|
||||||
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
RelDown = "down"
|
||||||
|
RelAdd = "add"
|
||||||
|
RelUp = "up"
|
||||||
|
RelEdit = "edit"
|
||||||
|
RelRemove = "remove"
|
||||||
|
RelCopy = "copy"
|
||||||
|
RelMove = "move"
|
||||||
|
RelAlternate = "alternate"
|
||||||
|
RelTaskCancel = "task:cancel"
|
||||||
|
RelDeploy = "deploy"
|
||||||
|
RelUndeploy = "undeploy"
|
||||||
|
RelDiscardState = "discardState"
|
||||||
|
RelPowerOn = "power:powerOn"
|
||||||
|
RelPowerOff = "power:powerOff"
|
||||||
|
RelPowerReset = "power:reset"
|
||||||
|
RelPowerReboot = "power:reboot"
|
||||||
|
RelPowerSuspend = "power:suspend"
|
||||||
|
RelPowerShutdown = "power:shutdown"
|
||||||
|
|
||||||
|
RelScreenThumbnail = "screen:thumbnail"
|
||||||
|
RelScreenAcquireTicket = "screen:acquireTicket"
|
||||||
|
RelScreenAcquireMksTicket = "screen:acquireMksTicket"
|
||||||
|
|
||||||
|
RelMediaInsertMedia = "media:insertMedia"
|
||||||
|
RelMediaEjectMedia = "media:ejectMedia"
|
||||||
|
|
||||||
|
RelDiskAttach = "disk:attach"
|
||||||
|
RelDiskDetach = "disk:detach"
|
||||||
|
|
||||||
|
RelUploadDefault = "upload:default"
|
||||||
|
RelUploadAlternate = "upload:alternate"
|
||||||
|
|
||||||
|
RelDownloadDefault = "download:default"
|
||||||
|
RelDownloadAlternate = "download:alternate"
|
||||||
|
RelDownloadIdentity = "download:identity"
|
||||||
|
|
||||||
|
RelSnapshotCreate = "snapshot:create"
|
||||||
|
RelSnapshotRevertToCurrent = "snapshot:revertToCurrent"
|
||||||
|
RelSnapshotRemoveAll = "snapshot:removeAll"
|
||||||
|
|
||||||
|
RelOVF = "ovf"
|
||||||
|
RelOVA = "ova"
|
||||||
|
RelControlAccess = "controlAccess"
|
||||||
|
RelPublish = "publish"
|
||||||
|
RelPublishExternal = "publishToExternalOrganizations"
|
||||||
|
RelSubscribeExternal = "subscribeToExternalCatalog"
|
||||||
|
RelExtension = "extension"
|
||||||
|
RelEnable = "enable"
|
||||||
|
RelDisable = "disable"
|
||||||
|
RelMerge = "merge"
|
||||||
|
RelCatalogItem = "catalogItem"
|
||||||
|
RelRecompose = "recompose"
|
||||||
|
RelRegister = "register"
|
||||||
|
RelUnregister = "unregister"
|
||||||
|
RelRepair = "repair"
|
||||||
|
RelReconnect = "reconnect"
|
||||||
|
RelDisconnect = "disconnect"
|
||||||
|
RelUpgrade = "upgrade"
|
||||||
|
RelAnswer = "answer"
|
||||||
|
RelAddOrgs = "addOrgs"
|
||||||
|
RelRemoveOrgs = "removeOrgs"
|
||||||
|
RelSync = "sync"
|
||||||
|
|
||||||
|
RelVSphereWebClientURL = "vSphereWebClientUrl"
|
||||||
|
RelVimServerDvSwitches = "vimServerDvSwitches"
|
||||||
|
|
||||||
|
RelCollaborationResume = "resume"
|
||||||
|
RelCollaborationAbort = "abort"
|
||||||
|
RelCollaborationFail = "fail"
|
||||||
|
RelEnterMaintenanceMode = "enterMaintenanceMode"
|
||||||
|
RelExitMaintenanceMode = "exitMaintenanceMode"
|
||||||
|
RelTask = "task"
|
||||||
|
RelTaskOwner = "task:owner"
|
||||||
|
RelPreviousPage = "previousPage"
|
||||||
|
RelNextPage = "nextPage"
|
||||||
|
RelFirstPage = "firstPage"
|
||||||
|
RelLastPage = "lastPage"
|
||||||
|
RelInstallVMWareTools = "installVmwareTools"
|
||||||
|
RelConsolidate = "consolidate"
|
||||||
|
RelEntity = "entity"
|
||||||
|
RelEntityResolver = "entityResolver"
|
||||||
|
RelRelocate = "relocate"
|
||||||
|
RelBlockingTasks = "blockingTasks"
|
||||||
|
RelUpdateProgress = "updateProgress"
|
||||||
|
RelSyncSyslogSettings = "syncSyslogSettings"
|
||||||
|
RelTakeOwnership = "takeOwnership"
|
||||||
|
RelUnlock = "unlock"
|
||||||
|
RelShadowVMs = "shadowVms"
|
||||||
|
RelTest = "test"
|
||||||
|
RelUpdateResourcePools = "update:resourcePools"
|
||||||
|
RelRemoveForce = "remove:force"
|
||||||
|
RelStorageClass = "storageProfile"
|
||||||
|
RelRefreshStorageClasses = "refreshStorageProfile"
|
||||||
|
RelRefreshVirtualCenter = "refreshVirtualCenter"
|
||||||
|
RelCheckCompliance = "checkCompliance"
|
||||||
|
RelForceFullCustomization = "customizeAtNextPowerOn"
|
||||||
|
RelReloadFromVC = "reloadFromVc"
|
||||||
|
RelMetricsDayView = "interval:day"
|
||||||
|
RelMetricsWeekView = "interval:week"
|
||||||
|
RelMetricsMonthView = "interval:month"
|
||||||
|
RelMetricsYearView = "interval:year"
|
||||||
|
RelMetricsPreviousRange = "range:previous"
|
||||||
|
RelMetricsNextRange = "range:next"
|
||||||
|
RelMetricsLatestRange = "range:latest"
|
||||||
|
RelRights = "rights"
|
||||||
|
RelMigratVMs = "migrateVms"
|
||||||
|
RelResourcePoolVMList = "resourcePoolVmList"
|
||||||
|
RelCreateEvent = "event:create"
|
||||||
|
RelCreateTask = "task:create"
|
||||||
|
RelUploadBundle = "bundle:upload"
|
||||||
|
RelCleanupBundles = "bundles:cleanup"
|
||||||
|
RelAuthorizationCheck = "authorization:check"
|
||||||
|
RelCleanupRights = "rights:cleanup"
|
||||||
|
|
||||||
|
RelEdgeGatewayRedeploy = "edgeGateway:redeploy"
|
||||||
|
RelEdgeGatewayReapplyServices = "edgeGateway:reapplyServices"
|
||||||
|
RelEdgeGatewayConfigureServices = "edgeGateway:configureServices"
|
||||||
|
RelEdgeGatewayConfigureSyslog = "edgeGateway:configureSyslogServerSettings"
|
||||||
|
RelEdgeGatewaySyncSyslogSettings = "edgeGateway:syncSyslogSettings"
|
||||||
|
RelEdgeGatewayUpgrade = "edgeGateway:upgrade"
|
||||||
|
RelEdgeGatewayUpgradeNetworking = "edgeGateway:convertToAdvancedNetworking"
|
||||||
|
RelVDCManageFirewall = "manageFirewall"
|
||||||
|
|
||||||
|
RelCertificateUpdate = "certificate:update"
|
||||||
|
RelCertificateReset = "certificate:reset"
|
||||||
|
RelTruststoreUpdate = "truststore:update"
|
||||||
|
RelTruststoreReset = "truststore:reset"
|
||||||
|
RelKeyStoreUpdate = "keystore:update"
|
||||||
|
RelKeystoreReset = "keystore:reset"
|
||||||
|
RelKeytabUpdate = "keytab:update"
|
||||||
|
RelKeytabReset = "keytab:reset"
|
||||||
|
|
||||||
|
RelServiceLinks = "down:serviceLinks"
|
||||||
|
RelAPIFilters = "down:apiFilters"
|
||||||
|
RelResourceClasses = "down:resourceClasses"
|
||||||
|
RelResourceClassActions = "down:resourceClassActions"
|
||||||
|
RelServices = "down:services"
|
||||||
|
RelACLRules = "down:aclRules"
|
||||||
|
RelFileDescriptors = "down:fileDescriptors"
|
||||||
|
RelAPIDefinitions = "down:apiDefinitions"
|
||||||
|
RelServiceResources = "down:serviceResources"
|
||||||
|
RelExtensibility = "down:extensibility"
|
||||||
|
RelAPIServiceQuery = "down:service"
|
||||||
|
RelAPIDefinitionsQuery = "down:apidefinitions"
|
||||||
|
RelAPIFilesQuery = "down:files"
|
||||||
|
RelServiceOfferings = "down:serviceOfferings"
|
||||||
|
RelServiceOfferingInstances = "down:serviceOfferingInstances"
|
||||||
|
RelHybrid = "down:hybrid"
|
||||||
|
|
||||||
|
RelServiceRefresh = "service:refresh"
|
||||||
|
RelServiceAssociate = "service:associate"
|
||||||
|
RelServiceDisassociate = "service:disassociate"
|
||||||
|
|
||||||
|
RelReconfigureVM = "reconfigureVM"
|
||||||
|
|
||||||
|
RelOrgVDCGateways = "edgeGateways"
|
||||||
|
RelOrgVDCNetworks = "orgVdcNetworks"
|
||||||
|
|
||||||
|
RelHybridAcquireControlTicket = "hybrid:acquireControlTicket"
|
||||||
|
RelHybridAcquireTicket = "hybrid:acquireTicket"
|
||||||
|
RelHybridRefreshTunnel = "hybrid:refreshTunnel"
|
||||||
|
|
||||||
|
RelMetrics = "metrics"
|
||||||
|
|
||||||
|
RelFederationRegenerateCertificate = "federation:regenerateFederationCertificate"
|
||||||
|
RelTemplateInstantiate = "instantiate"
|
||||||
|
)
|
@ -66,7 +66,7 @@ type CustomizationSection struct {
|
|||||||
HREF string `xml:"href,attr,omitempty"`
|
HREF string `xml:"href,attr,omitempty"`
|
||||||
Type string `xml:"type,attr,omitempty"`
|
Type string `xml:"type,attr,omitempty"`
|
||||||
CustomizeOnInstantiate bool `xml:"CustomizeOnInstantiate"`
|
CustomizeOnInstantiate bool `xml:"CustomizeOnInstantiate"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// LeaseSettingsSection represents vApp lease settings.
|
// LeaseSettingsSection represents vApp lease settings.
|
||||||
@ -172,7 +172,7 @@ type SubAllocations struct {
|
|||||||
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
|
HREF string `xml:"href,attr,omitempty"` // The URI of the entity.
|
||||||
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
|
Type string `xml:"type,attr,omitempty"` // The MIME type of the entity.
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
||||||
SubAllocation *SubAllocation `xml:"SubAllocation,omitempty"` // IP Range sub allocated to a edge gateway.
|
SubAllocation *SubAllocation `xml:"SubAllocation,omitempty"` // IP Range sub allocated to a edge gateway.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ type Vdc struct {
|
|||||||
ComputeCapacity []*ComputeCapacity `xml:"ComputeCapacity"`
|
ComputeCapacity []*ComputeCapacity `xml:"ComputeCapacity"`
|
||||||
Description string `xml:"Description,omitempty"`
|
Description string `xml:"Description,omitempty"`
|
||||||
IsEnabled bool `xml:"IsEnabled"`
|
IsEnabled bool `xml:"IsEnabled"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
NetworkQuota int `xml:"NetworkQuota"`
|
NetworkQuota int `xml:"NetworkQuota"`
|
||||||
NicQuota int `xml:"NicQuota"`
|
NicQuota int `xml:"NicQuota"`
|
||||||
ResourceEntities []*ResourceEntities `xml:"ResourceEntities,omitempty"`
|
ResourceEntities []*ResourceEntities `xml:"ResourceEntities,omitempty"`
|
||||||
@ -502,7 +502,7 @@ type Org struct {
|
|||||||
Description string `xml:"Description,omitempty"`
|
Description string `xml:"Description,omitempty"`
|
||||||
FullName string `xml:"FullName"`
|
FullName string `xml:"FullName"`
|
||||||
IsEnabled bool `xml:"IsEnabled,omitempty"`
|
IsEnabled bool `xml:"IsEnabled,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -521,7 +521,7 @@ type CatalogItem struct {
|
|||||||
DateCreated string `xml:"DateCreated,omitempty"`
|
DateCreated string `xml:"DateCreated,omitempty"`
|
||||||
Description string `xml:"Description,omitempty"`
|
Description string `xml:"Description,omitempty"`
|
||||||
Entity *Entity `xml:"Entity"`
|
Entity *Entity `xml:"Entity"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
||||||
VersionNumber int64 `xml:"VersionNumber,omitempty"`
|
VersionNumber int64 `xml:"VersionNumber,omitempty"`
|
||||||
}
|
}
|
||||||
@ -538,7 +538,7 @@ type Entity struct {
|
|||||||
OperationKey string `xml:"operationKey,attr,omitempty"`
|
OperationKey string `xml:"operationKey,attr,omitempty"`
|
||||||
Name string `xml:"name,attr"`
|
Name string `xml:"name,attr"`
|
||||||
Description string `xml:"Description,omitempty"`
|
Description string `xml:"Description,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,7 +566,7 @@ type Catalog struct {
|
|||||||
DateCreated string `xml:"DateCreated"`
|
DateCreated string `xml:"DateCreated"`
|
||||||
Description string `xml:"Description"`
|
Description string `xml:"Description"`
|
||||||
IsPublished bool `xml:"IsPublished"`
|
IsPublished bool `xml:"IsPublished"`
|
||||||
Link []*Link `xml:"Link"`
|
Link LinkList `xml:"Link"`
|
||||||
Owner *Owner `xml:"Owner,omitempty"`
|
Owner *Owner `xml:"Owner,omitempty"`
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
||||||
VersionNumber int64 `xml:"VersionNumber"`
|
VersionNumber int64 `xml:"VersionNumber"`
|
||||||
@ -580,7 +580,7 @@ type Catalog struct {
|
|||||||
type Owner struct {
|
type Owner struct {
|
||||||
HREF string `xml:"href,attr,omitempty"`
|
HREF string `xml:"href,attr,omitempty"`
|
||||||
Type string `xml:"type,attr,omitempty"`
|
Type string `xml:"type,attr,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
User *Reference `xml:"User"`
|
User *Reference `xml:"User"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ type File struct {
|
|||||||
BytesTransferred int64 `xml:"bytesTransferred,attr,omitempty"`
|
BytesTransferred int64 `xml:"bytesTransferred,attr,omitempty"`
|
||||||
Checksum string `xml:"checksum,attr,omitempty"`
|
Checksum string `xml:"checksum,attr,omitempty"`
|
||||||
Description string `xml:"Description,omitempty"`
|
Description string `xml:"Description,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -644,7 +644,7 @@ type VMCapabilities struct {
|
|||||||
HREF string `xml:"href,attr,omitempty"`
|
HREF string `xml:"href,attr,omitempty"`
|
||||||
Type string `xml:"type,attr,omitempty"`
|
Type string `xml:"type,attr,omitempty"`
|
||||||
CPUHotAddEnabled bool `xml:"CpuHotAddEnabled,omitempty"`
|
CPUHotAddEnabled bool `xml:"CpuHotAddEnabled,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
MemoryHotAddEnabled bool `xml:"MemoryHotAddEnabled,omitempty"`
|
MemoryHotAddEnabled bool `xml:"MemoryHotAddEnabled,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -656,7 +656,7 @@ type VMCapabilities struct {
|
|||||||
type VMs struct {
|
type VMs struct {
|
||||||
HREF string `xml:"href,attr,omitempty"`
|
HREF string `xml:"href,attr,omitempty"`
|
||||||
Type string `xml:"type,attr,omitempty"`
|
Type string `xml:"type,attr,omitempty"`
|
||||||
Link []*Link `xml:"Link,omitempty"`
|
Link LinkList `xml:"Link,omitempty"`
|
||||||
VMReference []*Reference `xml:"VmReference,omitempty"`
|
VMReference []*Reference `xml:"VmReference,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -754,7 +754,7 @@ type VApp struct {
|
|||||||
Deployed bool `xml:"deployed,attr,omitempty"` // True if the virtual machine is deployed.
|
Deployed bool `xml:"deployed,attr,omitempty"` // True if the virtual machine is deployed.
|
||||||
OvfDescriptorUploaded bool `xml:"ovfDescriptorUploaded,attr,omitempty"` // Read-only indicator that the OVF descriptor for this vApp has been uploaded.
|
OvfDescriptorUploaded bool `xml:"ovfDescriptorUploaded,attr,omitempty"` // Read-only indicator that the OVF descriptor for this vApp has been uploaded.
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
||||||
Description string `xml:"Description,omitempty"` // Optional description.
|
Description string `xml:"Description,omitempty"` // Optional description.
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
||||||
Files *FilesList `xml:"Files,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
Files *FilesList `xml:"Files,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
||||||
@ -851,7 +851,7 @@ type VAppTemplate struct {
|
|||||||
OvfDescriptorUploaded string `xml:"ovfDescriptorUploaded,attr,omitempty"` // True if the OVF descriptor for this template has been uploaded.
|
OvfDescriptorUploaded string `xml:"ovfDescriptorUploaded,attr,omitempty"` // True if the OVF descriptor for this template has been uploaded.
|
||||||
GoldMaster bool `xml:"goldMaster,attr,omitempty"` // True if this template is a gold master.
|
GoldMaster bool `xml:"goldMaster,attr,omitempty"` // True if this template is a gold master.
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
||||||
Description string `xml:"Description,omitempty"` // Optional description.
|
Description string `xml:"Description,omitempty"` // Optional description.
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
||||||
Files *FilesList `xml:"Files,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
Files *FilesList `xml:"Files,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
||||||
@ -894,7 +894,7 @@ type VM struct {
|
|||||||
NeedsCustomization bool `xml:"needsCustomization,attr,omitempty"` // True if this virtual machine needs customization.
|
NeedsCustomization bool `xml:"needsCustomization,attr,omitempty"` // True if this virtual machine needs customization.
|
||||||
NestedHypervisorEnabled bool `xml:"nestedHypervisorEnabled,attr,omitempty"` // True if hardware-assisted CPU virtualization capabilities in the host should be exposed to the guest operating system.
|
NestedHypervisorEnabled bool `xml:"nestedHypervisorEnabled,attr,omitempty"` // True if hardware-assisted CPU virtualization capabilities in the host should be exposed to the guest operating system.
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
||||||
Description string `xml:"Description,omitempty"` // Optional description.
|
Description string `xml:"Description,omitempty"` // Optional description.
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
||||||
Files *FilesList `xml:"FilesList,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
Files *FilesList `xml:"FilesList,omitempty"` // Represents a list of files to be transferred (uploaded or downloaded). Each File in the list is part of the ResourceEntity.
|
||||||
@ -1055,7 +1055,7 @@ type GuestCustomizationSection struct {
|
|||||||
ResetPasswordRequired bool `xml:"ResetPasswordRequired,omitempty"` // True if the administrator password for this virtual machine must be reset after first use.
|
ResetPasswordRequired bool `xml:"ResetPasswordRequired,omitempty"` // True if the administrator password for this virtual machine must be reset after first use.
|
||||||
CustomizationScript string `xml:"CustomizationScript,omitempty"` // Script to run on guest customization. The entire script must appear in this element. Use the XML entity to represent a newline. Unicode characters can be represented in the form &#xxxx; where xxxx is the character number.
|
CustomizationScript string `xml:"CustomizationScript,omitempty"` // Script to run on guest customization. The entire script must appear in this element. Use the XML entity to represent a newline. Unicode characters can be represented in the form &#xxxx; where xxxx is the character number.
|
||||||
ComputerName string `xml:"ComputerName,omitempty"` // Computer name to assign to this virtual machine.
|
ComputerName string `xml:"ComputerName,omitempty"` // Computer name to assign to this virtual machine.
|
||||||
Link []*Link `xml:"Link,omitempty"` // A link to an operation on this section.
|
Link LinkList `xml:"Link,omitempty"` // A link to an operation on this section.
|
||||||
}
|
}
|
||||||
|
|
||||||
// InstantiateVAppTemplateParams represents vApp template instantiation parameters.
|
// InstantiateVAppTemplateParams represents vApp template instantiation parameters.
|
||||||
@ -1098,7 +1098,7 @@ type EdgeGateway struct {
|
|||||||
Name string `xml:"name,attr"` // The name of the entity.
|
Name string `xml:"name,attr"` // The name of the entity.
|
||||||
Status int `xml:"status,attr,omitempty"` // Creation status of the gateway. One of: 0 (The gateway is still being created) 1 (The gateway is ready) -1 (There was an error while creating the gateway).
|
Status int `xml:"status,attr,omitempty"` // Creation status of the gateway. One of: 0 (The gateway is still being created) 1 (The gateway is ready) -1 (There was an error while creating the gateway).
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A link to an operation on this section.
|
Link LinkList `xml:"Link,omitempty"` // A link to an operation on this section.
|
||||||
Description string `xml:"Description,omitempty"` // Optional description.
|
Description string `xml:"Description,omitempty"` // Optional description.
|
||||||
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
Tasks *TasksInProgress `xml:"Tasks,omitempty"` // A list of queued, running, or recently completed tasks associated with this entity.
|
||||||
Configuration *GatewayConfiguration `xml:"Configuration"` // Gateway configuration.
|
Configuration *GatewayConfiguration `xml:"Configuration"` // Gateway configuration.
|
||||||
@ -1588,7 +1588,7 @@ type QueryResultEdgeGatewayRecordsType struct {
|
|||||||
PageSize int `xml:"pageSize,attr,omitempty"` // Page size, as a number of records or references.
|
PageSize int `xml:"pageSize,attr,omitempty"` // Page size, as a number of records or references.
|
||||||
Total float64 `xml:"total,attr,omitempty"` // Total number of records or references in the container.
|
Total float64 `xml:"total,attr,omitempty"` // Total number of records or references in the container.
|
||||||
// Elements
|
// Elements
|
||||||
Link []*Link `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
Link LinkList `xml:"Link,omitempty"` // A reference to an entity or operation associated with this object.
|
||||||
EdgeGatewayRecord *QueryResultEdgeGatewayRecordType `xml:"EdgeGatewayRecord"` // A record representing a query result.
|
EdgeGatewayRecord *QueryResultEdgeGatewayRecordType `xml:"EdgeGatewayRecord"` // A record representing a query result.
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@ -13,7 +13,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VApp struct {
|
type VApp struct {
|
@ -2,13 +2,13 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/xml"
|
"encoding/xml"
|
||||||
"fmt"
|
"fmt"
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VAppTemplate struct {
|
type VAppTemplate struct {
|
@ -2,14 +2,14 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Vdc struct {
|
type Vdc struct {
|
||||||
@ -60,12 +60,14 @@ func (v *Vdc) Refresh() error {
|
|||||||
|
|
||||||
// Empty struct before a new unmarshal, otherwise we end up with duplicate
|
// Empty struct before a new unmarshal, otherwise we end up with duplicate
|
||||||
// elements in slices.
|
// elements in slices.
|
||||||
v.Vdc = &types.Vdc{}
|
unmarshalledVdc := &types.Vdc{}
|
||||||
|
|
||||||
if err = decodeBody(resp, v.Vdc); err != nil {
|
if err = decodeBody(resp, unmarshalledVdc); err != nil {
|
||||||
return fmt.Errorf("error decoding Edge Gateway response: %s", err)
|
return fmt.Errorf("error decoding vdc response: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
v.Vdc = unmarshalledVdc
|
||||||
|
|
||||||
// The request was successful
|
// The request was successful
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
* Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package govcd
|
package govcloudair
|
||||||
|
|
||||||
import (
|
import (
|
||||||
// "bytes"
|
// "bytes"
|
||||||
@ -13,7 +13,7 @@ import (
|
|||||||
// "os"
|
// "os"
|
||||||
// "strconv"
|
// "strconv"
|
||||||
|
|
||||||
types "github.com/hmrc/vmware-govcd/types/v56"
|
types "github.com/ukcloud/govcloudair/types/v56"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VM struct {
|
type VM struct {
|
26
vendor/vendor.json
vendored
26
vendor/vendor.json
vendored
@ -1807,20 +1807,6 @@
|
|||||||
"revision": "6e9aa4b1a8a8b735ad14b4f1c9542ef183e82dc2",
|
"revision": "6e9aa4b1a8a8b735ad14b4f1c9542ef183e82dc2",
|
||||||
"revisionTime": "2016-08-11T07:26:26Z"
|
"revisionTime": "2016-08-11T07:26:26Z"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"checksumSHA1": "IHwZNoO/SD4MDwPWapLncZvDbTU=",
|
|
||||||
"comment": "v0.0.2-37-g5cd82f0",
|
|
||||||
"path": "github.com/hmrc/vmware-govcd",
|
|
||||||
"revision": "86a1deb871c34d97042b74c8a0d61a3bba7e84ff",
|
|
||||||
"revisionTime": "2016-09-07T09:41:58Z"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"checksumSHA1": "kTsVJblC91gsKgjfnFNgPmPswio=",
|
|
||||||
"comment": "v0.0.2-37-g5cd82f0",
|
|
||||||
"path": "github.com/hmrc/vmware-govcd/types/v56",
|
|
||||||
"revision": "86a1deb871c34d97042b74c8a0d61a3bba7e84ff",
|
|
||||||
"revisionTime": "2016-09-07T09:41:58Z"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"checksumSHA1": "hwGdeQbcfc2RvIQS5wAaYRKJDd4=",
|
"checksumSHA1": "hwGdeQbcfc2RvIQS5wAaYRKJDd4=",
|
||||||
"comment": "0.2.1-3-gb1859b1",
|
"comment": "0.2.1-3-gb1859b1",
|
||||||
@ -2469,6 +2455,18 @@
|
|||||||
"revision": "faddd6128c66c4708f45fdc007f575f75e592a3c",
|
"revision": "faddd6128c66c4708f45fdc007f575f75e592a3c",
|
||||||
"revisionTime": "2016-09-28T01:52:44Z"
|
"revisionTime": "2016-09-28T01:52:44Z"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "y4ihcZrjJdyQDnsKLelo9/1MjqE=",
|
||||||
|
"path": "github.com/ukcloud/govcloudair",
|
||||||
|
"revision": "9076b4221ebf430944c716c798e904e00cbaa89d",
|
||||||
|
"revisionTime": "2017-01-31T00:00:54Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"checksumSHA1": "CridJfrpcrjMdXnf7PbqA/+7wuY=",
|
||||||
|
"path": "github.com/ukcloud/govcloudair/types/v56",
|
||||||
|
"revision": "9076b4221ebf430944c716c798e904e00cbaa89d",
|
||||||
|
"revisionTime": "2017-01-31T00:00:54Z"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "CdE9OUEGLn2pAv1UMuM5rSlaUpM=",
|
"checksumSHA1": "CdE9OUEGLn2pAv1UMuM5rSlaUpM=",
|
||||||
"path": "github.com/vincent-petithory/dataurl",
|
"path": "github.com/vincent-petithory/dataurl",
|
||||||
|
Loading…
Reference in New Issue
Block a user