Skip to content
This repository has been archived by the owner on Sep 14, 2021. It is now read-only.

Commit

Permalink
Make network optional (for ETRI?)
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-yuen committed Dec 17, 2014
1 parent aa7ee9c commit f5fc9b9
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -404,13 +404,17 @@ private void runDeployment(int clientsToDeploy) throws Exception {
ComputeService computeService = genericOpenStackApi.getComputeService();
// have to use the specific api here to designate a keypair, weird
TemplateOptions templateOptions = NovaTemplateOptions.Builder
.networks(Lists.newArrayList(youxiaConfig.getString(DEPLOYER_OPENSTACK_NETWORK_ID)))
.securityGroupNames(youxiaConfig.getString(DEPLOYER_OPENSTACK_SECURITY_GROUP))
.userMetadata("Name", "instance_managed_by_" + youxiaConfig.getString(ConfigTools.YOUXIA_MANAGED_TAG))
.userMetadata(ConfigTools.YOUXIA_MANAGED_TAG, youxiaConfig.getString(ConfigTools.YOUXIA_MANAGED_TAG))
.userMetadata(Constants.STATE_TAG, Constants.STATE.SETTING_UP.toString()).blockUntilRunning(true)
.keyPairName(youxiaConfig.getString(ConfigTools.YOUXIA_OPENSTACK_KEY_NAME)).blockOnComplete(true);

if (youxiaConfig.getString(DEPLOYER_OPENSTACK_NETWORK_ID) != null
&& !youxiaConfig.getString(DEPLOYER_OPENSTACK_NETWORK_ID).isEmpty()) {
templateOptions.networks(Lists.newArrayList(youxiaConfig.getString(DEPLOYER_OPENSTACK_NETWORK_ID)));
}

Template template = computeService
.templateBuilder()
.imageId(
Expand Down

0 comments on commit f5fc9b9

Please sign in to comment.