Re: [jclouds/jclouds] [JCLOUDS-1374]This is the first commit of Softlayer LoadBalancer API (#1176)
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)
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)
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)
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)
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)
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)
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 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 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": ["", [{"uuid": "", "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
[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 `` ``` methods 1 ``` - 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
Re: [jclouds/jclouds] [JCLOUDS-1357] This is the first commit of Softlayer Network API (#1158)
swaqos commented on this pull request. > +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +import java.util.List; +import java.util.ArrayList; + +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertTrue; +import static org.testng.Assert.assertNull; + +/** + * Tests behavior of {@code NetworkApi} + */ +@Test(groups = "live") +public class NetworkApiLiveTest extends BaseSoftLayerApiLiveTest { Hi Andrea, I believe that only certain type of accounts have access to the new SL+ features. The following is a mvn test report results: ``` --- 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.NetworkApiLiveTest Configuring TestNG with: TestNG652Configurator Starting test testCreateNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testCreateNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 1710ms Test suite progress: tests succeeded: 1, failed: 0, skipped: 0. Starting test testCreateSubnet(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testCreateSubnet(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 3401ms Test suite progress: tests succeeded: 2, failed: 0, skipped: 0. Starting test testGetName(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testGetName(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 1206ms Test suite progress: tests succeeded: 3, failed: 0, skipped: 0. Starting test testGetNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testGetNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 1325ms Test suite progress: tests succeeded: 4, failed: 0, skipped: 0. Starting test testGetNotes(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testGetNotes(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 1147ms Test suite progress: tests succeeded: 5, failed: 0, skipped: 0. Starting test testListNetworks(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testListNetworks(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 7443ms Test suite progress: tests succeeded: 6, failed: 0, skipped: 0. Starting test testEditNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testEditNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 2570ms Test suite progress: tests succeeded: 7, failed: 0, skipped: 0. Starting test testGetSubnets(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testGetSubnets(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 1108ms Test suite progress: tests succeeded: 8, failed: 0, skipped: 0. Starting test testDeleteSubnet(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testDeleteSubnet(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 2658ms Test suite progress: tests succeeded: 9, failed: 0, skipped: 0. Starting test testDeleteNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) [TestNG] Test testDeleteNetwork(org.jclouds.softlayer.features.NetworkApiLiveTest) succeeded: 11568ms Test suite progress: tests succeeded: 10, failed: 0, skipped: 0. Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 53.068 sec - in org.jclouds.softlayer.features.NetworkApiLiveTest Results : Tests run: 10, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 02:05 min [INFO] Finished at: 2017-11-21T18:07:17+08:00 [INFO] Final Memory: 27M/330M [INFO] ``` -- 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/1158#discussion_r152228511
Re: [jclouds/jclouds] [JCLOUDS-1357] This is the first commit of Softlayer Network API (#1158)
@swaqos pushed 1 commit. 9a49e0d - added more test coverage to NetworkApiMockTest class -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1158/files/96e3c0c6895845a91e0683f45c8ba2ac1b0862b9..9a49e0de4000fc7d294f794333efce2cabc4645a
Re: [jclouds/jclouds] This is the first commit of Softlayer Network API (#1158)
Hi @andreaturli , thanks for the information. I updated the code and the build passed. -- 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/1158#issuecomment-345225778
Re: [jclouds/jclouds] This is the first commit of Softlayer Network API (#1158)
@swaqos pushed 1 commit. 96e3c0c Syntax fix with coding standards -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/jclouds/jclouds/pull/1158/files/d77041387df5a3837f0f68e9f7fd0a273f8770ea..96e3c0c6895845a91e0683f45c8ba2ac1b0862b9
[jclouds/jclouds] This is the first commit of Softlayer Network API (#1158)
Jira link: https://issues.apache.org/jira/browse/JCLOUDS-1357 JCLOUDS-1357 The update focuses on adding SoftLayer Network API to the features list of SoftLayer provider. Domain type files: - Added Network.java - Added Subnet.java Features: - Added NetworkApi.java - Added NetworkApiLiveTest.java - Added NetworkApiMockTest.java - Added resource files for NetworkApiMockTest.java You can view, comment on, or merge this pull request online at: https://github.com/jclouds/jclouds/pull/1158 -- Commit Summary -- * This is the first commit of for SoftLayer Network API set * minor code improvement -- File Changes -- M providers/softlayer/src/main/java/org/jclouds/softlayer/SoftLayerApi.java (8) A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Network.java (163) A providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Subnet.java (166) A providers/softlayer/src/main/java/org/jclouds/softlayer/features/NetworkApi.java (175) A providers/softlayer/src/test/java/org/jclouds/softlayer/features/NetworkApiLiveTest.java (207) A providers/softlayer/src/test/java/org/jclouds/softlayer/features/NetworkApiMockTest.java (230) A providers/softlayer/src/test/resources/network_createObject.json (7) A providers/softlayer/src/test/resources/network_createSubnet.json (18) A providers/softlayer/src/test/resources/network_get_153001.json (8) A providers/softlayer/src/test/resources/network_list.json (41) A providers/softlayer/src/test/resources/network_subnet_get_1592631.json (26) -- Patch Links -- https://github.com/jclouds/jclouds/pull/1158.patch https://github.com/jclouds/jclouds/pull/1158.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/1158