code string | signature string | docstring string | loss_without_docstring float64 | loss_with_docstring float64 | factor float64 |
|---|---|---|---|---|---|
firmware_file_path = _get_firmware_file(searching_path)
if not firmware_file_path:
return None
# Note(deray): the path of the new firmware file will be of the form:
#
# [TEMP_DIR]/xxx-xxx_actual_firmware_filename
#
# e.g. /tmp/77e8f689-f32c-4727-9fc3-a7dacefe67e4_ilo4_210.bi... | def _get_firmware_file_in_new_path(searching_path) | Gets the raw firmware file in a new path
Gets the raw firmware file from the extracted directory structure
and creates a hard link to that in a file path and cleans up the
lookup extract path.
:param searching_path: the directory structure to search for
:returns: the raw firmware file with the comp... | 4.29519 | 4.371674 | 0.982505 |
self.hostname, self.port = addressinfo
self.timeout = timeout
filename = self.fw_file
firmware = open(filename, 'rb').read()
# generate boundary
boundary = b('------hpiLO3t' +
str(random.randint(100000, 1000000)) + 'z')
while bounda... | def upload_file_to(self, addressinfo, timeout) | Uploads the raw firmware file to iLO
Uploads the raw firmware file (already set as attribute in
FirmwareImageControllerBase constructor) to iLO, whose address
information is passed to this method.
:param addressinfo: tuple of hostname and port of the iLO
:param timeout: timeout ... | 3.230479 | 3.113221 | 1.037664 |
err = None
sock = None
try:
for res in socket.getaddrinfo(
self.hostname, self.port, 0, socket.SOCK_STREAM):
af, socktype, proto, canonname, sa = res
try:
sock = socket.socket(af, socktype, proto)
... | def _get_socket(self, sslversion=ssl.PROTOCOL_TLSv1) | Sets up an https connection and do an HTTP/raw socket request
:param sslversion: version of ssl session
:raises: IloConnectionError, for connection failures
:returns: ssl wrapped socket object | 2.206896 | 2.165963 | 1.018898 |
target_file = self.fw_file
common.add_exec_permission_to(target_file)
# create a temp directory where the extraction will occur
temp_dir = tempfile.mkdtemp()
extract_path = os.path.join(temp_dir, self.fw_filename)
try:
self._do_extract(target_file, e... | def extract(self) | Extracts the raw firmware file from its compact format
Extracts the raw firmware file from its compact file format (already
set as attribute in FirmwareImageControllerBase constructor).
:raises: InvalidInputError, if raw firmware file not found
:raises: ImageExtractionFailed, for extrac... | 4.561529 | 4.02705 | 1.132722 |
logical_drives = raid_config["LogicalDrives"]
logical_disks = []
controller = controller
for ld in logical_drives:
prop = {'size_gb': ld['CapacityGiB'],
'raid_level': ld['Raid'].strip('Raid'),
'root_device_hint': {
... | def _generic_format(self, raid_config, controller=None) | Convert redfish data of current raid config to generic format.
:param raid_config: Raid configuration dictionary
:param controller: Array controller model in post_create read else
None
:returns: current raid config. | 4.439833 | 4.404794 | 1.007955 |
ssc_mesg = self.smart_storage_config_message
result = True
raid_message = ""
for element in ssc_mesg:
if "Success" not in element['MessageId']:
result = False
raid_message = element['MessageId']
return result, raid_message | def _check_smart_storage_message(self) | Check for smart storage message.
:returns: result, raid_message | 5.248734 | 3.949549 | 1.328945 |
if controller:
if not self.logical_drives:
msg = ('No logical drives found on the controller')
LOG.debug(msg)
raise exception.IloLogicalDriveNotFoundError(msg)
raid_op = 'create_raid'
else:
raid_op = 'delete_rai... | def read_raid(self, controller=None) | Get the current RAID configuration from the system.
:param controller: If controller model its post-create read else
post-delete
:returns: current raid config. | 5.30203 | 5.250813 | 1.009754 |
if not self.logical_drives:
msg = ('No logical drives found on the controller '
'%(controller)s' % {'controller': str(self.controller_id)})
LOG.debug(msg)
raise exception.IloLogicalDriveNotFoundError(msg)
lds = [{
'Actions':... | def delete_raid(self) | Clears the RAID configuration from the system. | 5.398935 | 5.208737 | 1.036515 |
manager.validate(raid_config)
logical_drives = raid_config['logical_disks']
redfish_logical_disk = []
for ld in logical_drives:
ld_attr = {"Raid": "Raid" + ld["raid_level"]}
ld_attr[
"CapacityGiB"] = -1 if ld[
"size_gb"... | def create_raid(self, raid_config) | Create the raid configuration on the hardware.
:param raid_config: A dictionary containing target raid configuration
data. This data stucture should be as follows:
raid_config = {'logical_disks': [{'raid_level': 1,
'size_gb': 1... | 2.939524 | 2.769675 | 1.061325 |
'''
Private method that reads in the data file and organizes it
within this object.
'''
if sldir.endswith('/'):
fname = str(sldir)+str(fname)
else:
fname = str(sldir)+'/'+str(fname)
f=open(fname,'r')
# read header line
lin... | def _readFile(self, fname, sldir) | Private method that reads in the data file and organizes it
within this object. | 3.841095 | 3.339646 | 1.15015 |
'''
get one data column with the data
Parameters
----------
col_str : string
One of the column strings in self.cols.
'''
data_column=zeros(self.ilines)
for i in range(self.ilines):
data_column[i]=self.data[i][self.col_num[col_str]... | def get(self, col_str) | get one data column with the data
Parameters
----------
col_str : string
One of the column strings in self.cols. | 5.559365 | 2.874601 | 1.933961 |
'''
make a simple plot of two columns against each other.
An example would be instance.plot_xtime('PB206', label='PB206 vs t_y'
Recomend using the plot function DataPlot.plot() it has more
functionality.
Parameters
----------
Y : string
Colum... | def plot_xtime(self, y, x='time', label='default', labelx=None,
labely=None ,title=None, shape='.', logx=False,
logy=True, base=10) | make a simple plot of two columns against each other.
An example would be instance.plot_xtime('PB206', label='PB206 vs t_y'
Recomend using the plot function DataPlot.plot() it has more
functionality.
Parameters
----------
Y : string
Column on Y-axis.
... | 3.655049 | 1.541092 | 2.371726 |
fname=self.findFile(fname,numtype)
if self.inputdir == '':
self.inputdir = self.sldir # This chunk of code changes into the directory where fname is,
os.chdir(self.inputdir) # and appends a '/' to the directory title so it accesses the
... | def getCycleData(self, attri, fname, numtype='cycNum') | In this method a column of data for the associated cycle
attribute is returned.
Parameters
----------
attri : string
The name of the attribute we are looking for.
fname : string
The name of the file we are getting the data from or the
cycle nu... | 3.82342 | 3.876476 | 0.986313 |
fname=self.findFile(fname,numtype)
f=open(fname,'r')
for i in range(self.index+1):
f.readline()
lines=f.readlines()
for i in range(len(lines)):
lines[i]=lines[i].strip()
lines[i]=lines[i].split()
index=0
data=[]
... | def getColData(self, attri, fname, numtype='cycNum') | In this method a column of data for the associated column
attribute is returned.
Parameters
----------
attri : string
The name of the attribute we are looking for.
fname : string
The name of the file we are getting the data from or the
cycle n... | 2.966337 | 3.09461 | 0.958549 |
'''
In this method instead of getting a particular column of data,
the program gets a particular row of data for a particular
element name.
attri : string
The name of the attribute we are looking for. A complete
list of them can be obtained by calling
... | def getElement(self, attri, fname, numtype='cycNum') | In this method instead of getting a particular column of data,
the program gets a particular row of data for a particular
element name.
attri : string
The name of the attribute we are looking for. A complete
list of them can be obtained by calling
>>> get('e... | 3.781422 | 2.038869 | 1.854666 |
''' Private method for getting a cycle, called from get.'''
yps=self.get('ABUNDANCE_MF', cycle)
z=self.get('Z', cycle) #charge
a=self.get('A', cycle) #mass
isomers=self.get('ISOM', cycle)
a_iso_to_plot,z_iso_to_plot,abunds,isotope_to_plot,el_iso_to_plot,isom=\
... | def _getcycle(self, cycle, decayed=False) | Private method for getting a cycle, called from get. | 3.838504 | 3.713577 | 1.033641 |
''' Private method for getting an attribute, called from get.'''
if str(fname.__class__)=="<type 'list'>":
isList=True
else:
isList=False
data=[]
if fname==None:
fname=self.files
numtype='file'
isList=True
if is... | def _getattr(self, attri, fname=None, numtype='cycNum') | Private method for getting an attribute, called from get. | 2.537511 | 2.376815 | 1.06761 |
'''
Private method that reads in and organizes the .ppn file
Loads the data of the .ppn file into the variable cols.
'''
if sldir.endswith(os.sep):
#Making sure fname will be formatted correctly
fname = str(sldir)+str(fname)
else:
... | def _readPPN(self, fname, sldir) | Private method that reads in and organizes the .ppn file
Loads the data of the .ppn file into the variable cols. | 6.676397 | 4.522584 | 1.476235 |
'''
private method that reads in and organizes the .DAT file
Loads the data of the .DAT File into the variables cattrs and cols.
In both these cases they are dictionaries, but in the case of cols,
it is a dictionary of numpy array exect for the element ,
element_name wher... | def _readFile(self, fname, sldir) | private method that reads in and organizes the .DAT file
Loads the data of the .DAT File into the variables cattrs and cols.
In both these cases they are dictionaries, but in the case of cols,
it is a dictionary of numpy array exect for the element ,
element_name where it is just a list | 5.803196 | 2.90784 | 1.995707 |
numType=numtype.upper()
if numType == 'FILE':
#do nothing
return fname
elif numType == 'CYCNUM':
try:
fname = int(fname)
except ValueError:
print('Improper choice:'+ str(fname))
print('Re... | def findFile(self, fname, numtype) | Function that finds the associated file for fname when Fname is
time or NDump.
Parameters
----------
fname : string
The name of the file we are looking for.
numType : string
Designates how this function acts and how it interprets
fname. If nu... | 8.850872 | 8.603757 | 1.028722 |
'''
A function which determines whether and how to retry.
:param ~azure.storage.models.RetryContext context:
The retry context. This contains the request, response, and other data
which can be used to determine whether or not to retry.
:param function() backoff... | def _retry(self, context, backoff) | A function which determines whether and how to retry.
:param ~azure.storage.models.RetryContext context:
The retry context. This contains the request, response, and other data
which can be used to determine whether or not to retry.
:param function() backoff:
A func... | 4.773135 | 2.723309 | 1.752697 |
'''
<?xml version="1.0" encoding="utf-8"?>
<StorageServiceStats>
<GeoReplication>
<Status>live|bootstrap|unavailable</Status>
<LastSyncTime>sync-time|<empty></LastSyncTime>
</GeoReplication>
</StorageServiceStats>
'''
if response is None or response.body is ... | def _convert_xml_to_service_stats(response) | <?xml version="1.0" encoding="utf-8"?>
<StorageServiceStats>
<GeoReplication>
<Status>live|bootstrap|unavailable</Status>
<LastSyncTime>sync-time|<empty></LastSyncTime>
</GeoReplication>
</StorageServiceStats> | 2.699086 | 1.630432 | 1.655442 |
fw_update_action = self._actions.update_firmware
if not fw_update_action:
raise (sushy.exceptions.
MissingActionError(action='#UpdateService.SimpleUpdate',
resource=self._path))
return fw_update_action | def _get_firmware_update_element(self) | Get the url for firmware update
:returns: firmware update url
:raises: Missing resource error on missing url | 8.690196 | 9.163855 | 0.948312 |
action_data = {
'ImageURI': file_url,
}
target_uri = self._get_firmware_update_element().target_uri
try:
self._conn.post(target_uri, data=action_data)
except sushy.exceptions.SushyError as e:
msg = (('The Redfish controller failed to u... | def flash_firmware(self, redfish_inst, file_url) | Perform firmware flashing on a redfish system
:param file_url: url to firmware bits.
:param redfish_inst: redfish instance
:raises: IloError, on an error from iLO. | 2.897887 | 2.943515 | 0.984499 |
p_state = ['Idle']
c_state = ['Idle']
def has_firmware_flash_completed():
curr_state, curr_percent = self.get_firmware_update_progress()
p_state[0] = c_state[0]
c_state[0] = curr_state
if (((p_state[0] in ['Updating', 'Verify... | def wait_for_redfish_firmware_update_to_complete(self, redfish_object) | Continuously polls for iLO firmware update to complete.
:param redfish_object: redfish instance | 4.321634 | 4.54024 | 0.951852 |
# perform refresh
try:
self.refresh()
except sushy.exceptions.SushyError as e:
msg = (('Progress of firmware update not known. '
'Error %(error)s') %
{'error': str(e)})
LOG.debug(msg)
return "Unknown"... | def get_firmware_update_progress(self) | Get the progress of the firmware update.
:returns: firmware update state, one of the following values:
"Idle","Uploading","Verifying","Writing",
"Updating","Complete","Error".
If the update resource is not found, then "Unknown".
:returns: firmware u... | 7.087871 | 6.791448 | 1.043647 |
return BIOSPendingSettings(
self._conn, utils.get_subresource_path_by(
self, ["@Redfish.Settings", "SettingsObject"]),
redfish_version=self.redfish_version) | def pending_settings(self) | Property to provide reference to bios_pending_settings instance
It is calculated once when the first time it is queried. On refresh,
this property gets reset. | 11.98697 | 8.792079 | 1.363383 |
return BIOSBootSettings(
self._conn, utils.get_subresource_path_by(
self, ["Oem", "Hpe", "Links", "Boot"]),
redfish_version=self.redfish_version) | def boot_settings(self) | Property to provide reference to bios boot instance
It is calculated once when the first time it is queried. On refresh,
this property gets reset. | 8.198648 | 7.252156 | 1.130512 |
return iscsi.ISCSIResource(
self._conn, utils.get_subresource_path_by(
self, ["Oem", "Hpe", "Links", "iScsi"]),
redfish_version=self.redfish_version) | def iscsi_resource(self) | Property to provide reference to bios iscsi resource instance
It is calculated once when the first time it is queried. On refresh,
this property gets reset. | 7.042327 | 6.677861 | 1.054578 |
return BIOSMappings(
self._conn, utils.get_subresource_path_by(
self, ["Oem", "Hpe", "Links", "Mappings"]),
redfish_version=self.redfish_version) | def bios_mappings(self) | Property to provide reference to bios mappings instance
It is calculated once when the first time it is queried. On refresh,
this property gets reset. | 7.18903 | 7.325027 | 0.981434 |
return BIOSBaseConfigs(
self._conn, utils.get_subresource_path_by(
self, ["Oem", "Hpe", "Links", "BaseConfigs"]),
redfish_version=self.redfish_version) | def _get_base_configs(self) | Method that returns object of bios base configs. | 7.694677 | 5.315897 | 1.447484 |
bios_properties = {
'BootMode': mappings.GET_BIOS_BOOT_MODE_MAP_REV.get(boot_mode)
}
if boot_mode == sys_cons.BIOS_BOOT_MODE_UEFI:
bios_properties['UefiOptimizedBoot'] = 'Enabled'
self.update_bios_data_by_patch(bios_properties) | def set_pending_boot_mode(self, boot_mode) | Sets the boot mode of the system for next boot.
:param boot_mode: either sys_cons.BIOS_BOOT_MODE_LEGACY_BIOS,
sys_cons.BIOS_BOOT_MODE_UEFI. | 5.114661 | 4.531526 | 1.128684 |
bios_settings_data = {
'Attributes': data
}
self._conn.post(self.path, data=bios_settings_data) | def update_bios_data_by_post(self, data) | Update bios data by post
:param data: default bios config data | 6.668968 | 8.170454 | 0.81623 |
bios_settings_data = {
'Attributes': data
}
self._conn.patch(self.path, data=bios_settings_data) | def update_bios_data_by_patch(self, data) | Update bios data by patch
:param data: default bios config data | 6.163855 | 7.856835 | 0.784521 |
boot_string = None
if not self.persistent_boot_config_order or not self.boot_sources:
msg = ('Boot sources or persistent boot config order not found')
LOG.debug(msg)
raise exception.IloError(msg)
preferred_boot_device = self.persistent_boot_config_or... | def get_persistent_boot_device(self) | Get current persistent boot device set for the host
:returns: persistent boot device for the system
:raises: IloError, on an error from iLO. | 3.419533 | 3.439946 | 0.994066 |
boot_sources = self.boot_sources
if not boot_sources:
msg = ('Boot sources are not found')
LOG.debug(msg)
raise exception.IloError(msg)
for boot_source in boot_sources:
if (mac.upper() in boot_source['UEFIDevicePath'] and
... | def get_uefi_boot_string(self, mac) | Get uefi iscsi boot string for the host
:returns: iscsi boot string for the system
:raises: IloError, on an error from iLO. | 4.33855 | 4.413901 | 0.982929 |
'''
Molecular plasma viscosity (Spitzer 1962)
Parameters
----------
X : float
H mass fraction
T : float
temperature in K
rho : float
density in cgs
Returns
-------
nu : float
molecular diffusivity in [cm**2/s]
Notes
-----
According t... | def visc_mol_sol(T,rho,X) | Molecular plasma viscosity (Spitzer 1962)
Parameters
----------
X : float
H mass fraction
T : float
temperature in K
rho : float
density in cgs
Returns
-------
nu : float
molecular diffusivity in [cm**2/s]
Notes
-----
According to Eq 22 in S... | 11.193857 | 1.773695 | 6.311037 |
'''
Radiative viscosity (Thomas, 1930) for e- scattering opacity
Parameters
----------
X : float
H mass fraction
T : float
temperature in K
rho : float
density in cgs
Returns
-------
nu : float
radiative diffusivity in [cm**2/s]
Examples
---... | def visc_rad_kap_sc(T,rho,X) | Radiative viscosity (Thomas, 1930) for e- scattering opacity
Parameters
----------
X : float
H mass fraction
T : float
temperature in K
rho : float
density in cgs
Returns
-------
nu : float
radiative diffusivity in [cm**2/s]
Examples
--------
>>... | 5.368656 | 1.335619 | 4.019601 |
'''
Gamma1 for a mix of ideal gas and radiation
Hansen & Kawaler, page 177, Eqn. 3.110
Parameters
----------
beta : float
Gas pressure fraction Pgas/(Pgas+Prad)
'''
Gamma3minus1 = (old_div(2.,3.))*(4.-3.*beta)/(8.-7.*beta)
Gamma1 = beta + (4.-3.*beta) * Gamma3minus1
... | def Gamma1_gasrad(beta) | Gamma1 for a mix of ideal gas and radiation
Hansen & Kawaler, page 177, Eqn. 3.110
Parameters
----------
beta : float
Gas pressure fraction Pgas/(Pgas+Prad) | 10.94864 | 3.861648 | 2.835224 |
'''
P = R/mu * rho * T
Parameters
----------
mu : float
Mean molecular weight
rho : float
Density [cgs]
T : float
Temperature [K]
'''
R = old_div(boltzmann_constant, atomic_mass_unit)
return (old_div(R,mu)) * rho * T | def Pgas(rho,T,mu) | P = R/mu * rho * T
Parameters
----------
mu : float
Mean molecular weight
rho : float
Density [cgs]
T : float
Temperature [K] | 5.555414 | 3.284561 | 1.691372 |
''' Curvature MiMf from Ferrario etal. 2005MNRAS.361.1131.'''
mf=-0.00012336*mi**6+0.003160*mi**5-0.02960*mi**4+\
0.12350*mi**3-0.21550*mi**2+0.19022*mi+0.46575
return mf | def mimf_ferrario(mi) | Curvature MiMf from Ferrario etal. 2005MNRAS.361.1131. | 6.202009 | 3.921379 | 1.581589 |
'''
Returns
-------
N(M)dM
for given mass according to Kroupa IMF, vectorization
available via vimf()
'''
m1 = 0.08; m2 = 0.50
a1 = 0.30; a2 = 1.30; a3 = 2.3
const2 = m1**-a1 -m1**-a2
const3 = m2**-a2 -m2**-a3
if m < 0.08:
alpha = 0.3
const ... | def imf(m) | Returns
-------
N(M)dM
for given mass according to Kroupa IMF, vectorization
available via vimf() | 5.334055 | 3.180345 | 1.677194 |
'''
Integrate IMF between m1 and m2.
Parameters
----------
m1 : float
Min mass
m2 : float
Max mass
m : float
Mass array
imf : float
IMF array
bywhat : string, optional
'bymass' integrates the mass that goes into stars of
that mass int... | def int_imf_dm(m1,m2,m,imf,bywhat='bymass',integral='normal') | Integrate IMF between m1 and m2.
Parameters
----------
m1 : float
Min mass
m2 : float
Max mass
m : float
Mass array
imf : float
IMF array
bywhat : string, optional
'bymass' integrates the mass that goes into stars of
that mass interval; or 'by... | 2.730355 | 1.595106 | 1.711708 |
'''
orbital angular momentum.
e.g Ge etal2010
Parameters
----------
m1, m2 : float
Masses of both stars in Msun.
A : float
Separation in Rsun.
e : float
Eccentricity
'''
a_cm = a * rsun_cm
m1_g = m1 * msun_g
m2_g = m2 * msun_g
... | def am_orb(m1,m2,a,e) | orbital angular momentum.
e.g Ge etal2010
Parameters
----------
m1, m2 : float
Masses of both stars in Msun.
A : float
Separation in Rsun.
e : float
Eccentricity | 5.570163 | 3.014339 | 1.847888 |
'''
mass loss rate van Loon etal (2005).
Parameters
----------
L : float
L in L_sun.
Teff : float
Teff in K.
Returns
-------
Mdot
Mdot in Msun/yr
Notes
-----
ref: van Loon etal 2005, A&A 438, 273
'''
Mdot = -5.65 +... | def mass_loss_loon05(L,Teff) | mass loss rate van Loon etal (2005).
Parameters
----------
L : float
L in L_sun.
Teff : float
Teff in K.
Returns
-------
Mdot
Mdot in Msun/yr
Notes
-----
ref: van Loon etal 2005, A&A 438, 273 | 5.08424 | 2.290086 | 2.220109 |
'''
Parameters
----------
m1, m2 : float
M in Msun.
r : float
Distance in Rsun.
Returns
-------
Epot
Epot in erg.
'''
epo = -grav_const * m1 * m2 * msun_g**2 / (r * rsun_cm)
return epo | def energ_orb(m1,m2,r) | Parameters
----------
m1, m2 : float
M in Msun.
r : float
Distance in Rsun.
Returns
-------
Epot
Epot in erg. | 7.170113 | 3.910461 | 1.833572 |
A *= rsun_cm
print(A)
velocity = np.sqrt(grav_const*msun_g*(M1+M2)/A)
print(old_div(velocity,1.e5))
p = 2.*np.pi * A / velocity
p /= (60*60*24.)
return p | def period(A,M1,M2) | calculate binary period from separation.
Parameters
----------
A : float
separation A Rsun.
M1, M2 : float
M in Msun.
Returns
-------
p
period in days. | 8.7481 | 7.819973 | 1.118687 |
ve = np.sqrt(2.*grav_const*M*msun_g/(R*rsun_cm))
ve = ve*1.e-5
return ve | def escape_velocity(M,R) | escape velocity.
Parameters
----------
M : float
Mass in solar masses.
R : float
Radius in solar radiu.
Returns
-------
v_escape
in km/s. | 9.207775 | 10.587363 | 0.869695 |
'''
Returns
-------
Na*<sigma v>
for MACS [mb] at T [K].
'''
Na = avogadro_constant
k = boltzmann_constant
vtherm=(2.*k*T/mass_H_atom)**0.5
s = macs*1.e-27
Nasv = s*vtherm*Na
return Nasv | def Nasv(macs,T) | Returns
-------
Na*<sigma v>
for MACS [mb] at T [K]. | 14.633921 | 6.593204 | 2.219546 |
'''
Returns
-------
MACS
[mb] at T [K] from Na*<sigma v>.
'''
Na = avogadro_constant
k = boltzmann_constant
vtherm=(2.*k*T/mass_H_atom)**0.5
s = old_div(nasv,(vtherm*Na))
macs = s*1.e27
return macs | def macs(nasv,T) | Returns
-------
MACS
[mb] at T [K] from Na*<sigma v>. | 16.277479 | 8.075722 | 2.015607 |
'''
mean molecular weight per free electron, assuming full ionisation, and
approximating mu_i/Z_i ~ 2 for all elements heavier then Helium.
(Kippenhahn & Weigert, Ch 13.1, Eq. 13.8)
Parameters
----------
X : float
Mass fraction of H.
'''
try:
mu_e = o... | def mu_e(X) | mean molecular weight per free electron, assuming full ionisation, and
approximating mu_i/Z_i ~ 2 for all elements heavier then Helium.
(Kippenhahn & Weigert, Ch 13.1, Eq. 13.8)
Parameters
----------
X : float
Mass fraction of H. | 9.212391 | 2.12584 | 4.333529 |
'''
mean molecular weight assuming full ionisation.
(Kippenhahn & Weigert, Ch 13.1, Eq. 13.6)
Parameters
----------
X : float
Mass fraction vector.
Z : float
Charge number vector.
A : float
Mass number vector.
'''
if not isinstance(Z,n... | def mu(X,Z,A) | mean molecular weight assuming full ionisation.
(Kippenhahn & Weigert, Ch 13.1, Eq. 13.6)
Parameters
----------
X : float
Mass fraction vector.
Z : float
Charge number vector.
A : float
Mass number vector. | 3.70102 | 2.049546 | 1.805775 |
'''
T(rho) that separates ideal gas and degenerate pressure dominated regions.
Kippenhahn & Weigert, Eq. 16.6
Parameters
----------
rho : float
Density array [cgs].
mu : float
Mean molecular weight.
mu_e : float
Mean molecular weight per free electron.
... | def Trho_iddeg(rho,mu,mu_e) | T(rho) that separates ideal gas and degenerate pressure dominated regions.
Kippenhahn & Weigert, Eq. 16.6
Parameters
----------
rho : float
Density array [cgs].
mu : float
Mean molecular weight.
mu_e : float
Mean molecular weight per free electron. | 9.201894 | 2.689039 | 3.422001 |
matching_physical_drives = []
criteria_to_consider = [x for x in FILTER_CRITERIA
if x in logical_disk]
for physical_drive_object in physical_drives:
for criteria in criteria_to_consider:
logical_drive_value = logical_disk.get(criteria)
physic... | def _get_criteria_matching_disks(logical_disk, physical_drives) | Finds the physical drives matching the criteria of logical disk.
This method finds the physical drives matching the criteria
of the logical disk passed.
:param logical_disk: The logical disk dictionary from raid config
:param physical_drives: The physical drives to consider.
:returns: A list of ph... | 2.185999 | 2.41667 | 0.90455 |
size_gb = logical_disk['size_gb']
raid_level = logical_disk['raid_level']
number_of_physical_disks = logical_disk.get(
'number_of_physical_disks', constants.RAID_LEVEL_MIN_DISKS[raid_level])
share_physical_disks = logical_disk.get('share_physical_disks', False)
# Try to create a new in... | def allocate_disks(logical_disk, server, raid_config) | Allocate physical disks to a logical disk.
This method allocated physical disks to a logical
disk based on the current state of the server and
criteria mentioned in the logical disk.
:param logical_disk: a dictionary of a logical disk
from the RAID configuration input to the module.
:param... | 2.943588 | 2.908868 | 1.011936 |
'''
setup trajectories for constant radiation entropy.
S_gamma/R where the radiation constant R = N_A*k
(Dave Arnett, Supernova book, p. 212)
This relates rho and T but the time scale for this
is independent.
Parameters
----------
Sg : float
S_gamma/R, values between 0.1 an... | def trajectory_SgConst(Sg=0.1, delta_logt_dex=-0.01) | setup trajectories for constant radiation entropy.
S_gamma/R where the radiation constant R = N_A*k
(Dave Arnett, Supernova book, p. 212)
This relates rho and T but the time scale for this
is independent.
Parameters
----------
Sg : float
S_gamma/R, values between 0.1 and 10. reflec... | 7.008698 | 3.621405 | 1.935353 |
'''
provide default lists of elements to plot.
what_list : string
String name of species lists provided.
If what_list is "CNONe", then C, N, O and some other light
elements.
If what_list is "s-process", then s-process indicators.
'''
if what_list is "CNONe":
... | def species_list(what_list) | provide default lists of elements to plot.
what_list : string
String name of species lists provided.
If what_list is "CNONe", then C, N, O and some other light
elements.
If what_list is "s-process", then s-process indicators. | 4.450519 | 2.733419 | 1.628188 |
'''
provide one out of 25 unique combinations of style, color and mark
use in combination with markevery=a+mod(i,b) to add spaced points,
here a would be the base spacing that would depend on the data
density, modulated with the number of lines to be plotted (b)
Parameters
----------
i... | def linestyle(i,a=5,b=3) | provide one out of 25 unique combinations of style, color and mark
use in combination with markevery=a+mod(i,b) to add spaced points,
here a would be the base spacing that would depend on the data
density, modulated with the number of lines to be plotted (b)
Parameters
----------
i : integer
... | 7.409951 | 1.903013 | 3.893799 |
'''
colour pallete from http://tableaufriction.blogspot.ro/
allegedly suitable for colour-blind folk
SJ
'''
rawRGBs = [(162,200,236),
(255,128,14),
(171,171,171),
(95,158,209),
(89,89,89),
(0,107,164),
... | def colourblind(i) | colour pallete from http://tableaufriction.blogspot.ro/
allegedly suitable for colour-blind folk
SJ | 4.2978 | 2.870872 | 1.497036 |
'''
another colour pallete from http://www.sron.nl/~pault/
allegedly suitable for colour-blind folk
SJ
'''
hexcols = ['#332288', '#88CCEE', '#44AA99', '#117733', '#999933', '#DDCC77',
'#CC6677', '#882255', '#AA4499']
idx = sc.mod(i,len(hexcols))
return hexcol... | def colourblind2(i) | another colour pallete from http://www.sron.nl/~pault/
allegedly suitable for colour-blind folk
SJ | 4.754902 | 2.554427 | 1.861436 |
'''
version of linestyle function with colourblind colour scheme
returns linetyle, marker, color (see example)
Parameters
----------
i : integer
Number of linestyle combination - there are many....
a : integer
Spacing of marks. The default is 5.
... | def linestylecb(i,a=5,b=3) | version of linestyle function with colourblind colour scheme
returns linetyle, marker, color (see example)
Parameters
----------
i : integer
Number of linestyle combination - there are many....
a : integer
Spacing of marks. The default is 5.
b : integer... | 6.987515 | 2.218158 | 3.150142 |
'''
provide default symbol lists
Parameters
----------
what_list : string
String name of symbol lists provided; "list1", "list2",
"lines1" or "lines2".
'''
if what_list is "list1":
symbol=['ro','bo','ko','go','mo'\
,'r-','b-','k-','g-','m-','r--','b-... | def symbol_list(what_list) | provide default symbol lists
Parameters
----------
what_list : string
String name of symbol lists provided; "list1", "list2",
"lines1" or "lines2". | 3.722733 | 3.012271 | 1.235856 |
'''
provide the list of symbols to use according for the list of
species/arrays to plot.
Parameters
----------
default_symbol_list : list
Symbols that the user choose to use.
len_list_to_print : integer
len of list of species/arrays to print.
'''
symbol_used = []
... | def make_list(default_symbol_list, len_list_to_print) | provide the list of symbols to use according for the list of
species/arrays to plot.
Parameters
----------
default_symbol_list : list
Symbols that the user choose to use.
len_list_to_print : integer
len of list of species/arrays to print. | 4.726382 | 2.108541 | 2.241542 |
'''
bb is an index array which may have numerous double or triple
occurrences of indices, such as for example the decay_index_pointer.
This method removes all entries <= -, then all dublicates and
finally returns a sorted list of indices.
'''
cc=bb[np.where(bb>=0)]
cc.sort()
dc=cc[1... | def strictly_monotonic(bb) | bb is an index array which may have numerous double or triple
occurrences of indices, such as for example the decay_index_pointer.
This method removes all entries <= -, then all dublicates and
finally returns a sorted list of indices. | 10.127843 | 3.419542 | 2.961754 |
'''
read solar abundances from filename_solar.
Parameters
----------
filename_solar : string
The file name.
solar_factor : float
The correction factor to apply, in case filename_solar is not
solar, but some file used to get initial abundances at
metallicity lower... | def solar(filename_solar, solar_factor) | read solar abundances from filename_solar.
Parameters
----------
filename_solar : string
The file name.
solar_factor : float
The correction factor to apply, in case filename_solar is not
solar, but some file used to get initial abundances at
metallicity lower than solar.... | 5.514811 | 3.051084 | 1.807492 |
''' This just give back cl, that is the original index as it is read from files from a data file.'''
#connect the specie number in the list, with the specie name
global cl
cl={}
for a,b in zip(names_ppn_world,number_names_ppn_world):
cl[a] = b | def define_zip_index_for_species(names_ppn_world,
number_names_ppn_world) | This just give back cl, that is the original index as it is read from files from a data file. | 13.57332 | 4.457069 | 3.045347 |
'''
Given an array of isotopic abundances not decayed and a similar
array of isotopic abundances not decayed, here elements abundances,
and production factors for elements are calculated
'''
# this way is done in a really simple way. May be done better for sure, in a couple of loops.
# I ... | def element_abund_marco(i_decay, stable_isotope_list,
stable_isotope_identifier,
mass_fractions_array_not_decayed,
mass_fractions_array_decayed) | Given an array of isotopic abundances not decayed and a similar
array of isotopic abundances not decayed, here elements abundances,
and production factors for elements are calculated | 3.571657 | 3.063594 | 1.165839 |
'''
Very simple Vfunction that gives the atomic number AS A STRING when given the element symbol.
Uses predefined a dictionnary.
Parameter :
z : string or number
For the other way, see get_z_from_el
'''
if(type(z)==float):
z=int(z)
if(type(z)==int):
z=str(z)
dict_... | def get_el_from_z(z) | Very simple Vfunction that gives the atomic number AS A STRING when given the element symbol.
Uses predefined a dictionnary.
Parameter :
z : string or number
For the other way, see get_z_from_el | 2.718573 | 2.210283 | 1.229966 |
'''
performs the fit
x, y : list
Matching data arrays that define a numerical function y(x),
this is the data to be fitted.
dcoef : list or string
You can provide a different guess for the coefficients, or
provide the string 'none' to use ... | def fit(self, x, y, dcoef='none') | performs the fit
x, y : list
Matching data arrays that define a numerical function y(x),
this is the data to be fitted.
dcoef : list or string
You can provide a different guess for the coefficients, or
provide the string 'none' to use the inital guess. T... | 6.628553 | 1.851839 | 3.579444 |
'''
plot the data and the fitted function.
Parameters
----------
ifig : integer
Figure window number. The default is 1.
data_label : string
Legend for data. The default is 'data'.
fit_label : string
Legend for fit. If fit_la... | def plot(self, ifig=1, data_label='data', fit_label='fit',
data_shape='o', fit_shape='-') | plot the data and the fitted function.
Parameters
----------
ifig : integer
Figure window number. The default is 1.
data_label : string
Legend for data. The default is 'data'.
fit_label : string
Legend for fit. If fit_lable is 'fit', then s... | 3.361797 | 2.089991 | 1.608523 |
'''
This private method extracts the element names from stable_el.
Note that stable_names is a misnomer as stable_el also contains
unstable element names with a number 999 for the *stable* mass
numbers. (?!??)
'''
stable_names=[]
for i in range(len(self.s... | def _stable_names(self) | This private method extracts the element names from stable_el.
Note that stable_names is a misnomer as stable_el also contains
unstable element names with a number 999 for the *stable* mass
numbers. (?!??) | 8.069145 | 1.660993 | 4.858026 |
'''
This private method takes as input one vector definition and
processes it, including sorting by charge number and
mass number. It returns the processed input variables
plus an element and isotope vector and a list of
isomers.
'''
def cmp_to_key(mycmp)... | def _process_abundance_vector(self, a, z, isomers, yps) | This private method takes as input one vector definition and
processes it, including sorting by charge number and
mass number. It returns the processed input variables
plus an element and isotope vector and a list of
isomers. | 2.131726 | 1.772163 | 1.202895 |
'''
simple comparator method
'''
indX=0
indY=0
a= int(x[0].split('-')[1])
b= int(y[0].split('-')[1])
if a>b:
return 1
if a==b:
return 0
if a<b:
return -1 | def compar(self, x, y) | simple comparator method | 4.809027 | 4.00223 | 1.201587 |
'''
simple comparator method
'''
indX=0
indY=0
for i in range(len(self.stable_names)):
if self.stable_names[i] == x[0].split('-')[0]:
indX=i
if self.stable_names[i] == y[0].split('-')[0]:
indY=i
if indX>in... | def comparator(self, x, y) | simple comparator method | 2.801151 | 2.555913 | 1.095949 |
'''
This private method reads the isotopedatabase.txt file in sldir
run dictory and returns z, a, elements, the cutoff mass for each
species that delineate beta+ and beta- decay and the logical in
the last column. Also provides charge_from_element dictionary
according to ... | def _read_isotopedatabase(self, ffname='isotopedatabase.txt') | This private method reads the isotopedatabase.txt file in sldir
run dictory and returns z, a, elements, the cutoff mass for each
species that delineate beta+ and beta- decay and the logical in
the last column. Also provides charge_from_element dictionary
according to isotopedatabase.txt. | 5.737697 | 2.616564 | 2.192837 |
'''
This routine accepts input formatted like 'He-3' and checks with
stable_el list if occurs in there. If it does, the routine
returns True, otherwise False.
Notes
-----
this method is designed to work with an se instance from
nugridse.py. In order to m... | def is_stable(self,species) | This routine accepts input formatted like 'He-3' and checks with
stable_el list if occurs in there. If it does, the routine
returns True, otherwise False.
Notes
-----
this method is designed to work with an se instance from
nugridse.py. In order to make it work with ppn... | 9.730852 | 3.867139 | 2.516292 |
'''
Write initial abundance file (intended for use with ppn)
Parameters
----------
outfile : string
Name of output file. The default is
'initial_abundance.dat'.
header_string : string
A string with header line. The default is
... | def write(self, outfile='initial_abundance.dat',
header_string='initial abundances for a PPN run') | Write initial abundance file (intended for use with ppn)
Parameters
----------
outfile : string
Name of output file. The default is
'initial_abundance.dat'.
header_string : string
A string with header line. The default is
'initial abunda... | 4.865816 | 3.01358 | 1.61463 |
'''
species_hash is a hash array in which you provide abundances
referenced by species names that you want to set to some
particular value; all other species are then normalised so that
the total sum is 1.
Examples
--------
You can set up the argument ar... | def set_and_normalize(self,species_hash) | species_hash is a hash array in which you provide abundances
referenced by species names that you want to set to some
particular value; all other species are then normalised so that
the total sum is 1.
Examples
--------
You can set up the argument array for this method ... | 5.162033 | 2.64848 | 1.949055 |
'''
This file returns the isotopic ratio of two isotopes specified
as iso1 and iso2. The isotopes are given as, e.g.,
['Fe',56,'Fe',58] or ['Fe-56','Fe-58'] (for compatibility)
-> list.
'''
if len(isos) == 2:
dumb = []
dumb = isos[0].split... | def isoratio_init(self,isos) | This file returns the isotopic ratio of two isotopes specified
as iso1 and iso2. The isotopes are given as, e.g.,
['Fe',56,'Fe',58] or ['Fe-56','Fe-58'] (for compatibility)
-> list. | 4.213073 | 2.294061 | 1.836513 |
'''
This routine returns the abundance of a specific isotope.
Isotope given as, e.g., 'Si-28' or as list
['Si-28','Si-29','Si-30']
'''
if type(isos) == list:
dumb = []
for it in range(len(isos)):
dumb.append(isos[it].split('-'))
... | def iso_abundance(self,isos) | This routine returns the abundance of a specific isotope.
Isotope given as, e.g., 'Si-28' or as list
['Si-28','Si-29','Si-30'] | 3.191873 | 2.221054 | 1.437099 |
drv_rot_speed_rpm = set()
for member in self.get_members():
if member.rotational_speed_rpm is not None:
drv_rot_speed_rpm.add(member.rotational_speed_rpm)
return drv_rot_speed_rpm | def drive_rotational_speed_rpm(self) | Gets the set of rotational speed of the HDD drives | 2.592242 | 2.46178 | 1.052995 |
'''
Converts the name of the given isotope (input), e.g., 'N-14' to
14N as used later to compare w/ grain database.
'''
sp = iso.split('-')
output = sp[1] + sp[0]
return output.lower() | def iso_name_converter(iso) | Converts the name of the given isotope (input), e.g., 'N-14' to
14N as used later to compare w/ grain database. | 14.584093 | 2.657452 | 5.487998 |
'''
This subroutine gives back the path of the whole svn tree
installation, which is necessary for the script to run.
'''
svnpathtmp = __file__
splitsvnpath = svnpathtmp.split('/')
if len(splitsvnpath) == 1:
svnpath = os.path.abspath('.') + '/../../'
else:
svnpath = ''
... | def get_svnpath() | This subroutine gives back the path of the whole svn tree
installation, which is necessary for the script to run. | 4.533377 | 2.582508 | 1.755416 |
'''
Resets the filter and goes back to initialized value. This
routine also resets the style if you have changed it.
'''
self.header_desc = self._header_desc
self.header_data = self._header_data
self.header_style = self._header_style
self.desc = self._des... | def reset_filter(self) | Resets the filter and goes back to initialized value. This
routine also resets the style if you have changed it. | 4.345168 | 2.310536 | 1.880589 |
'''
This routine gives you informations what kind of grains are
currently available in your filtered version. It gives you
the type of grains available. More to be implemented upon need.
Parameters
----------
graintype, group, references, phase : boolean
... | def info(self, graintype=True, group=True, reference=False,
phase=True) | This routine gives you informations what kind of grains are
currently available in your filtered version. It gives you
the type of grains available. More to be implemented upon need.
Parameters
----------
graintype, group, references, phase : boolean
What do you wa... | 2.323737 | 1.668733 | 1.392516 |
'''
Private function to filter data, goes with filter_desc
'''
# now filter data
if len(indexing) > 0:
desc_tmp = np.zeros((len(indexing),len(self.header_desc)),dtype='|S1024')
data_tmp = np.zeros((len(indexing),len(self.header_data)))
style_... | def _filter_desc(self, indexing) | Private function to filter data, goes with filter_desc | 2.34991 | 2.020721 | 1.162907 |
'''
This subroutine is to filter out single grains. It is kind of
useless if you have tons of data still in the list. To work on
there, you have other filters (filter_desc and filter_data)
available! This filter gives an index to every grain, plots
the most important inf... | def filter_single_grain(self) | This subroutine is to filter out single grains. It is kind of
useless if you have tons of data still in the list. To work on
there, you have other filters (filter_desc and filter_data)
available! This filter gives an index to every grain, plots
the most important information, and then a... | 3.778318 | 2.578305 | 1.465427 |
'''
This subroutine filters isotopic values according to the limit
you give. You can filter in ratio or in delta space.
Parameters
----------
isos : list
isotopes you want to filter for, e.g., give as
['Si-28', 'Si-30'] for the 28/30 ratio.
... | def filter_data(self, isos, limit, delta=True) | This subroutine filters isotopic values according to the limit
you give. You can filter in ratio or in delta space.
Parameters
----------
isos : list
isotopes you want to filter for, e.g., give as
['Si-28', 'Si-30'] for the 28/30 ratio.
limit : string
... | 3.663375 | 2.694062 | 1.359796 |
'''
This routine changes the plotting style that is set by default.
The style is changed according the the label that you choose.
Changing according to reference, use style_chg_ref() function!
You can change it back to default by resetting the filter using
g.reset_filter(... | def style_chg_label(self,type,symb=None,edc=None,fac=None,smbsz=None,edw=None,lab=None) | This routine changes the plotting style that is set by default.
The style is changed according the the label that you choose.
Changing according to reference, use style_chg_ref() function!
You can change it back to default by resetting the filter using
g.reset_filter() routine, assuming ... | 3.85351 | 1.300826 | 2.962356 |
'''
This routine changes the plotting style that is set by default.
The style is changed according the the reference of the paper
as given in the grain database. For change according to type of
grain, use the routine syle_chg_label().
['Symbol', 'Edge color', 'Face color... | def style_chg_ref(self,ref,symb=None,edc=None,fac=None,smbsz=None,edw=None,lab=None) | This routine changes the plotting style that is set by default.
The style is changed according the the reference of the paper
as given in the grain database. For change according to type of
grain, use the routine syle_chg_label().
['Symbol', 'Edge color', 'Face color', 'Symbol size', 'E... | 3.301814 | 1.373962 | 2.403133 |
'''
This routine checks if the requested set of isotopes is
available in the dataset.
Parameters
----------
isos : list
set of isotopes in format ['Si-28','Si-30'].
Returns
-------
list
[index, delta_b, ratio_b].
... | def check_availability(self, isos) | This routine checks if the requested set of isotopes is
available in the dataset.
Parameters
----------
isos : list
set of isotopes in format ['Si-28','Si-30'].
Returns
-------
list
[index, delta_b, ratio_b].
index: where is it.... | 3.02274 | 1.676076 | 1.803462 |
'''
Transforms an isotope ratio into a delta value
Parameters
----------
isos_ss: list or float
list w/ isotopes, e.g., ['N-14','N-15'] OR the solar
system ratio.
ratio : float
ratio of the isotopes to transform.
oneover : bool... | def ratio_to_delta(self, isos_ss, ratio, oneover=False) | Transforms an isotope ratio into a delta value
Parameters
----------
isos_ss: list or float
list w/ isotopes, e.g., ['N-14','N-15'] OR the solar
system ratio.
ratio : float
ratio of the isotopes to transform.
oneover : boolean
take... | 4.669556 | 2.326797 | 2.00686 |
'''
Returns a new service which will process requests with the specified
filter. Filtering operations can include logging, automatic retrying,
etc... The filter is a lambda which receives the HTTPRequest and
another lambda. The filter can perform any pre-processing on the
... | def with_filter(self, filter) | Returns a new service which will process requests with the specified
filter. Filtering operations can include logging, automatic retrying,
etc... The filter is a lambda which receives the HTTPRequest and
another lambda. The filter can perform any pre-processing on the
request, pass it of... | 5.770224 | 1.552116 | 3.71765 |
'''
Sends the request and return response. Catches HTTPError and hands it
to error handler
'''
try:
resp = self._filter(request)
if sys.version_info >= (3,) and isinstance(resp, bytes) and \
encoding:
resp = resp.decode(enc... | def _perform_request(self, request, encoding='utf-8') | Sends the request and return response. Catches HTTPError and hands it
to error handler | 8.388593 | 6.73937 | 1.244715 |
cred = self.snmp_credentials
if cred is not None:
if cred.get('snmp_inspection') is True:
if not all([cred.get('auth_user'),
cred.get('auth_prot_pp'),
cred.get('auth_priv_pp')]):
msg = self._('... | def _validate_snmp(self) | Validates SNMP credentials.
:raises exception.IloInvalidInputError | 2.378495 | 2.296817 | 1.035561 |
if self.use_redfish_only:
if method_name in SUPPORTED_REDFISH_METHODS:
the_operation_object = self.redfish
else:
raise NotImplementedError()
else:
the_operation_object = self.ribcl
if 'Gen10' in self.model:
... | def _call_method(self, method_name, *args, **kwargs) | Call the corresponding method using RIBCL, RIS or REDFISH
Make the decision to invoke the corresponding method using RIBCL,
RIS or REDFISH way. In case of none, throw out ``NotImplementedError`` | 3.185365 | 2.665089 | 1.195219 |
return self._call_method('set_iscsi_info', target_name, lun,
ip_address, port, auth_method, username,
password) | def set_iscsi_info(self, target_name, lun, ip_address,
port='3260', auth_method=None, username=None,
password=None) | Set iscsi details of the system in uefi boot mode.
The initiator system is set with the target details like
IQN, LUN, IP, Port etc.
:param target_name: Target Name for iscsi.
:param lun: logical unit number.
:param ip_address: IP address of the target.
:param port: port ... | 2.387786 | 3.13638 | 0.761319 |
LOG.warning("'set_iscsi_boot_info' is deprecated. The 'MAC' parameter"
"passed in is ignored. Use 'set_iscsi_info' instead.")
return self._call_method('set_iscsi_info', target_name, lun,
ip_address, port, auth_method, username,
... | def set_iscsi_boot_info(self, mac, target_name, lun, ip_address,
port='3260', auth_method=None, username=None,
password=None) | Set iscsi details of the system in uefi boot mode.
The initiator system is set with the target details like
IQN, LUN, IP, Port etc.
:param mac: The MAC of the NIC to be set with iSCSI information
:param target_name: Target Name for iscsi.
:param lun: logical unit number.
... | 4.191678 | 4.33966 | 0.9659 |
return self._call_method('set_vm_status', device, boot_option,
write_protect) | def set_vm_status(self, device='FLOPPY',
boot_option='BOOT_ONCE', write_protect='YES') | Sets the Virtual Media drive status and allows the
boot options for booting from the virtual media. | 3.259615 | 4.931328 | 0.661001 |
data = self._call_method('get_essential_properties')
if (data['properties']['local_gb'] == 0):
cred = self.snmp_credentials
if cred and cred.get('snmp_inspection'):
disksize = snmp.get_local_gb(self.host, cred)
if disksize:
... | def get_essential_properties(self) | Get the essential scheduling properties
:returns: a dictionary containing memory size, disk size,
number of cpus, cpu arch, port numbers and
mac addresses.
:raises: IloError, on an error from iLO.
:raises: IloCommandNotSupportedError, if the command is not su... | 5.086251 | 4.47202 | 1.13735 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.