Software Development Kit (SDK) and API Discussions

Python SDK Issue: Couldn't find end of Start Tag netapp


I get the following problem when trying to use the SDK with Python (2.7, 3.3, or 3.4). If I intentionally put bad credentials I get authentication failure, so I think it is getting to the Netapp.


python -s <myfiler> admin <mypassword> system-get-version


<results status="failed" errno="13001" reason="Couldn't find end of Start Tag netapp "></results>


Any ideas?



Had same problem with Perl, turned out that my Linux distribution had some bad characters on the first line of /etc/issue, a dirty quick solution was to delete that first line so I got a hit on a text-string.


Problem is in the SDK (Perl in this case, guess it is the same in Python.




sub get_platform_info .....


if ($osType eq 'linux') {
if (-e "/etc/SuSE-release") {
chomp($osName = `head -n 1 /etc/SuSE-release`);
} else {
choIn mp($osName = `head -n 1 /etc/issue`);
if ($osName =~ m/(.*?) \(.*?\)/) {
$osName = $1;
chomp($processor = `uname -p`);
$osInfo = $osName . " " . $processor;


As you see, it does a head -n 1 /etc/issue.


Of course, you might have a completly diffrent problem, but it is worth looking into.


You can add set_debug_style("NA_PRINT_DONT_PARSE") (don't know the Python syntax here, but should be similar) to your code and get some verbose debug.





Your reply got me pointed in the right direction and I managed to find a workaround. My employer has a large security blurb in /etc/issue and I guess the API doesn't like it. Rather than changing /etc/issue, I updated the code a bit so it would be able to find my OS. For the benefit of anyone else who finds this, in I changed:


if os.path.isfile("/etc/SuSE-release"):

    pipe = os.popen('head -n 1 /etc/SuSE-release')


    pipe = os.popen("head -n 1 /etc/issue")





if os.path.isfile("/etc/SuSE-release"):

    pipe = os.popen('head -n 1 /etc/SuSE-release')

elif os.path.isfile("/etc/redhat-release"):

    pipe = os.popen('head -n 1 /etc/redhat-release')


    pipe = os.popen("head -n 1 /etc/issue")



Thanks again. This has been driving me crazy for a long time.

NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.