Subscribe

SDK calls DFM "host-add-ossv" failed

[ Edited ]

Hi there, I was coding ontap-SDK and got something wrong with "host-add-ossv" while interacting with dfm server. Please see the sample  below,

$dfmServer = "xxx";

$user = "xxx";

$pwd = "xxx";

$s = New-Object NetApp.Manage.NaServer ($dfmServer,"1","0");

$s.ServerType = "DFM";

$s.Style = "LOGIN_PASSWORD";

$s.TransportType = "HTTP";

$s.Port = "8088";

$s.SetAdminUser($user, $pwd);

$in = New-Object NetApp.Manage.NaElement("host-add-ossv");

$in.AddNewChild("host-name-or-id","192.168.1.2");

$Credentials = New-object NetApp.Manage.NaElement("full-ndmp-credentials");   

$Credentials.AddNewEncryptedChild("ndmp-password","ndmp");

$Credentials.AddNewChild("ndmp-username","ndmp");

$Credentials.AddNewChild("ndmp-port",10000);

$in.AddChildElement($Credentials);   

$s.InvokeElem($in);

$hostAddr = $out.getChildContent("host-address");

$ossvId = $out.getChildContent("ossv-id");

The system output is

Exception calling "InvokeElem" with "1" argument(s): "Extra input(s) - full-ndmp-credentials"

At C:\__brian\dfm\det\dfm_provision.ps1:48 char:14

+ $s.InvokeElem <<<< ($in);

    + CategoryInfo          : NotSpecified: (Smiley Happy [], MethodInvocationException

    + FullyQualifiedErrorId : DotNetMethodException

I really appreciate that any one could have a look on this.

Re: SDK calls DFM "host-add-ossv" failed

Solved.