code: func newInstanceDiscovery(provider *gophercloud.ProviderClient, opts *gophercloud.AuthOptions,
  	port int, region string, allTenants bool, l log.Logger) *InstanceDiscovery {
  	if l == nil {
  		l = log.NewNopLogger()
  	}
  	return &InstanceDiscovery{provider: provider, authOpts: opts,
  		region: region, port: port, allTenants: allTenants, logger: l}
  }
docs: // NewInstanceDiscovery returns a new instance discovery.