repository_name
stringlengths
7
55
func_path_in_repository
stringlengths
4
223
func_name
stringlengths
1
134
whole_func_string
stringlengths
75
104k
language
stringclasses
1 value
func_code_string
stringlengths
75
104k
func_code_tokens
listlengths
19
28.4k
func_documentation_string
stringlengths
1
46.9k
func_documentation_tokens
listlengths
1
1.97k
split_name
stringclasses
1 value
func_code_url
stringlengths
87
315
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_supported_boot_mode
def get_supported_boot_mode(self): """Retrieves the supported boot mode. :returns: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI """ ...
python
def get_supported_boot_mode(self): """Retrieves the supported boot mode. :returns: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI """ ...
[ "def", "get_supported_boot_mode", "(", "self", ")", ":", "system", "=", "self", ".", "_get_host_details", "(", ")", "bios_uefi_class_val", "=", "0", "# value for bios_only boot mode", "if", "(", "'Bios'", "in", "system", "[", "'Oem'", "]", "[", "'Hp'", "]", "a...
Retrieves the supported boot mode. :returns: any one of the following proliantutils.ilo.constants: SUPPORTED_BOOT_MODE_LEGACY_BIOS_ONLY, SUPPORTED_BOOT_MODE_UEFI_ONLY, SUPPORTED_BOOT_MODE_LEGACY_BIOS_AND_UEFI
[ "Retrieves", "the", "supported", "boot", "mode", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1067-L1084
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.reset_ilo_credential
def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. "...
python
def reset_ilo_credential(self, password): """Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. "...
[ "def", "reset_ilo_credential", "(", "self", ",", "password", ")", ":", "acc_uri", "=", "'/rest/v1/AccountService/Accounts'", "for", "status", ",", "hds", ",", "account", ",", "memberuri", "in", "self", ".", "_get_collection", "(", "acc_uri", ")", ":", "if", "a...
Resets the iLO password. :param password: The password to be set. :raises: IloError, if account not found or on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Resets", "the", "iLO", "password", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1086-L1108
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_ilo_details
def _get_ilo_details(self): """Gets iLO details :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager_uri = '/r...
python
def _get_ilo_details(self): """Gets iLO details :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager_uri = '/r...
[ "def", "_get_ilo_details", "(", "self", ")", ":", "manager_uri", "=", "'/rest/v1/Managers/1'", "status", ",", "headers", ",", "manager", "=", "self", ".", "_rest_get", "(", "manager_uri", ")", "if", "status", "!=", "200", ":", "msg", "=", "self", ".", "_ge...
Gets iLO details :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Gets", "iLO", "details" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1110-L1131
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.reset_ilo
def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, reset_uri = self...
python
def reset_ilo(self): """Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, reset_uri = self...
[ "def", "reset_ilo", "(", "self", ")", ":", "manager", ",", "reset_uri", "=", "self", ".", "_get_ilo_details", "(", ")", "action", "=", "{", "'Action'", ":", "'Reset'", "}", "# perform the POST", "status", ",", "headers", ",", "response", "=", "self", ".", ...
Resets the iLO. :raises: IloError, on an error from iLO. :raises: IloConnectionError, if iLO is not up after reset. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Resets", "the", "iLO", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1133-L1152
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.reset_bios_to_default
def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Check if the BIOS resource if exists. head...
python
def reset_bios_to_default(self): """Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ # Check if the BIOS resource if exists. head...
[ "def", "reset_bios_to_default", "(", "self", ")", ":", "# Check if the BIOS resource if exists.", "headers_bios", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "# Get the BaseConfig resource.", "try", ":", "base_config_uri", "=...
Resets the BIOS settings to default values. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Resets", "the", "BIOS", "settings", "to", "default", "values", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1154-L1196
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_ilo_firmware_version_as_major_minor
def get_ilo_firmware_version_as_major_minor(self): """Gets the ilo firmware version for server capabilities :returns: String with the format "<major>.<minor>" or None. """ try: manager, reset_uri = self._get_ilo_details() ilo_fw_ver_str = ( manag...
python
def get_ilo_firmware_version_as_major_minor(self): """Gets the ilo firmware version for server capabilities :returns: String with the format "<major>.<minor>" or None. """ try: manager, reset_uri = self._get_ilo_details() ilo_fw_ver_str = ( manag...
[ "def", "get_ilo_firmware_version_as_major_minor", "(", "self", ")", ":", "try", ":", "manager", ",", "reset_uri", "=", "self", ".", "_get_ilo_details", "(", ")", "ilo_fw_ver_str", "=", "(", "manager", "[", "'Oem'", "]", "[", "'Hp'", "]", "[", "'Firmware'", "...
Gets the ilo firmware version for server capabilities :returns: String with the format "<major>.<minor>" or None.
[ "Gets", "the", "ilo", "firmware", "version", "for", "server", "capabilities" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1209-L1222
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_server_capabilities
def get_server_capabilities(self): """Gets server properties which can be used for scheduling :returns: a dictionary of hardware properties like firmware versions, server model. :raises: IloError, if iLO returns an error in command execution. """ capabilities ...
python
def get_server_capabilities(self): """Gets server properties which can be used for scheduling :returns: a dictionary of hardware properties like firmware versions, server model. :raises: IloError, if iLO returns an error in command execution. """ capabilities ...
[ "def", "get_server_capabilities", "(", "self", ")", ":", "capabilities", "=", "{", "}", "system", "=", "self", ".", "_get_host_details", "(", ")", "capabilities", "[", "'server_model'", "]", "=", "system", "[", "'Model'", "]", "rom_firmware_version", "=", "(",...
Gets server properties which can be used for scheduling :returns: a dictionary of hardware properties like firmware versions, server model. :raises: IloError, if iLO returns an error in command execution.
[ "Gets", "server", "properties", "which", "can", "be", "used", "for", "scheduling" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1228-L1279
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.activate_license
def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, uri = self._get_ilo_details...
python
def activate_license(self, key): """Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ manager, uri = self._get_ilo_details...
[ "def", "activate_license", "(", "self", ",", "key", ")", ":", "manager", ",", "uri", "=", "self", ".", "_get_ilo_details", "(", ")", "try", ":", "lic_uri", "=", "manager", "[", "'Oem'", "]", "[", "'Hp'", "]", "[", "'links'", "]", "[", "'LicenseService'...
Activates iLO license. :param key: iLO license key. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Activates", "iLO", "license", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1281-L1304
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_vm_device_status
def _get_vm_device_status(self, device='FLOPPY'): """Returns the given virtual media device status and device URI :param device: virtual media device to be queried :returns json format virtual media device status and its URI :raises: IloError, on an error from iLO. :raises: Il...
python
def _get_vm_device_status(self, device='FLOPPY'): """Returns the given virtual media device status and device URI :param device: virtual media device to be queried :returns json format virtual media device status and its URI :raises: IloError, on an error from iLO. :raises: Il...
[ "def", "_get_vm_device_status", "(", "self", ",", "device", "=", "'FLOPPY'", ")", ":", "valid_devices", "=", "{", "'FLOPPY'", ":", "'floppy'", ",", "'CDROM'", ":", "'cd'", "}", "# Check if the input is valid", "if", "device", "not", "in", "valid_devices", ":", ...
Returns the given virtual media device status and device URI :param device: virtual media device to be queried :returns json format virtual media device status and its URI :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported ...
[ "Returns", "the", "given", "virtual", "media", "device", "status", "and", "device", "URI" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1306-L1344
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_vm_status
def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status. :param device: virtual media device to be queried :returns device status in dictionary form :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not ...
python
def get_vm_status(self, device='FLOPPY'): """Returns the virtual media drive status. :param device: virtual media device to be queried :returns device status in dictionary form :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not ...
[ "def", "get_vm_status", "(", "self", ",", "device", "=", "'FLOPPY'", ")", ":", "response", ",", "vm_device_uri", "=", "self", ".", "_get_vm_device_status", "(", "device", ")", "# Create RIBCL equivalent response", "# RIBCL provides this data in VM status", "# VM_APPLET = ...
Returns the virtual media drive status. :param device: virtual media device to be queried :returns device status in dictionary form :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Returns", "the", "virtual", "media", "drive", "status", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1346-L1396
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.set_vm_status
def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status It sets the boot option for virtual media device. Note: boot option can be set only for CD device. :param device: virual media device ...
python
def set_vm_status(self, device='FLOPPY', boot_option='BOOT_ONCE', write_protect='YES'): """Sets the Virtual Media drive status It sets the boot option for virtual media device. Note: boot option can be set only for CD device. :param device: virual media device ...
[ "def", "set_vm_status", "(", "self", ",", "device", "=", "'FLOPPY'", ",", "boot_option", "=", "'BOOT_ONCE'", ",", "write_protect", "=", "'YES'", ")", ":", "# CONNECT is a RIBCL call. There is no such property to set in RIS.", "if", "boot_option", "==", "'CONNECT'", ":",...
Sets the Virtual Media drive status It sets the boot option for virtual media device. Note: boot option can be set only for CD device. :param device: virual media device :param boot_option: boot option to set on the virtual media device :param write_protect: set the write prote...
[ "Sets", "the", "Virtual", "Media", "drive", "status" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1398-L1440
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.insert_virtual_media
def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image. :param url: URL to image :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is n...
python
def insert_virtual_media(self, url, device='FLOPPY'): """Notifies iLO of the location of a virtual media diskette image. :param url: URL to image :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is n...
[ "def", "insert_virtual_media", "(", "self", ",", "url", ",", "device", "=", "'FLOPPY'", ")", ":", "response", ",", "vm_device_uri", "=", "self", ".", "_get_vm_device_status", "(", "device", ")", "# Eject media if there is one. RIBCL was tolerant enough to overwrite", "#...
Notifies iLO of the location of a virtual media diskette image. :param url: URL to image :param device: virual media device :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Notifies", "iLO", "of", "the", "location", "of", "a", "virtual", "media", "diskette", "image", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1442-L1469
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_persistent_boot_devices
def _get_persistent_boot_devices(self): """Get details of persistent boot devices, its order :returns: List of dictionary of boot sources and list of boot device order :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not ...
python
def _get_persistent_boot_devices(self): """Get details of persistent boot devices, its order :returns: List of dictionary of boot sources and list of boot device order :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not ...
[ "def", "_get_persistent_boot_devices", "(", "self", ")", ":", "# Check if the BIOS resource if exists.", "headers_bios", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "# Get the Boot resource.", "boot_settings", "=", "self", "....
Get details of persistent boot devices, its order :returns: List of dictionary of boot sources and list of boot device order :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Get", "details", "of", "persistent", "boot", "devices", "its", "order" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1497-L1525
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_persistent_boot_device
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. :raises: IloCommandNotSupportedError, if the command is not supported on the server. ...
python
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. :raises: IloCommandNotSupportedError, if the command is not supported on the server. ...
[ "def", "get_persistent_boot_device", "(", "self", ")", ":", "system", "=", "self", ".", "_get_host_details", "(", ")", "try", ":", "# Return boot device if it is persistent.", "if", "system", "[", "'Boot'", "]", "[", "'BootSourceOverrideEnabled'", "]", "==", "'Conti...
Get current persistent boot device set for the host :returns: persistent boot device for the system :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Get", "current", "persistent", "boot", "device", "set", "for", "the", "host" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1527-L1577
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._update_persistent_boot
def _update_persistent_boot(self, device_type=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the device_type and ignores rest. :param device_type: ordered list of boot devices :param persistent: Boolean...
python
def _update_persistent_boot(self, device_type=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the device_type and ignores rest. :param device_type: ordered list of boot devices :param persistent: Boolean...
[ "def", "_update_persistent_boot", "(", "self", ",", "device_type", "=", "[", "]", ",", "persistent", "=", "False", ")", ":", "tenure", "=", "'Once'", "new_device", "=", "device_type", "[", "0", "]", "# If it is a standard device, we need to convert in RIS convention",...
Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the device_type and ignores rest. :param device_type: ordered list of boot devices :param persistent: Boolean flag to indicate if the device to be set as a persis...
[ "Changes", "the", "persistent", "boot", "device", "order", "in", "BIOS", "boot", "mode", "for", "host" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1579-L1633
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.update_persistent_boot
def update_persistent_boot(self, device_type=[]): """Changes the persistent boot device order for the host :param device_type: ordered list of boot devices :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on ...
python
def update_persistent_boot(self, device_type=[]): """Changes the persistent boot device order for the host :param device_type: ordered list of boot devices :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on ...
[ "def", "update_persistent_boot", "(", "self", ",", "device_type", "=", "[", "]", ")", ":", "# Check if the input is valid", "for", "item", "in", "device_type", ":", "if", "item", ".", "upper", "(", ")", "not", "in", "DEVICE_COMMON_TO_RIS", ":", "raise", "excep...
Changes the persistent boot device order for the host :param device_type: ordered list of boot devices :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Changes", "the", "persistent", "boot", "device", "order", "for", "the", "host" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1635-L1650
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_one_time_boot
def get_one_time_boot(self): """Retrieves the current setting for the one time boot. :returns: Returns the first boot device that would be used in next boot. Returns 'Normal' is no device is set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedEr...
python
def get_one_time_boot(self): """Retrieves the current setting for the one time boot. :returns: Returns the first boot device that would be used in next boot. Returns 'Normal' is no device is set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedEr...
[ "def", "get_one_time_boot", "(", "self", ")", ":", "system", "=", "self", ".", "_get_host_details", "(", ")", "try", ":", "if", "system", "[", "'Boot'", "]", "[", "'BootSourceOverrideEnabled'", "]", "==", "'Once'", ":", "device", "=", "system", "[", "'Boot...
Retrieves the current setting for the one time boot. :returns: Returns the first boot device that would be used in next boot. Returns 'Normal' is no device is set. :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported ...
[ "Retrieves", "the", "current", "setting", "for", "the", "one", "time", "boot", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1662-L1684
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_firmware_update_service_resource
def _get_firmware_update_service_resource(self): """Gets the firmware update service uri. :returns: firmware update service uri :raises: IloError, on an error from iLO. :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, for not finding t...
python
def _get_firmware_update_service_resource(self): """Gets the firmware update service uri. :returns: firmware update service uri :raises: IloError, on an error from iLO. :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, for not finding t...
[ "def", "_get_firmware_update_service_resource", "(", "self", ")", ":", "manager", ",", "uri", "=", "self", ".", "_get_ilo_details", "(", ")", "try", ":", "fw_uri", "=", "manager", "[", "'Oem'", "]", "[", "'Hp'", "]", "[", "'links'", "]", "[", "'UpdateServi...
Gets the firmware update service uri. :returns: firmware update service uri :raises: IloError, on an error from iLO. :raises: IloConnectionError, if not able to reach iLO. :raises: IloCommandNotSupportedError, for not finding the uri
[ "Gets", "the", "firmware", "update", "service", "uri", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1686-L1700
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.update_firmware
def update_firmware(self, file_url, component_type): """Updates the given firmware on the server for the given component. :param file_url: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen pr...
python
def update_firmware(self, file_url, component_type): """Updates the given firmware on the server for the given component. :param file_url: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen pr...
[ "def", "update_firmware", "(", "self", ",", "file_url", ",", "component_type", ")", ":", "fw_update_uri", "=", "self", ".", "_get_firmware_update_service_resource", "(", ")", "action_data", "=", "{", "'Action'", ":", "'InstallFromURI'", ",", "'FirmwareURI'", ":", ...
Updates the given firmware on the server for the given component. :param file_url: location of the raw firmware file. Extraction of the firmware file (if in compact format) is expected to happen prior to this invocation. :param component_type: Type of c...
[ "Updates", "the", "given", "firmware", "on", "the", "server", "for", "the", "given", "component", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1703-L1748
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_firmware_update_progress
def get_firmware_update_progress(self): """Get the progress of the firmware update. :returns: firmware update state, one of the following values: "IDLE", "UPLOADING", "PROGRESSING", "COMPLETED", "ERROR". If the update resource is not found, then "UNKNOWN". :r...
python
def get_firmware_update_progress(self): """Get the progress of the firmware update. :returns: firmware update state, one of the following values: "IDLE", "UPLOADING", "PROGRESSING", "COMPLETED", "ERROR". If the update resource is not found, then "UNKNOWN". :r...
[ "def", "get_firmware_update_progress", "(", "self", ")", ":", "try", ":", "fw_update_uri", "=", "self", ".", "_get_firmware_update_service_resource", "(", ")", "except", "exception", ".", "IloError", "as", "e", ":", "LOG", ".", "debug", "(", "self", ".", "_", ...
Get the progress of the firmware update. :returns: firmware update state, one of the following values: "IDLE", "UPLOADING", "PROGRESSING", "COMPLETED", "ERROR". If the update resource is not found, then "UNKNOWN". :returns: firmware update progress percent :r...
[ "Get", "the", "progress", "of", "the", "firmware", "update", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1750-L1777
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_tpm_capability
def _get_tpm_capability(self): """Retrieves if server is TPM capable or not. :returns True if TPM is Present else False """ tpm_values = {"NotPresent": False, "PresentDisabled": True, "PresentEnabled": True} try: tpm_state ...
python
def _get_tpm_capability(self): """Retrieves if server is TPM capable or not. :returns True if TPM is Present else False """ tpm_values = {"NotPresent": False, "PresentDisabled": True, "PresentEnabled": True} try: tpm_state ...
[ "def", "_get_tpm_capability", "(", "self", ")", ":", "tpm_values", "=", "{", "\"NotPresent\"", ":", "False", ",", "\"PresentDisabled\"", ":", "True", ",", "\"PresentEnabled\"", ":", "True", "}", "try", ":", "tpm_state", "=", "self", ".", "_get_bios_setting", "...
Retrieves if server is TPM capable or not. :returns True if TPM is Present else False
[ "Retrieves", "if", "server", "is", "TPM", "capable", "or", "not", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1785-L1798
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_cpu_virtualization
def _get_cpu_virtualization(self): """get cpu virtualization status.""" try: cpu_vt = self._get_bios_setting('ProcVirtualization') except exception.IloCommandNotSupportedError: return False if cpu_vt == 'Enabled': vt_status = True else: ...
python
def _get_cpu_virtualization(self): """get cpu virtualization status.""" try: cpu_vt = self._get_bios_setting('ProcVirtualization') except exception.IloCommandNotSupportedError: return False if cpu_vt == 'Enabled': vt_status = True else: ...
[ "def", "_get_cpu_virtualization", "(", "self", ")", ":", "try", ":", "cpu_vt", "=", "self", ".", "_get_bios_setting", "(", "'ProcVirtualization'", ")", "except", "exception", ".", "IloCommandNotSupportedError", ":", "return", "False", "if", "cpu_vt", "==", "'Enabl...
get cpu virtualization status.
[ "get", "cpu", "virtualization", "status", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1800-L1810
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations._get_nvdimm_n_status
def _get_nvdimm_n_status(self): """Get status of NVDIMM_N. :returns: True if NVDIMM_N is present and enabled, False otherwise. """ try: nvdimm_n_status = self._get_bios_setting('NvDimmNMemFunctionality') if nvdimm_n_status == 'Enabled': nvn_status...
python
def _get_nvdimm_n_status(self): """Get status of NVDIMM_N. :returns: True if NVDIMM_N is present and enabled, False otherwise. """ try: nvdimm_n_status = self._get_bios_setting('NvDimmNMemFunctionality') if nvdimm_n_status == 'Enabled': nvn_status...
[ "def", "_get_nvdimm_n_status", "(", "self", ")", ":", "try", ":", "nvdimm_n_status", "=", "self", ".", "_get_bios_setting", "(", "'NvDimmNMemFunctionality'", ")", "if", "nvdimm_n_status", "==", "'Enabled'", ":", "nvn_status", "=", "True", "else", ":", "nvn_status"...
Get status of NVDIMM_N. :returns: True if NVDIMM_N is present and enabled, False otherwise.
[ "Get", "status", "of", "NVDIMM_N", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1812-L1825
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.inject_nmi
def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO """ cur_status = self.get_host_power_status() if cur_status != 'ON': raise exception.IloError("Se...
python
def inject_nmi(self): """Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO """ cur_status = self.get_host_power_status() if cur_status != 'ON': raise exception.IloError("Se...
[ "def", "inject_nmi", "(", "self", ")", ":", "cur_status", "=", "self", ".", "get_host_power_status", "(", ")", "if", "cur_status", "!=", "'ON'", ":", "raise", "exception", ".", "IloError", "(", "\"Server is not in powered on state.\"", ")", "self", ".", "_perfor...
Inject NMI, Non Maskable Interrupt. Inject NMI (Non Maskable Interrupt) for a node immediately. :raises: IloError, on an error from iLO
[ "Inject", "NMI", "Non", "Maskable", "Interrupt", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1827-L1838
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_current_bios_settings
def get_current_bios_settings(self, only_allowed_settings=True): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
python
def get_current_bios_settings(self, only_allowed_settings=True): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
[ "def", "get_current_bios_settings", "(", "self", ",", "only_allowed_settings", "=", "True", ")", ":", "headers", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "# Remove the \"links\" section", "bios_settings", ".", "pop", ...
Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of current BIOS settings is returned. Depending on the...
[ "Get", "current", "BIOS", "settings", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1856-L1876
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_pending_bios_settings
def get_pending_bios_settings(self, only_allowed_settings=True): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
python
def get_pending_bios_settings(self, only_allowed_settings=True): """Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
[ "def", "get_pending_bios_settings", "(", "self", ",", "only_allowed_settings", "=", "True", ")", ":", "headers", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "try", ":", "settings_config_uri", "=", "bios_settings", "["...
Get current BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of pending BIOS settings. Depending on the 'only_allow...
[ "Get", "current", "BIOS", "settings", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1878-L1911
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.set_bios_settings
def set_bios_settings(self, data=None, only_allowed_settings=True): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the ...
python
def set_bios_settings(self, data=None, only_allowed_settings=True): """Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the ...
[ "def", "set_bios_settings", "(", "self", ",", "data", "=", "None", ",", "only_allowed_settings", "=", "True", ")", ":", "if", "not", "data", ":", "raise", "exception", ".", "IloError", "(", "\"Could not apply settings with\"", "\" empty data\"", ")", "if", "only...
Sets current BIOS settings to the provided data. :param: only_allowed_settings: True when only allowed BIOS settings are to be set. If False, all the BIOS settings supported by iLO and present in the 'data' are set. :param: data: a dictionary of BIOS settings to be appli...
[ "Sets", "current", "BIOS", "settings", "to", "the", "provided", "data", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1913-L1942
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_default_bios_settings
def get_default_bios_settings(self, only_allowed_settings=True): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
python
def get_default_bios_settings(self, only_allowed_settings=True): """Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictio...
[ "def", "get_default_bios_settings", "(", "self", ",", "only_allowed_settings", "=", "True", ")", ":", "headers_bios", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "# Get the BaseConfig resource.", "try", ":", "base_config_...
Get default BIOS settings. :param: only_allowed_settings: True when only allowed BIOS settings are to be returned. If False, All the BIOS settings supported by iLO are returned. :return: a dictionary of default BIOS settings(factory settings). Depending ...
[ "Get", "default", "BIOS", "settings", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L1944-L1984
openstack/proliantutils
proliantutils/ilo/ris.py
RISOperations.get_bios_settings_result
def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_b...
python
def get_bios_settings_result(self): """Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server. """ headers, bios_uri, bios_settings = self._check_b...
[ "def", "get_bios_settings_result", "(", "self", ")", ":", "headers", ",", "bios_uri", ",", "bios_settings", "=", "self", ".", "_check_bios_resource", "(", ")", "settings_result", "=", "bios_settings", ".", "get", "(", "\"SettingsResult\"", ")", ".", "get", "(", ...
Gets the result of the bios settings applied :raises: IloError, on an error from iLO. :raises: IloCommandNotSupportedError, if the command is not supported on the server.
[ "Gets", "the", "result", "of", "the", "bios", "settings", "applied" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/ilo/ris.py#L2035-L2045
NuGrid/NuGridPy
nugridpy/nugridse.py
_obsolete_plot_iso_abund_marco
def _obsolete_plot_iso_abund_marco(directory, name_h5_file, mass_range, cycle, logic_stable, i_decay, file_solar, solar_factor): """ Interface to plot average over mass_range. Parameters ---------- directory : string Locati...
python
def _obsolete_plot_iso_abund_marco(directory, name_h5_file, mass_range, cycle, logic_stable, i_decay, file_solar, solar_factor): """ Interface to plot average over mass_range. Parameters ---------- directory : string Locati...
[ "def", "_obsolete_plot_iso_abund_marco", "(", "directory", ",", "name_h5_file", ",", "mass_range", ",", "cycle", ",", "logic_stable", ",", "i_decay", ",", "file_solar", ",", "solar_factor", ")", ":", "# provide library for Z versus element names, and Z for elements", "u", ...
Interface to plot average over mass_range. Parameters ---------- directory : string Location of h5 file to plot. Needed for plot_tools. name_h5_file : string Name of h5 file. Needed for plot_tools. mass_range : list A 1x2 array required to plot data in a certain mass range...
[ "Interface", "to", "plot", "average", "over", "mass_range", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3968-L4069
NuGrid/NuGridPy
nugridpy/nugridse.py
_obsolete_plot_el_abund_marco
def _obsolete_plot_el_abund_marco(directory,name_h5_file,mass_range,cycle,logic_stable,i_decay,file_solar,solar_factor,symbol='ko'): """ Interface to plot elements abundances averaged over mass_range. Parameters ---------- directory : string Location of h5 file to plot. Needed for plot_too...
python
def _obsolete_plot_el_abund_marco(directory,name_h5_file,mass_range,cycle,logic_stable,i_decay,file_solar,solar_factor,symbol='ko'): """ Interface to plot elements abundances averaged over mass_range. Parameters ---------- directory : string Location of h5 file to plot. Needed for plot_too...
[ "def", "_obsolete_plot_el_abund_marco", "(", "directory", ",", "name_h5_file", ",", "mass_range", ",", "cycle", ",", "logic_stable", ",", "i_decay", ",", "file_solar", ",", "solar_factor", ",", "symbol", "=", "'ko'", ")", ":", "# provide library for Z versus element n...
Interface to plot elements abundances averaged over mass_range. Parameters ---------- directory : string Location of h5 file to plot. Needed for plot_tools. name_h5_file : string Name of h5 file. Needed for plot_tools. mass_range : list A 1x2 array required to plot data in...
[ "Interface", "to", "plot", "elements", "abundances", "averaged", "over", "mass_range", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L4075-L4162
NuGrid/NuGridPy
nugridpy/nugridse.py
se.get
def get(self, cycle_list, dataitem=None, isotope=None, sparse=1): """ Simple function that simply calls h5T.py get method. There are three ways to call this function. Parameters ---------- cycle_list : string, list If cycle_list is a string, then get interpa...
python
def get(self, cycle_list, dataitem=None, isotope=None, sparse=1): """ Simple function that simply calls h5T.py get method. There are three ways to call this function. Parameters ---------- cycle_list : string, list If cycle_list is a string, then get interpa...
[ "def", "get", "(", "self", ",", "cycle_list", ",", "dataitem", "=", "None", ",", "isotope", "=", "None", ",", "sparse", "=", "1", ")", ":", "return", "self", ".", "se", ".", "get", "(", "cycle_list", ",", "dataitem", ",", "isotope", ",", "sparse", ...
Simple function that simply calls h5T.py get method. There are three ways to call this function. Parameters ---------- cycle_list : string, list If cycle_list is a string, then get interpates the argument cycle_list as a dataitem and fetches the dataitem for all...
[ "Simple", "function", "that", "simply", "calls", "h5T", ".", "py", "get", "method", ".", "There", "are", "three", "ways", "to", "call", "this", "function", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L327-L367
NuGrid/NuGridPy
nugridpy/nugridse.py
se.get_elemental_abunds
def get_elemental_abunds(self,cycle,index=None): """ returns the elemental abundances for one cycle, either for the whole star or a specific zone depending upon the value of 'index'. Parameters ---------- cycle : string or integer Model to get the abu...
python
def get_elemental_abunds(self,cycle,index=None): """ returns the elemental abundances for one cycle, either for the whole star or a specific zone depending upon the value of 'index'. Parameters ---------- cycle : string or integer Model to get the abu...
[ "def", "get_elemental_abunds", "(", "self", ",", "cycle", ",", "index", "=", "None", ")", ":", "isoabunds", "=", "self", ".", "se", ".", "get", "(", "cycle", ",", "'iso_massf'", ")", "A", "=", "array", "(", "self", ".", "se", ".", "A", ")", "Z", ...
returns the elemental abundances for one cycle, either for the whole star or a specific zone depending upon the value of 'index'. Parameters ---------- cycle : string or integer Model to get the abundances for. index : integer or list, optional zo...
[ "returns", "the", "elemental", "abundances", "for", "one", "cycle", "either", "for", "the", "whole", "star", "or", "a", "specific", "zone", "depending", "upon", "the", "value", "of", "index", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L423-L462
NuGrid/NuGridPy
nugridpy/nugridse.py
se.plot_prof_1
def plot_prof_1(self, mod, species, xlim1, xlim2, ylim1, ylim2, symbol=None): """ plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list ...
python
def plot_prof_1(self, mod, species, xlim1, xlim2, ylim1, ylim2, symbol=None): """ plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list ...
[ "def", "plot_prof_1", "(", "self", ",", "mod", ",", "species", ",", "xlim1", ",", "xlim2", ",", "ylim1", ",", "ylim2", ",", "symbol", "=", "None", ")", ":", "DataPlot", ".", "plot_prof_1", "(", "self", ",", "species", ",", "mod", ",", "xlim1", ",", ...
plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list Which species to plot. xlim1, xlim2 : float Mass coordinate range. ylim1, ylim2 : floa...
[ "plot", "one", "species", "for", "cycle", "between", "xlim1", "and", "xlim2" ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L465-L499
NuGrid/NuGridPy
nugridpy/nugridse.py
se.plot_prof_2
def plot_prof_2(self, mod, species, xlim1, xlim2): """ Plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list Which species to plot. xlim1, xlim...
python
def plot_prof_2(self, mod, species, xlim1, xlim2): """ Plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list Which species to plot. xlim1, xlim...
[ "def", "plot_prof_2", "(", "self", ",", "mod", ",", "species", ",", "xlim1", ",", "xlim2", ")", ":", "mass", "=", "self", ".", "se", ".", "get", "(", "mod", ",", "'mass'", ")", "Xspecies", "=", "self", ".", "se", ".", "get", "(", "mod", ",", "'...
Plot one species for cycle between xlim1 and xlim2 Parameters ---------- mod : string or integer Model to plot, same as cycle number. species : list Which species to plot. xlim1, xlim2 : float Mass coordinate range.
[ "Plot", "one", "species", "for", "cycle", "between", "xlim1", "and", "xlim2" ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L501-L521
NuGrid/NuGridPy
nugridpy/nugridse.py
se.write_deltatable
def write_deltatable(self, filename='default', decayed=True, dcycle=500, iniabufile='../../frames/mppnp/USEEPP/iniab2.0E-02GN93.ppn'): """ This subroutine is to write out tables with delta values for cosmochemists to use in comparison with their data. No options...
python
def write_deltatable(self, filename='default', decayed=True, dcycle=500, iniabufile='../../frames/mppnp/USEEPP/iniab2.0E-02GN93.ppn'): """ This subroutine is to write out tables with delta values for cosmochemists to use in comparison with their data. No options...
[ "def", "write_deltatable", "(", "self", ",", "filename", "=", "'default'", ",", "decayed", "=", "True", ",", "dcycle", "=", "500", ",", "iniabufile", "=", "'../../frames/mppnp/USEEPP/iniab2.0E-02GN93.ppn'", ")", ":", "print", "(", "'This is a preliminary version - con...
This subroutine is to write out tables with delta values for cosmochemists to use in comparison with their data. No options are necessarily needed to load this routine, however, it might be useful to specify a filename. This file furthermore searches for thermal pulses, hence, it's onl...
[ "This", "subroutine", "is", "to", "write", "out", "tables", "with", "delta", "values", "for", "cosmochemists", "to", "use", "in", "comparison", "with", "their", "data", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L523-L699
NuGrid/NuGridPy
nugridpy/nugridse.py
se._tp_finder
def _tp_finder(self, dcycle): # Private routine """ Routine to find thermal pulses in given star and returns an index vector that gives the cycle number in which the thermal pulse occure. The routine looks for the C/O ratio jumping up and up, so only useful in TP-AGB s...
python
def _tp_finder(self, dcycle): # Private routine """ Routine to find thermal pulses in given star and returns an index vector that gives the cycle number in which the thermal pulse occure. The routine looks for the C/O ratio jumping up and up, so only useful in TP-AGB s...
[ "def", "_tp_finder", "(", "self", ",", "dcycle", ")", ":", "# Private routine", "# read in c and o isotopes for all cycles, regarding deltacycle", "last_cycle", "=", "int", "(", "self", ".", "se", ".", "cycles", "[", "len", "(", "self", ".", "se", ".", "cycles", ...
Routine to find thermal pulses in given star and returns an index vector that gives the cycle number in which the thermal pulse occure. The routine looks for the C/O ratio jumping up and up, so only useful in TP-AGB star. A vector is given back that indicates the position of th...
[ "Routine", "to", "find", "thermal", "pulses", "in", "given", "star", "and", "returns", "an", "index", "vector", "that", "gives", "the", "cycle", "number", "in", "which", "the", "thermal", "pulse", "occure", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L703-L776
NuGrid/NuGridPy
nugridpy/nugridse.py
se.ernst_table_exporter
def ernst_table_exporter(self, cycle, outfname='table_out', sheetname='Sheet 1'): """ This routine takes NuGrid data (model output) for a given cycle and writes it into an Excel sheet. This is one format as requested by Ernst Zinner in June 2013 (thr...
python
def ernst_table_exporter(self, cycle, outfname='table_out', sheetname='Sheet 1'): """ This routine takes NuGrid data (model output) for a given cycle and writes it into an Excel sheet. This is one format as requested by Ernst Zinner in June 2013 (thr...
[ "def", "ernst_table_exporter", "(", "self", ",", "cycle", ",", "outfname", "=", "'table_out'", ",", "sheetname", "=", "'Sheet 1'", ")", ":", "from", "xlsxwriter", ".", "workbook", "import", "Workbook", "# https://xlsxwriter.readthedocs.org/ Note: We neex xlswriter. Please...
This routine takes NuGrid data (model output) for a given cycle and writes it into an Excel sheet. This is one format as requested by Ernst Zinner in June 2013 (through Marco). If you want all radioactive isotopes, start from the restart file. Empty columns are not written out and ...
[ "This", "routine", "takes", "NuGrid", "data", "(", "model", "output", ")", "for", "a", "given", "cycle", "and", "writes", "it", "into", "an", "Excel", "sheet", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L779-L855
NuGrid/NuGridPy
nugridpy/nugridse.py
se.plot4
def plot4(self, num): """ Plots the abundances of H-1, He-4, C-12 and O-16. """ self.plot_prof_1(num,'H-1',0.,5.,-5,0.) self.plot_prof_1(num,'He-4',0.,5.,-5,0.) self.plot_prof_1(num,'C-12',0.,5.,-5,0.) self.plot_prof_1(num,'O-16',0.,5.,-5,0.) pyl.legend...
python
def plot4(self, num): """ Plots the abundances of H-1, He-4, C-12 and O-16. """ self.plot_prof_1(num,'H-1',0.,5.,-5,0.) self.plot_prof_1(num,'He-4',0.,5.,-5,0.) self.plot_prof_1(num,'C-12',0.,5.,-5,0.) self.plot_prof_1(num,'O-16',0.,5.,-5,0.) pyl.legend...
[ "def", "plot4", "(", "self", ",", "num", ")", ":", "self", ".", "plot_prof_1", "(", "num", ",", "'H-1'", ",", "0.", ",", "5.", ",", "-", "5", ",", "0.", ")", "self", ".", "plot_prof_1", "(", "num", ",", "'He-4'", ",", "0.", ",", "5.", ",", "-...
Plots the abundances of H-1, He-4, C-12 and O-16.
[ "Plots", "the", "abundances", "of", "H", "-", "1", "He", "-", "4", "C", "-", "12", "and", "O", "-", "16", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L857-L865
NuGrid/NuGridPy
nugridpy/nugridse.py
se.plot4_nolog
def plot4_nolog(self, num): """ Plots the abundances of H-1, He-4, C-12 and O-16. """ self.plot_prof_2(num,'H-1',0.,5.) self.plot_prof_2(num,'He-4',0.,5.) self.plot_prof_2(num,'C-12',0.,5.) self.plot_prof_2(num,'O-16',0.,5.) pyl.legend(loc=3)
python
def plot4_nolog(self, num): """ Plots the abundances of H-1, He-4, C-12 and O-16. """ self.plot_prof_2(num,'H-1',0.,5.) self.plot_prof_2(num,'He-4',0.,5.) self.plot_prof_2(num,'C-12',0.,5.) self.plot_prof_2(num,'O-16',0.,5.) pyl.legend(loc=3)
[ "def", "plot4_nolog", "(", "self", ",", "num", ")", ":", "self", ".", "plot_prof_2", "(", "num", ",", "'H-1'", ",", "0.", ",", "5.", ")", "self", ".", "plot_prof_2", "(", "num", ",", "'He-4'", ",", "0.", ",", "5.", ")", "self", ".", "plot_prof_2", ...
Plots the abundances of H-1, He-4, C-12 and O-16.
[ "Plots", "the", "abundances", "of", "H", "-", "1", "He", "-", "4", "C", "-", "12", "and", "O", "-", "16", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L867-L875
NuGrid/NuGridPy
nugridpy/nugridse.py
se.plot_prof_sparse
def plot_prof_sparse(self, mod, species, xlim1, xlim2, ylim1, ylim2, sparse, symbol): """ plot one species for cycle between xlim1 and xlim2. Parameters ---------- species : list which species to plot. mod : string or integer ...
python
def plot_prof_sparse(self, mod, species, xlim1, xlim2, ylim1, ylim2, sparse, symbol): """ plot one species for cycle between xlim1 and xlim2. Parameters ---------- species : list which species to plot. mod : string or integer ...
[ "def", "plot_prof_sparse", "(", "self", ",", "mod", ",", "species", ",", "xlim1", ",", "xlim2", ",", "ylim1", ",", "ylim2", ",", "sparse", ",", "symbol", ")", ":", "mass", "=", "self", ".", "se", ".", "get", "(", "mod", ",", "'mass'", ")", "Xspecie...
plot one species for cycle between xlim1 and xlim2. Parameters ---------- species : list which species to plot. mod : string or integer Model (cycle) to plot. xlim1, xlim2 : float Mass coordinate range. ylim1, ylim2 : float ...
[ "plot", "one", "species", "for", "cycle", "between", "xlim1", "and", "xlim2", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L877-L904
NuGrid/NuGridPy
nugridpy/nugridse.py
se.trajectory
def trajectory(self, ini, end, delta, mass_coo, age_in_sec=False, online=False): """ create a trajectory out of a stellar model Parameters ---------- ini : integer Initial model, inital cycle number. end : integer Final model, f...
python
def trajectory(self, ini, end, delta, mass_coo, age_in_sec=False, online=False): """ create a trajectory out of a stellar model Parameters ---------- ini : integer Initial model, inital cycle number. end : integer Final model, f...
[ "def", "trajectory", "(", "self", ",", "ini", ",", "end", ",", "delta", ",", "mass_coo", ",", "age_in_sec", "=", "False", ",", "online", "=", "False", ")", ":", "filename", "=", "'traj_'", "+", "str", "(", "mass_coo", ")", "+", "'.dat'", "f", "=", ...
create a trajectory out of a stellar model Parameters ---------- ini : integer Initial model, inital cycle number. end : integer Final model, final cycle number. delta : integer Sparsity factor of the frames. mass_coo : float ...
[ "create", "a", "trajectory", "out", "of", "a", "stellar", "model" ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L906-L997
NuGrid/NuGridPy
nugridpy/nugridse.py
se.abund_at_masscoordinate
def abund_at_masscoordinate(self, ini, mass_coo, online=False): """ Create a file with distribution at a given mass coord, and at a given time step. This for instance may be used as intial distribution for function trajectory, to reproduce local conditions in ppn. Param...
python
def abund_at_masscoordinate(self, ini, mass_coo, online=False): """ Create a file with distribution at a given mass coord, and at a given time step. This for instance may be used as intial distribution for function trajectory, to reproduce local conditions in ppn. Param...
[ "def", "abund_at_masscoordinate", "(", "self", ",", "ini", ",", "mass_coo", ",", "online", "=", "False", ")", ":", "age", "=", "self", ".", "se", ".", "get", "(", "ini", ",", "'age'", ")", "mass", "=", "self", ".", "se", ".", "get", "(", "ini", "...
Create a file with distribution at a given mass coord, and at a given time step. This for instance may be used as intial distribution for function trajectory, to reproduce local conditions in ppn. Parameters ---------- ini : integer Initial model, inital cyc...
[ "Create", "a", "file", "with", "distribution", "at", "a", "given", "mass", "coord", "and", "at", "a", "given", "time", "step", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L1000-L1091
NuGrid/NuGridPy
nugridpy/nugridse.py
se._kip
def _kip(self, cycle_end, mix_thresh, xaxis, sparse): """ *** Should be used with care, therefore has been flagged as a private routine *** This function uses a threshold diffusion coefficient, above which the the shell is considered to be convective, to plot a Kippenhahn...
python
def _kip(self, cycle_end, mix_thresh, xaxis, sparse): """ *** Should be used with care, therefore has been flagged as a private routine *** This function uses a threshold diffusion coefficient, above which the the shell is considered to be convective, to plot a Kippenhahn...
[ "def", "_kip", "(", "self", ",", "cycle_end", ",", "mix_thresh", ",", "xaxis", ",", "sparse", ")", ":", "original_cyclelist", "=", "self", ".", "se", ".", "cycles", "cyclelist", "=", "original_cyclelist", "[", "0", ":", "cycle_end", ":", "sparse", "]", "...
*** Should be used with care, therefore has been flagged as a private routine *** This function uses a threshold diffusion coefficient, above which the the shell is considered to be convective, to plot a Kippenhahn diagram. Parameters ---------- cycle_end : integ...
[ "***", "Should", "be", "used", "with", "care", "therefore", "has", "been", "flagged", "as", "a", "private", "routine", "***", "This", "function", "uses", "a", "threshold", "diffusion", "coefficient", "above", "which", "the", "the", "shell", "is", "considered",...
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L1094-L1212
NuGrid/NuGridPy
nugridpy/nugridse.py
se.kip_cont
def kip_cont(self, modstart, modstop, dcoeff_thresh=1.e12, xres=1000, ylims=[0., 0.], xlims=[0., 0.], yres=2000, ixaxis='log_time_left', outfile='', landscape_plot=False, codev='KEP', kepswitch=12555, outlines=False, write_preproc=False, hatching=False...
python
def kip_cont(self, modstart, modstop, dcoeff_thresh=1.e12, xres=1000, ylims=[0., 0.], xlims=[0., 0.], yres=2000, ixaxis='log_time_left', outfile='', landscape_plot=False, codev='KEP', kepswitch=12555, outlines=False, write_preproc=False, hatching=False...
[ "def", "kip_cont", "(", "self", ",", "modstart", ",", "modstop", ",", "dcoeff_thresh", "=", "1.e12", ",", "xres", "=", "1000", ",", "ylims", "=", "[", "0.", ",", "0.", "]", ",", "xlims", "=", "[", "0.", ",", "0.", "]", ",", "yres", "=", "2000", ...
This function creates a Kippenhahn diagram as a contour plot of the se output using a convection flag or diffusion coefficient threshold. Parameters ---------- modstart, modstop : integer First and last cycle numbers to plot. dcoeff_thresh : float, optional ...
[ "This", "function", "creates", "a", "Kippenhahn", "diagram", "as", "a", "contour", "plot", "of", "the", "se", "output", "using", "a", "convection", "flag", "or", "diffusion", "coefficient", "threshold", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L1214-L1584
NuGrid/NuGridPy
nugridpy/nugridse.py
se._kip_cont2
def _kip_cont2(self, sparse, cycle_start=0, cycle_end=0, plot=['dcoeff'], thresholds=[1.0E+12], xax='log_time_left', alphas=[1.0], yllim=0., yulim=0., y_res=2000, xllim=0., xulim=0., age='seconds', sparse_intrinsic=20, engen=False, ...
python
def _kip_cont2(self, sparse, cycle_start=0, cycle_end=0, plot=['dcoeff'], thresholds=[1.0E+12], xax='log_time_left', alphas=[1.0], yllim=0., yulim=0., y_res=2000, xllim=0., xulim=0., age='seconds', sparse_intrinsic=20, engen=False, ...
[ "def", "_kip_cont2", "(", "self", ",", "sparse", ",", "cycle_start", "=", "0", ",", "cycle_end", "=", "0", ",", "plot", "=", "[", "'dcoeff'", "]", ",", "thresholds", "=", "[", "1.0E+12", "]", ",", "xax", "=", "'log_time_left'", ",", "alphas", "=", "[...
!! EXPERIMENTAL FEATURE (flagged as private) !! This function creates a Kippenhahn diagram as a contour plot of the .se.h5 or .out.h5 files using any continuous variable (columns in the hdf5 cycle data). Multiple columns may be plotted, their name indicated in the list "plot", and their...
[ "!!", "EXPERIMENTAL", "FEATURE", "(", "flagged", "as", "private", ")", "!!" ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L1586-L2024
NuGrid/NuGridPy
nugridpy/nugridse.py
se.abup_se_plot
def abup_se_plot(mod,species): """ plot species from one ABUPP file and the se file. You must use this function in the directory where the ABP files are and an ABUP file for model mod must exist. Parameters ---------- mod : integer Model to plot, yo...
python
def abup_se_plot(mod,species): """ plot species from one ABUPP file and the se file. You must use this function in the directory where the ABP files are and an ABUP file for model mod must exist. Parameters ---------- mod : integer Model to plot, yo...
[ "def", "abup_se_plot", "(", "mod", ",", "species", ")", ":", "# Marco, you have already implemented finding headers and columns in", "# ABUP files. You may want to transplant that into here?", "species", "=", "'C-12'", "filename", "=", "'ABUPP%07d0000.DAT'", "%", "mod", "print", ...
plot species from one ABUPP file and the se file. You must use this function in the directory where the ABP files are and an ABUP file for model mod must exist. Parameters ---------- mod : integer Model to plot, you need to have an ABUPP file for that mo...
[ "plot", "species", "from", "one", "ABUPP", "file", "and", "the", "se", "file", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L2027-L2061
NuGrid/NuGridPy
nugridpy/nugridse.py
se._read_iso_abund_marco
def _read_iso_abund_marco(self, mass_range, cycle): """ plot the abundance of all the chemical species Parameters ---------- mass_range : list A 1x2 array containing the lower and upper mass range. If None, it will plot over the entire range. cyc...
python
def _read_iso_abund_marco(self, mass_range, cycle): """ plot the abundance of all the chemical species Parameters ---------- mass_range : list A 1x2 array containing the lower and upper mass range. If None, it will plot over the entire range. cyc...
[ "def", "_read_iso_abund_marco", "(", "self", ",", "mass_range", ",", "cycle", ")", ":", "import", "nuutils", "as", "u", "masses", "=", "[", "]", "# Check the inputs", "#if not self.se.cycles.count(str(cycle)):", "# print 'You entered an cycle that doesn\\'t exist in thi...
plot the abundance of all the chemical species Parameters ---------- mass_range : list A 1x2 array containing the lower and upper mass range. If None, it will plot over the entire range. cycle : string or integer A string/integer of the cycle of inte...
[ "plot", "the", "abundance", "of", "all", "the", "chemical", "species" ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L2064-L2129
NuGrid/NuGridPy
nugridpy/nugridse.py
se.decay
def decay(self, mass_frac): """ this module simply calculate abundances of isotopes after decay. It requires that before it is used a call is made to _read_iso_abund_marco and _stable_species. Parameters ---------- mass_frac : list alist of mass_fra...
python
def decay(self, mass_frac): """ this module simply calculate abundances of isotopes after decay. It requires that before it is used a call is made to _read_iso_abund_marco and _stable_species. Parameters ---------- mass_frac : list alist of mass_fra...
[ "def", "decay", "(", "self", ",", "mass_frac", ")", ":", "import", "nuutils", "as", "u", "global", "decayed_multi_d", "decayed_multi_d", "=", "[", "]", "#print len(mass_frac)", "#print len(decay_raw)", "for", "iii", "in", "range", "(", "len", "(", "mass_frac", ...
this module simply calculate abundances of isotopes after decay. It requires that before it is used a call is made to _read_iso_abund_marco and _stable_species. Parameters ---------- mass_frac : list alist of mass_frac dicts. See Also -------- ...
[ "this", "module", "simply", "calculate", "abundances", "of", "isotopes", "after", "decay", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L2132-L2177
NuGrid/NuGridPy
nugridpy/nugridse.py
se.burnstage
def burnstage(self, **keyw): """ This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arguments. ...
python
def burnstage(self, **keyw): """ This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arguments. ...
[ "def", "burnstage", "(", "self", ",", "*", "*", "keyw", ")", ":", "if", "(", "\"isoa\"", "in", "keyw", ")", "==", "False", ":", "keyw", "[", "\"isoa\"", "]", "=", "\"A\"", "if", "(", "\"isoz\"", "in", "keyw", ")", "==", "False", ":", "keyw", "[",...
This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arguments. Returns ------- list ...
[ "This", "function", "calculates", "the", "presence", "of", "burning", "stages", "and", "outputs", "the", "ages", "when", "key", "isotopes", "are", "depleted", "and", "uses", "them", "to", "calculate", "burning", "lifetimes", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L2198-L2617
NuGrid/NuGridPy
nugridpy/nugridse.py
se.burnstage_upgrade
def burnstage_upgrade(self, **keyw): """ This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arg...
python
def burnstage_upgrade(self, **keyw): """ This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arg...
[ "def", "burnstage_upgrade", "(", "self", ",", "*", "*", "keyw", ")", ":", "if", "(", "\"isoa\"", "in", "keyw", ")", "==", "False", ":", "keyw", "[", "\"isoa\"", "]", "=", "\"A\"", "if", "(", "\"isoz\"", "in", "keyw", ")", "==", "False", ":", "keyw"...
This function calculates the presence of burning stages and outputs the ages when key isotopes are depleted and uses them to calculate burning lifetimes. Parameters ---------- keyw : dict A dict of key word arguments. Returns ------- list ...
[ "This", "function", "calculates", "the", "presence", "of", "burning", "stages", "and", "outputs", "the", "ages", "when", "key", "isotopes", "are", "depleted", "and", "uses", "them", "to", "calculate", "burning", "lifetimes", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L2619-L3064
NuGrid/NuGridPy
nugridpy/nugridse.py
se.cores
def cores(self, incycle, **keyw): """ This function uses the abundances as a function of time to return core masses. Parameters ---------- incycle : integer incycle is the cycle to choose where to take the core masses. keyw : dict ...
python
def cores(self, incycle, **keyw): """ This function uses the abundances as a function of time to return core masses. Parameters ---------- incycle : integer incycle is the cycle to choose where to take the core masses. keyw : dict ...
[ "def", "cores", "(", "self", ",", "incycle", ",", "*", "*", "keyw", ")", ":", "def", "infomod", "(", "core_opt", ",", "*", "inp", ")", ":", "\"\"\"\n This calls the correct infomod function depending on the\n value of core_opt.\n\n \"\"\"", ...
This function uses the abundances as a function of time to return core masses. Parameters ---------- incycle : integer incycle is the cycle to choose where to take the core masses. keyw : dict A dict of key word arguments. Returns ...
[ "This", "function", "uses", "the", "abundances", "as", "a", "function", "of", "time", "to", "return", "core", "masses", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3068-L3513
NuGrid/NuGridPy
nugridpy/nugridse.py
se.presnyields
def presnyields(self, *cycles, **keyw): """ This function calculates the presupernova yields of a full structure profile from a remnant mass, mrem, to the surface. Parameters ---------- cycles : variadic tuple cycle[0] is the cycle to perform the presupernova...
python
def presnyields(self, *cycles, **keyw): """ This function calculates the presupernova yields of a full structure profile from a remnant mass, mrem, to the surface. Parameters ---------- cycles : variadic tuple cycle[0] is the cycle to perform the presupernova...
[ "def", "presnyields", "(", "self", ",", "*", "cycles", ",", "*", "*", "keyw", ")", ":", "abund_list", "=", "[", "]", "xm_list", "=", "[", "]", "if", "(", "\"xm\"", "in", "keyw", ")", "==", "False", ":", "keyw", "[", "\"xm\"", "]", "=", "\"mass\""...
This function calculates the presupernova yields of a full structure profile from a remnant mass, mrem, to the surface. Parameters ---------- cycles : variadic tuple cycle[0] is the cycle to perform the presupernova yields calculations on. If cycle[1] is also sp...
[ "This", "function", "calculates", "the", "presupernova", "yields", "of", "a", "full", "structure", "profile", "from", "a", "remnant", "mass", "mrem", "to", "the", "surface", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3515-L3638
NuGrid/NuGridPy
nugridpy/nugridse.py
se.windyields
def windyields(self, ini, end, delta, **keyw): """ This function returns the wind yields and ejected masses. X_i, E_i = data.windyields(ini, end, delta) Parameters ---------- ini : integer The starting cycle. end : integer The finishing c...
python
def windyields(self, ini, end, delta, **keyw): """ This function returns the wind yields and ejected masses. X_i, E_i = data.windyields(ini, end, delta) Parameters ---------- ini : integer The starting cycle. end : integer The finishing c...
[ "def", "windyields", "(", "self", ",", "ini", ",", "end", ",", "delta", ",", "*", "*", "keyw", ")", ":", "if", "(", "\"tmass\"", "in", "keyw", ")", "==", "False", ":", "keyw", "[", "\"tmass\"", "]", "=", "\"mass\"", "if", "(", "\"abund\"", "in", ...
This function returns the wind yields and ejected masses. X_i, E_i = data.windyields(ini, end, delta) Parameters ---------- ini : integer The starting cycle. end : integer The finishing cycle. delta : integer The cycle interval. ...
[ "This", "function", "returns", "the", "wind", "yields", "and", "ejected", "masses", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3640-L3730
NuGrid/NuGridPy
nugridpy/nugridse.py
se._windcalc
def _windcalc(self, first, totalmass, nsteps, niso, ypssurf, ypsinit, \ X_i, E_i, cycles): """ This function calculates the windyields and ejected masses as called from windyields(). It uses a summation version of the formulae used in Hirschi et al. 2005, "Yields of rotating stars a...
python
def _windcalc(self, first, totalmass, nsteps, niso, ypssurf, ypsinit, \ X_i, E_i, cycles): """ This function calculates the windyields and ejected masses as called from windyields(). It uses a summation version of the formulae used in Hirschi et al. 2005, "Yields of rotating stars a...
[ "def", "_windcalc", "(", "self", ",", "first", ",", "totalmass", ",", "nsteps", ",", "niso", ",", "ypssurf", ",", "ypsinit", ",", "X_i", ",", "E_i", ",", "cycles", ")", ":", "if", "first", "==", "True", ":", "X_i", "=", "np", ".", "zeros", "(", "...
This function calculates the windyields and ejected masses as called from windyields(). It uses a summation version of the formulae used in Hirschi et al. 2005, "Yields of rotating stars at solar metallicity". If it is the first file, the arrays need to be created and the initial abund...
[ "This", "function", "calculates", "the", "windyields", "and", "ejected", "masses", "as", "called", "from", "windyields", "()", ".", "It", "uses", "a", "summation", "version", "of", "the", "formulae", "used", "in", "Hirschi", "et", "al", ".", "2005", "Yields"...
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3733-L3764
NuGrid/NuGridPy
nugridpy/nugridse.py
se.average_iso_abund_marco
def average_iso_abund_marco(self,mass_range,cycle,stable,i_decay): """ Interface to average over mass_range. Parameters ---------- mass_range : list A 1x2 array required to plot data in a certain mass range. Needed for _read_iso_abund_marco. cycle...
python
def average_iso_abund_marco(self,mass_range,cycle,stable,i_decay): """ Interface to average over mass_range. Parameters ---------- mass_range : list A 1x2 array required to plot data in a certain mass range. Needed for _read_iso_abund_marco. cycle...
[ "def", "average_iso_abund_marco", "(", "self", ",", "mass_range", ",", "cycle", ",", "stable", ",", "i_decay", ")", ":", "import", "nuutils", "as", "u", "if", "not", "stable", "and", "i_decay", "==", "2", ":", "print", "(", "'ERROR: choose i_decay = 1'", ")"...
Interface to average over mass_range. Parameters ---------- mass_range : list A 1x2 array required to plot data in a certain mass range. Needed for _read_iso_abund_marco. cycle : integer which cycle from the h5 file?. Needed for _read_iso_abund_marco...
[ "Interface", "to", "average", "over", "mass_range", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3767-L3847
NuGrid/NuGridPy
nugridpy/nugridse.py
se._get_elem_names
def _get_elem_names(self): """ returns for one cycle an element name dictionary.""" import nuutils as u # provide library for Z versus element names, and Z for elements #element_name = self.se.elements element_name = self.elements_names u.give_zip_element_z_and_names(el...
python
def _get_elem_names(self): """ returns for one cycle an element name dictionary.""" import nuutils as u # provide library for Z versus element names, and Z for elements #element_name = self.se.elements element_name = self.elements_names u.give_zip_element_z_and_names(el...
[ "def", "_get_elem_names", "(", "self", ")", ":", "import", "nuutils", "as", "u", "# provide library for Z versus element names, and Z for elements", "#element_name = self.se.elements", "element_name", "=", "self", ".", "elements_names", "u", ".", "give_zip_element_z_and_names",...
returns for one cycle an element name dictionary.
[ "returns", "for", "one", "cycle", "an", "element", "name", "dictionary", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3851-L3860
NuGrid/NuGridPy
nugridpy/nugridse.py
se.get_abundance_iso_decay
def get_abundance_iso_decay(self,cycle): """ returns the decayed stable isotopes. Parameters ---------- cycle : integer The cycle. """ import nuutils as u masses_for_this_cycle = self.se.get(cycle,'mass') self._read_iso_abund_marco(...
python
def get_abundance_iso_decay(self,cycle): """ returns the decayed stable isotopes. Parameters ---------- cycle : integer The cycle. """ import nuutils as u masses_for_this_cycle = self.se.get(cycle,'mass') self._read_iso_abund_marco(...
[ "def", "get_abundance_iso_decay", "(", "self", ",", "cycle", ")", ":", "import", "nuutils", "as", "u", "masses_for_this_cycle", "=", "self", ".", "se", ".", "get", "(", "cycle", ",", "'mass'", ")", "self", ".", "_read_iso_abund_marco", "(", "[", "min", "("...
returns the decayed stable isotopes. Parameters ---------- cycle : integer The cycle.
[ "returns", "the", "decayed", "stable", "isotopes", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3864-L3917
NuGrid/NuGridPy
nugridpy/nugridse.py
se.get_abundance_elem
def get_abundance_elem(self,cycle): """ returns the undecayed element profile (all elements that are in elem_names). Parameters ---------- cycle : integer The cycle number """ import nuutils as u masses_for_this_cycle = self.se.get(...
python
def get_abundance_elem(self,cycle): """ returns the undecayed element profile (all elements that are in elem_names). Parameters ---------- cycle : integer The cycle number """ import nuutils as u masses_for_this_cycle = self.se.get(...
[ "def", "get_abundance_elem", "(", "self", ",", "cycle", ")", ":", "import", "nuutils", "as", "u", "masses_for_this_cycle", "=", "self", ".", "se", ".", "get", "(", "cycle", ",", "'mass'", ")", "self", ".", "_read_iso_abund_marco", "(", "[", "min", "(", "...
returns the undecayed element profile (all elements that are in elem_names). Parameters ---------- cycle : integer The cycle number
[ "returns", "the", "undecayed", "element", "profile", "(", "all", "elements", "that", "are", "in", "elem_names", ")", "." ]
train
https://github.com/NuGrid/NuGridPy/blob/eee8047446e398be77362d82c1d8b3310054fab0/nugridpy/nugridse.py#L3921-L3963
openstack/proliantutils
proliantutils/redfish/resources/system/storage/simple_storage.py
SimpleStorage.maximum_size_bytes
def maximum_size_bytes(self): """Gets the biggest disk drive :returns size in bytes. """ return utils.max_safe( [device.get('CapacityBytes') for device in self.devices if device.get('CapacityBytes') is not None])
python
def maximum_size_bytes(self): """Gets the biggest disk drive :returns size in bytes. """ return utils.max_safe( [device.get('CapacityBytes') for device in self.devices if device.get('CapacityBytes') is not None])
[ "def", "maximum_size_bytes", "(", "self", ")", ":", "return", "utils", ".", "max_safe", "(", "[", "device", ".", "get", "(", "'CapacityBytes'", ")", "for", "device", "in", "self", ".", "devices", "if", "device", ".", "get", "(", "'CapacityBytes'", ")", "...
Gets the biggest disk drive :returns size in bytes.
[ "Gets", "the", "biggest", "disk", "drive" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/storage/simple_storage.py#L39-L46
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2016_05_31/table/tableservice.py
TableService.generate_account_shared_access_signature
def generate_account_shared_access_signature(self, resource_types, permission, expiry, start=None, ip=None, protocol=None): ''' Generates a shared access signature for the table service. Use the returned signature with the sas_token parameter of TableServ...
python
def generate_account_shared_access_signature(self, resource_types, permission, expiry, start=None, ip=None, protocol=None): ''' Generates a shared access signature for the table service. Use the returned signature with the sas_token parameter of TableServ...
[ "def", "generate_account_shared_access_signature", "(", "self", ",", "resource_types", ",", "permission", ",", "expiry", ",", "start", "=", "None", ",", "ip", "=", "None", ",", "protocol", "=", "None", ")", ":", "_validate_not_none", "(", "'self.account_name'", ...
Generates a shared access signature for the table service. Use the returned signature with the sas_token parameter of TableService. :param ResourceTypes resource_types: Specifies the resource types that are accessible with the account SAS. :param AccountPermissions permission: ...
[ "Generates", "a", "shared", "access", "signature", "for", "the", "table", "service", ".", "Use", "the", "returned", "signature", "with", "the", "sas_token", "parameter", "of", "TableService", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2016_05_31/table/tableservice.py#L191-L237
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.push_power_button
def push_power_button(self, target_value): """Reset the system in hpe exclusive manner. :param target_value: The target value to be set. :raises: InvalidInputError, if the target value is not allowed. :raises: SushyError, on an error from iLO. """ if target_v...
python
def push_power_button(self, target_value): """Reset the system in hpe exclusive manner. :param target_value: The target value to be set. :raises: InvalidInputError, if the target value is not allowed. :raises: SushyError, on an error from iLO. """ if target_v...
[ "def", "push_power_button", "(", "self", ",", "target_value", ")", ":", "if", "target_value", "not", "in", "mappings", ".", "PUSH_POWER_BUTTON_VALUE_MAP_REV", ":", "msg", "=", "(", "'The parameter \"%(parameter)s\" value \"%(target_value)s\" is '", "'invalid. Valid values are...
Reset the system in hpe exclusive manner. :param target_value: The target value to be set. :raises: InvalidInputError, if the target value is not allowed. :raises: SushyError, on an error from iLO.
[ "Reset", "the", "system", "in", "hpe", "exclusive", "manner", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L102-L122
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.bios_settings
def bios_settings(self): """Property to provide reference to `BIOSSettings` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return bios.BIOSSettings( self._conn, utils.get_subresource_path_by(self, 'Bios'), ...
python
def bios_settings(self): """Property to provide reference to `BIOSSettings` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return bios.BIOSSettings( self._conn, utils.get_subresource_path_by(self, 'Bios'), ...
[ "def", "bios_settings", "(", "self", ")", ":", "return", "bios", ".", "BIOSSettings", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "'Bios'", ")", ",", "redfish_version", "=", "self", ".", "redfish_version", ")" ]
Property to provide reference to `BIOSSettings` instance It is calculated once when the first time it is queried. On refresh, this property gets reset.
[ "Property", "to", "provide", "reference", "to", "BIOSSettings", "instance" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L126-L134
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.update_persistent_boot
def update_persistent_boot(self, devices=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the devices and ignores rest. :param devices: ordered list of boot devices :param persistent: Boolean flag to indi...
python
def update_persistent_boot(self, devices=[], persistent=False): """Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the devices and ignores rest. :param devices: ordered list of boot devices :param persistent: Boolean flag to indi...
[ "def", "update_persistent_boot", "(", "self", ",", "devices", "=", "[", "]", ",", "persistent", "=", "False", ")", ":", "device", "=", "PERSISTENT_BOOT_DEVICE_MAP", ".", "get", "(", "devices", "[", "0", "]", ".", "upper", "(", ")", ")", "if", "device", ...
Changes the persistent boot device order in BIOS boot mode for host Note: It uses first boot device from the devices and ignores rest. :param devices: ordered list of boot devices :param persistent: Boolean flag to indicate if the device to be set as a persistent boo...
[ "Changes", "the", "persistent", "boot", "device", "order", "in", "BIOS", "boot", "mode", "for", "host" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L136-L175
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.secure_boot
def secure_boot(self): """Property to provide reference to `SecureBoot` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return secure_boot.SecureBoot( self._conn, utils.get_subresource_path_by(self, 'SecureB...
python
def secure_boot(self): """Property to provide reference to `SecureBoot` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return secure_boot.SecureBoot( self._conn, utils.get_subresource_path_by(self, 'SecureB...
[ "def", "secure_boot", "(", "self", ")", ":", "return", "secure_boot", ".", "SecureBoot", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "'SecureBoot'", ")", ",", "redfish_version", "=", "self", ".", "redfish_version"...
Property to provide reference to `SecureBoot` instance It is calculated once when the first time it is queried. On refresh, this property gets reset.
[ "Property", "to", "provide", "reference", "to", "SecureBoot", "instance" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L191-L199
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.ethernet_interfaces
def ethernet_interfaces(self): """Provide reference to EthernetInterfacesCollection instance""" return ethernet_interface.EthernetInterfaceCollection( self._conn, self._get_hpe_sub_resource_collection_path('EthernetInterfaces'), redfish_version=self.redfish_version)
python
def ethernet_interfaces(self): """Provide reference to EthernetInterfacesCollection instance""" return ethernet_interface.EthernetInterfaceCollection( self._conn, self._get_hpe_sub_resource_collection_path('EthernetInterfaces'), redfish_version=self.redfish_version)
[ "def", "ethernet_interfaces", "(", "self", ")", ":", "return", "ethernet_interface", ".", "EthernetInterfaceCollection", "(", "self", ".", "_conn", ",", "self", ".", "_get_hpe_sub_resource_collection_path", "(", "'EthernetInterfaces'", ")", ",", "redfish_version", "=", ...
Provide reference to EthernetInterfacesCollection instance
[ "Provide", "reference", "to", "EthernetInterfacesCollection", "instance" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L212-L217
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.smart_storage
def smart_storage(self): """This property gets the object for smart storage. This property gets the object for smart storage. There is no collection for smart storages. :returns: an instance of smart storage """ return hpe_smart_storage.HPESmartStorage( self....
python
def smart_storage(self): """This property gets the object for smart storage. This property gets the object for smart storage. There is no collection for smart storages. :returns: an instance of smart storage """ return hpe_smart_storage.HPESmartStorage( self....
[ "def", "smart_storage", "(", "self", ")", ":", "return", "hpe_smart_storage", ".", "HPESmartStorage", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "[", "'Oem'", ",", "'Hpe'", ",", "'Links'", ",", "'SmartStorage'", ...
This property gets the object for smart storage. This property gets the object for smart storage. There is no collection for smart storages. :returns: an instance of smart storage
[ "This", "property", "gets", "the", "object", "for", "smart", "storage", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L221-L231
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.storages
def storages(self): """This property gets the list of instances for Storages This property gets the list of instances for Storages :returns: a list of instances of Storages """ return storage.StorageCollection( self._conn, utils.get_subresource_path_by(self, 'Storage...
python
def storages(self): """This property gets the list of instances for Storages This property gets the list of instances for Storages :returns: a list of instances of Storages """ return storage.StorageCollection( self._conn, utils.get_subresource_path_by(self, 'Storage...
[ "def", "storages", "(", "self", ")", ":", "return", "storage", ".", "StorageCollection", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "'Storage'", ")", ",", "redfish_version", "=", "self", ".", "redfish_version", ...
This property gets the list of instances for Storages This property gets the list of instances for Storages :returns: a list of instances of Storages
[ "This", "property", "gets", "the", "list", "of", "instances", "for", "Storages" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L235-L243
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.simple_storages
def simple_storages(self): """This property gets the list of instances for SimpleStorages :returns: a list of instances of SimpleStorages """ return simple_storage.SimpleStorageCollection( self._conn, utils.get_subresource_path_by(self, 'SimpleStorage'), redfish_...
python
def simple_storages(self): """This property gets the list of instances for SimpleStorages :returns: a list of instances of SimpleStorages """ return simple_storage.SimpleStorageCollection( self._conn, utils.get_subresource_path_by(self, 'SimpleStorage'), redfish_...
[ "def", "simple_storages", "(", "self", ")", ":", "return", "simple_storage", ".", "SimpleStorageCollection", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "'SimpleStorage'", ")", ",", "redfish_version", "=", "self", "...
This property gets the list of instances for SimpleStorages :returns: a list of instances of SimpleStorages
[ "This", "property", "gets", "the", "list", "of", "instances", "for", "SimpleStorages" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L247-L254
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.memory
def memory(self): """Property to provide reference to `MemoryCollection` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return memory.MemoryCollection( self._conn, utils.get_subresource_path_by(self, 'Memor...
python
def memory(self): """Property to provide reference to `MemoryCollection` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return memory.MemoryCollection( self._conn, utils.get_subresource_path_by(self, 'Memor...
[ "def", "memory", "(", "self", ")", ":", "return", "memory", ".", "MemoryCollection", "(", "self", ".", "_conn", ",", "utils", ".", "get_subresource_path_by", "(", "self", ",", "'Memory'", ")", ",", "redfish_version", "=", "self", ".", "redfish_version", ")" ...
Property to provide reference to `MemoryCollection` instance It is calculated once when the first time it is queried. On refresh, this property gets reset.
[ "Property", "to", "provide", "reference", "to", "MemoryCollection", "instance" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L258-L266
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.get_smart_storage_config
def get_smart_storage_config(self, smart_storage_config_url): """Returns a SmartStorageConfig Instance for each controller.""" return (smart_storage_config. HPESmartStorageConfig(self._conn, smart_storage_config_url, redfish_version=self.redfish_vers...
python
def get_smart_storage_config(self, smart_storage_config_url): """Returns a SmartStorageConfig Instance for each controller.""" return (smart_storage_config. HPESmartStorageConfig(self._conn, smart_storage_config_url, redfish_version=self.redfish_vers...
[ "def", "get_smart_storage_config", "(", "self", ",", "smart_storage_config_url", ")", ":", "return", "(", "smart_storage_config", ".", "HPESmartStorageConfig", "(", "self", ".", "_conn", ",", "smart_storage_config_url", ",", "redfish_version", "=", "self", ".", "redfi...
Returns a SmartStorageConfig Instance for each controller.
[ "Returns", "a", "SmartStorageConfig", "Instance", "for", "each", "controller", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L268-L272
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem._get_smart_storage_config_by_controller_model
def _get_smart_storage_config_by_controller_model(self, controller_model): """Returns a SmartStorageConfig Instance for controller by model. :returns: SmartStorageConfig Instance for controller """ ac = self.smart_storage.array_controllers.array_controller_by_model( controll...
python
def _get_smart_storage_config_by_controller_model(self, controller_model): """Returns a SmartStorageConfig Instance for controller by model. :returns: SmartStorageConfig Instance for controller """ ac = self.smart_storage.array_controllers.array_controller_by_model( controll...
[ "def", "_get_smart_storage_config_by_controller_model", "(", "self", ",", "controller_model", ")", ":", "ac", "=", "self", ".", "smart_storage", ".", "array_controllers", ".", "array_controller_by_model", "(", "controller_model", ")", "if", "ac", ":", "for", "ssc_id",...
Returns a SmartStorageConfig Instance for controller by model. :returns: SmartStorageConfig Instance for controller
[ "Returns", "a", "SmartStorageConfig", "Instance", "for", "controller", "by", "model", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L274-L285
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.check_smart_storage_config_ids
def check_smart_storage_config_ids(self): """Check SmartStorageConfig controllers is there in hardware. :raises: IloError, on an error from iLO. """ if self.smart_storage_config_identities is None: msg = ('The Redfish controller failed to get the ' 'SmartS...
python
def check_smart_storage_config_ids(self): """Check SmartStorageConfig controllers is there in hardware. :raises: IloError, on an error from iLO. """ if self.smart_storage_config_identities is None: msg = ('The Redfish controller failed to get the ' 'SmartS...
[ "def", "check_smart_storage_config_ids", "(", "self", ")", ":", "if", "self", ".", "smart_storage_config_identities", "is", "None", ":", "msg", "=", "(", "'The Redfish controller failed to get the '", "'SmartStorageConfig controller configurations.'", ")", "LOG", ".", "debu...
Check SmartStorageConfig controllers is there in hardware. :raises: IloError, on an error from iLO.
[ "Check", "SmartStorageConfig", "controllers", "is", "there", "in", "hardware", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L287-L296
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.delete_raid
def delete_raid(self): """Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloError, on an error from iLO. """ self.check_smart_storage_config_ids() any_exceptions = [] ...
python
def delete_raid(self): """Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloError, on an error from iLO. """ self.check_smart_storage_config_ids() any_exceptions = [] ...
[ "def", "delete_raid", "(", "self", ")", ":", "self", ".", "check_smart_storage_config_ids", "(", ")", "any_exceptions", "=", "[", "]", "ld_exc_count", "=", "0", "for", "config_id", "in", "self", ".", "smart_storage_config_identities", ":", "try", ":", "ssc_obj",...
Delete the raid configuration on the hardware. Loops through each SmartStorageConfig controller and clears the raid configuration. :raises: IloError, on an error from iLO.
[ "Delete", "the", "raid", "configuration", "on", "the", "hardware", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L298-L327
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem._parse_raid_config_data
def _parse_raid_config_data(self, raid_config): """It will parse raid config data based on raid controllers :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logica...
python
def _parse_raid_config_data(self, raid_config): """It will parse raid config data based on raid controllers :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logica...
[ "def", "_parse_raid_config_data", "(", "self", ",", "raid_config", ")", ":", "default", "=", "(", "self", ".", "smart_storage", ".", "array_controllers", ".", "get_default_controller", ".", "model", ")", "controllers", "=", "{", "default", ":", "[", "]", "}", ...
It will parse raid config data based on raid controllers :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, 's...
[ "It", "will", "parse", "raid", "config", "data", "based", "on", "raid", "controllers" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L329-L352
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.create_raid
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_leve...
python
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_leve...
[ "def", "create_raid", "(", "self", ",", "raid_config", ")", ":", "self", ".", "check_smart_storage_config_ids", "(", ")", "any_exceptions", "=", "[", "]", "controllers", "=", "self", ".", "_parse_raid_config_data", "(", "raid_config", ")", "# Creating raid on rest o...
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...
[ "Create", "the", "raid", "configuration", "on", "the", "hardware", "." ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L354-L391
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem._post_create_read_raid
def _post_create_read_raid(self, raid_config): """Read the logical drives from the system after post-create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'l...
python
def _post_create_read_raid(self, raid_config): """Read the logical drives from the system after post-create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'l...
[ "def", "_post_create_read_raid", "(", "self", ",", "raid_config", ")", ":", "controllers", "=", "self", ".", "_parse_raid_config_data", "(", "raid_config", ")", "ld_exc_count", "=", "0", "any_exceptions", "=", "[", "]", "config", "=", "{", "'logical_disks'", ":"...
Read the logical drives from the system after post-create raid :param raid_config: A dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, ...
[ "Read", "the", "logical", "drives", "from", "the", "system", "after", "post", "-", "create", "raid" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L393-L431
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem._post_delete_read_raid
def _post_delete_read_raid(self): """Read the logical drives from the system after post-delete raid :raises: IloError, if any error form iLO :returns: Empty dictionary with format: {'logical_disks': []} """ any_exceptions = [] ssc_ids = self.smart_storage_config_identiti...
python
def _post_delete_read_raid(self): """Read the logical drives from the system after post-delete raid :raises: IloError, if any error form iLO :returns: Empty dictionary with format: {'logical_disks': []} """ any_exceptions = [] ssc_ids = self.smart_storage_config_identiti...
[ "def", "_post_delete_read_raid", "(", "self", ")", ":", "any_exceptions", "=", "[", "]", "ssc_ids", "=", "self", ".", "smart_storage_config_identities", "config", "=", "{", "'logical_disks'", ":", "[", "]", "}", "for", "ssc_id", "in", "ssc_ids", ":", "try", ...
Read the logical drives from the system after post-delete raid :raises: IloError, if any error form iLO :returns: Empty dictionary with format: {'logical_disks': []}
[ "Read", "the", "logical", "drives", "from", "the", "system", "after", "post", "-", "delete", "raid" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L433-L461
openstack/proliantutils
proliantutils/redfish/resources/system/system.py
HPESystem.read_raid
def read_raid(self, raid_config=None): """Read the logical drives from the system :param raid_config: None or a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config ...
python
def read_raid(self, raid_config=None): """Read the logical drives from the system :param raid_config: None or a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config ...
[ "def", "read_raid", "(", "self", ",", "raid_config", "=", "None", ")", ":", "self", ".", "check_smart_storage_config_ids", "(", ")", "if", "raid_config", ":", "# When read called after create raid, user can pass raid config", "# as a input", "result", "=", "self", ".", ...
Read the logical drives from the system :param raid_config: None or a dictionary containing target raid configuration data. This data stucture should be as follows: raid_config = {'logical_disks': [{'raid_level': 1, ...
[ "Read", "the", "logical", "drives", "from", "the", "system" ]
train
https://github.com/openstack/proliantutils/blob/86ef3b47b4eca97c221577e3570b0240d6a25f22/proliantutils/redfish/resources/system/system.py#L463-L484
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2016_05_31/storageclient.py
StorageClient._perform_request
def _perform_request(self, request, parser=None, parser_args=None, operation_context=None): ''' Sends the request and return response. Catches HTTPError and hands it to error handler ''' operation_context = operation_context or _OperationContext() retry_context = RetryCon...
python
def _perform_request(self, request, parser=None, parser_args=None, operation_context=None): ''' Sends the request and return response. Catches HTTPError and hands it to error handler ''' operation_context = operation_context or _OperationContext() retry_context = RetryCon...
[ "def", "_perform_request", "(", "self", ",", "request", ",", "parser", "=", "None", ",", "parser_args", "=", "None", ",", "operation_context", "=", "None", ")", ":", "operation_context", "=", "operation_context", "or", "_OperationContext", "(", ")", "retry_conte...
Sends the request and return response. Catches HTTPError and hands it to error handler
[ "Sends", "the", "request", "and", "return", "response", ".", "Catches", "HTTPError", "and", "hands", "it", "to", "error", "handler" ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2016_05_31/storageclient.py#L189-L285
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/_deserialization.py
_convert_json_to_entity
def _convert_json_to_entity(entry_element, property_resolver): ''' Convert json response to entity. The entity format is: { "Address":"Mountain View", "Age":23, "AmountDue":200.23, "CustomerCode@odata.type":"Edm.Guid", "CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833"...
python
def _convert_json_to_entity(entry_element, property_resolver): ''' Convert json response to entity. The entity format is: { "Address":"Mountain View", "Age":23, "AmountDue":200.23, "CustomerCode@odata.type":"Edm.Guid", "CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833"...
[ "def", "_convert_json_to_entity", "(", "entry_element", ",", "property_resolver", ")", ":", "entity", "=", "Entity", "(", ")", "properties", "=", "{", "}", "edmtypes", "=", "{", "}", "odata", "=", "{", "}", "for", "name", ",", "value", "in", "entry_element...
Convert json response to entity. The entity format is: { "Address":"Mountain View", "Age":23, "AmountDue":200.23, "CustomerCode@odata.type":"Edm.Guid", "CustomerCode":"c9da6455-213d-42c9-9a79-3e9149a57833", "CustomerSince@odata.type":"Edm.DateTime", "CustomerSin...
[ "Convert", "json", "response", "to", "entity", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/_deserialization.py#L95-L185
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/_deserialization.py
_convert_json_response_to_tables
def _convert_json_response_to_tables(response): ''' Converts the response to tables class. ''' if response is None: return response tables = _list() continuation = _get_continuation_from_response_headers(response) tables.next_marker = continuation.get('NextTableName') root = loads...
python
def _convert_json_response_to_tables(response): ''' Converts the response to tables class. ''' if response is None: return response tables = _list() continuation = _get_continuation_from_response_headers(response) tables.next_marker = continuation.get('NextTableName') root = loads...
[ "def", "_convert_json_response_to_tables", "(", "response", ")", ":", "if", "response", "is", "None", ":", "return", "response", "tables", "=", "_list", "(", ")", "continuation", "=", "_get_continuation_from_response_headers", "(", "response", ")", "tables", ".", ...
Converts the response to tables class.
[ "Converts", "the", "response", "to", "tables", "class", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/_deserialization.py#L188-L211
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/_deserialization.py
_convert_json_response_to_entities
def _convert_json_response_to_entities(response, property_resolver): ''' Converts the response to tables class. ''' if response is None: return response entities = _list() entities.next_marker = _get_continuation_from_response_headers(response) root = loads(response.body.decode('utf-8...
python
def _convert_json_response_to_entities(response, property_resolver): ''' Converts the response to tables class. ''' if response is None: return response entities = _list() entities.next_marker = _get_continuation_from_response_headers(response) root = loads(response.body.decode('utf-8...
[ "def", "_convert_json_response_to_entities", "(", "response", ",", "property_resolver", ")", ":", "if", "response", "is", "None", ":", "return", "response", "entities", "=", "_list", "(", ")", "entities", ".", "next_marker", "=", "_get_continuation_from_response_heade...
Converts the response to tables class.
[ "Converts", "the", "response", "to", "tables", "class", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/_deserialization.py#L214-L234
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/_deserialization.py
_extract_etag
def _extract_etag(response): ''' Extracts the etag from the response headers. ''' if response and response.headers: for name, value in response.headers: if name.lower() == 'etag': return value return None
python
def _extract_etag(response): ''' Extracts the etag from the response headers. ''' if response and response.headers: for name, value in response.headers: if name.lower() == 'etag': return value return None
[ "def", "_extract_etag", "(", "response", ")", ":", "if", "response", "and", "response", ".", "headers", ":", "for", "name", ",", "value", "in", "response", ".", "headers", ":", "if", "name", ".", "lower", "(", ")", "==", "'etag'", ":", "return", "value...
Extracts the etag from the response headers.
[ "Extracts", "the", "etag", "from", "the", "response", "headers", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/_deserialization.py#L236-L243
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/sharedaccesssignature.py
SharedAccessSignature.generate_table
def generate_table(self, table_name, permission=None, expiry=None, start=None, id=None, ip=None, protocol=None, start_pk=None, start_rk=None, end_pk=None, end_rk=None): ''' Generates a shared access signatu...
python
def generate_table(self, table_name, permission=None, expiry=None, start=None, id=None, ip=None, protocol=None, start_pk=None, start_rk=None, end_pk=None, end_rk=None): ''' Generates a shared access signatu...
[ "def", "generate_table", "(", "self", ",", "table_name", ",", "permission", "=", "None", ",", "expiry", "=", "None", ",", "start", "=", "None", ",", "id", "=", "None", ",", "ip", "=", "None", ",", "protocol", "=", "None", ",", "start_pk", "=", "None"...
Generates a shared access signature for the table. Use the returned signature with the sas_token parameter of TableService. :param str table_name: Name of table. :param TablePermissions permission: The permissions associated with the shared access signature. The ...
[ "Generates", "a", "shared", "access", "signature", "for", "the", "table", ".", "Use", "the", "returned", "signature", "with", "the", "sas_token", "parameter", "of", "TableService", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/sharedaccesssignature.py#L45-L116
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/sharedaccesssignature.py
SharedAccessSignature.generate_blob
def generate_blob(self, container_name, blob_name, permission=None, expiry=None, start=None, id=None, ip=None, protocol=None, cache_control=None, content_disposition=None, content_encoding=None, content_language=None, conte...
python
def generate_blob(self, container_name, blob_name, permission=None, expiry=None, start=None, id=None, ip=None, protocol=None, cache_control=None, content_disposition=None, content_encoding=None, content_language=None, conte...
[ "def", "generate_blob", "(", "self", ",", "container_name", ",", "blob_name", ",", "permission", "=", "None", ",", "expiry", "=", "None", ",", "start", "=", "None", ",", "id", "=", "None", ",", "ip", "=", "None", ",", "protocol", "=", "None", ",", "c...
Generates a shared access signature for the blob. Use the returned signature with the sas_token parameter of any BlobService. :param str container_name: Name of container. :param str blob_name: Name of blob. :param BlobPermissions permission: The perm...
[ "Generates", "a", "shared", "access", "signature", "for", "the", "blob", ".", "Use", "the", "returned", "signature", "with", "the", "sas_token", "parameter", "of", "any", "BlobService", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/sharedaccesssignature.py#L170-L245
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.list_tables
def list_tables(self, num_results=None, marker=None, timeout=None): ''' Returns a generator to list the tables. The generator will lazily follow the continuation tokens returned by the service and stop when all tables have been returned or num_results is reached. If num_result...
python
def list_tables(self, num_results=None, marker=None, timeout=None): ''' Returns a generator to list the tables. The generator will lazily follow the continuation tokens returned by the service and stop when all tables have been returned or num_results is reached. If num_result...
[ "def", "list_tables", "(", "self", ",", "num_results", "=", "None", ",", "marker", "=", "None", ",", "timeout", "=", "None", ")", ":", "kwargs", "=", "{", "'max_results'", ":", "num_results", ",", "'marker'", ":", "marker", ",", "'timeout'", ":", "timeou...
Returns a generator to list the tables. The generator will lazily follow the continuation tokens returned by the service and stop when all tables have been returned or num_results is reached. If num_results is specified and the account has more than that number of tables, the generat...
[ "Returns", "a", "generator", "to", "list", "the", "tables", ".", "The", "generator", "will", "lazily", "follow", "the", "continuation", "tokens", "returned", "by", "the", "service", "and", "stop", "when", "all", "tables", "have", "been", "returned", "or", "n...
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L353-L383
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService._list_tables
def _list_tables(self, max_results=None, marker=None, timeout=None): ''' Returns a list of tables under the specified account. Makes a single list request to the service. Used internally by the list_tables method. :param int max_results: The maximum number of tables to retu...
python
def _list_tables(self, max_results=None, marker=None, timeout=None): ''' Returns a list of tables under the specified account. Makes a single list request to the service. Used internally by the list_tables method. :param int max_results: The maximum number of tables to retu...
[ "def", "_list_tables", "(", "self", ",", "max_results", "=", "None", ",", "marker", "=", "None", ",", "timeout", "=", "None", ")", ":", "request", "=", "HTTPRequest", "(", ")", "request", ".", "method", "=", "'GET'", "request", ".", "host", "=", "self"...
Returns a list of tables under the specified account. Makes a single list request to the service. Used internally by the list_tables method. :param int max_results: The maximum number of tables to return. A single list request may return up to 1000 tables and potentially a con...
[ "Returns", "a", "list", "of", "tables", "under", "the", "specified", "account", ".", "Makes", "a", "single", "list", "request", "to", "the", "service", ".", "Used", "internally", "by", "the", "list_tables", "method", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L385-L419
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.create_table
def create_table(self, table_name, fail_on_exist=False, timeout=None): ''' Creates a new table in the storage account. :param str table_name: The name of the table to create. The table name may contain only alphanumeric characters and cannot begin with a numeric characte...
python
def create_table(self, table_name, fail_on_exist=False, timeout=None): ''' Creates a new table in the storage account. :param str table_name: The name of the table to create. The table name may contain only alphanumeric characters and cannot begin with a numeric characte...
[ "def", "create_table", "(", "self", ",", "table_name", ",", "fail_on_exist", "=", "False", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table'", ",", "table_name", ")", "request", "=", "HTTPRequest", "(", ")", "request", ".", "method",...
Creates a new table in the storage account. :param str table_name: The name of the table to create. The table name may contain only alphanumeric characters and cannot begin with a numeric character. It is case-insensitive and must be from 3 to 63 characters long. :pa...
[ "Creates", "a", "new", "table", "in", "the", "storage", "account", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L421-L458
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.exists
def exists(self, table_name, timeout=None): ''' Returns a boolean indicating whether the table exists. :param str table_name: The name of table to check for existence. :param int timeout: The server timeout, expressed in seconds. :return: A boolean indica...
python
def exists(self, table_name, timeout=None): ''' Returns a boolean indicating whether the table exists. :param str table_name: The name of table to check for existence. :param int timeout: The server timeout, expressed in seconds. :return: A boolean indica...
[ "def", "exists", "(", "self", ",", "table_name", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "HTTPRequest", "(", ")", "request", ".", "method", "=", "'GET'", "request", ".", "hos...
Returns a boolean indicating whether the table exists. :param str table_name: The name of table to check for existence. :param int timeout: The server timeout, expressed in seconds. :return: A boolean indicating whether the table exists. :rtype: bool
[ "Returns", "a", "boolean", "indicating", "whether", "the", "table", "exists", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L460-L484
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.get_table_acl
def get_table_acl(self, table_name, timeout=None): ''' Returns details about any stored access policies specified on the table that may be used with Shared Access Signatures. :param str table_name: The name of an existing table. :param int timeout: The se...
python
def get_table_acl(self, table_name, timeout=None): ''' Returns details about any stored access policies specified on the table that may be used with Shared Access Signatures. :param str table_name: The name of an existing table. :param int timeout: The se...
[ "def", "get_table_acl", "(", "self", ",", "table_name", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "HTTPRequest", "(", ")", "request", ".", "method", "=", "'GET'", "request", ".",...
Returns details about any stored access policies specified on the table that may be used with Shared Access Signatures. :param str table_name: The name of an existing table. :param int timeout: The server timeout, expressed in seconds. :return: A dictionary of ac...
[ "Returns", "details", "about", "any", "stored", "access", "policies", "specified", "on", "the", "table", "that", "may", "be", "used", "with", "Shared", "Access", "Signatures", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L528-L551
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.set_table_acl
def set_table_acl(self, table_name, signed_identifiers=None, timeout=None): ''' Sets stored access policies for the table that may be used with Shared Access Signatures. When you set permissions for a table, the existing permissions are replaced. To update the table’s...
python
def set_table_acl(self, table_name, signed_identifiers=None, timeout=None): ''' Sets stored access policies for the table that may be used with Shared Access Signatures. When you set permissions for a table, the existing permissions are replaced. To update the table’s...
[ "def", "set_table_acl", "(", "self", ",", "table_name", ",", "signed_identifiers", "=", "None", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "HTTPRequest", "(", ")", "request", ".", ...
Sets stored access policies for the table that may be used with Shared Access Signatures. When you set permissions for a table, the existing permissions are replaced. To update the table’s permissions, call :func:`~get_table_acl` to fetch all access policies associated with ...
[ "Sets", "stored", "access", "policies", "for", "the", "table", "that", "may", "be", "used", "with", "Shared", "Access", "Signatures", ".", "When", "you", "set", "permissions", "for", "a", "table", "the", "existing", "permissions", "are", "replaced", ".", "To...
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L553-L591
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.query_entities
def query_entities(self, table_name, filter=None, select=None, num_results=None, marker=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Returns a generator to list the entities in the table specified. The ...
python
def query_entities(self, table_name, filter=None, select=None, num_results=None, marker=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Returns a generator to list the entities in the table specified. The ...
[ "def", "query_entities", "(", "self", ",", "table_name", ",", "filter", "=", "None", ",", "select", "=", "None", ",", "num_results", "=", "None", ",", "marker", "=", "None", ",", "accept", "=", "TablePayloadFormat", ".", "JSON_MINIMAL_METADATA", ",", "proper...
Returns a generator to list the entities in the table specified. The generator will lazily follow the continuation tokens returned by the service and stop when all entities have been returned or max_results is reached. If max_results is specified and the account has more than that nu...
[ "Returns", "a", "generator", "to", "list", "the", "entities", "in", "the", "table", "specified", ".", "The", "generator", "will", "lazily", "follow", "the", "continuation", "tokens", "returned", "by", "the", "service", "and", "stop", "when", "all", "entities",...
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L593-L647
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService._query_entities
def _query_entities(self, table_name, filter=None, select=None, max_results=None, marker=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Returns a list of entities under the specified table. Makes a single li...
python
def _query_entities(self, table_name, filter=None, select=None, max_results=None, marker=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Returns a list of entities under the specified table. Makes a single li...
[ "def", "_query_entities", "(", "self", ",", "table_name", ",", "filter", "=", "None", ",", "select", "=", "None", ",", "max_results", "=", "None", ",", "marker", "=", "None", ",", "accept", "=", "TablePayloadFormat", ".", "JSON_MINIMAL_METADATA", ",", "prope...
Returns a list of entities under the specified table. Makes a single list request to the service. Used internally by the query_entities method. :param str table_name: The name of the table to query. :param str filter: Returns only entities that satisfy the specified fil...
[ "Returns", "a", "list", "of", "entities", "under", "the", "specified", "table", ".", "Makes", "a", "single", "list", "request", "to", "the", "service", ".", "Used", "internally", "by", "the", "query_entities", "method", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L649-L710
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.commit_batch
def commit_batch(self, table_name, batch, timeout=None): ''' Commits a :class:`~azure.storage.table.TableBatch` request. :param str table_name: The name of the table to commit the batch to. :param TableBatch batch: The batch to commit. :param int timeout:...
python
def commit_batch(self, table_name, batch, timeout=None): ''' Commits a :class:`~azure.storage.table.TableBatch` request. :param str table_name: The name of the table to commit the batch to. :param TableBatch batch: The batch to commit. :param int timeout:...
[ "def", "commit_batch", "(", "self", ",", "table_name", ",", "batch", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "# Construct the batch request", "request", "=", "HTTPRequest", "(", ")", "request", "....
Commits a :class:`~azure.storage.table.TableBatch` request. :param str table_name: The name of the table to commit the batch to. :param TableBatch batch: The batch to commit. :param int timeout: The server timeout, expressed in seconds. :return: A lis...
[ "Commits", "a", ":", "class", ":", "~azure", ".", "storage", ".", "table", ".", "TableBatch", "request", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L712-L750
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.batch
def batch(self, table_name, timeout=None): ''' Creates a batch object which can be used as a context manager. Commits the batch on exit. :param str table_name: The name of the table to commit the batch to. :param int timeout: The server timeout, expressed in seco...
python
def batch(self, table_name, timeout=None): ''' Creates a batch object which can be used as a context manager. Commits the batch on exit. :param str table_name: The name of the table to commit the batch to. :param int timeout: The server timeout, expressed in seco...
[ "def", "batch", "(", "self", ",", "table_name", ",", "timeout", "=", "None", ")", ":", "batch", "=", "TableBatch", "(", ")", "yield", "batch", "self", ".", "commit_batch", "(", "table_name", ",", "batch", ",", "timeout", "=", "timeout", ")" ]
Creates a batch object which can be used as a context manager. Commits the batch on exit. :param str table_name: The name of the table to commit the batch to. :param int timeout: The server timeout, expressed in seconds.
[ "Creates", "a", "batch", "object", "which", "can", "be", "used", "as", "a", "context", "manager", ".", "Commits", "the", "batch", "on", "exit", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L753-L764
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.get_entity
def get_entity(self, table_name, partition_key, row_key, select=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Get an entity from the specified table. Throws if the entity does not exist. :param str table_n...
python
def get_entity(self, table_name, partition_key, row_key, select=None, accept=TablePayloadFormat.JSON_MINIMAL_METADATA, property_resolver=None, timeout=None): ''' Get an entity from the specified table. Throws if the entity does not exist. :param str table_n...
[ "def", "get_entity", "(", "self", ",", "table_name", ",", "partition_key", ",", "row_key", ",", "select", "=", "None", ",", "accept", "=", "TablePayloadFormat", ".", "JSON_MINIMAL_METADATA", ",", "property_resolver", "=", "None", ",", "timeout", "=", "None", "...
Get an entity from the specified table. Throws if the entity does not exist. :param str table_name: The name of the table to get the entity from. :param str partition_key: The PartitionKey of the entity. :param str row_key: The RowKey of the entity. :...
[ "Get", "an", "entity", "from", "the", "specified", "table", ".", "Throws", "if", "the", "entity", "does", "not", "exist", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L766-L802
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.insert_entity
def insert_entity(self, table_name, entity, timeout=None): ''' Inserts a new entity into the table. Throws if an entity with the same PartitionKey and RowKey already exists. When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system p...
python
def insert_entity(self, table_name, entity, timeout=None): ''' Inserts a new entity into the table. Throws if an entity with the same PartitionKey and RowKey already exists. When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system p...
[ "def", "insert_entity", "(", "self", ",", "table_name", ",", "entity", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "_insert_entity", "(", "entity", ")", "request", ".", "host", "="...
Inserts a new entity into the table. Throws if an entity with the same PartitionKey and RowKey already exists. When inserting an entity into a table, you must specify values for the PartitionKey and RowKey system properties. Together, these properties form the primary key and must be...
[ "Inserts", "a", "new", "entity", "into", "the", "table", ".", "Throws", "if", "an", "entity", "with", "the", "same", "PartitionKey", "and", "RowKey", "already", "exists", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L804-L836
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.update_entity
def update_entity(self, table_name, entity, if_match='*', timeout=None): ''' Updates an existing entity in a table. Throws if the entity does not exist. The update_entity operation replaces the entire entity and can be used to remove properties. :param str table_name: ...
python
def update_entity(self, table_name, entity, if_match='*', timeout=None): ''' Updates an existing entity in a table. Throws if the entity does not exist. The update_entity operation replaces the entire entity and can be used to remove properties. :param str table_name: ...
[ "def", "update_entity", "(", "self", ",", "table_name", ",", "entity", ",", "if_match", "=", "'*'", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "_update_entity", "(", "entity", ","...
Updates an existing entity in a table. Throws if the entity does not exist. The update_entity operation replaces the entire entity and can be used to remove properties. :param str table_name: The name of the table containing the entity to update. :param entity: ...
[ "Updates", "an", "existing", "entity", "in", "a", "table", ".", "Throws", "if", "the", "entity", "does", "not", "exist", ".", "The", "update_entity", "operation", "replaces", "the", "entire", "entity", "and", "can", "be", "used", "to", "remove", "properties"...
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L838-L870
Azure/azure-multiapi-storage-python
azure/multiapi/storage/v2015_04_05/table/tableservice.py
TableService.delete_entity
def delete_entity(self, table_name, partition_key, row_key, if_match='*', timeout=None): ''' Deletes an existing entity in a table. Throws if the entity does not exist. When an entity is successfully deleted, the entity is immediately marked for deletion and is no...
python
def delete_entity(self, table_name, partition_key, row_key, if_match='*', timeout=None): ''' Deletes an existing entity in a table. Throws if the entity does not exist. When an entity is successfully deleted, the entity is immediately marked for deletion and is no...
[ "def", "delete_entity", "(", "self", ",", "table_name", ",", "partition_key", ",", "row_key", ",", "if_match", "=", "'*'", ",", "timeout", "=", "None", ")", ":", "_validate_not_none", "(", "'table_name'", ",", "table_name", ")", "request", "=", "_delete_entity...
Deletes an existing entity in a table. Throws if the entity does not exist. When an entity is successfully deleted, the entity is immediately marked for deletion and is no longer accessible to clients. The entity is later removed from the Table service during garbage collection. :par...
[ "Deletes", "an", "existing", "entity", "in", "a", "table", ".", "Throws", "if", "the", "entity", "does", "not", "exist", "." ]
train
https://github.com/Azure/azure-multiapi-storage-python/blob/bd5482547f993c6eb56fd09070e15c2e9616e440/azure/multiapi/storage/v2015_04_05/table/tableservice.py#L911-L943