Skip to content

Commit 8fb2bb5

Browse files
kinjelomramonskie
authored andcommitted
new flags missing implementation
1 parent 6e62ffa commit 8fb2bb5

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed

acceptance-tests/config.go

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,21 @@ type Config struct {
2525
GCPServiceAccountKey string
2626
GCPRegion string
2727

28-
VSphereNetwork string
29-
VSphereSubnetCIDR string
30-
VSphereVCenterIP string
31-
VSphereVCenterUser string
32-
VSphereVCenterPassword string
33-
VSphereVCenterDC string
34-
VSphereVCenterCluster string
35-
VSphereVCenterRP string
36-
VSphereVCenterDS string
37-
VSphereVCenterDisks string
38-
VSphereVCenterVMs string
39-
VSphereVCenterTemplates string
28+
VSphereNetwork string
29+
VSphereSubnetCIDR string
30+
VSphereInternalGW string
31+
VSphereJumpboxIP string
32+
VSphereDirectorInternalIP string
33+
VSphereVCenterIP string
34+
VSphereVCenterUser string
35+
VSphereVCenterPassword string
36+
VSphereVCenterDC string
37+
VSphereVCenterCluster string
38+
VSphereVCenterRP string
39+
VSphereVCenterDS string
40+
VSphereVCenterDisks string
41+
VSphereVCenterVMs string
42+
VSphereVCenterTemplates string
4043

4144
OpenStackAuthURL string
4245
OpenStackAZ string
@@ -237,18 +240,21 @@ func loadConfigFromEnvVars() Config {
237240
GCPServiceAccountKey: os.Getenv("BBL_GCP_SERVICE_ACCOUNT_KEY"),
238241
GCPRegion: os.Getenv("BBL_GCP_REGION"),
239242

240-
VSphereNetwork: os.Getenv("BBL_VSPHERE_NETWORK"),
241-
VSphereSubnetCIDR: os.Getenv("BBL_VSPHERE_SUBNET_CIDR"),
242-
VSphereVCenterIP: os.Getenv("BBL_VSPHERE_VCENTER_IP"),
243-
VSphereVCenterUser: os.Getenv("BBL_VSPHERE_VCENTER_USER"),
244-
VSphereVCenterPassword: os.Getenv("BBL_VSPHERE_VCENTER_PASSWORD"),
245-
VSphereVCenterDC: os.Getenv("BBL_VSPHERE_VCENTER_DC"),
246-
VSphereVCenterCluster: os.Getenv("BBL_VSPHERE_VCENTER_CLUSTER"),
247-
VSphereVCenterRP: os.Getenv("BBL_VSPHERE_VCENTER_RP"),
248-
VSphereVCenterDS: os.Getenv("BBL_VSPHERE_VCENTER_DS"),
249-
VSphereVCenterDisks: os.Getenv("BBL_VSPHERE_VCENTER_DISKS"),
250-
VSphereVCenterVMs: os.Getenv("BBL_VSPHERE_VCENTER_VMS"),
251-
VSphereVCenterTemplates: os.Getenv("BBL_VSPHERE_VCENTER_TEMPLATES"),
243+
VSphereNetwork: os.Getenv("BBL_VSPHERE_NETWORK"),
244+
VSphereSubnetCIDR: os.Getenv("BBL_VSPHERE_SUBNET_CIDR"),
245+
VSphereInternalGW: os.Getenv("BBL_VSPHERE_INTERNAL_GW"),
246+
VSphereJumpboxIP: os.Getenv("BBL_VSPHERE_JUMPBOX_IP"),
247+
VSphereDirectorInternalIP: os.Getenv("BBL_VSPHERE_DIRECTOR_INTERNAL_IP"),
248+
VSphereVCenterIP: os.Getenv("BBL_VSPHERE_VCENTER_IP"),
249+
VSphereVCenterUser: os.Getenv("BBL_VSPHERE_VCENTER_USER"),
250+
VSphereVCenterPassword: os.Getenv("BBL_VSPHERE_VCENTER_PASSWORD"),
251+
VSphereVCenterDC: os.Getenv("BBL_VSPHERE_VCENTER_DC"),
252+
VSphereVCenterCluster: os.Getenv("BBL_VSPHERE_VCENTER_CLUSTER"),
253+
VSphereVCenterRP: os.Getenv("BBL_VSPHERE_VCENTER_RP"),
254+
VSphereVCenterDS: os.Getenv("BBL_VSPHERE_VCENTER_DS"),
255+
VSphereVCenterDisks: os.Getenv("BBL_VSPHERE_VCENTER_DISKS"),
256+
VSphereVCenterVMs: os.Getenv("BBL_VSPHERE_VCENTER_VMS"),
257+
VSphereVCenterTemplates: os.Getenv("BBL_VSPHERE_VCENTER_TEMPLATES"),
252258

253259
OpenStackAuthURL: os.Getenv("BBL_OPENSTACK_AUTH_URL"),
254260
OpenStackAZ: os.Getenv("BBL_OPENSTACK_AZ"),

config/global_flags.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,12 @@ type GlobalFlags struct {
2323
GCPServiceAccountKey string `long:"gcp-service-account-key" env:"BBL_GCP_SERVICE_ACCOUNT_KEY"`
2424
GCPRegion string `long:"gcp-region" env:"BBL_GCP_REGION"`
2525

26-
VSphereNetwork string `long:"vsphere-network" env:"BBL_VSPHERE_NETWORK"`
27-
VSphereSubnetCIDR string `long:"vsphere-subnet-cidr" env:"BBL_VSPHERE_SUBNET_CIDR"`
26+
VSphereNetwork string `long:"vsphere-network" env:"BBL_VSPHERE_NETWORK"`
27+
VSphereSubnetCIDR string `long:"vsphere-subnet-cidr" env:"BBL_VSPHERE_SUBNET_CIDR"`
28+
VSphereInternalGW string `long:"vsphere-internal-gw" env:"BBL_VSPHERE_INTERNAL_GW"`
29+
VSphereJumpboxIP string `long:"vsphere-jumpbox-ip" env:"BBL_VSPHERE_JUMPBOX_IP"`
30+
VSphereDirectorInternalIP string `long:"vsphere-director-internal-ip" env:"BBL_VSPHERE_DIRECTOR_INTERNAL_IP"`
31+
2832
VSphereVCenterCluster string `long:"vsphere-vcenter-cluster" env:"BBL_VSPHERE_VCENTER_CLUSTER"`
2933
VSphereVCenterDC string `long:"vsphere-vcenter-dc" env:"BBL_VSPHERE_VCENTER_DC"`
3034
VSphereVCenterDS string `long:"vsphere-vcenter-ds" env:"BBL_VSPHERE_VCENTER_DS"`

config/merger.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ func (m Merger) updateVSphereState(globalFlags GlobalFlags, state storage.State)
8989
copyFlagToState(globalFlags.VSphereNetwork, &state.VSphere.Network)
9090
copyFlagToState(globalFlags.VSphereVCenterDS, &state.VSphere.VCenterDS)
9191
copyFlagToState(globalFlags.VSphereSubnetCIDR, &state.VSphere.SubnetCIDR)
92+
copyFlagToState(globalFlags.VSphereInternalGW, &state.VSphere.InternalGW)
93+
copyFlagToState(globalFlags.VSphereJumpboxIP, &state.VSphere.JumpboxIP)
94+
copyFlagToState(globalFlags.VSphereDirectorInternalIP, &state.VSphere.DirectorInternalIP)
9295
copyFlagToStateWithDefault(globalFlags.VSphereVCenterDisks, &state.VSphere.VCenterDisks, globalFlags.VSphereNetwork)
9396
copyFlagToStateWithDefault(globalFlags.VSphereVCenterTemplates, &state.VSphere.VCenterTemplates, fmt.Sprintf("%s_templates", globalFlags.VSphereNetwork))
9497
copyFlagToStateWithDefault(globalFlags.VSphereVCenterVMs, &state.VSphere.VCenterVMs, fmt.Sprintf("%s_vms", globalFlags.VSphereNetwork))

0 commit comments

Comments
 (0)