@@ -55,13 +55,17 @@ def load_config_yml(self, config_file: str) -> None:
55
55
self ._BIBIGRID_USE_MASTER_WITH_PUBLIC_IP = bibigrid_cfg .get (
56
56
"use_master_with_public_ip" , False
57
57
)
58
- self ._SUB_NETWORK = bibigrid_cfg [ "sub_network" ]
58
+ self ._SUB_NETWORK = bibigrid_cfg . get ( "sub_network" )
59
59
60
60
self ._BIBIGRID_LOCAL_DNS_LOOKUP = bibigrid_cfg .get ("localDnsLookup" , False )
61
61
self ._BIBIGRID_ANSIBLE_ROLES = bibigrid_cfg .get ("ansibleGalaxyRoles" , [])
62
62
63
63
openstack_cfg = cfg ["openstack" ]
64
- self ._NETWORK = openstack_cfg ["network" ]
64
+ self ._NETWORK = openstack_cfg .get ("network" )
65
+
66
+ if not self ._SUB_NETWORK and not self ._NETWORK :
67
+ logger .info ("No NETWORK or SUB_NETWORK provided for Bibigrid." )
68
+ return
65
69
self ._GATEWAY_IP = (
66
70
openstack_cfg .get ("internal_gateway_ip" ) or openstack_cfg ["gateway_ip" ]
67
71
)
@@ -250,7 +254,10 @@ def start_cluster(
250
254
"nfs" : True ,
251
255
"workerInstances" : worker_config ,
252
256
"sshUser" : "ubuntu" ,
253
- "subnet" : self ._SUB_NETWORK ,
257
+ "subnet" : self ._SUB_NETWORK if self ._SUB_NETWORK else "" ,
258
+ "network" : (
259
+ self ._NETWORK if self ._NETWORK and not self ._SUB_NETWORK else ""
260
+ ),
254
261
"waitForServices" : ["de.NBI_Bielefeld_environment.service" ],
255
262
"sshPublicKeys" : public_keys ,
256
263
"securityGroups" : [self ._DEFAULT_SECURITY_GROUP_NAME ],
0 commit comments