Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug (http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
I like the simplicity of CLI and parsing the results. Using set -rows 0 makes reading input simple, and the only risk is if a firmware change modifies the output.
On Wed, Oct 21, 2015 at 6:11 PM, Rue, Randy rrue@fredhutch.org wrote:
Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug ( http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
Hello,
I've done a fair amount of work with the SDK though mostly using Perl, just started playing with Python. I guess the first thing is has this been fixed in the latest SDK release (5.4)? That post looks a couple of years old and there haves been a couple of SDK releases since then. I think technically 5.4 is to support 8.3.1 but it might be worth testing it.
--rdp
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Wednesday, October 21, 2015 6:12 PM To: 'toasters@teaparty.net' Subject: python API guidance for cluster mode CIFS share reporting/management
Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug (http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
_______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
I'm running the 5.4 SDK, maybe (likely) this is a user (me) problem resulting from contact with a new API, XML. Etc.
Can I break down a few weird things I'm seeing and hopefully you can point out what newbie thing I'm missing?
When I first connect to the 8.3 cluster using ZEDI I get a warning "API Version: Ontapi 1.30 Cluster-Mode not listed. Please select the API Document manually." Is the cluster running a newer version than ZEDI? I can see where to select API documents in the ZEDI interface, and that 1.21 is the latest version offered for cluster-mode, and where to import a file for new documents. I can't find any sign online of where to get a file like what they appear to be looking for, or anything resembling it in the zip file I downloaded for the SDK.
If I drill down to cifs-->cifs-share-get-iter, right-click and Generate, and then Execute, first I get an error in the XML output "<results reason='Invalid integer value for max-records: (null)' errno='13115' status='failed'/>"
I can take the python from the Develop tab and run it in an IDE (after pasting in the password in text, yee-haw, I'll switch to cert authentication if this ever goes live), I get the same error in my output.
If I plug in a value for max-records i.e. 10000 to the XML, in the XML tab I get what looks like a healthy return but with 0 records returned. But if I run the python code in my IDE I get "<results status="failed" errno="1" reason="Extra content at the end of the document "></results>"
Also, the guidance I'm finding seems to revolve around viewing things on the cluster. At some point I'm also going to need to know how to change them.
So how many glaring green oversights are listed above?
Hope to hear from you,
Randy
-----Original Message----- From: Payne, Richard [mailto:richard.payne@amd.com] Sent: Thursday, October 22, 2015 5:40 AM To: Rue, Randy; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
Hello,
I've done a fair amount of work with the SDK though mostly using Perl, just started playing with Python. I guess the first thing is has this been fixed in the latest SDK release (5.4)? That post looks a couple of years old and there haves been a couple of SDK releases since then. I think technically 5.4 is to support 8.3.1 but it might be worth testing it.
--rdp
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Wednesday, October 21, 2015 6:12 PM To: 'toasters@teaparty.net' Subject: python API guidance for cluster mode CIFS share reporting/management
Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug (http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
_______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
So I just tried some of this myself and the bad news is we don't have CIFS licenses. I tried running 'cifs-share-get-iter' (from perl) and it ran with success but of course returned nothing.
" Also, the guidance I'm finding seems to revolve around viewing things on the cluster. At some point I'm also going to need to know how to change them"
There's a cifs-share-modify, just keep in mind that works at the vserver context so you'll have to run a set_vserver on the NaServer object to change the context to the vserver.
You may also want to try that for the cifs-share-get-iter call, the DOCs say it works under the cluster vserver context but not sure what it would return in cluster context (I assume all CIFS shares but I could be wrong there).
Sorry I can't be of more help....
--rdp
-----Original Message----- From: Rue, Randy [mailto:rrue@fredhutch.org] Sent: Thursday, October 22, 2015 11:40 AM To: Payne, Richard; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
I'm running the 5.4 SDK, maybe (likely) this is a user (me) problem resulting from contact with a new API, XML. Etc.
Can I break down a few weird things I'm seeing and hopefully you can point out what newbie thing I'm missing?
When I first connect to the 8.3 cluster using ZEDI I get a warning "API Version: Ontapi 1.30 Cluster-Mode not listed. Please select the API Document manually." Is the cluster running a newer version than ZEDI? I can see where to select API documents in the ZEDI interface, and that 1.21 is the latest version offered for cluster-mode, and where to import a file for new documents. I can't find any sign online of where to get a file like what they appear to be looking for, or anything resembling it in the zip file I downloaded for the SDK.
If I drill down to cifs-->cifs-share-get-iter, right-click and Generate, and then Execute, first I get an error in the XML output "<results reason='Invalid integer value for max-records: (null)' errno='13115' status='failed'/>"
I can take the python from the Develop tab and run it in an IDE (after pasting in the password in text, yee-haw, I'll switch to cert authentication if this ever goes live), I get the same error in my output.
If I plug in a value for max-records i.e. 10000 to the XML, in the XML tab I get what looks like a healthy return but with 0 records returned. But if I run the python code in my IDE I get "<results status="failed" errno="1" reason="Extra content at the end of the document "></results>"
Also, the guidance I'm finding seems to revolve around viewing things on the cluster. At some point I'm also going to need to know how to change them.
So how many glaring green oversights are listed above?
Hope to hear from you,
Randy
-----Original Message----- From: Payne, Richard [mailto:richard.payne@amd.com] Sent: Thursday, October 22, 2015 5:40 AM To: Rue, Randy; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
Hello,
I've done a fair amount of work with the SDK though mostly using Perl, just started playing with Python. I guess the first thing is has this been fixed in the latest SDK release (5.4)? That post looks a couple of years old and there haves been a couple of SDK releases since then. I think technically 5.4 is to support 8.3.1 but it might be worth testing it.
--rdp
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Wednesday, October 21, 2015 6:12 PM To: 'toasters@teaparty.net' Subject: python API guidance for cluster mode CIFS share reporting/management
Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug (http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
_______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters
No need for any apology, I'm grateful for any guidance at all, especially when you're doing actual work to try to figure this out for me.
If I do need to specify the vserver that might explain why I get an empty return when I get a return at all. Will noodle with that. Also going to ask our NA representation about the API doc file for 1.30.
Will keep you posted on any progress...
Randy
-----Original Message----- From: Payne, Richard [mailto:richard.payne@amd.com] Sent: Monday, October 26, 2015 1:56 PM To: Rue, Randy; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
So I just tried some of this myself and the bad news is we don't have CIFS licenses. I tried running 'cifs-share-get-iter' (from perl) and it ran with success but of course returned nothing.
" Also, the guidance I'm finding seems to revolve around viewing things on the cluster. At some point I'm also going to need to know how to change them"
There's a cifs-share-modify, just keep in mind that works at the vserver context so you'll have to run a set_vserver on the NaServer object to change the context to the vserver.
You may also want to try that for the cifs-share-get-iter call, the DOCs say it works under the cluster vserver context but not sure what it would return in cluster context (I assume all CIFS shares but I could be wrong there).
Sorry I can't be of more help....
--rdp
-----Original Message----- From: Rue, Randy [mailto:rrue@fredhutch.org] Sent: Thursday, October 22, 2015 11:40 AM To: Payne, Richard; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
I'm running the 5.4 SDK, maybe (likely) this is a user (me) problem resulting from contact with a new API, XML. Etc.
Can I break down a few weird things I'm seeing and hopefully you can point out what newbie thing I'm missing?
When I first connect to the 8.3 cluster using ZEDI I get a warning "API Version: Ontapi 1.30 Cluster-Mode not listed. Please select the API Document manually." Is the cluster running a newer version than ZEDI? I can see where to select API documents in the ZEDI interface, and that 1.21 is the latest version offered for cluster-mode, and where to import a file for new documents. I can't find any sign online of where to get a file like what they appear to be looking for, or anything resembling it in the zip file I downloaded for the SDK.
If I drill down to cifs-->cifs-share-get-iter, right-click and Generate, and then Execute, first I get an error in the XML output "<results reason='Invalid integer value for max-records: (null)' errno='13115' status='failed'/>"
I can take the python from the Develop tab and run it in an IDE (after pasting in the password in text, yee-haw, I'll switch to cert authentication if this ever goes live), I get the same error in my output.
If I plug in a value for max-records i.e. 10000 to the XML, in the XML tab I get what looks like a healthy return but with 0 records returned. But if I run the python code in my IDE I get "<results status="failed" errno="1" reason="Extra content at the end of the document "></results>"
Also, the guidance I'm finding seems to revolve around viewing things on the cluster. At some point I'm also going to need to know how to change them.
So how many glaring green oversights are listed above?
Hope to hear from you,
Randy
-----Original Message----- From: Payne, Richard [mailto:richard.payne@amd.com] Sent: Thursday, October 22, 2015 5:40 AM To: Rue, Randy; 'toasters@teaparty.net' Subject: RE: python API guidance for cluster mode CIFS share reporting/management
Hello,
I've done a fair amount of work with the SDK though mostly using Perl, just started playing with Python. I guess the first thing is has this been fixed in the latest SDK release (5.4)? That post looks a couple of years old and there haves been a couple of SDK releases since then. I think technically 5.4 is to support 8.3.1 but it might be worth testing it.
--rdp
-----Original Message----- From: toasters-bounces@teaparty.net [mailto:toasters-bounces@teaparty.net] On Behalf Of Rue, Randy Sent: Wednesday, October 21, 2015 6:12 PM To: 'toasters@teaparty.net' Subject: python API guidance for cluster mode CIFS share reporting/management
Hello All,
I'm working on automating the synchronizing of CIFS shares on the vservers of one 8.3 cluster to their DR mirrors on another cluster. It occurs to me that this might be useful to other shops so I'm trying to up my game from my usual fairly sloppy code i.e. http://xkcd.com/1513/ with lots of SSH calls to the CLI and parsing text output sequentially, to something portable and standard enough to share.
Taking a look at the SDK/API with ZEDI as a guide to the objects involved and having a tough time getting started (never used much XML either). To make things muddier, the API I'm looking at "cifs-share-get-iter" apparently has a bug (http://community.netapp.com/t5/Software-Development-Kit-SDK-and-API-Discussi...) that I don't totally get. Maybe if I could understand the object as it's supposed to work first.
Any experience with the API? Looks like it's a few years old, is it used with 8.3?
Hope to hear from you,
Randy in Seattle
_______________________________________________ Toasters mailing list Toasters@teaparty.net http://www.teaparty.net/mailman/listinfo/toasters