Documentation ¶
Index ¶
- func MatchClusterToSite(ctx context.Context, nbi *inventory.NetboxInventory, clusterName string, ...) (*objects.Site, error)
- func MatchClusterToTenant(ctx context.Context, nbi *inventory.NetboxInventory, clusterName string, ...) (*objects.Tenant, error)
- func MatchHostToSite(ctx context.Context, nbi *inventory.NetboxInventory, hostName string, ...) (*objects.Site, error)
- func MatchHostToTenant(ctx context.Context, nbi *inventory.NetboxInventory, hostName string, ...) (*objects.Tenant, error)
- func MatchVMToTenant(ctx context.Context, nbi *inventory.NetboxInventory, vmName string, ...) (*objects.Tenant, error)
- func MatchVlanToGroup(ctx context.Context, nbi *inventory.NetboxInventory, vlanName string, ...) (*objects.VlanGroup, error)
- func MatchVlanToTenant(ctx context.Context, nbi *inventory.NetboxInventory, vlanName string, ...) (*objects.Tenant, error)
- type Config
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchClusterToSite ¶ added in v0.2.2
func MatchClusterToSite(ctx context.Context, nbi *inventory.NetboxInventory, clusterName string, clusterSiteRelations map[string]string) (*objects.Site, error)
Function that matches cluster to tenant using regexRelationsMap.
In case there is no match or regexRelations is nil, it will return nil.
func MatchClusterToTenant ¶ added in v0.2.2
func MatchClusterToTenant(ctx context.Context, nbi *inventory.NetboxInventory, clusterName string, clusterTenantRelations map[string]string) (*objects.Tenant, error)
Function that matches cluster to tenant using regexRelationsMap.
In case there is no match or regexRelations is nil, it will return nil.
func MatchHostToSite ¶
func MatchHostToSite(ctx context.Context, nbi *inventory.NetboxInventory, hostName string, hostSiteRelations map[string]string) (*objects.Site, error)
Function that matches Host from hostName to Site using hostSiteRelations.
In case that there is not match or hostSiteRelations is nil, it will return default site.
func MatchHostToTenant ¶
func MatchHostToTenant(ctx context.Context, nbi *inventory.NetboxInventory, hostName string, hostTenantRelations map[string]string) (*objects.Tenant, error)
Function that matches Host from hostName to Tenant using hostTenantRelations.
In case that there is not match or hostTenantRelations is nil, it will return nil.
func MatchVMToTenant ¶
func MatchVMToTenant(ctx context.Context, nbi *inventory.NetboxInventory, vmName string, vmTenantRelations map[string]string) (*objects.Tenant, error)
Function that matches Vm from vmName to Tenant using vmTenantRelations.
In case that there is not match or hostTenantRelations is nil, it will return nil.
func MatchVlanToGroup ¶
func MatchVlanToGroup(ctx context.Context, nbi *inventory.NetboxInventory, vlanName string, regexRelations map[string]string) (*objects.VlanGroup, error)
Function that matches vlanName to vlanGroupName using regexRelationsMap.
In case there is no match or regexRelations is nil, it will return default VlanGroup.
func MatchVlanToTenant ¶
func MatchVlanToTenant(ctx context.Context, nbi *inventory.NetboxInventory, vlanName string, vlanTenantRelations map[string]string) (*objects.Tenant, error)
Function that matches vlanName to tenant using vlanTenantRelations regex relations map.
In case there is no match or vlanTenantRelations is nil, it will return nil.