# # Copyright (c) 2001-2013 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary MetroclusterNode ComponentState Module (auto-generated by CGT) ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::MetroclusterNode =head1 DESCRIPTION C is a derived class of L. It represents the state of an ONTAP MetroclusterNode. A related class is L, which represents access to an ONTAP MetroclusterNode. =head1 ATTRIBUTES The individual pieces of data that are part of the state of the MetroclusterNode element are the attributes of the MetroclusterNode ComponentState. Additionally, the command_interface used to obtain the ComponentState object is also an attribute of the object. This makes it easier to obtain the component object corresponding to the CS object, using L. =over =item command_interface The command_interface with which the CS object was obtained. (Available in all CS objects regardless of requested_fields and the mode/interface) =item C<< additional_dr_operation_info >> Additional DR Operation Info Filled in for CMode CLI/ZAPI =item C<< dr_operation_time >> Time to Complete Operation (secs) Filled in for CMode CLI/ZAPI =item C<> Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< node_uuid >> Node UUID Filled in for CMode CLI/ZAPI =item C<< dr_partner >> DR Partner Name Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< dr_partner_cluster_uuid >> DR Partner Cluster UUID Filled in for CMode CLI/ZAPI =item C<< dr_mirroring_state >> State of DR Mirroring Config Filled in for CMode CLI/ZAPI =item C<< node >> Node Name Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< reason_dr_nvram_mirroring_disabled >> Reason NVRAM Mirroring to DR Partner is Disabled Filled in for CMode CLI/ZAPI =item C<< dr_partner_systemid >> DR Partner System ID Filled in for CMode CLI/ZAPI =item C<< reason_ha_nvram_mirroring_disabled >> Reason NVRAM Mirroring to HA Partner is Disabled Filled in for CMode CLI/ZAPI =item C<< dr_group_id >> DR Group ID Filled in for CMode CLI/ZAPI =item C<< dr_auxiliary_uuid >> DR Auxiliary UUID Filled in for CMode CLI/ZAPI =item C<< dr_auxiliary_systemid >> DR Auxiliary System ID Filled in for CMode CLI/ZAPI =item C<< dr_auxiliary >> DR Auxiliary Name Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< ha_partner >> HA Partner Name Filled in for CMode CLI/ZAPI =item C<< additional_configuration_info >> Additional Configuration Info Filled in for CMode CLI/ZAPI =item C<< node_cluster_uuid >> Node Cluster UUID Filled in for CMode CLI/ZAPI =item C<< configuration_state >> Configuration State of Node Filled in for CMode CLI/ZAPI =item C<< cluster >> Cluster Name Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< node_systemid >> Node System ID Filled in for CMode CLI/ZAPI =item C<< dr_partner_uuid >> DR Partner UUID Filled in for CMode CLI/ZAPI =item C<< dr_cluster >> DR Cluster Name Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< dr_operation_state >> DR Operation State Filled in for CMode CLI/ZAPI =item C<< dr_auxiliary_cluster_uuid >> DR Auxiliary Cluster UUID Filled in for CMode CLI/ZAPI =item C<< node_object_limit >> Specifies if the Node Object Limits are Enforced possible value(s) are, on,off Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< ha_partner_uuid >> HA Partner UUID Filled in for CMode CLI/ZAPI =item C<< is_nvram_mirroring_to_ha_partner >> NVRAM Mirroring to HA Partner? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< ha_partner_systemid >> HA Partner System ID Filled in for CMode CLI/ZAPI =item C<< ha_partner_cluster_uuid >> HA Partner Cluster UUID Filled in for CMode CLI/ZAPI =item C<< is_nvram_mirroring_to_dr_partner >> NVRAM Mirroring to DR Partner? possible value(s) are, true,false Filled in for CMode CLI/ZAPI =item C<< node_ha_partner >> Node and it's HA partner Filled in for CMode CLI/ZAPI Maps to: CMode ZAPI: $value =item C<< cluster_ordinal >> Cluster Ordinal Filled in for CMode CLI. =back =cut package NACL::CS::MetroclusterNode; use strict; use warnings; use Params::Validate qw(validate); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use NACL::Exceptions::NoElementsFound qw(:try); use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'additional_dr_operation_info', scalar => 'dr_operation_time', scalar => 'node_uuid', scalar => 'dr_partner', scalar => 'dr_partner_cluster_uuid', scalar => 'dr_mirroring_state', scalar => 'node', scalar => 'reason_dr_nvram_mirroring_disabled', scalar => 'dr_partner_systemid', scalar => 'reason_ha_nvram_mirroring_disabled', scalar => 'dr_group_id', scalar => 'dr_auxiliary_uuid', scalar => 'dr_auxiliary_systemid', scalar => 'dr_auxiliary', scalar => 'ha_partner', scalar => 'additional_configuration_info', scalar => 'node_cluster_uuid', scalar => 'configuration_state', scalar => 'cluster', scalar => 'node_systemid', scalar => 'dr_partner_uuid', scalar => 'dr_cluster', scalar => 'dr_operation_state', scalar => 'dr_auxiliary_cluster_uuid', scalar => 'node_object_limit', scalar => 'ha_partner_uuid', scalar => 'is_nvram_mirroring_to_ha_partner', scalar => 'ha_partner_systemid', scalar => 'ha_partner_cluster_uuid', scalar => 'is_nvram_mirroring_to_dr_partner', scalar => 'node_ha_partner', scalar => 'cluster_ordinal', scalar => 'automatic_uso', ]; =head1 METHODS =head2 fetch my $MetroclusterNode_state = NACL::CS::MetroclusterNode->fetch(command_interface => $ci, ...); my @MetroclusterNode_states = NACL::CS::MetroclusterNode->fetch(command_interface => $ci, ...); (Class method) Discovers which elements are present and returns their state in ComponentState objects. Called in scalar context it returns only one state object, in list context it returns all state objects. See L for a more detailed description along with a complete explanation of the options it accepts. Uses CMode CLI/ZAPI Invokes "metrocluster-node-get-iter" API for CMode ZAPI. =over =item Exceptions =over =item C When there are no elements matching the query specified or elements of that type doesn't exist, then this exception will be thrown. =back =back =cut sub fetch { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::fetch( @args, show_cmd => 'metrocluster node show', choices => [ { method => '_fetch_cmode_cli', interface => 'CLI', set => 'CMode' }, { method => '_fetch_cmode_zapi', interface => 'ZAPI', set => 'CMode' } ], exception_text => 'No matching metrocluster node(s) found', frontend => 'NACL::CS::MetroclusterNode::fetch', ); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } sub _fetch_cmode_cli { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_cli(@args, api => 'metrocluster_node_show',); $Log->exit() if $may_exit; return @state_objs; } sub _fetch_cmode_zapi { $Log->enter() if $may_enter; my ($pkg, @args) = @_; my @state_objs = $pkg->SUPER::_fetch_cmode_zapi( @args, api => 'metrocluster-node-get-iter', copy => [ qw (configuration-state dr-auxiliary-cluster-uuid dr-auxiliary-cluster-uuid dr-operation-state ha-partner-cluster-uuid reason-dr-nvram-mirroring-disabled ha-partner-systemid is-nvram-mirroring-to-dr-partner dr-partner-uuid node-cluster-uuid node-systemid reason-ha-nvram-mirroring-disabled additional-configuration-info additional-dr-operation-info dr-auxiliary-cluster-uuid ha-partner-uuid dr-mirroring-state ha-partner-cluster-uuid dr-partner-systemid dr-partner-cluster-uuid is-nvram-mirroring-to-ha-partner node-ha-partner dr-auxiliary-uuid dr-auxiliary-systemid node-uuid dr-group-id automatic-uso ) ], map => { cluster => 'cluster-name', 'dr-cluster' => 'dr-cluster-name', 'dr-operation-time' => 'dr-operation-duration', 'dr-partner' => 'dr-partner-node-name', 'node-object-limit' => 'force-node-object-limit', 'ha-partner' => 'ha-partner-node-name', node => 'node-name', 'dr-auxiliary' => 'dr-auxiliary-partner-node-name', } ); $Log->exit() if $may_exit; return @state_objs; } 1;