You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by swaqos <no...@github.com> on 2018/01/26 22:41:24 UTC

[jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Jira link: https://issues.apache.org/jira/browse/JCLOUDS-1374
The update focuses on adding SoftLayer LoadBalancer API to the features list of SoftLayer provider.

Domain type files:
- Added LoadBalancer.java
- Added LoadBalancerHealthMonitor.java
- Added LoadBalancerListener.java
- Added LoadBalancerListenerDefaultPool.java
- Added LoadBalancerMember.java
- Added LoadBalancerMemberHealth.java
- Added LoadBalancerMemberPoolHealth.java
- Added LoadBalancerProtocolConfiguration.java
- Added LoadBalancerServerInstanceInformation.java
- Added LoadBalancerServicePrice.java
- Added LoadBalancerStatistics.java
- Added LoadBalancerSubnetId.java
- Added Location.java
Features:
- Added LoadBalancerApi.java
- Added LoadBalancerApiLiveTest.java
- Added LoadBalancerApiMockTest.java
- Added resource files for LoadBalancerApiMockTest.java

Notes:
- The users are expected to set variables `subnetId`, `servicePrices`, and `testInstancePrivateIp` for LoadBalancerApiLiveTest.
- Since the LoadBalancerApiLiveTest test cases are dependent on other test cases (some tests should take precedence), I had to set the threadCount to be 1 to avoid parallel REST calls in the pom.xml. Added after line 117 for `<maven-surefire-plugin>`
```
            <configuration>
              <parallel>methods</parallel>
              <threadCount>1</threadCount>
            </configuration>
```
- The following is the test results of the LoadBalancerApiLiveTest:
```
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Running org.jclouds.softlayer.features.LoadBalancerApiLiveTest
Configuring TestNG with: TestNG652Configurator
Starting test testCreateLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
LoadBalancer service is fully created and ready to be tested.
[TestNG] Test testCreateLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 315135ms
Test suite progress: tests succeeded: 1, failed: 0, skipped: 0.
Starting test testAddLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testAddLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 32067ms
Test suite progress: tests succeeded: 2, failed: 0, skipped: 0.
Starting test testGetDatacenter(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetDatacenter(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 525ms
Test suite progress: tests succeeded: 3, failed: 0, skipped: 0.
Starting test testGetHealthMonitors(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetHealthMonitors(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 523ms
Test suite progress: tests succeeded: 4, failed: 0, skipped: 0.
Starting test testGetLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 440ms
Test suite progress: tests succeeded: 5, failed: 0, skipped: 0.
Starting test testGetLoadBalancerListeners(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerListeners(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 509ms
Test suite progress: tests succeeded: 6, failed: 0, skipped: 0.
Starting test testGetLoadBalancerObject(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerObject(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 500ms
Test suite progress: tests succeeded: 7, failed: 0, skipped: 0.
Starting test testGetLoadBalancerStatistics(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerStatistics(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 1061ms
Test suite progress: tests succeeded: 8, failed: 0, skipped: 0.
Starting test testListLoadBalancers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testListLoadBalancers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 461ms
Test suite progress: tests succeeded: 9, failed: 0, skipped: 0.
Starting test testUpdateLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testUpdateLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 978ms
Test suite progress: tests succeeded: 10, failed: 0, skipped: 0.
Starting test testAddLoadBalancerProtocols(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testAddLoadBalancerProtocols(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 33132ms
Test suite progress: tests succeeded: 11, failed: 0, skipped: 0.
Starting test testGetLoadBalancerMember(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerMember(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 525ms
Test suite progress: tests succeeded: 12, failed: 0, skipped: 0.
Starting test testGetLoadBalancerMemberHealth(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerMemberHealth(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 1079ms
Test suite progress: tests succeeded: 13, failed: 0, skipped: 0.
Starting test testGetLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 489ms
Test suite progress: tests succeeded: 14, failed: 0, skipped: 0.
Starting test testUpdateHealthMonitor(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testUpdateHealthMonitor(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 32393ms
Test suite progress: tests succeeded: 15, failed: 0, skipped: 0.
Starting test testUpdateLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testUpdateLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 523ms
Test suite progress: tests succeeded: 16, failed: 0, skipped: 0.
Starting test testGetHealthMonitor(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetHealthMonitor(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 457ms
Test suite progress: tests succeeded: 17, failed: 0, skipped: 0.
Starting test testDeleteLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testDeleteLoadBalancerMembers(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 32520ms
Test suite progress: tests succeeded: 18, failed: 0, skipped: 0.
Starting test testUpdateLoadBalancerProtocols(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testUpdateLoadBalancerProtocols(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 32929ms
Test suite progress: tests succeeded: 19, failed: 0, skipped: 0.
Starting test testGetLoadBalancerListener(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testGetLoadBalancerListener(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 467ms
Test suite progress: tests succeeded: 20, failed: 0, skipped: 0.
Starting test testDeleteLoadBalancerListener(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testDeleteLoadBalancerListener(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 34895ms
Test suite progress: tests succeeded: 21, failed: 0, skipped: 0.
Starting test testDeleteLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest)
[TestNG] Test testDeleteLoadBalancer(org.jclouds.softlayer.features.LoadBalancerApiLiveTest) succeeded: 62475ms
Test suite progress: tests succeeded: 22, failed: 0, skipped: 0.
Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 586.37 sec - in org.jclouds.softlayer.features.LoadBalancerApiLiveTest

Results :

Tests run: 22, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19:38 min
[INFO] Finished at: 2018-01-26T16:07:41-06:00
[INFO] Final Memory: 44M/499M
[INFO] ------------------------------------------------------------------------
```
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/1176

-- Commit Summary --

  * Added LBaaS_LoadBalancer feature

-- File Changes --

    M providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApi.java (7)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancer.java (132)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerHealthMonitor.java (100)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerListener.java (106)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerListenerDefaultPool.java (53)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerMember.java (116)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerMemberHealth.java (42)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerMemberPoolHealth.java (42)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerProtocolConfiguration.java (52)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerServerInstanceInformation.java (43)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerServicePrice.java (42)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerStatistics.java (50)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/LoadBalancerSubnetId.java (42)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Location.java (46)
    A providers/softlayer/src/main/java/org/jclouds/softlayer/features/LoadBalancerApi.java (353)
    A providers/softlayer/src/test/java/org/jclouds/softlayer/features/LoadBalancerApiLiveTest.java (529)
    A providers/softlayer/src/test/java/org/jclouds/softlayer/features/LoadBalancerApiMockTest.java (789)
    A providers/softlayer/src/test/resources/loadbalancer_add_listener.json (97)
    A providers/softlayer/src/test/resources/loadbalancer_add_member.json (77)
    A providers/softlayer/src/test/resources/loadbalancer_create.json (337)
    A providers/softlayer/src/test/resources/loadbalancer_delete_listener.json (77)
    A providers/softlayer/src/test/resources/loadbalancer_delete_member.json (68)
    A providers/softlayer/src/test/resources/loadbalancer_get_170811.json (68)
    A providers/softlayer/src/test/resources/loadbalancer_get_datacenter_170811.json (5)
    A providers/softlayer/src/test/resources/loadbalancer_get_healthmonitors_170811.json (12)
    A providers/softlayer/src/test/resources/loadbalancer_get_listener_214871.json (20)
    A providers/softlayer/src/test/resources/loadbalancer_get_listeners_170811.json (22)
    A providers/softlayer/src/test/resources/loadbalancer_get_member_170811.json (9)
    A providers/softlayer/src/test/resources/loadbalancer_get_member_health_170811.json (11)
    A providers/softlayer/src/test/resources/loadbalancer_get_members_170811.json (11)
    A providers/softlayer/src/test/resources/loadbalancer_get_statistics_170811.json (8)
    A providers/softlayer/src/test/resources/loadbalancer_healthmonitor_get_170811.json (12)
    A providers/softlayer/src/test/resources/loadbalancer_list.json (70)
    A providers/softlayer/src/test/resources/loadbalancer_update_healthmonitors_170811.json (68)
    A providers/softlayer/src/test/resources/loadbalancer_update_listener.json (97)
    A providers/softlayer/src/test/resources/loadbalancer_update_loadbalancer.json (68)
    A providers/softlayer/src/test/resources/loadbalancer_update_member.json (77)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/1176.patch
https://github.com/jclouds/jclouds/pull/1176.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
Closed #1176.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#event-1448958454

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Andrea Turli <no...@github.com>.
andreaturli requested changes on this pull request.



> +   @BeforeClass(groups = {"integration", "live"})
+   @Override
+   public void setup() {
+      super.setup();
+
+      loadBalancerApi = api.getLoadBalancerApi();
+
+      datacenter = Iterables.get(api.getDatacenterApi().listDatacenters(), 0);
+      assertNotNull(datacenter, "Datacenter must not be null");
+   }
+
+   @Test
+   public void testCreateLoadBalancer() throws Exception {
+      assertTrue(subnetId != -1, "Please set the subnetId");
+      assertTrue(!testInstancePrivateIp.equals(""), "Please set the testInstancePrivateIp for Member functions testing");
+      loadBalancer = LoadBalancer.create(0, 0, "", new Date(), "", 0, 0,

why are you creating this mock obj instead of using line 108

> +   LoadBalancerMember getLoadBalancerMember(@PathParam("id") int id);
+
+   /**
+    * Add load balancer members
+    * @param LoadBalancerMembersToBeAdded the load balancer member creation definition of LoadBalancerMember.AddLoadBalancerMember
+    *                                     along with the uuid of the targeted load balancer
+    * @reutrn new load balancer object
+    * @see <a href="https://sldn.softlayer.com/reference/services/softlayer_network_lbaas_member/addloadbalancermembers" />
+    */
+   @POST
+   @Named("LoadBalanceMember:addLoadBalancerMembers")
+   @Path("SoftLayer_Network_LBaaS_Member/addLoadBalancerMembers")
+   @QueryParams(keys = "objectMask", values = NAME_MASK)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancer addLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeAdded);

is there any better type than `Object`?

> +   LoadBalancer addLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeAdded);
+
+   /**
+    * Update member's weight
+    * @param LoadBalancerMembersToBeUpdated the load balancer member edition definition of LoadBalancerMember.UpdateLoadBalancerMember
+    *                                     along with the uuid of the targeted load balancer
+    * @reutrn new load balancer object
+    * @see <a href="https://sldn.softlayer.com/reference/services/SoftLayer_Network_LBaaS_Member/updateLoadBalancerMembers" />
+    */
+   @POST
+   @Named("LoadBalanceMember:updateLoadBalancerMembers")
+   @Path("SoftLayer_Network_LBaaS_Member/updateLoadBalancerMembers")
+   @QueryParams(keys = "objectMask", values = NAME_MASK)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancer updateLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeUpdated);

is there any better type than `Object`?

> +   LoadBalancer updateLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeUpdated);
+
+   /**
+    * Delete load balancer members
+    * @param LoadBalancerMembersToBeDeleted the array of the load balancer member uuid along with the uuid of the
+    *                                       targeted load balancer
+    * @reutrn new load balancer object
+    * @see <a href="https://sldn.softlayer.com/reference/services/SoftLayer_Network_LBaaS_Member/deleteLoadBalancerMembers" />
+    */
+   @POST
+   @Named("LoadBalanceMember:deleteLoadBalancerMembers")
+   @Path("SoftLayer_Network_LBaaS_Member/deleteLoadBalancerMembers")
+   @QueryParams(keys = "objectMask", values = NAME_MASK)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancer deleteLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeDeleted);

is there any better type than `Object`?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#pullrequestreview-92065202

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Ignasi Barrera <no...@github.com>.
Thanks @swaqos!

>The users are expected to set variables subnetId, servicePrices, and testInstancePrivateIp for LoadBalancerApiLiveTest.

What are those properties needed for?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361627549

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
swaqos commented on this pull request.



> +   LoadBalancerMember getLoadBalancerMember(@PathParam("id") int id);
+
+   /**
+    * Add load balancer members
+    * @param LoadBalancerMembersToBeAdded the load balancer member creation definition of LoadBalancerMember.AddLoadBalancerMember
+    *                                     along with the uuid of the targeted load balancer
+    * @reutrn new load balancer object
+    * @see <a href="https://sldn.softlayer.com/reference/services/softlayer_network_lbaas_member/addloadbalancermembers" />
+    */
+   @POST
+   @Named("LoadBalanceMember:addLoadBalancerMembers")
+   @Path("SoftLayer_Network_LBaaS_Member/addLoadBalancerMembers")
+   @QueryParams(keys = "objectMask", values = NAME_MASK)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   LoadBalancer addLoadBalancerMembers(@WrapWith("parameters") List<Object> LoadBalancerMembersToBeAdded);

With a lot of the LBaaS APIs, they are expecting the payload to be in the format of the mixture of LB uuid and the definition. For example, for `updateLoadBalancerMembers`, the payload is something like `{"parameters": ["<load_balancer_uuid>", [{"uuid": "<load_balancer_member_uuid>", "weight": <weight>}]]}`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#discussion_r164455028

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
I totally understand that out of the box live tests would be nice and I would hope that too, but that would require other information for the new subnet (networkIdentifier, cider) and new machine, not to mention the extra time needed for this (it's now taking approximately 20 mins). I wonder if there's a better way to work around this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361790403

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
swaqos commented on this pull request.



> +   @BeforeClass(groups = {"integration", "live"})
+   @Override
+   public void setup() {
+      super.setup();
+
+      loadBalancerApi = api.getLoadBalancerApi();
+
+      datacenter = Iterables.get(api.getDatacenterApi().listDatacenters(), 0);
+      assertNotNull(datacenter, "Datacenter must not be null");
+   }
+
+   @Test
+   public void testCreateLoadBalancer() throws Exception {
+      assertTrue(subnetId != -1, "Please set the subnetId");
+      assertTrue(!testInstancePrivateIp.equals(""), "Please set the testInstancePrivateIp for Member functions testing");
+      loadBalancer = LoadBalancer.create(0, 0, "", new Date(), "", 0, 0,

The reason for this is because of the wait state at line 113-125, the assignment of the `loadBalancer` object needs to be created (not null) for the `apply` function.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#discussion_r164456055

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Andrea Turli <no...@github.com>.
hi @swaqos any update on that?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-415091546

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Andrew Gaul <no...@github.com>.
Please reopen against apache/jclouds if this is still relevant.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-663855736

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Ignasi Barrera <no...@github.com>.
Thanks for the explanation. Would it make sense to do like we do in the [Azure ARM load balancer live test](https://github.com/jclouds/jclouds/blob/master/providers/azurecompute-arm/src/test/java/org/jclouds/azurecompute/arm/features/LoadBalancerApiLiveTest.java#L250) and use the ComputeService to create the instance? That way you could probably extract the subnet and private ip from the created instance and get rid of those properties. We should try to have live tests that work out of the box.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361659858

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
Reopened #1176.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#event-1449815624

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Andrea Turli <no...@github.com>.
thx @swaqos it looks like a great PR: jira issue, good tests (with live tests results) and use of jclouds best practices!
Thanks, Ill review it properly asap

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-360993332

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
subnetId: This is the subnet id of which the load balancer instance will connect to, and which the back-end compute servers can reach. Description from load balancer doc "This subnet must have network connectivity with backend servers hosting your application. This means that the backend servers can be either on the same subnet as the one you select for the load balancer here, and/or the backend servers are on subnet(s) that have Layer-3 connectivity with the selected subnet (you may have to enable “VLAN Spanning” in this case). Note that the corresponding public subnet is automatically selected by the implementation.The load balancer uses two IP addresses from the private subnet, and three IP addresses from the public subnet. If sufficient IP addresses are not available, then the order or subsequent provisioning will fail."

servicePrices: These are just the priced items that are required by spinning up a load balancer instance. Users can retrieve relevant information through the following APIs:
- Determine required product items of product package with id=805:
`
curl -k -H 'Content-Type: application/json' 'https://'$SL_USER':'$SL_API'@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/805/getConfiguration?objectMask=isRequired;itemCategory.name;itemCategory.id' | jq .
`
-Determine price identifiers of product items:
`
curl -k -H 'Content-Type: application/json' 'https://'$SL_USER':'$SL_API'@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/805/getItemPrices?objectMask=id;item.description;categories.id;locations' | jq .
`
-Determine datacenters, in which Bluemix LBaaS is available:
`
curl -k -H 'Content-Type: application/json' 'https://'$SL_USER':'$SL_API'@api.softlayer.com/rest/v3.1/SoftLayer_Product_Package/805/getItemPrices?objectMask=id;item.description;categories.id;locations' | jq .
`

testInstancePrivateIp: This is the privateIp of a test instance from user that's going to be sitting behind the load balancer. Since we are not testing the performance of the load balancer, I just need one instance for testing the `SoftLayer_Network_LBaaS_Member` related APIs.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361652638

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Andrew Gaul <no...@github.com>.
Closed #1176.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#event-3586273540

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by swaqos <no...@github.com>.
I think creating a new virtualGuest is not a problem, but the problem is more with the network/subnets. I believe with the new CDN accounts, virtualGuest creations require subnetId as well, while I believe subnets need to live on private networks, and there are limit number of private networks(5), at least . Depending on how the private networks are configured, the number of subnets are limited, too, so I don't know if it's safe to assume there is room for them. I will need to do some more investigations on that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361973789

Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)

Posted by Ignasi Barrera <no...@github.com>.
Time is not an issue. Live tests are assumed to take their time.
What about my comment on creating the machine using the compute service? Could it be then created using the compute service defaults, and extract the subnet and address from the created instance?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1176#issuecomment-361838007