[
https://issues.apache.org/jira/browse/JCLOUDS-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761840#comment-13761840
]
Everett Toews commented on JCLOUDS-273:
---------------------------------------
Hi Maty,
Andrew's point is that your code shouldn't be calling the constructor directly.
It's protected so unless you've subclassed it, I'm not sure how you're even
calling it. When you use Server.Builder the metadata has an empty Map by
default [1] so it won't throw an exception when Server.Builder.build() is
called.
In fact, it should be kind of a really rare thing to need to be able to use a
Server.Builder object yourself. Normally you'd get a Server object by calling
ServerApi.get() or a ServerCreated object by calling ServerApi.create().
[1]
https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/Server.java#L101
> JClouds OpenStack Nova v2.0 Server domian doesn't follow OpenStack formal
> documentation
> ---------------------------------------------------------------------------------------
>
> Key: JCLOUDS-273
> URL: https://issues.apache.org/jira/browse/JCLOUDS-273
> Project: jclouds
> Issue Type: Bug
> Components: jclouds-compute
> Reporter: Maty Grosz
>
> Using class org.jclouds.openstack.nova.v2_0.domain.Server – look at the
> constructor “protected Server(… parameters)”:
> OpenStack formal documentation says that the metadata attribute is optional.
> The constructor above calls to(checkNotNull(metadata, "metadata")) – and
> fails.
> No need to check that in this case.
--
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