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) Init() error
- func (vc *VmwareSource) InitClusters(ctx context.Context, containerView *view.ContainerView) error
- func (vc *VmwareSource) InitDataCenters(ctx context.Context, containerView *view.ContainerView) error
- func (vc *VmwareSource) InitDisks(ctx context.Context, containerView *view.ContainerView) error
- func (vc *VmwareSource) InitHosts(ctx context.Context, containerView *view.ContainerView) error
- func (vc *VmwareSource) InitNetworks(ctx context.Context, containerView *view.ContainerView) error
- func (vc *VmwareSource) InitVms(ctx context.Context, containerView *view.ContainerView) 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 map[string]*DistributedPortgroupData // Portgroup.key -> PortgroupData Vid2Name map[int]string // Helper map, for quickly obtaining name of the vid HostVirtualSwitches map[string]map[string]*HostVirtualSwitchData // hostName -> VSwitchName-> VSwitchData HostProxySwitches map[string]map[string]*HostProxySwitchData // hostName -> PSwitchName -> HostPortgroups map[string]map[string]*HostPortgroupData // hostname -> Portgroup.Spec.Name -> 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 // Netbox relations DatacenterClusterGroupRelations map[string]string ClusterSiteRelations map[string]string ClusterTenantRelations map[string]string HostTenantRelations map[string]string HostSiteRelations map[string]string VMTenantRelations map[string]string VlanGroupRelations map[string]string VlanTenantRelations map[string]string // Mappings of custom fields to contacts CustomFieldMappings map[string]string }
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) Init ¶
func (vc *VmwareSource) Init() error
func (*VmwareSource) InitClusters ¶
func (vc *VmwareSource) InitClusters(ctx context.Context, containerView *view.ContainerView) error
func (*VmwareSource) InitDataCenters ¶
func (vc *VmwareSource) InitDataCenters(ctx context.Context, containerView *view.ContainerView) error
func (*VmwareSource) InitDisks ¶
func (vc *VmwareSource) InitDisks(ctx context.Context, containerView *view.ContainerView) error
func (*VmwareSource) InitHosts ¶
func (vc *VmwareSource) InitHosts(ctx context.Context, containerView *view.ContainerView) error
func (*VmwareSource) InitNetworks ¶
func (vc *VmwareSource) InitNetworks(ctx context.Context, containerView *view.ContainerView) error
In vsphere we get vlans from DistributedVirtualPortgroups.
func (*VmwareSource) InitVms ¶
func (vc *VmwareSource) InitVms(ctx context.Context, containerView *view.ContainerView) 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.