-
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
add Evacuate Server (evacuate Action) #931
Conversation
ex) ServerPassword password = os.compute().servers().evacuate("1427b0a6-e6a1-496", EvacuateOptions.create().host("compute1").onSharedStorage(false)); System.out.println(password.getPassword());
Hi @taemin77, Could you also add a test to the PR? Maybe just a short unit test. Please take a look at the other tests in the |
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.
Hi, I add a test.
But I don't know exactly what this code - respondWith(JSON_SERVER_CREATE) is.
So I let it alone.
Could you help me finish this code?
All checks have failed? |
Hi @taemin77, |
@@ -67,7 +68,7 @@ protected Service service() { | |||
|
|||
@Test | |||
public void evacuateServer() throws Exception { | |||
respondWith(JSON_SERVER_CREATE); | |||
respondWith(JSON_SERVER_EVACUATE); | |||
|
|||
ServerPassword password = osv3().compute().servers().evacuate("e565cbdb-8e74-4044-ba6e-0155500b2c46", EvacuateOptions.create().host("server-test-1").onSharedStorage(false)); | |||
assertNotNull(password.getPassword()); |
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.
One last thing: Instead of assertNotNull(..)
maybe assertEquals(password.getPassword(), "MySecretPass")
Besides the comment above this looks good @taemin77 👍 |
Very cool. Many thanks for your woke @taemin77! |
Hi, I'm taemin
I added Evacuate Server.
I did tests about this api and checked the result.
The example below.
ServerPassword password =
os.compute().servers().evacuate("1427b0a6-e6a1-496",
EvacuateOptions.create().host("compute1").onSharedStorage(false));
System.out.println(password.getPassword());
I hope you review codes I pulled.