Start a Conversation

Unsolved

This post is more than 5 years old

1770

November 4th, 2015 13:00

REST API for 'Block Services for Linux' / 'Create And Mount Block Volume' action?

Hi - this afternoon, after setting up our physical and virtual assets in ViPR V2.3, I used the 'Service Catalog' / 'Block Services for Linux' / 'Create And Mount Block Volume' action. This single high-level task performed a bunch of discrete execution steps, which ultimately mounted a volume with file system on a host.  Wow. For ViPR newbies that have done these many manual steps for many years, this was VERY impressive!

I went looking for the corresponding ViPR V2.3 REST API for this action/function, but didn't find it.  Does a single REST API exist for 'Block Services for Linux' / 'Create And Mount Block Volume' action?  If not, is there a 'cheat sheet' to explain how to create this using lower-level ViPR REST API calls?

Thanks.

474 Posts

November 4th, 2015 15:00

Yes, you can call catalog items to get the full workflow.  You need to get the URI for the catalog item.

Check out this section of the API documentation..

ViPR 2.3 REST API

Also check out this Powershell commandlet code one of my peers created..  There are modules for calling catalog items in that as well.

emccode/viprshell · GitHub

Richard Anderson

87 Posts

November 5th, 2015 06:00

Hi Rich - thanks very much for this information and for the code example - great reading! I did take a look at the REST API functions in the catalog service area.  But I didn't see any definition in the documentation of the available catalog items.  I also tried running some of the catalog commands, and didn't find a command to list, for example, the URI of the 'Create and Mount Block Volume on Linux host' workflow.  Am I missing this?

Thanks

tl

87 Posts

November 12th, 2015 09:00

Hi - thanks again for the additional information, but I still don't see a REST function for 'Block Services for Linux' / 'Create and Mount Block Volume'.  Help, please.  Thanks.

474 Posts

November 12th, 2015 16:00

There won't be one with that name..  It will be a generic catalog API call and you will need to pass the URI for that item in the API call.  Some of the code examples show how to query the API to get a list of catalog items and URI's, and then you can send the request to the URI you want.  You can also get the URI from the URL shown in your browser when you are at the order page of a particular catalog item.

87 Posts

November 16th, 2015 07:00

Thanks the additional help, Rich.  I did have some success with:

curl -k https://lfcp0155:4443/catalog/services/search?name="CreateBlock" -b cookiefile -v

which did show the several catalog requests involving the creation of block devices, and I did find the catalog request I was looking for (CreateBlockVolumeforaHost). Oddly, in the GUI, I don't see this name displayed.

.../catalog/services/{id} shows all of the properties for this catalog service, including the fields that need to be supplied.

Thanks for the help!

tl

No Events found!

Top