14 Posts

April 1st, 2016 09:00

Thank you, I will look at these.

82 Posts

April 1st, 2016 09:00

  • Create service plan

  • Please see the section titled "Post a new Service Plan" it will outline how to "Add a new Service Plan to server repository"

  • Subscribe host file system (windows drives) to a service plan

  • Look at the “Posts a new dataset” section on how this can be achieved

  • Set mount options

  • Please look at “Update a service plan” for options such as setting mount options

  • Set number of copies

  • Please look at “Update a service plan” for options such as setting copy count options

  • Assign external scripts to the service plan during desired phases

  • Please look at “Update a service plan” for options such as setting pre/post scripts

Aaron

14 Posts

April 13th, 2016 11:00

Hi Aaron,

I tried a few different things with posting a service plan but without any luck.

Is there a sample xml payload available for posting a file system service plan?

I modified the exchange service plan example from the REST API guide to fit into file system but I am doing something wrong that the POST is failing with the following message:

Invoke-RestMethod : Wed Apr 13 14:45:33 EDT 2016500500https://10.5.184.76:8445/appsync/rest/types/servicePlan/instancesNIYArchway

Server1http://schemas.emc.com/msa/common/error/javax.xml.bind.UnmarshalException

At C:\data\proj\Scripts\appsync\AddSP2.ps1:411 char:9

+ $data = Invoke-RestMethod -Uri $uri -Method POST -Body $body -Contenttype "text/ ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException

    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

I am using the following URI and method to post it

(All variables are predefined in the script and resolve correctly as I have tested some gets with it)

$uri = "$baseuri/types/servicePlan/instances"

$data = Invoke-RestMethod -Uri $uri -Method POST -Body $body -Contenttype "text/xml" -WebSession $session

The $body variable contents > 100 lines of xml payload for a file system service plan but I think it is not accurate.

I can email it to anyone who wants to take a look at it as I can't seem to attach it here.

Thank you for your help.

82 Posts

April 14th, 2016 10:00


Sorry...every time I try and post the instructions, they get truncated, so I am attaching the document...

1 Attachment

14 Posts

April 14th, 2016 11:00

Thank you so much.

I will give it a try and let you know.

82 Posts

April 14th, 2016 11:00

Please see the attachment previously posted. It has the specific instructions you need to create a new SP.

14 Posts

April 14th, 2016 11:00

Hi Aaron,

I already tried this approach and it didn't work for me.

  1. I created a test Service plan with all the required settings
  2. Found its UID
  3. Used the UID to get the plan details. The output is not what is required to create a new service plan. If you look at the sample Exchange plan XML data you will notice it has completely different format than the plan detail GET output.

If you are successful with your method please share either here or to me privately the following:

  1. Your GET URL for plan details
  2. Return output from above
  3. What modification you make to it for posting
  4. POST URL and body

As always, thank you for your efforts in helping with this.

No Events found!

Top