move makeHostUrl to gce_instances (only used there)
This commit is contained in:
@@ -67,6 +67,11 @@ func getZone(n *v1.Node) string {
|
|||||||
return zone
|
return zone
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func makeHostURL(projectsApiEndpoint, projectID, zone, host string) string {
|
||||||
|
host = canonicalizeInstanceName(host)
|
||||||
|
return projectsApiEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/")
|
||||||
|
}
|
||||||
|
|
||||||
// ToInstanceReferences returns instance references by links
|
// ToInstanceReferences returns instance references by links
|
||||||
func (gce *GCECloud) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) {
|
func (gce *GCECloud) ToInstanceReferences(zone string, instanceNames []string) (refs []*compute.InstanceReference) {
|
||||||
for _, ins := range instanceNames {
|
for _, ins := range instanceNames {
|
||||||
|
@@ -732,11 +732,6 @@ func nodeNames(nodes []*v1.Node) []string {
|
|||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeHostURL(projectsApiEndpoint, projectID, zone, host string) string {
|
|
||||||
host = canonicalizeInstanceName(host)
|
|
||||||
return projectsApiEndpoint + strings.Join([]string{projectID, "zones", zone, "instances", host}, "/")
|
|
||||||
}
|
|
||||||
|
|
||||||
func hostURLToComparablePath(hostURL string) string {
|
func hostURLToComparablePath(hostURL string) string {
|
||||||
idx := strings.Index(hostURL, "/zones/")
|
idx := strings.Index(hostURL, "/zones/")
|
||||||
if idx < 0 {
|
if idx < 0 {
|
||||||
|
Reference in New Issue
Block a user