Hi,

Get deployment policy rest API was missing. I have now implemented it as
below.

      GET /deploymentPolicies/{deploymentPolicyId}

Better if we update the CLI to have this command too.

@Imesh, do we need an API in CC to list all the deployment policies (like
we already have an api in CC to list all network partitions)?

Thanks.

On Sun, Feb 15, 2015 at 11:02 PM, Gayan Gunarathne <gay...@wso2.com> wrote:

> This deployment policy modification are inline with the email [1]
> I will share the document regarding this modification.
>
> [1] 4.1 deployment policy questions
>
> Thanks,
> Gayan
>
> On Sun, Feb 15, 2015 at 10:31 PM, Gayan Gunarathne <gay...@wso2.com>
> wrote:
>
>> Hi Shaheedur,
>>
>> With the REST API re-factor, there were changes happen with the REST API
>> method definitions.As a result our API methods change some what.
>> As an example v 4.0 rest API was POST /policy/deployment
>> Now for v 4.1.0 we introduce it as POST /deploymentPolicies to align
>> with the REST API standards.
>>
>> With the deployment policy json context wise it is almost the same . But
>> we drop the "partitionMin" from the partition section in 4.1.0. AFAIU We
>> will handle this in the cartridge level with application deployment.So I
>> guess we don't need this partitionMin in 4.1.0 deployment policy. Please
>> correct this if I am wrong here.
>>
>> Thanks,
>> Gayan
>>
>> On Sun, Feb 15, 2015 at 8:03 PM, Shaheedur Haque (shahhaqu) <
>> shahh...@cisco.com> wrote:
>>
>>>  Is there a reason not to make these APIs exactly like they were for
>>> 4.0?
>>>
>>>
>>>
>>> *From:* Imesh Gunaratne [mailto:im...@apache.org]
>>> *Sent:* 15 February 2015 03:56
>>> *To:* dev
>>> *Subject:* Re: REST API methods for managing deployment policies
>>>
>>>
>>>
>>> Gayan/Udara: It would be great if you guys can keep updating a mail
>>> thread with the progress of this modification; which tasks are done and
>>> which tasks to be started. Then others should also be able to contribute
>>> when you are not around.
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> On Fri, Feb 13, 2015 at 7:41 PM, Gayan Gunarathne <gay...@wso2.com>
>>> wrote:
>>>
>>> Sample JSON:
>>>
>>>
>>> https://github.com/apache/stratos/blob/4.1.0-beta-deployment-policy-fix/samples/applications/single-cartridge/artifacts/deployment-policy.json
>>>
>>>
>>>
>>> Sample curl request :
>>>
>>> curl -X POST -H "Content-Type: application/json" -d
>>> "@deployment-policy.json" -k -v -u admin:admin
>>> https://${host_ip}:${host_port}/api/deploymentPolicies
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Gayan
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 13, 2015 at 7:25 PM, Gayan Gunarathne <gay...@wso2.com>
>>> wrote:
>>>
>>> Sure. Will update the samples.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Gayan
>>>
>>>
>>>
>>> On Fri, Feb 13, 2015 at 7:22 PM, Dakshika Jayathilaka <daksh...@wso2.com>
>>> wrote:
>>>
>>> Hi Gayan,
>>>
>>>
>>>
>>> Can you share JSON as wel.
>>>
>>>
>>>
>>> Thanks
>>>
>>>
>>>   *Dakshika Jayathilaka*
>>>
>>> Software Engineer
>>>
>>> WSO2, Inc.
>>>
>>> lean.enterprise.middleware
>>>
>>> 0771100911
>>>
>>>
>>>
>>> On Fri, Feb 13, 2015 at 7:12 PM, Gayan Gunarathne <gay...@wso2.com>
>>> wrote:
>>>
>>> Added two REST API methods for global deployment policy add/update. I
>>> have pushed those changes to the "4.1.0-beta-deployment-policy-fix" branch.
>>>
>>>
>>>
>>> POST
>>>
>>> /deploymentpolicy
>>> <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Adding+a+Cartridge+via+REST+API>
>>>
>>> Add a deployment policy
>>>
>>> PUT
>>>
>>> /deploymentpolicy
>>> <https://cwiki.apache.org/confluence/display/STRATOS/4.1.0+Updating+a+Cartridge+via+REST+API>
>>>
>>>
>>> Update existing deployment policy
>>>
>>>
>>> Added the sample deployment policy to the single-cartridge sample.Will
>>> update the other samples as well.
>>>
>>>
>>>
>>> Will add another REST methods for retrieve and remove deployment policy.
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Gayan
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> Gayan Gunarathne
>>>
>>> Technical Lead
>>>
>>> WSO2 Inc. (http://wso2.com)
>>>
>>> email  : gay...@wso2.com  | mobile : +94 766819985
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> Gayan Gunarathne
>>>
>>> Technical Lead
>>>
>>> WSO2 Inc. (http://wso2.com)
>>>
>>> email  : gay...@wso2.com  | mobile : +94 766819985
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>>
>>>
>>> Gayan Gunarathne
>>>
>>> Technical Lead
>>>
>>> WSO2 Inc. (http://wso2.com)
>>>
>>> email  : gay...@wso2.com  | mobile : +94 766819985
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Imesh Gunaratne
>>>
>>>
>>>
>>> Technical Lead, WSO2
>>>
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>>
>> Gayan Gunarathne
>> Technical Lead
>> WSO2 Inc. (http://wso2.com)
>> email  : gay...@wso2.com  | mobile : +94 766819985
>>
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead
> WSO2 Inc. (http://wso2.com)
> email  : gay...@wso2.com  | mobile : +94 766819985
>
>



-- 
Rajkumar Rajaratnam
Committer & PMC Member, Apache Stratos
Software Engineer, WSO2

Mobile : +94777568639
Blog : rajkumarr.com

Reply via email to