Remove multiple calls to CreateInstanceGroups by reusing results from a single call

This commit is contained in:
nikhiljindal 2017-09-11 20:29:49 -07:00
parent 0f4f5c97d4
commit 937cde666e
10 changed files with 68 additions and 75 deletions

View file

@ -353,3 +353,9 @@ func CompareLinks(l1, l2 string) bool {
// FakeIngressRuleValueMap is a convenience type used by multiple submodules
// that share the same testing methods.
type FakeIngressRuleValueMap map[string]string
// GetNamedPort creates the NamedPort API object for the given port.
func GetNamedPort(port int64) *compute.NamedPort {
// TODO: move port naming to namer
return &compute.NamedPort{Name: fmt.Sprintf("port%v", port), Port: port}
}