Documentation ¶
Overview ¶
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and *
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and *
* Copyright 2019 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and *
Index ¶
- Constants
- func ContextWithPseudoFlagset(ctx context.Context, client *govmomi.Client, spec *api.VsphereProviderSpec) context.Context
- func GetClientFromPseudoFlagset(ctx context.Context) *govmomi.Client
- func GetSpecFromPseudoFlagset(ctx context.Context) *api.VsphereProviderSpec
- type ClientFlag
- type ClusterFlag
- func (f *ClusterFlag) Cluster() (*object.ClusterComputeResource, error)
- func (f *ClusterFlag) ClusterIfSpecified() (*object.ClusterComputeResource, error)
- func (f *ClusterFlag) Names(ctx context.Context, refs []types.ManagedObjectReference) (map[types.ManagedObjectReference]string, error)
- func (f *ClusterFlag) ObjectList(ctx context.Context, kind string, names []string) ([]types.ManagedObjectReference, error)
- type DatacenterFlag
- func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)
- func (flag *DatacenterFlag) DatacenterIfSpecified() (*object.Datacenter, error)
- func (flag *DatacenterFlag) Finder(all ...bool) (*find.Finder, error)
- func (flag *DatacenterFlag) ManagedObject(ctx context.Context, arg string) (types.ManagedObjectReference, error)
- func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error)
- type DatastoreFlag
- func (f *DatastoreFlag) Args(args []string) []object.DatastorePath
- func (f *DatastoreFlag) Datastore() (*object.Datastore, error)
- func (flag *DatastoreFlag) DatastoreIfSpecified() (*object.Datastore, error)
- func (f *DatastoreFlag) DatastorePath(name string) (string, error)
- func (f *DatastoreFlag) Stat(ctx context.Context, file string) (types.BaseFileInfo, error)
- type FolderFlag
- type HostSystemFlag
- type NetworkFlag
- func (flag *NetworkFlag) Change(device types.BaseVirtualDevice, update types.BaseVirtualDevice)
- func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error)
- func (flag *NetworkFlag) IsSet() bool
- func (flag *NetworkFlag) Network() (object.NetworkReference, error)
- func (flag *NetworkFlag) Set(name string) error
- func (flag *NetworkFlag) SetSwitchUUID(uuid string) error
- func (flag *NetworkFlag) String() string
- type NotFoundError
- type ResourcePoolFlag
- type SearchFlag
- func (flag *SearchFlag) HostSystem() (*object.HostSystem, error)
- func (flag *SearchFlag) HostSystems(args []string) ([]*object.HostSystem, error)
- func (flag *SearchFlag) IsSet() bool
- func (flag *SearchFlag) SetByDatastorePath(path string)
- func (flag *SearchFlag) SetByInventoryPath(path string)
- func (flag *SearchFlag) SetByUUID(uuid string)
- func (flag *SearchFlag) VirtualApp() (*object.VirtualApp, error)
- func (flag *SearchFlag) VirtualApps(args []string) ([]*object.VirtualApp, error)
- func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error)
- func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error)
- type StoragePodFlag
- type VirtualMachineFlag
Constants ¶
const ( SearchVirtualMachines = iota + 1 SearchHosts SearchVirtualApps )
Variables ¶
This section is empty.
Functions ¶
func GetSpecFromPseudoFlagset ¶
func GetSpecFromPseudoFlagset(ctx context.Context) *api.VsphereProviderSpec
Types ¶
type ClientFlag ¶
type ClientFlag struct {
// contains filtered or unexported fields
}
func NewClientFlag ¶
func NewClientFlag(ctx context.Context) (*ClientFlag, context.Context)
type ClusterFlag ¶
type ClusterFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewClusterFlag ¶
func NewClusterFlag(ctx context.Context) (*ClusterFlag, context.Context)
func (*ClusterFlag) Cluster ¶
func (f *ClusterFlag) Cluster() (*object.ClusterComputeResource, error)
func (*ClusterFlag) ClusterIfSpecified ¶
func (f *ClusterFlag) ClusterIfSpecified() (*object.ClusterComputeResource, error)
func (*ClusterFlag) Names ¶
func (f *ClusterFlag) Names(ctx context.Context, refs []types.ManagedObjectReference) (map[types.ManagedObjectReference]string, error)
func (*ClusterFlag) ObjectList ¶
func (f *ClusterFlag) ObjectList(ctx context.Context, kind string, names []string) ([]types.ManagedObjectReference, error)
type DatacenterFlag ¶
type DatacenterFlag struct { *ClientFlag Name string // contains filtered or unexported fields }
func NewDatacenterFlag ¶
func NewDatacenterFlag(ctx context.Context) (*DatacenterFlag, context.Context)
func (*DatacenterFlag) Datacenter ¶
func (flag *DatacenterFlag) Datacenter() (*object.Datacenter, error)
func (*DatacenterFlag) DatacenterIfSpecified ¶
func (flag *DatacenterFlag) DatacenterIfSpecified() (*object.Datacenter, error)
func (*DatacenterFlag) Finder ¶
func (flag *DatacenterFlag) Finder(all ...bool) (*find.Finder, error)
func (*DatacenterFlag) ManagedObject ¶
func (flag *DatacenterFlag) ManagedObject(ctx context.Context, arg string) (types.ManagedObjectReference, error)
func (*DatacenterFlag) ManagedObjects ¶
func (flag *DatacenterFlag) ManagedObjects(ctx context.Context, args []string) ([]types.ManagedObjectReference, error)
type DatastoreFlag ¶
type DatastoreFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewCustomDatastoreFlag ¶
func NewCustomDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
NewCustomDatastoreFlag creates and returns a new DatastoreFlag without trying to retrieve an existing one from the specified context.
func NewDatastoreFlag ¶
func NewDatastoreFlag(ctx context.Context) (*DatastoreFlag, context.Context)
func (*DatastoreFlag) Args ¶
func (f *DatastoreFlag) Args(args []string) []object.DatastorePath
func (*DatastoreFlag) DatastoreIfSpecified ¶
func (flag *DatastoreFlag) DatastoreIfSpecified() (*object.Datastore, error)
func (*DatastoreFlag) DatastorePath ¶
func (f *DatastoreFlag) DatastorePath(name string) (string, error)
func (*DatastoreFlag) Stat ¶
func (f *DatastoreFlag) Stat(ctx context.Context, file string) (types.BaseFileInfo, error)
type FolderFlag ¶
type FolderFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewFolderFlag ¶
func NewFolderFlag(ctx context.Context) (*FolderFlag, context.Context)
func (*FolderFlag) FolderOrDefault ¶
func (flag *FolderFlag) FolderOrDefault(kind string) (*object.Folder, error)
type HostSystemFlag ¶
type HostSystemFlag struct { *ClientFlag *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewHostSystemFlag ¶
func NewHostSystemFlag(ctx context.Context) (*HostSystemFlag, context.Context)
func (*HostSystemFlag) HostNetworkSystem ¶
func (flag *HostSystemFlag) HostNetworkSystem() (*object.HostNetworkSystem, error)
func (*HostSystemFlag) HostSystem ¶
func (flag *HostSystemFlag) HostSystem() (*object.HostSystem, error)
func (*HostSystemFlag) HostSystemIfSpecified ¶
func (flag *HostSystemFlag) HostSystemIfSpecified() (*object.HostSystem, error)
type NetworkFlag ¶
type NetworkFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewNetworkFlag ¶
func NewNetworkFlag(ctx context.Context) (*NetworkFlag, context.Context)
func (*NetworkFlag) Change ¶
func (flag *NetworkFlag) Change(device types.BaseVirtualDevice, update types.BaseVirtualDevice)
Change applies update backing and hardware address changes to the given network device.
func (*NetworkFlag) Device ¶
func (flag *NetworkFlag) Device() (types.BaseVirtualDevice, error)
func (*NetworkFlag) IsSet ¶
func (flag *NetworkFlag) IsSet() bool
func (*NetworkFlag) Network ¶
func (flag *NetworkFlag) Network() (object.NetworkReference, error)
func (*NetworkFlag) Set ¶
func (flag *NetworkFlag) Set(name string) error
func (*NetworkFlag) SetSwitchUUID ¶ added in v0.4.0
func (flag *NetworkFlag) SetSwitchUUID(uuid string) error
func (*NetworkFlag) String ¶
func (flag *NetworkFlag) String() string
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type ResourcePoolFlag ¶
type ResourcePoolFlag struct { *DatacenterFlag // contains filtered or unexported fields }
func NewResourcePoolFlag ¶
func NewResourcePoolFlag(ctx context.Context) (*ResourcePoolFlag, context.Context)
func (*ResourcePoolFlag) ResourcePool ¶
func (flag *ResourcePoolFlag) ResourcePool() (*object.ResourcePool, error)
func (*ResourcePoolFlag) ResourcePoolIfSpecified ¶
func (flag *ResourcePoolFlag) ResourcePoolIfSpecified() (*object.ResourcePool, error)
type SearchFlag ¶
type SearchFlag struct { *ClientFlag *DatacenterFlag // contains filtered or unexported fields }
func NewSearchFlag ¶
func (*SearchFlag) HostSystem ¶
func (flag *SearchFlag) HostSystem() (*object.HostSystem, error)
func (*SearchFlag) HostSystems ¶
func (flag *SearchFlag) HostSystems(args []string) ([]*object.HostSystem, error)
func (*SearchFlag) IsSet ¶
func (flag *SearchFlag) IsSet() bool
func (*SearchFlag) SetByDatastorePath ¶
func (flag *SearchFlag) SetByDatastorePath(path string)
func (*SearchFlag) SetByInventoryPath ¶
func (flag *SearchFlag) SetByInventoryPath(path string)
func (*SearchFlag) SetByUUID ¶
func (flag *SearchFlag) SetByUUID(uuid string)
func (*SearchFlag) VirtualApp ¶
func (flag *SearchFlag) VirtualApp() (*object.VirtualApp, error)
func (*SearchFlag) VirtualApps ¶
func (flag *SearchFlag) VirtualApps(args []string) ([]*object.VirtualApp, error)
func (*SearchFlag) VirtualMachine ¶
func (flag *SearchFlag) VirtualMachine() (*object.VirtualMachine, error)
func (*SearchFlag) VirtualMachines ¶
func (flag *SearchFlag) VirtualMachines(args []string) ([]*object.VirtualMachine, error)
type StoragePodFlag ¶
type StoragePodFlag struct { *DatacenterFlag Name string // contains filtered or unexported fields }
func NewStoragePodFlag ¶
func NewStoragePodFlag(ctx context.Context) (*StoragePodFlag, context.Context)
func (*StoragePodFlag) Isset ¶
func (f *StoragePodFlag) Isset() bool
func (*StoragePodFlag) StoragePod ¶
func (f *StoragePodFlag) StoragePod() (*object.StoragePod, error)
type VirtualMachineFlag ¶
type VirtualMachineFlag struct { *ClientFlag *DatacenterFlag *SearchFlag // contains filtered or unexported fields }
func NewVirtualMachineFlag ¶
func NewVirtualMachineFlag(ctx context.Context) (*VirtualMachineFlag, context.Context)
func (*VirtualMachineFlag) VirtualMachine ¶
func (flag *VirtualMachineFlag) VirtualMachine() (*object.VirtualMachine, error)