-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create HostAggregate #932
Conversation
…stack.common.ListResult<T>.first()
Hi @Cherry522, |
Hi @auhlig, |
ex) ServerPassword password = os.compute().servers().evacuate("1427b0a6-e6a1-496", EvacuateOptions.create().host("compute1").onSharedStorage(false)); System.out.println(password.getPassword());
…attach a port to a server.
You can use |
…)' in 'HostAggregate.java' and 'NovaHostAggregate.java'.
@auhlig
Does this means my tests is OK? |
It skipped the tests. Check your environment if you set a flag, etc. which could cause this and try again from project root. |
@auhlig
What should I do to run a test? |
Maven invokes that. I guess the error is related to your local setup. A default connector should be configured. |
|
I write some test code,but I down't know how to test it.
/openstack4j-core-test/src/main/resources/compute/aggregates.json :
|
Yes.
project root is
project root is
Might work according to maven documentation. Never tried just running a single test. |
Hi @auhlig, |
Yeah 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @Cherry522.
Just a couple of minor comments. Shouldn't take long to fix.
Many thanks for all the work!
I guess we can merge afterwards, if @vinodborole or @gondor does not object?
@@ -32,6 +32,11 @@ public NovaInterfaceAttachment() { | |||
public NovaInterfaceAttachment(String portId) { | |||
this.portId = portId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add null check checkNotNull(portId);
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public List<? extends SecurityGroup> list(Map<String,Object> params){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null check
* {@inheritDoc} | ||
*/ | ||
@Override | ||
public List<? extends SecurityGroupRule> list(Map<String,Object> param){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add checkNotNull(param);
* @see org.openstack4j.api.storage.BlockVolumeService#attach(java.lang.String, java.lang.String, java.lang.String, java.lang.String) | ||
*/ | ||
@Override | ||
public ActionResponse attach(String volumeId, String instanceId, String mountpoint, String hostName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null check as prerequisite for each argument before call
* @see org.openstack4j.api.storage.BlockVolumeService#forceDetach(java.lang.String, java.lang.String, java.lang.String) | ||
*/ | ||
@Override | ||
public ActionResponse forceDetach(String volumeId, String initiator, String attachmentId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
null check
push Just in case you missed @Cherry522. |
Closing in favor of #1017 |
I just tested the 3.0.4-SNAPSHOT version, but it still cannot create HostAggregate.
Error messages:
org.openstack4j.api.exceptions.ClientResponseException: Invalid input for field/attribute aggregate. Value: {u'deleted': False, u'name': u'aggregate_cy_test', u'avaiablityZone': u'uec_zone_1', u'availability_zone': u'uec_zone_1'}. Additional properties are not allowed (u'deleted', u'avaiablityZone' were unexpected)
I modified the source code to solve this problem.