You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Dakshika Jayathilaka <da...@wso2.com> on 2015/01/28 19:01:46 UTC

accessUrls on Application runtime return with incorrect format

Hi All,

I have notice $subject on application runtime return.

"accessUrls":["http\\://mylb.isuruh.lk:8280"]

it should return as

"accessUrls":["http://mylb.isuruh.lk:8280"]


Thank you,

Regards,

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

Re: accessUrls on Application runtime return with incorrect format

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Yes it is better to use java.net.URL as a common practices in all possible
places.

On Thu, Jan 29, 2015 at 9:36 AM, Imesh Gunaratne <im...@apache.org> wrote:

> We need to use java.net.URL [1] when constructing URLs, I will fix this.
>
> [1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html
>
> Thanks
>
> On Thu, Jan 29, 2015 at 12:25 AM, shiro <sh...@gmail.com> wrote:
>
>> This is due to the following code segment in
>> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.createApplicationClusters(String,
>> ApplicationClusterContext[])
>>
>> for (PortMapping portMap : portMappings) {
>>                                 if
>> (portMap.isKubernetesServicePortMapping()) {
>>                                     String accessUrl =
>>                                             portMap.getProtocol() +
>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>
>> portMap.getKubernetesServicePort();
>>                                     accessUrlPerCluster.add(accessUrl);
>>                                 } else {
>>                                     String accessUrl =
>>                                             portMap.getProtocol() +
>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>                                             portMap.getProxyPort();
>>                                     accessUrlPerCluster.add(accessUrl);
>>                                 }
>>                             }
>>
>> Is there a particular reason for setting it this way ?
>>
>> On Wed, Jan 28, 2015 at 11:31 PM, Dakshika Jayathilaka <dakshika@wso2.com
>> > wrote:
>>
>>> Hi All,
>>>
>>> I have notice $subject on application runtime return.
>>>
>>> "accessUrls":["http\\://mylb.isuruh.lk:8280"]
>>>
>>> it should return as
>>>
>>> "accessUrls":["http://mylb.isuruh.lk:8280"]
>>>
>>>
>>> Thank you,
>>>
>>> Regards,
>>>
>>> *Dakshika Jayathilaka*
>>> Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>> 0771100911
>>>
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: accessUrls on Application runtime return with incorrect format

Posted by Dakshika Jayathilaka <da...@wso2.com>.
Thanks Imesh..

*Dakshika Jayathilaka*
Software Engineer
WSO2, Inc.
lean.enterprise.middleware
0771100911

On Thu, Jan 29, 2015 at 1:34 PM, Imesh Gunaratne <im...@apache.org> wrote:

> This is now fixed with commit revision:
> 27e4384100f815fefa50af7f5f1ac87efabfddde
>
> On Thu, Jan 29, 2015 at 9:36 AM, Imesh Gunaratne <im...@apache.org> wrote:
>
>> We need to use java.net.URL [1] when constructing URLs, I will fix this.
>>
>> [1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html
>>
>> Thanks
>>
>> On Thu, Jan 29, 2015 at 12:25 AM, shiro <sh...@gmail.com> wrote:
>>
>>> This is due to the following code segment in
>>> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.createApplicationClusters(String,
>>> ApplicationClusterContext[])
>>>
>>> for (PortMapping portMap : portMappings) {
>>>                                 if
>>> (portMap.isKubernetesServicePortMapping()) {
>>>                                     String accessUrl =
>>>                                             portMap.getProtocol() +
>>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>>
>>> portMap.getKubernetesServicePort();
>>>                                     accessUrlPerCluster.add(accessUrl);
>>>                                 } else {
>>>                                     String accessUrl =
>>>                                             portMap.getProtocol() +
>>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>>                                             portMap.getProxyPort();
>>>                                     accessUrlPerCluster.add(accessUrl);
>>>                                 }
>>>                             }
>>>
>>> Is there a particular reason for setting it this way ?
>>>
>>> On Wed, Jan 28, 2015 at 11:31 PM, Dakshika Jayathilaka <
>>> dakshika@wso2.com> wrote:
>>>
>>>> Hi All,
>>>>
>>>> I have notice $subject on application runtime return.
>>>>
>>>> "accessUrls":["http\\://mylb.isuruh.lk:8280"]
>>>>
>>>> it should return as
>>>>
>>>> "accessUrls":["http://mylb.isuruh.lk:8280"]
>>>>
>>>>
>>>> Thank you,
>>>>
>>>> Regards,
>>>>
>>>> *Dakshika Jayathilaka*
>>>> Software Engineer
>>>> WSO2, Inc.
>>>> lean.enterprise.middleware
>>>> 0771100911
>>>>
>>>
>>>
>>
>>
>> --
>> Imesh Gunaratne
>>
>> Technical Lead, WSO2
>> Committer & PMC Member, Apache Stratos
>>
>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>

Re: accessUrls on Application runtime return with incorrect format

Posted by Imesh Gunaratne <im...@apache.org>.
This is now fixed with commit revision:
27e4384100f815fefa50af7f5f1ac87efabfddde

On Thu, Jan 29, 2015 at 9:36 AM, Imesh Gunaratne <im...@apache.org> wrote:

> We need to use java.net.URL [1] when constructing URLs, I will fix this.
>
> [1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html
>
> Thanks
>
> On Thu, Jan 29, 2015 at 12:25 AM, shiro <sh...@gmail.com> wrote:
>
>> This is due to the following code segment in
>> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.createApplicationClusters(String,
>> ApplicationClusterContext[])
>>
>> for (PortMapping portMap : portMappings) {
>>                                 if
>> (portMap.isKubernetesServicePortMapping()) {
>>                                     String accessUrl =
>>                                             portMap.getProtocol() +
>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>
>> portMap.getKubernetesServicePort();
>>                                     accessUrlPerCluster.add(accessUrl);
>>                                 } else {
>>                                     String accessUrl =
>>                                             portMap.getProtocol() +
>> "\\://" + appClusterCtxt.getHostName() + ":" +
>>                                             portMap.getProxyPort();
>>                                     accessUrlPerCluster.add(accessUrl);
>>                                 }
>>                             }
>>
>> Is there a particular reason for setting it this way ?
>>
>> On Wed, Jan 28, 2015 at 11:31 PM, Dakshika Jayathilaka <dakshika@wso2.com
>> > wrote:
>>
>>> Hi All,
>>>
>>> I have notice $subject on application runtime return.
>>>
>>> "accessUrls":["http\\://mylb.isuruh.lk:8280"]
>>>
>>> it should return as
>>>
>>> "accessUrls":["http://mylb.isuruh.lk:8280"]
>>>
>>>
>>> Thank you,
>>>
>>> Regards,
>>>
>>> *Dakshika Jayathilaka*
>>> Software Engineer
>>> WSO2, Inc.
>>> lean.enterprise.middleware
>>> 0771100911
>>>
>>
>>
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PMC Member, Apache Stratos
>



-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: accessUrls on Application runtime return with incorrect format

Posted by Imesh Gunaratne <im...@apache.org>.
We need to use java.net.URL [1] when constructing URLs, I will fix this.

[1] http://docs.oracle.com/javase/7/docs/api/java/net/URL.html

Thanks

On Thu, Jan 29, 2015 at 12:25 AM, shiro <sh...@gmail.com> wrote:

> This is due to the following code segment in
> org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.createApplicationClusters(String,
> ApplicationClusterContext[])
>
> for (PortMapping portMap : portMappings) {
>                                 if
> (portMap.isKubernetesServicePortMapping()) {
>                                     String accessUrl =
>                                             portMap.getProtocol() +
> "\\://" + appClusterCtxt.getHostName() + ":" +
>
> portMap.getKubernetesServicePort();
>                                     accessUrlPerCluster.add(accessUrl);
>                                 } else {
>                                     String accessUrl =
>                                             portMap.getProtocol() +
> "\\://" + appClusterCtxt.getHostName() + ":" +
>                                             portMap.getProxyPort();
>                                     accessUrlPerCluster.add(accessUrl);
>                                 }
>                             }
>
> Is there a particular reason for setting it this way ?
>
> On Wed, Jan 28, 2015 at 11:31 PM, Dakshika Jayathilaka <da...@wso2.com>
> wrote:
>
>> Hi All,
>>
>> I have notice $subject on application runtime return.
>>
>> "accessUrls":["http\\://mylb.isuruh.lk:8280"]
>>
>> it should return as
>>
>> "accessUrls":["http://mylb.isuruh.lk:8280"]
>>
>>
>> Thank you,
>>
>> Regards,
>>
>> *Dakshika Jayathilaka*
>> Software Engineer
>> WSO2, Inc.
>> lean.enterprise.middleware
>> 0771100911
>>
>
>


-- 
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Re: accessUrls on Application runtime return with incorrect format

Posted by shiro <sh...@gmail.com>.
This is due to the following code segment in
org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl.createApplicationClusters(String,
ApplicationClusterContext[])

for (PortMapping portMap : portMappings) {
                                if
(portMap.isKubernetesServicePortMapping()) {
                                    String accessUrl =
                                            portMap.getProtocol() + "\\://"
+ appClusterCtxt.getHostName() + ":" +

portMap.getKubernetesServicePort();
                                    accessUrlPerCluster.add(accessUrl);
                                } else {
                                    String accessUrl =
                                            portMap.getProtocol() + "\\://"
+ appClusterCtxt.getHostName() + ":" +
                                            portMap.getProxyPort();
                                    accessUrlPerCluster.add(accessUrl);
                                }
                            }

Is there a particular reason for setting it this way ?

On Wed, Jan 28, 2015 at 11:31 PM, Dakshika Jayathilaka <da...@wso2.com>
wrote:

> Hi All,
>
> I have notice $subject on application runtime return.
>
> "accessUrls":["http\\://mylb.isuruh.lk:8280"]
>
> it should return as
>
> "accessUrls":["http://mylb.isuruh.lk:8280"]
>
>
> Thank you,
>
> Regards,
>
> *Dakshika Jayathilaka*
> Software Engineer
> WSO2, Inc.
> lean.enterprise.middleware
> 0771100911
>