tlemons1
2 Iron

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.

Labels (1)
0 Kudos
5 Replies
Highlighted

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

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

tlemons1
2 Iron

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

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

0 Kudos
tlemons1
2 Iron

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

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.

0 Kudos

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

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.

tlemons1
2 Iron

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

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

0 Kudos