Documentation
¶
Index ¶
- type DistributedPortgroupData
- type HostPortgroupData
- type HostProxySwitchData
- type HostVirtualSwitchData
- type NetworkData
- type VmwareSource
- func (vc *VmwareSource) CreateClusterDataCenterRelation(ctx context.Context, client *vim25.Client) error
- func (vc *VmwareSource) CreateCustomFieldRelation(ctx context.Context, client *vim25.Client) error
- func (vc *VmwareSource) CreateObjectTagsRelation(ctx context.Context, vim25client *vim25.Client, userInfo *url.Userinfo) error
- func (vc *VmwareSource) Init() error
- func (vc *VmwareSource) Sync(nbi *inventory.NetboxInventory) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HostPortgroupData ¶
type HostPortgroupData struct {
// contains filtered or unexported fields
}
type HostProxySwitchData ¶
type HostProxySwitchData struct {
// contains filtered or unexported fields
}
type HostVirtualSwitchData ¶
type HostVirtualSwitchData struct {
// contains filtered or unexported fields
}
type NetworkData ¶
type NetworkData struct { // DistributedVirtualPortgroups: Portgroup.key -> PortgroupData DistributedVirtualPortgroups map[string]*DistributedPortgroupData // Vid2Name is a Helper map, for quickly obtaining name of the vid Vid2Name map[int]string // HostVirtualSwitches: hostName -> VSwitchName-> VSwitchData HostVirtualSwitches map[string]map[string]*HostVirtualSwitchData // HostProxySwitches: hostName -> PSwitchName -> HostProxySwitchData HostProxySwitches map[string]map[string]*HostProxySwitchData // HostPortgroups: hostname -> Portgroup.Spec.Name -> HostPortgroupData HostPortgroups map[string]map[string]*HostPortgroupData }
type VmwareSource ¶
type VmwareSource struct { common.Config // Vmware API data initialized in init functions Disks map[string]mo.Datastore DataCenters map[string]mo.Datacenter Clusters map[string]mo.ClusterComputeResource Hosts map[string]mo.HostSystem Vms map[string]mo.VirtualMachine Networks NetworkData // Relations between objects "object_id": "object_id" Cluster2Datacenter map[string]string // ClusterKey -> DatacenterKey Host2Cluster map[string]string // HostKey -> ClusterKey VM2Host map[string]string // VmKey -> HostKey // CustomField2Name is a map of custom field ids to their names CustomFieldID2Name map[int32]string // Object2Tags is a map of object ids to their tags Object2Tags map[string][]*tags.Tag Object2NBTags map[string][]*objects.Tag // Created in sync function }
VmwareSource represents an vsphere source.
func (*VmwareSource) CreateClusterDataCenterRelation ¶
func (vc *VmwareSource) CreateClusterDataCenterRelation( ctx context.Context, client *vim25.Client, ) error
Currently we have to traverse the vsphere tree to get datacenter to cluster relation For other objects relations are available in with containerView.
func (*VmwareSource) CreateCustomFieldRelation ¶
Creates a map of custom field ids to their names.
func (*VmwareSource) CreateObjectTagsRelation ¶ added in v1.8.12
func (vc *VmwareSource) CreateObjectTagsRelation( ctx context.Context, vim25client *vim25.Client, userInfo *url.Userinfo, ) error
Creates a map of object ids to their tags. This uses the rest api since tags are not available in the containerView (see https://github.com/vmware/govmomi/issues/1825).
func (*VmwareSource) Init ¶
func (vc *VmwareSource) Init() error
func (*VmwareSource) Sync ¶
func (vc *VmwareSource) Sync(nbi *inventory.NetboxInventory) error
Function that syncs all data from oVirt to Netbox.
Click to show internal directories.
Click to hide internal directories.