none
Take offline a node RRS feed

  • Question

  • Hello Everyone. 

    I have a situation when need to take offline a node. 
    From HPC Cluster Manager I am able to do it (select node->right click->Take Offline), and know the way with HPC Powershell (set-hpcnodestate –name:CN001 –state:offline). 
    But I need to do it from code. Do there any way to do it use C#?
    The HPC version is 2016.

    Thanks

    Wednesday, October 4, 2017 9:48 PM

Answers

  • Hi Artem,

      This is our iternal API. But there is no public document on how to use it and we may not guarantee it is compatible in future release though usually we won't make changes to those API.

      If it works for you now, just keep using it. But do not heavily reply on it and make your implementation in a wrapper in case in future you need move to another set of API (for example, future management REST API).

    Qiufang


    Qiufang Shi

    • Marked as answer by Artem Azaryan Monday, October 23, 2017 8:03 AM
    Friday, October 13, 2017 1:50 AM

All replies

  • Hi,

      Management API isn't made public I'm afraid. You need to use C# calling powershell cmdlet.


    Qiufang Shi

    Sunday, October 8, 2017 3:24 AM
  • Hello

    Thanks Qiufang Shi for your response.

    I am using HPC 2016 and for client I have used NuGet and installed Microsoft.HPC.SDK 5.1.5929-beta1. I did research and have found the Cluster class included under Microsoft.ComputeCluster namespace in CcpApi.dll 

                        Cluster cluster = new Cluster();
                        cluster.Connect(scheduler.GetActiveHeadNode());
                        cluster.PauseNode("Node Name");

    I did some test it is working fine.

    Will you suggest to use it ? 


    Thursday, October 12, 2017 5:58 AM
  • Hi Artem,

      This is our iternal API. But there is no public document on how to use it and we may not guarantee it is compatible in future release though usually we won't make changes to those API.

      If it works for you now, just keep using it. But do not heavily reply on it and make your implementation in a wrapper in case in future you need move to another set of API (for example, future management REST API).

    Qiufang


    Qiufang Shi

    • Marked as answer by Artem Azaryan Monday, October 23, 2017 8:03 AM
    Friday, October 13, 2017 1:50 AM
  • Okay , Thanks !
    Monday, October 23, 2017 8:02 AM