Subscribe
Accepted Solution

Create a nfs volume with an export rule by entering multiple ip adress

Hi all,

I'm a new user for WFA and i began to build my first workflow to create a NFS volume by entering the name,size and a multiple ip adress.

The workflow works just by entering one ip adress and not when i specified a multiple IP adress.

I changed the workflow by set "TABLE" in the field "value" of the user input ipadress and it doesn't work, the second and the third ip address are not set in the workflow

And my second question is How can call this workflow by Api ?

You can find files describe my workflow in attachment

Thanks a lot for your help

Re: Create a nfs volume with an export rule by entering multiple ip adress

Which User Input are you trying to set to Type Table? In your setup.png I don't any user input declared of type Table. Is it possible to send your workflow?

@And my second question is How can call this workflow by Api ?

===

You can use WFA REST and SOAP apis to execute the workflow. See the WFA Developers Guide for detailed help on this topic.


If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Create a nfs volume with an export rule by entering multiple ip adress

Hi Sinha,

Thanks for your help.

Please find file attachment for my workflow

Re: Create a nfs volume with an export rule by entering multiple ip adress

Not looked in very depth but I can say that this error is not due to User Input of Type Table. I've not been able to reproduce this error by the information you have provided. Kindly Export the workflow( see the tool-bar icon for exporting a workflow) and send the .dar file to my mail id : sinhaa at netapp dot com

I'll send you the cause of the failure and also the corrected workflow.

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Create a nfs volume with an export rule by entering multiple ip adress

Hi:

WFA has an inbuilt workflow named "Create a clustered Data ONTAP NFS Volume".

You can also take a look at it. Please see the attached image.


Regards

Abhi

Re: Create a nfs volume with an export rule by entering multiple ip adress

The problems with your workflow:

1. A single Client-match value can be taken for every single export rule created. A comma separated list doesn't work. So if you want to multiple client-match ips, then you need to created rules for every single one of them. Do it using WFA feature row looping

2. Values entered in Table inputs, do not remain strings. Though WFA Planning can't detect it and will pass it, Workflow execution will throw an error. The error "Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'ClientMatch'." is thrown by the powershell. So you need to use WFA functions getValueAt2D to obtain the value entered.

The corrected workflow has been sent to your mail id.

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Create a nfs volume with an export rule by entering multiple ip adress

Hi Sinha,

The workflow work's very well by entering multiple ip adress.Thanks a lot for your help.

It only remains for me only two things to do :

1- Display the date for the volume name > for example by entering '12345' for the name and create vol_12345_09072014 (today's date)

I don't find how to retrieve the date ( maybe by API ?)

2 - Call the workflow by API > I find this document "WFA Web services primer - REST - rev 0.3" and i'll read it to find out how does it work.




Re: Create a nfs volume with an export rule by entering multiple ip adress

@ 1- Display the date for the volume name > for example by entering '12345' for the name and create vol_12345_09072014 (today's date)

-----

Multiple ways to do it depending on the date format you need. The simplest one would be getting the date in UTC format. In Command Create Volume, for the name field enter this: 'vol_' + $VolumeName + System.currentTimeMillis()

If you want more human readable formats then you might need to clone and modify the Create Volume powershell Command and adding the following line below the parameters definitions.

$VolumeName = $VolumeName + "_" + [string](get-date -Format ddMMyyyy)

and then use this new command into your workflow.

warm regards,

sinhaa




If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

Re: Create a nfs volume with an export rule by entering multiple ip adress

I used this command : : 'vol_' + $VolumeName + System.currentTimeMillis() but it doesn’t work

I’ll try to use create volume powershell and modify it.

Please follow te output :

De : sinhaa

Envoyé : mercredi 9 juillet 2014 13:02

À : Redouane Liani

Objet : - Re: Create a nfs volume with an export rule by entering multiple ip adress

<https://communities.netapp.com/index.jspa>

Re: Create a nfs volume with an export rule by entering multiple ip adress

created by sinhaa<https://communities.netapp.com/people/sinhaa> in OnCommand Workflow Automation - View the full discussion<https://communities.netapp.com/message/132714#132714>

@ 1- Display the date for the volume name > for example by entering '12345' for the name and create vol_12345_09072014 (today's date)

Re: Create a nfs volume with an export rule by entering multiple ip adress

@

I used this command : : 'vol_' + $VolumeName + System.currentTimeMillis() but it doesn’t work

====

Strange. I tried similar thing on another simpler workflow but that perfectly worked.

Do the following, this will have to work

Create a new function with below function definition:

def getDateUTC(fake)

{

  

return System.currentTimeMillis();

}

Now the function name is getDateUTC.

Now in your workflow, for name parameter use this: 'vol_' + $VolumeName + getDateUTC("")


If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.