Hi,
I tested this and it works, can you post the code you are using which generates the error?
using System;
using System.Text;
using System.Collections.Generic;
using NetApp.Manage;
namespace NetApp.NMSDK.Example
{
class ApiClient
{
static void Main(string[] args)
{
try
{
NaServer s = new NaServer("<cluster_name>", 1 , 110);
s.ServerType = NaServer.SERVER_TYPE.FILER;
s.TransportType = NaServer.TRANSPORT_TYPE.HTTPS;
s.Port = 443;
s.Style = NaServer.AUTH_STYLE.LOGIN_PASSWORD;
s.SetAdminUser("admin", "<password>");
s.Vserver = "<vserver_name>";
NaElement api = new NaElement("snapshot-set-reserve");
api.AddNewChild("percentage","10");
api.AddNewChild("volume","<volume_name>");
NaElement xo = s.InvokeElem(api);
Console.WriteLine(xo.ToPrettyString(""));
}
catch (NaAuthException e)
{
Console.Error.WriteLine("Authorization Failed: " + e.Message);
}
catch (NaApiFailedException e)
{
Console.Error.WriteLine("API FAILED: " + e.Message);
}
catch (Exception e)
{
Console.Error.WriteLine(e.Message);
}
}
}
}
Have you tried using the "Set-NcSnapshotReserve" cmdlet? EG:
PS C:\> import-module dataontap
PS C:\> get-nccommand -api snapshot-set-reserve
Name Category Family Api
---- -------- ------ ---
Set-NcSnapshotReserve snapshot {vserver} {snapshot-set-reserve}
PS C:\> get-help Set-NcSnapshotReserve
NAME
Set-NcSnapshotReserve
SYNOPSIS
Sets the size of the indicated volume's snapshot reserve to the specified percentage.
SYNTAX
Set-NcSnapshotReserve [-Volume] <String> [-Percentage] <Int32> [-VserverContext <String>] [-Controller
<NcController[]>] [-ZapiRetryCount <Int32>] [<CommonParameters>]
/Matt
If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.