Re: Adding domain mappings using REST API

2015-08-11 Thread Swapnil Patil
Okay. Thank you. I will check. Regards, Swapnil On Tue, Aug 11, 2015 at 12:25 AM, Imesh Gunaratne wrote: > Check the TopologyManager. It should have a method to get cluster objects > by providing the cluster id. > > On Mon, Aug 10, 2015 at 11:53 PM, Swapnil Patil > wrote: > >> Hi Imesh, >> >>

Re: Adding domain mappings using REST API

2015-08-10 Thread Imesh Gunaratne
Check the TopologyManager. It should have a method to get cluster objects by providing the cluster id. On Mon, Aug 10, 2015 at 11:53 PM, Swapnil Patil wrote: > Hi Imesh, > > Thanks! Even I think this should be the way forward. But the problem I am > facing is I am not able to figure out a way to

Re: Adding domain mappings using REST API

2015-08-10 Thread Swapnil Patil
Hi Imesh, Thanks! Even I think this should be the way forward. But the problem I am facing is I am not able to figure out a way to find Service Type using cluster id. Could you please let me know how we can do this? Thanks and Regards, Swapnil On Mon, Aug 10, 2015 at 3:56 AM, Imesh Gunaratne w

Re: Adding domain mappings using REST API

2015-08-09 Thread Imesh Gunaratne
Hi Swapnil, We need to think out of the box here, add a new field to the DomainMappingBean to send the Cluster ID from the client. Users can either use the Alias or Cluster ID depending on the API method they use. In the API method implementation use the Cluster ID to find the Service Type and in

Re: Adding domain mappings using REST API

2015-08-09 Thread Swapnil Patil
Hi Imesh, Sorry, I am not sure I got you. Just to reiterate what I want to say. In convertDomainMappingBeanToStubDomainMapping() method, DomainMappingBean is used to fill two fields domain name and context path of DomainMapping object. Now to execute following statements. domainMapping.setServi

Re: Adding domain mappings using REST API

2015-08-09 Thread Imesh Gunaratne
I do not see any problems in implementing this. Refer following: https://github.com/apache/stratos/blob/master/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java#L2597 DomainMapping domainMapping = ObjectConverter.convertDomainMa

Re: Adding domain mappings using REST API

2015-08-09 Thread Swapnil Patil
Hi All, I need to add a REST method to add domain mappings using cluster id. Currently the request needs a JSON object with cartridge alias, domain name and context path. But I need to add a REST method which support adding domain mapping using cluster id instead of alias. Currently alias is use

Re: Adding domain mappings using REST API

2015-07-26 Thread Swapnil Patil
Oh Okay. Sorry I missed this suggestion during the meeting. I will look into this. Thanks and Regards, Swapnil On Mon, Jul 27, 2015 at 2:59 AM, Imesh Gunaratne wrote: > As we discussed in the last meeting, may be you could add a new API method > to use the cluster id instead of the alias. > > O

Re: Adding domain mappings using REST API

2015-07-26 Thread Imesh Gunaratne
As we discussed in the last meeting, may be you could add a new API method to use the cluster id instead of the alias. On Sun, Jul 26, 2015 at 10:51 PM, Swapnil Patil wrote: > Thanks Ashan! > > But unfortunately I don't have access to application id. So this method > will not be useful for me. >

Re: Adding domain mappings using REST API

2015-07-26 Thread Swapnil Patil
Thanks Ashan! But unfortunately I don't have access to application id. So this method will not be useful for me. Thanks and Regards, Swapnil On Sun, Jul 26, 2015 at 10:40 AM, Ashan Dhananjaya wrote: > Hi Swapnil, > > You can get the cluster details using this api call. > > curl -k -u admin:adm

Re: Adding domain mappings using REST API

2015-07-26 Thread Ashan Dhananjaya
Hi Swapnil, You can get the cluster details using this api call. curl -k -u admin:admin https://localhost:9443/api/v4.1/applications/{ applicationId}/runtime/ curl -k -u admin:admin https://localhost:9443/api/v4.1/applications/tomcat-single-signon/runtime/ I hope this may help. Thank You! Best

Adding domain mappings using REST API

2015-07-26 Thread Swapnil Patil
Hi All, I want to add domain mappings to a cluster as a part of AWS load balancer extension functionality. For that I went through [1]. But I have a couple of doubts. 1. In the request, I need to specify cartridge alias. But I am not able to find a way to get the alias of a cluster using Service