You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Ignasi Barrera (JIRA)" <ji...@apache.org> on 2013/09/06 09:41:55 UTC
[jira] [Commented] (JCLOUDS-266) softlayer: Use alpha region ids,
instead of numeric (ams01 vs 265592)
[ https://issues.apache.org/jira/browse/JCLOUDS-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13760021#comment-13760021 ]
Ignasi Barrera commented on JCLOUDS-266:
----------------------------------------
Hi [~jdtoy], I'm not a SoftLayer expert, but taking a look at the code, it seems that it could be a simple change (given that names are unique, otherwise names shouldn't be used for the locationId).
This code [1] is the one used to transform a SoftLayer Datacenter object into a jclouds Location, so if you change that line to use the "datacenter.getName()" instead, jclouds will take that as the locationId. Again, I am not an expert in SoftLayer and perhaps someone else has a better advice, but I'd try that change. Would you mind trying to change that and contributing [2] back the change?
[1] https://github.com/jclouds/jclouds/blob/master/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/DatacenterToLocation.java#L53
[2] https://wiki.apache.org/jclouds/How%20to%20Contribute
> softlayer: Use alpha region ids, instead of numeric (ams01 vs 265592)
> ---------------------------------------------------------------------
>
> Key: JCLOUDS-266
> URL: https://issues.apache.org/jira/browse/JCLOUDS-266
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-compute
> Environment: api.softlayer.com/rest/v3/
> Reporter: David Toy
> Priority: Minor
>
> Currently when using softlayer regions must be specified using a numeric 'locationId'.
> In addition to the numeric id SoftLayer make a human readable 'name' available for each region.
> Can jclouds:softlayer switch to using the easier alphanumeric name to specify a region?
> e.g. jclouds.softlayer:ams01, rather than jclouds.softlayer:265592.
> JSON from SoftLayer:
> {"id":265592,"longName":"Amsterdam 1","name":"ams01","locationAddress":{"accountId":1,"address1":"Paul van Vlissingenstraat 16","city":"Amsterdam","contactName":"SoftLayer","country":"NL","description":"Amsterdam - AMS01","id":3322,"isActive":1,"locationId":265592,"postalCode":"1096 BK","type":{"createDate":"2010-04-06T04:49:15+01:00","id":1,"keyName":"SOFTLAYER_DATACENTER","name":"SoftLayer Datacenter (accepts customer DTS shipments)"}},"regions":[{"description":"AMS01 - Amsterdam - Western Europe","keyname":"AMSTERDAM","sortOrder":11}]}]}"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira