DX Infrastructure Manager

Expand all | Collapse all

How to put the prevent_rediscovery parameter of the remove_master_devices_by_cskeys with nimNamedRequest

Jump to Best Answer
  • 1.  How to put the prevent_rediscovery parameter of the remove_master_devices_by_cskeys with nimNamedRequest

    Posted 01-16-2019 08:12 PM

    I found that we can use the 'remove_master_devices_by_cskeys' callback to remove the server using the PU command.

    [Linux123$] /opt/nimsoft/bin/pu -u username -p password /Domain/Primary/Server123/discovery_server | grep remove_master
    remove_master_devices_by_cskeys PDS_PCH          27 csKeys,prevent_rediscovery

    /opt/nimsoft/bin/pu -u username -p password /Domain/Primary/Server123/discovery_server

    [Linux123$] /opt/nimsoft/bin/pu -u username -p password /Domain/Primary/Server123/discovery_server remove_master_devices_by_cskeys 5c373e79-3c81-40ab-8fb7-9462579937d8 prevent_rediscovery

     

    But, how to write the Perl script that include the 'prevent_rediscovery' parameter in nimNamedRequest?

    Example :

     

    $pds_in = Nimbus::PDS->new();
    $cmd="remove_master_devices_by_cskeys";

    $server_csKeys="5c373e79-3c81-40ab-8fb7-9462579937d8";

    $pds_in->string("csKeys", $server_csKeys);
    ($rc, $pds_data) = nimNamedRequest($target_addr, $cmd, $pds_in->data());
    if ($rc)
      {
        $err = nimError2Txt($rc);
        print("rc=$rc err=$err from nimNamedRequest for $cmd on try $itry\n");
        exit(1);
      }

     

    Where should I put the 'prevent_rediscovery' parameter?

     

    Thanks in advance.



  • 2.  Re: How to put the prevent_rediscovery parameter of the remove_master_devices_by_cskeys with nimNamedRequest
    Best Answer

    Posted 01-17-2019 06:57 AM

    add after: $pds_in->string("csKeys", $server_csKeys);

          $pds_in->string("prevent_rediscovery", "true");



  • 3.  Re: How to put the prevent_rediscovery parameter of the remove_master_devices_by_cskeys with nimNamedRequest

    Posted 01-23-2019 01:51 AM

    Thanks for the reply. One more question. 

     

    For the script to take effect, do I need to restart the discovery_probe after I execute this line ?

     "my ($rc, $pds_data) = nimNamedRequest($target_addr, $cmd, $pds_in->data());"



  • 4.  Re: How to put the prevent_rediscovery parameter of the remove_master_devices_by_cskeys with nimNamedRequest

    Posted 01-23-2019 01:59 AM

    No restart of a probe is needed.