Microsoft Virtualization Discussions

New-NcSisPolicy in Powershell Toolkit 4.6

renem

Want to create an automatic threshold based efficiency policy.

 

New-NcSisPolicy -VserverContext svm_renem1 -name automatic -PolicyType threshold -QosPolicy background

 

New-NcSisPolicy : Cannot bind argument to parameter 'Schedule' because it is an empty string.

 

New-NcSisPolicy -VserverContext svm_renem1 -name automatic -PolicyType threshold -QosPolicy background -Schedule 'daily'

 

New-NcSisPolicy : Parameter 'Schedule' is supported only for policy type 'scheduled'.

 

The option schedule is unfortunately mandatory. 

 

1 ACCEPTED SOLUTION

renem

Until this is fixed I use a workaround. Since the Invoke-NcSsh use plink.exe and have trouble with TLS only I don't like this cmdlet anymore. My solution is based on the cmdlet Invoke-NcSystemApi

 

$Vserver = "svm_renem1"

$PolicyName = "Test"

$PolicyType = "threshold"

$Percent = "45"

$Qos = "background"

$Enable = "true"

 

$Request = @"

<sis-policy-create>

    <policy-name>$PolicyName</policy-name>

    <policy-type>$PolicyType</policy-type>

    <changelog-threshold-percent>$Percent</changelog-threshold-percent>

    <qos-policy>$Qos</qos-policy>

    <enabled>$Enable</enabled>

</sis-policy-create>

"@

 

Invoke-NcSystemApi -VserverContext $Vserver -Request $Request -ErrorAction Stop

 

- Rene

View solution in original post

4 REPLIES 4

JGPSHNTAP

^^

This is because you need to add 

 

-ChangelogThresholdPercent

 

new-ncsispolicy -VserverContext testvserver -name automatic  -QosPolicy background -PolicyType threshold -ChangelogThresholdPercent 20

 

-ChangelogThresholdPercent <Int32>
Percentage at which the changelog will be processed for a policy type 'threshold', tested once each hour. Range [1..100].

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

 

 

renem

Until this is fixed I use a workaround. Since the Invoke-NcSsh use plink.exe and have trouble with TLS only I don't like this cmdlet anymore. My solution is based on the cmdlet Invoke-NcSystemApi

 

$Vserver = "svm_renem1"

$PolicyName = "Test"

$PolicyType = "threshold"

$Percent = "45"

$Qos = "background"

$Enable = "true"

 

$Request = @"

<sis-policy-create>

    <policy-name>$PolicyName</policy-name>

    <policy-type>$PolicyType</policy-type>

    <changelog-threshold-percent>$Percent</changelog-threshold-percent>

    <qos-policy>$Qos</qos-policy>

    <enabled>$Enable</enabled>

</sis-policy-create>

"@

 

Invoke-NcSystemApi -VserverContext $Vserver -Request $Request -ErrorAction Stop

 

- Rene

View solution in original post

JGPSHNTAP
<changelog-threshold-percent>$Percent</changelog-threshold-percent>

You call it out in your API, but see  above post.  I agree that the cmdlet should be a little more informative

renem

In my point of view there is no reason why the ChangelogThresholdPercent should be a mandatory option.

 

ONTAP set this option by default to 20.

 

Also the API option <changelog-threshold-percent> is optional and not mandatory. 

 

A redesign of this cmdlet should be necessary

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