You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2015/05/22 11:04:58 UTC
[13/23] incubator-brooklyn git commit: support `domainName` as a
location config property (softlayer only)
support `domainName` as a location config property (softlayer only)
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/b4518dd5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/b4518dd5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/b4518dd5
Branch: refs/heads/master
Commit: b4518dd5c1e6075a2f243e0f790f0be6f0a55773
Parents: 3ed4459
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri May 8 17:19:19 2015 +0100
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri May 8 18:51:50 2015 +0100
----------------------------------------------------------------------
.../java/brooklyn/location/cloud/CloudLocationConfig.java | 3 +++
docs/guide/ops/locations/index.md | 3 +++
.../main/java/brooklyn/location/jclouds/JcloudsLocation.java | 8 ++++++++
3 files changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b4518dd5/core/src/main/java/brooklyn/location/cloud/CloudLocationConfig.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/cloud/CloudLocationConfig.java b/core/src/main/java/brooklyn/location/cloud/CloudLocationConfig.java
index 39ef6fa..6831726 100644
--- a/core/src/main/java/brooklyn/location/cloud/CloudLocationConfig.java
+++ b/core/src/main/java/brooklyn/location/cloud/CloudLocationConfig.java
@@ -98,4 +98,7 @@ public interface CloudLocationConfig {
public static final ConfigKey<Object> MIN_DISK = new BasicConfigKey<Object>(Object.class, "minDisk",
"Minimum size of disk, either as string (100gb) or number of GB (100), for use in selecting the machine/hardware profile", null);
+ public static final ConfigKey<String> DOMAIN_NAME = new BasicConfigKey<String>(String.class, "domainName",
+ "DNS domain where the host should be created, e.g. yourdomain.com (selected clouds only)", null);
+
}
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b4518dd5/docs/guide/ops/locations/index.md
----------------------------------------------------------------------
diff --git a/docs/guide/ops/locations/index.md b/docs/guide/ops/locations/index.md
index 3c1f6b8..02e82bb 100644
--- a/docs/guide/ops/locations/index.md
+++ b/docs/guide/ops/locations/index.md
@@ -139,6 +139,9 @@ For more keys and more detail on the keys below, see
For all names, a random suffix will be appended to help guarantee uniqueness;
this can be removed by setting `vmNameSaltLength: 0`.
+- A DNS domain name where this host should be placed can be specified with `domainName`
+ (in selected clouds only)
+
- User metadata can be attached using the syntax `userMetadata: { key: value, key2: "value 2" }`
(or `userMetadata=key=value,key2="value 2"` in a properties file)
http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/b4518dd5/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
index 1118409..c74cfe2 100644
--- a/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/brooklyn/location/jclouds/JcloudsLocation.java
@@ -1065,6 +1065,14 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
public void apply(TemplateOptions t, ConfigBag props, Object v) {
t.networks((String)v);
}})
+ .put(DOMAIN_NAME, new CustomizeTemplateOptions() {
+ public void apply(TemplateOptions t, ConfigBag props, Object v) {
+ if (t instanceof SoftLayerTemplateOptions) {
+ ((SoftLayerTemplateOptions)t).domainName((String)v);
+ } else {
+ LOG.info("ignoring domain-name({}) in VM creation because not supported for cloud/type ({})", v, t);
+ }
+ }})
.put(TEMPLATE_OPTIONS, new CustomizeTemplateOptions() {
@Override
public void apply(TemplateOptions options, ConfigBag config, Object v) {