@@ -45,10 +45,10 @@ const (
45
45
)
46
46
47
47
type InstanceInfo struct {
48
- project string
49
- zone string
50
- name string
51
- machine string
48
+ project string
49
+ zone string
50
+ name string
51
+ machineType string
52
52
53
53
// External IP is filled in after instance creation
54
54
externalIP string
@@ -68,12 +68,12 @@ func (i *InstanceInfo) GetNodeID() string {
68
68
return common .CreateNodeID (i .project , i .zone , i .name )
69
69
}
70
70
71
- func CreateInstanceInfo (project , instanceZone , name , machine string , cs * compute.Service ) (* InstanceInfo , error ) {
71
+ func CreateInstanceInfo (project , instanceZone , name , machineType string , cs * compute.Service ) (* InstanceInfo , error ) {
72
72
return & InstanceInfo {
73
- project : project ,
74
- zone : instanceZone ,
75
- name : name ,
76
- machine : machine ,
73
+ project : project ,
74
+ zone : instanceZone ,
75
+ name : name ,
76
+ machineType : machineType ,
77
77
78
78
computeService : cs ,
79
79
}, nil
@@ -94,7 +94,7 @@ func (i *InstanceInfo) CreateOrGetInstance(imageURL, serviceAccount string) erro
94
94
95
95
inst := & compute.Instance {
96
96
Name : i .name ,
97
- MachineType : machineType (i .zone , i .machine ),
97
+ MachineType : machineType (i .zone , i .machineType ),
98
98
NetworkInterfaces : []* compute.NetworkInterface {
99
99
{
100
100
AccessConfigs : []* compute.AccessConfig {
@@ -215,8 +215,8 @@ func getTimestamp() string {
215
215
return fmt .Sprintf (time .Now ().Format (timestampFormat ))
216
216
}
217
217
218
- func machineType (zone , machine string ) string {
219
- return fmt .Sprintf ("zones/%s/machineTypes/%s" , zone , machine )
218
+ func machineType (zone , machineType string ) string {
219
+ return fmt .Sprintf ("zones/%s/machineTypes/%s" , zone , machineType )
220
220
}
221
221
222
222
// Create default SSH filewall rule if it does not exist
0 commit comments