2017-06-09 04:26 AM
i am using ONTAP.9.0 SDK API to develop puppet library to integrate with ONTAP.
I am calling api like this
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE netapp SYSTEM 'file:/etc/netapp_filer.dtd'>
<netapp version='1.15' xmlns='http://www.netapp.com/filer/admin' nmsdk_version='5.6' nmsdk_platform='CentOS Linux release 7.0.1406 x86_64' nmsdk_language='Ruby' nmsdk_app='puppet_netapp_cmode'>
Response body from ONTAP
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE netapp SYSTEM 'file:/etc/netapp_gx.dtd'>
<netapp version='1.100' xmlns='http://www.netapp.com/filer/admin'>
<results reason="Vserver API missing vserver parameter." status="failed" errno="13006"/></netapp>
In result i am getting this errror in puppet program
Error: /Stage[main]/Main/Node[hnidhi-vsim1]/Netapp_vserver_cifs_domain_password_schedule[data_server]: Could not evaluate: Executing api call cifs-domain-password-schedule-modify schedule-randomized-minute 100 failed: "Vserver API missing vserver parameter."
If we refer api for
Modify the attributes of cifs-domain-password-schedule object.
Value of this field indicates whether domain account password change schedule is enabled or not. Value of true indicates schedule is enabled.
This field specifies the day of week when the scheduled domain account password change occurs
This field specifies the minutes within which the scheduled domain account password start time can be randomized beginning schedule-time-of-day
This field specifies the time in HH:MM:SS at which the scheduled domain account password change starts
This field specifies the number of weeks after which the scheduled domain account password change must occur
My aim is - I want to change value of schedule_randomized_minutes in this command.
My query is
1) API IS not asking for vserver name in its input Then why this error is coming?
2)If vserver has to be given in input , how do we give it ?
Any kind of help in understanding this error response from server will be really helpful.!!!!!!
Solved! SEE THE SOLUTION
2017-06-09 05:22 AM - edited 2017-06-14 11:08 AM
In cluster mode the are 2 sets of API, cluster APIs and Vservers API. Most of those CIFS APIs are driven to vserver.
To have a better understanding I recommend you open the Zedi folder under NMSDK. In there you'll find the Zexplorer which is the documentation of APIs. I think after some play around you'll understand a little better.
By the way you don't have to ask your user for the vserver, but your software will have to find out. I do this kind of operation using both sets. First calling cluster and then get the right vserver. If you'll do it for all vservers, just iterate through it.