Hi Martin,

To deploy a deployment policy you can use something like below; so path is,
POST /api/deploymentPolicies

curl -X POST -H "Content-Type: application/json" -d@'deployment-policy.json'
-k -v -u admin:admin https://localhost:9443/api/deploymentPolicies

On Fri, Dec 5, 2014 at 8:36 AM, Martin Eppel (meppel) <[email protected]>
wrote:

>  Ok, I see - I think you are right, the sample in the below mentioned
> email thread (Aplication_Gloabl_Dep_Policy.json) has the partitions, so I
> guess I just need to deploy the definition as shown in the sample to get
> partitions deployed, just wondering which API to use in StratosApiV41 ?
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
>
>
>
>
> *From:* Nirmal Fernando [mailto:[email protected]]
> *Sent:* Thursday, December 04, 2014 6:21 PM
> *To:* dev; Reka Thirunavukkarasu
> *Subject:* Re: how to deploy autoscale and deployment policies and
> partitions with latest code from master ?
>
>
>
> Hi Martin,
>
>
>
> We do not deploy partitions alone any more right? Partitions are declared
> in deployment policy, aren't they?
>
>
>
> On Fri, Dec 5, 2014 at 7:37 AM, Martin Eppel (meppel) <[email protected]>
> wrote:
>
>
>
> Ok, I realized that we changed the RestAPIs for autoscale, deployment
> policy  and service group deployment, not sure however how a partition
> definition is deployed, the “…/partitions” RestAPi is commented out ?
>
>
>
>
>
> *From:* Martin Eppel (meppel)
> *Sent:* Thursday, December 04, 2014 5:43 PM
> *To:* [email protected]
> *Subject:* how to deploy autoscale and deployment policies and partitions
> with latest code from master ?
>
>
>
> Hi,
>
>
>
> I tried with the latest code from the master (Dec-04) to deploy autoscale,
> , deployment and partition policy but they all fail with an
> “AccessDeniedException” exception as below. I understand that we will be
> moving to a new format for application deployment (see email thread “Global
> Deployment Policy for the Application”) but I don’t see the autoscale and
> partition definition in the provided example. Also, I checked and the
> RESTAPIs to deploy the policies individually are still there ? Any ideas
> why the deployment is failing or is this simple not yet working and I
> should give it some time ?
>
> Is there an working example which will show me how to deploy partition,
> autoscaler and deployment policy ?
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> TID: [0] [STRATOS] [2014-12-05 01:19:04,649] ERROR
> {org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler} -
> The requested resource is not found. Please check the resource path, etc
> {org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler}TID:
> [0] [STRATOS] [2014-12-05 01:19:04,649] ERROR
> {org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler} -
> Unexpected error occured while REST api, authorization process
> {org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler}org.apache.cxf.interceptor.security.AccessDeniedException:
> Method is not available: Unauthorized
>
>         at
> org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler.getTargetMethod(StratosAuthorizingHandler.java:155)
> at
> org.apache.stratos.rest.endpoint.handlers.StratosAuthorizingHandler.handleRequest(StratosAuthorizingHandler.java:83)
>
>         at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:190)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:101)
>
>         at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>
>
>
>
>
> --
>
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
>
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Reply via email to