ONTAP Discussions

snapshot-get-schedule returns incorrect 'which-hours' list when none is set

chris_algar

 

When calling :

 

my $snap_sched = NetAppApi::NaElement->new("snapshot-get-schedule");
$snap_sched->child_add_string("volume", $name);

my $output = $serv->invoke_elem( $snap_sched );

 

the returned value of $output->child_get_string("which-hours") is  '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23' (rather than undef of ' ') for a snapshot schedule that does not have any hours specified.

 

For example for this schedule:

 

lnn30oznp1> snap sched <volumename>
Volume <volumename>: 4 0 0

 

returns : 

Debug : Response $VAR1 = bless( {
'content' => '',
'name' => 'results',
'children' => [
bless( {
'content' => '4',
'name' => 'weeks',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0',
'name' => 'days',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0',
'name' => 'hours',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0',
'name' => 'minutes',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23',
'name' => 'which-hours',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => ' ',
'name' => 'which-minutes',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' )
],
'attrvals' => [
'passed'
],
'attrkeys' => [
'status'
]
}, 'NetAppApi::NaElement' );

 

 

Compare to this schedule:

 

<filername> snap sched <volumename> 4 0 2@6,1

 

which corerctly returns:

Debug : Response $VAR1 = bless( {
'content' => '',
'name' => 'results',
'children' => [
bless( {
'content' => '4',
'name' => 'weeks',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0',
'name' => 'days',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '2',
'name' => 'hours',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '0',
'name' => 'minutes',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => '6,12',
'name' => 'which-hours',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' ),
bless( {
'content' => ' ',
'name' => 'which-minutes',
'children' => [],
'attrvals' => [],
'attrkeys' => []
}, 'NetAppApi::NaElement' )
],
'attrvals' => [
'passed'
],
'attrkeys' => [
'status'
]
}, 'NetAppApi::NaElement' );

 

 

 

If there are no hourly values set in the schedule the I would expect which-hours to be undef. Is this a known bug?

1 REPLY 1

ekashpureff

 

Chris -

 

The output is correct. A null string in the hours field of a snap sched implies to take a snapshot every hour of the day.

 


I hope this response has been helpful to you.

At your service,

Eugene E. Kashpureff, Sr.
Independent NetApp Consultant http://www.linkedin.com/in/eugenekashpureff
Senior NetApp Instructor, IT Learning Solutions http://sg.itls.asia/netapp
(P.S. I appreciate 'kudos' on any helpful posts.)

 

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