How to create your own custom WFA dictionary to retreive data from

advertisement
Technical Report
How to create your own custom WFA dictionary
to retreive data from your own custom
playground Table
Mirko Van Colen, NetApp
Creation : oktober ’13
Last Saved : 8 februari 2016
Last Saved By : Mirko Van Colen
Number of pages : 9
How to create your own custom WFA dictionary to retreive data from your own custom playground Table ............1
Mirko Van Colen, NetApp Creation : oktober ’13 .....................................................................................................1
Last Saved : 13 oktober 2013 Last Saved By : Mirko Van Colen Number of pages : 9 ...........................................1
1
Document Control ................................................................................................................................ 3
1.1
Distribution ......................................................................................................................................................3
1.2
Version History................................................................................................................................................3
2
Add a customer playground database ............................................................................................... 4
3
Insert data in the database from within WFA ? ................................................................................. 4
4
Create WFA object ................................................................................................................................ 4
5
Create a new filter for your object. ..................................................................................................... 5
6
Create a new finder for your object. ................................................................................................... 6
7
Create your own command to go with the object. ............................................................................ 7
8
Create a workflow to use your custom command ............................................................................ 9
2
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
1 Document Control
1.1
Distribution
Name
Role
Mirko Van Colen
PSC Netapp Belgium
Mirko.vancolen@netapp.com
Table 1 : Distribution
1.2
Version History
Date
Change Reference
Author
Version
10/13/13
Version created
MVC
1.0
Sections Affected
ALL
Table 2 : Version History
3
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
Hi all,
I had to create a customer table in the playground database, insert data in de database from WFA
and then retrieve those back later in a WFA custom dictionary (what I call “object”)
My table was to store CHAP credentials during a vserver-create workflow.
Then I needed to retrieve them again during a iscsi-lun create workflow, to have them ready as return
values for the workflow initiator. And as the chap-credentials are not included in any current WFA
dictionary, I’ve had to create my own.
2 Add a customer playground database
Using SqlYog (a mysql gui) it was easy to connect to MySQL and create a customer table.
3 Insert data in the database from within WFA ?
I created my own MySQL insert/update command (made it somewhat dynamic, so it could be re-used
for other projects).
I documented this command in a separate document :
https://communities.netapp.com/docs/DOC-30478
4 Create WFA object
I've called mine : "chap_credentials".
4

Add a new schema (as your object cannot be in an existing WFA-scheme. I called my
scheme "cm_storage_%name-of-the-project%", as it was a clustered ontap project.

Add rows to you dictionary (vserver, cluster_ip, chap_username, chap_password)
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
5 Create a new filter for your object.
5

Give it the dictionary type you created earlier.

Write your query to retrieve a record from your custom table. Make sure to return all fields
you need (not just the primary keys)
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
6 Create a new finder for your object.
6

Give it the dictionary type you created earlier.

Select the filter you created earlier

Important : make sure you have all fields returned (at least the ones you need)
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
7 Create your own command to go with the object.
I needed a retrieve-only command, so I created my own "no-op-storage command"
7
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
8
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
8 Create a workflow to use your custom command
Use your custom finder to retrieve the data from SQL.
Voila, return your customer properties from your own custom table !
9
How to create your own custom WFA dictionary to retreive data from your own custom playground Table - boss8
Download