Start a Conversation

Unsolved

This post is more than 5 years old

1605

May 11th, 2017 10:00

Correct CURL/REST payload data to invalidate cache for a consistency group

Hello,

We are trying to perform invalidate cache operation on a VPLEX CG. I am using CURL to perform the invalidate operation but running into syntax related issues.

So far I have tried the following without any success.

NOTE:

  • At the moment this is being tested from Windows host but it will be run from Linux host using bash/curl. Please do not suggest python/pycurl as it is not an option at this time
  • Usernames/Passwords will not be in clear text in actual scripts, using clear text now for testing
  • Appropriate escape characters will be used when running it from Linux host

curl -k -H "Username:xxxx" -H "xxxx"  "{\"args\" : \"TestCG  -f \"}" -X POST https://vplex-mgmt-ip/vplex/clusters/cluster-1/consistency-groups/cache-invalidate

The error message I receive is Invalid URI in GET request. Not one among context,command or attribute

I have tried to use PUT instead of POST, no luck there either.

Any help you may be able to provide will be greatly appreciated.

Thank you.

89 Posts

May 16th, 2017 15:00

This is what will work. 


# curl -k -X POST -H "Username:service" -H "Password:xxx" -d '{"args" : "-g TestCG -f"}' https://xx.xx.xx.xx/vplex/consistency-group+cache-invalidate


Changes needed were:

  • Need “-d” in front of the arguments
  • Need “-g” in front of the CG name (or “-v” for a virtual-volume)
  • Need “+” for the command “consistency-group cache-invalidate”
  • Path to run the command is “vplex/consistency-group+cache-invalidate” and NOT the full command path, which is complete unintuitive and not documented anywhere (or at least not well enough) it would seem.
    • One table in the VPLEX Element Guide doesn’t even list “consistency-group cache-invalidate” as a command (seems to be missing.)

Aside:  This command does list all the possible commands:

# curl -k -X POST -H "Username:service" -H "Password:xxx" https://xx.xx.xx.xx/vplex/help


No Events found!

Top