Software Development Kit (SDK) and API Discussions

"storage-service-dataset-modify" Error: Extra content at the end of the document

TYNOVPET_TIETO

I am getting error : Error: Extra content at the end of the document  when I am trying to attach storage policy to dataset. What I am doing wrong?

sub storage_policy {

        # Reading the server object

        my $server = $_[0];

        my $input = NaElement->new("storage-service-dataset-modify");

        $input->child_add_string("dataset-name-or-id", $dfmval);

        $input->child_add_string("operation-type", attach);

        $input->child_add_string("storage-service-name-or-id", $storage_policy);

        # invoking the api and printing the xml ouput

        my $output =  $server->invoke($input);

        print "\n$output\n";

        print( "Error : " . $output->results_reason() . "\n" ) and exit(-2)

          if ( $output->results_status() eq "failed" );

        print "\nResult: " . result( $output->results_status() ) . "\n";

}

Thanks, Petr

1 ACCEPTED SOLUTION

TYNOVPET_TIETO

my $output =  $server->invoke_elem($input);

View solution in original post

1 REPLY 1

TYNOVPET_TIETO

my $output =  $server->invoke_elem($input);

View solution in original post

Announcements
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.

NetApp Insights to Action
I2A Banner
Public