Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
I really appreciate that any one could have a look on this.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved.
