public bladeSpec createBladeSpec(string newBladeIP, string newISCSIIP, string newILOIP, ushort newILOPort,
                                  bool newCurrentlyHavingBIOSDeployed, VMDeployStatus newVMDeployState, string newCurrentBIOS,
                                  bladeLockType permittedAccess)
 {
     return(new bladeSpec(newBladeIP, newISCSIIP, newILOIP, newILOPort, newCurrentlyHavingBIOSDeployed,
                          newVMDeployState, newCurrentBIOS, permittedAccess));
 }
Exemple #2
0
 public bladeSpec createBladeSpec(string newBladeIP, string newISCSIIP, string newILOIP, ushort newKernelDebugPort,
                                  bool newCurrentlyHavingBIOSDeployed, VMDeployStatus newvmDeployState, string newCurrentBIOS, string newDebugKey,
                                  string newFriendlyName,
                                  bladeLockType permittedAccessRead, bladeLockType permittedAccessWrite)
 {
     return(new bladeSpec(null, newBladeIP, newISCSIIP, newILOIP, newKernelDebugPort, newCurrentlyHavingBIOSDeployed,
                          newvmDeployState, newCurrentBIOS, newDebugKey, newFriendlyName, permittedAccessRead, permittedAccessWrite));
 }
Exemple #3
0
        public bladeSpec(SQLiteConnection conn,
                         string newBladeIP, string newISCSIIP,
                         string newILOIP, ushort newKernelDebugPort, string newKernelDebugKey = "idk", string newFriendlyName = null)
            : base(conn, newFriendlyName, newKernelDebugPort, newKernelDebugKey, bladeLockType.lockAll, bladeLockType.lockAll)
        {
            _iscsiIP = newISCSIIP;
            _bladeIP = newBladeIP;
            _iLOIP   = newILOIP;

            _currentlyHavingBIOSDeployed = false;
            _lastDeployedBIOS            = null;
            _vmDeployState = VMDeployStatus.notBeingDeployed;

            ESXiUsername = Settings.Default.esxiUsername;
            ESXiPassword = Settings.Default.esxiPassword;
            iLoUsername  = Settings.Default.iloUsername;
            iLoPassword  = Settings.Default.iloPassword;
        }
Exemple #4
0
        public bladeSpec(SQLiteConnection conn,
                         string newBladeIP, string newISCSIIP,
                         string newILOIP, ushort newKernelDebugPort,
                         bool newCurrentlyHavingBIOSDeployed,
                         VMDeployStatus newvmDeployState, string newCurrentBIOS,
                         string newKernelDebugKey, string newFriendlyName,
                         bladeLockType permittedAccessRead, bladeLockType permittedAccessWrite)
            : base(conn, newFriendlyName, newKernelDebugPort, newKernelDebugKey, permittedAccessRead, permittedAccessWrite)
        {
            _iscsiIP = newISCSIIP;
            _bladeIP = newBladeIP;
            _iLOIP   = newILOIP;

            _currentlyHavingBIOSDeployed = newCurrentlyHavingBIOSDeployed;
            _lastDeployedBIOS            = newCurrentBIOS;
            _vmDeployState = newvmDeployState;

            ESXiUsername = Settings.Default.esxiUsername;
            ESXiPassword = Settings.Default.esxiPassword;
            iLoUsername  = Settings.Default.iloUsername;
            iLoPassword  = Settings.Default.iloPassword;
        }
Exemple #5
0
        private void parseFromDBRow(SQLiteDataReader reader)
        {
            string[] fieldList = new string[reader.FieldCount];
            for (int i = 0; i < reader.FieldCount; i++)
            {
                fieldList[i] = reader.GetName(i);
            }

            if (fieldList.Contains("iscsiIP"))
            {
                _iscsiIP = (string)reader["iscsiIP"];
            }

            if (fieldList.Contains("bladeIP"))
            {
                _bladeIP = (string)reader["bladeIP"];
            }

            if (fieldList.Contains("kernelDebugPort"))
            {
                _kernelDebugPort = ushort.Parse(reader["kernelDebugPort"].ToString());
            }

            if (fieldList.Contains("iLOIP"))
            {
                _iLOIP = (string)reader["iLOIP"];
            }

            if (fieldList.Contains("vmDeployState"))
            {
                if (reader["vmDeployState"] is DBNull)
                {
                    _vmDeployState = VMDeployStatus.notBeingDeployed;
                }
                else
                {
                    _vmDeployState = (VMDeployStatus)((long)reader["vmDeployState"]);
                }
            }

            if (fieldList.Contains("bladeConfigKey"))
            {
                if (reader["bladeConfigKey"] is DBNull)
                {
                    bladeID = null;
                }
                else
                {
                    bladeID = (long)reader["bladeConfigKey"];
                }
            }

            if (fieldList.Contains("currentlyHavingBIOSDeployed"))
            {
                _currentlyHavingBIOSDeployed = (long)reader["currentlyHavingBIOSDeployed"] != 0;
            }

            if (fieldList.Contains("currentlyBeingAVMServer"))
            {
                _currentlyBeingAVMServer = (long)reader["currentlyBeingAVMServer"] != 0;
            }

            if (fieldList.Contains("lastDeployedBIOS"))
            {
                if (reader["lastDeployedBIOS"] is DBNull)
                {
                    _lastDeployedBIOS = null;
                }
                else
                {
                    _lastDeployedBIOS = (string)reader["lastDeployedBIOS"];
                }
            }
        }