2016-07-31 04:46 AM
Is it possible to set the timezone of a cluster/vserver with NMSDK?
Looking at the latest manual for 5.5, it appears all you can do is get the timezone (clock-get-timezone)
However if you search the manual, it shows references to 7-mode api calls that suggest setting it was once a thing.
clock-set-clock and clock-set-timezone
2016-08-01 06:24 AM
Unfortunately there is no ZAPI for changing the timezone of a cluster.
2016-08-01 06:32 AM
I managed to solve this using the NMSDK 5.5 api call
Here is a snippit of how I was able to do it using python.
It is using an undocumented NMSDK call that I was sent by a NetApp employee who grabbed it from this site.
timezone = 'Australia/Brisbane' args = NaElement('args') args.child_add(NaElement('arg', 'cluster')) args.child_add(NaElement('arg', 'date')) args.child_add(NaElement('arg', 'modify')) args.child_add(NaElement('arg', '-timezone')) args.child_add(NaElement('arg', timezone)) systemCli = NaElement('system-cli') systemCli.child_add(args) connection = NaServer(clusterManagementIp, 1, 15) connection.set_admin_user(username, password) response = connection.invoke_elem(systemCli)
2016-08-01 06:40 AM
system-cli may work, just be aware it's not a supported API (notice it's not in the documentation). The usual recommendation is to use an SSH library to connect to the controller to issue CLI commands...for example, the PowerShell Toolkit has the "Invoke-NcSsh" cmdlet for these instances.
2016-08-01 06:43 AM
Do they have an equavilant python and/or unix call for this?
Yeah I could probably write some hack in python to connect to the node using SSH.
But for me system-cli is working and until NetApp decide to fix their broken API this will have to do.
2 weeks ago
is it working for you on a c-mode cluster?
i am running the same command as you but it returns empty.
did you do some configuration on the cluster side to enable the usage of system-cli feature?