Option to run Racadm locally; handle: logs, exceptions. Separate folders for scripts, logs

This commit is contained in:
2026-01-16 16:20:16 +00:00
parent eda2eb0cc8
commit ecec60554f
4 changed files with 519 additions and 481 deletions

View File

@@ -40,6 +40,7 @@
this.label5 = new System.Windows.Forms.Label();
this.textBoxTftpIP = new System.Windows.Forms.TextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.checkBox_Local = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.textBoxIDRACPassword = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
@@ -157,6 +158,7 @@
//
// groupBox3
//
this.groupBox3.Controls.Add(this.checkBox_Local);
this.groupBox3.Controls.Add(this.label3);
this.groupBox3.Controls.Add(this.textBoxIDRACPassword);
this.groupBox3.Controls.Add(this.label4);
@@ -165,15 +167,26 @@
this.groupBox3.Controls.Add(this.textBoxIDRACIP);
this.groupBox3.Location = new System.Drawing.Point(307, 12);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(278, 118);
this.groupBox3.Size = new System.Drawing.Size(278, 152);
this.groupBox3.TabIndex = 6;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "IDRAC";
//
// checkBox_Local
//
this.checkBox_Local.AutoSize = true;
this.checkBox_Local.Location = new System.Drawing.Point(23, 19);
this.checkBox_Local.Name = "checkBox_Local";
this.checkBox_Local.Size = new System.Drawing.Size(52, 17);
this.checkBox_Local.TabIndex = 6;
this.checkBox_Local.Text = "Local";
this.checkBox_Local.UseVisualStyleBackColor = true;
this.checkBox_Local.CheckedChanged += new System.EventHandler(this.checkBox_Local_CheckedChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(20, 80);
this.label3.Location = new System.Drawing.Point(20, 105);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 13);
this.label3.TabIndex = 4;
@@ -181,7 +194,7 @@
//
// textBoxIDRACPassword
//
this.textBoxIDRACPassword.Location = new System.Drawing.Point(83, 77);
this.textBoxIDRACPassword.Location = new System.Drawing.Point(83, 102);
this.textBoxIDRACPassword.Name = "textBoxIDRACPassword";
this.textBoxIDRACPassword.Size = new System.Drawing.Size(186, 20);
this.textBoxIDRACPassword.TabIndex = 5;
@@ -190,7 +203,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(20, 54);
this.label4.Location = new System.Drawing.Point(20, 79);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(57, 13);
this.label4.TabIndex = 2;
@@ -198,7 +211,7 @@
//
// textBoxIDRACUsername
//
this.textBoxIDRACUsername.Location = new System.Drawing.Point(83, 51);
this.textBoxIDRACUsername.Location = new System.Drawing.Point(83, 76);
this.textBoxIDRACUsername.Name = "textBoxIDRACUsername";
this.textBoxIDRACUsername.Size = new System.Drawing.Size(186, 20);
this.textBoxIDRACUsername.TabIndex = 3;
@@ -206,7 +219,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(20, 28);
this.label6.Location = new System.Drawing.Point(56, 53);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(17, 13);
this.label6.TabIndex = 0;
@@ -214,9 +227,9 @@
//
// textBoxIDRACIP
//
this.textBoxIDRACIP.Location = new System.Drawing.Point(55, 25);
this.textBoxIDRACIP.Location = new System.Drawing.Point(83, 50);
this.textBoxIDRACIP.Name = "textBoxIDRACIP";
this.textBoxIDRACIP.Size = new System.Drawing.Size(214, 20);
this.textBoxIDRACIP.Size = new System.Drawing.Size(186, 20);
this.textBoxIDRACIP.TabIndex = 1;
//
// FormConfiguration
@@ -230,6 +243,7 @@
this.Controls.Add(this.groupBox1);
this.Name = "FormConfiguration";
this.Text = "FormConfiguration";
this.Load += new System.EventHandler(this.FormConfiguration_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
@@ -260,5 +274,6 @@
private System.Windows.Forms.TextBox textBoxIDRACUsername;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox textBoxIDRACIP;
private System.Windows.Forms.CheckBox checkBox_Local;
}
}

View File

@@ -19,9 +19,10 @@ namespace SSH_Test
public string IDRAC_IP { get; set; }
public string IDRAC_Username { get; set; }
public string IDRAC_Password { get; set; }
public bool IDRAC_Local { get; set; }
public FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, string idrac_IP, string idrac_Username, string idrac_Password)
public FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, string idrac_IP, string idrac_Username, string idrac_Password, bool iDRAC_Local)
{
InitializeComponent();
this.textBoxTftpIP.Text = Tftp_IP = tftp_IP;
@@ -31,8 +32,9 @@ namespace SSH_Test
this.textBoxIDRACIP.Text = IDRAC_IP = idrac_IP;
this.textBoxIDRACUsername.Text = IDRAC_Username = idrac_Username;
this.textBoxIDRACPassword.Text = IDRAC_Password = idrac_Password;
this.checkBox_Local.Checked = iDRAC_Local;
this.Update();
}
private void groupBox1_Enter(object sender, EventArgs e)
@@ -64,7 +66,28 @@ namespace SSH_Test
IDRAC_IP = textBoxIDRACIP.Text;
IDRAC_Username= textBoxIDRACUsername.Text;
IDRAC_Password= textBoxIDRACPassword.Text;
IDRAC_Local=checkBox_Local.Checked;
this.Close();
}
private void FormConfiguration_Load(object sender, EventArgs e)
{
}
private void checkBox_Local_CheckedChanged(object sender, EventArgs e)
{
if (checkBox_Local.Checked)
{
checkBox_Local.Checked = true;
IDRAC_Local = checkBox_Local.Checked;
}
else
{
checkBox_Local.Checked = false;
IDRAC_Local = checkBox_Local.Checked;
}
}
}
}