From a843196bf6f7a618ed68472b6832ba76f60627e2 Mon Sep 17 00:00:00 2001 From: Andrea Turli Date: Thu, 13 Oct 2016 22:03:44 +0200 Subject: [PATCH] reduce payload for GET VirtualGuests --- .../softlayer/features/AccountApi.java | 2 +- .../features/AccountApiMockTest.java | 4 +- .../src/test/resources/logback-test.xml | 42 +++++++++++++++++++ .../softlayer/src/test/resources/logback.xml | 34 --------------- 4 files changed, 45 insertions(+), 37 deletions(-) create mode 100644 providers/softlayer/src/test/resources/logback-test.xml delete mode 100644 providers/softlayer/src/test/resources/logback.xml diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountApi.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountApi.java index 05f01e0e8c..f8c883f8ca 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountApi.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/features/AccountApi.java @@ -45,7 +45,7 @@ public interface AccountApi { String GUEST_MASK = "children.blockDevices.diskImage.softwareReferences.softwareDescription"; String LIST_GUEST_MASK = "powerState;operatingSystem.passwords;datacenter;billingItem;blockDevices" + - ".diskImage;tagReferences"; + ".diskImage;tagReferences.tag.name"; /** * @return an account's associated virtual guest objects. diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/AccountApiMockTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/AccountApiMockTest.java index 46ca8e4636..6c6d8670f3 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/AccountApiMockTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/AccountApiMockTest.java @@ -41,7 +41,7 @@ public class AccountApiMockTest extends BaseSoftLayerMockTest { AccountApi api = getAccountApi(server); try { assertEquals(api.listVirtualGuests(), new VirtualGuestsParseTest().expected()); - assertSent(server, "GET", "/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences"); + assertSent(server, "GET", "/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences.tag.name"); } finally { server.shutdown(); } @@ -52,7 +52,7 @@ public class AccountApiMockTest extends BaseSoftLayerMockTest { AccountApi api = getAccountApi(server); try { assertTrue(api.listVirtualGuests().isEmpty()); - assertSent(server, "GET", "/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences"); + assertSent(server, "GET", "/SoftLayer_Account/VirtualGuests?objectMask=powerState%3BoperatingSystem.passwords%3Bdatacenter%3BbillingItem%3BblockDevices.diskImage%3BtagReferences.tag.name"); } finally { server.shutdown(); } diff --git a/providers/softlayer/src/test/resources/logback-test.xml b/providers/softlayer/src/test/resources/logback-test.xml new file mode 100644 index 0000000000..4cac342d75 --- /dev/null +++ b/providers/softlayer/src/test/resources/logback-test.xml @@ -0,0 +1,42 @@ + + + + target/test-data/jclouds.log + + %d %-5p [%c] [%thread] %m%n + + + + target/test-data/jclouds-wire.log + + %d %-5p [%c] [%thread] %m%n + + + + target/jclouds-compute.log + + %d %-5p [%c] [%thread] %m%n + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/providers/softlayer/src/test/resources/logback.xml b/providers/softlayer/src/test/resources/logback.xml deleted file mode 100644 index c823913f6f..0000000000 --- a/providers/softlayer/src/test/resources/logback.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - %msg%n - - - - - - - - - - -