Query the firmware versions.
430091
async def query_firmware(self):
        """"""

        _version = await self.request.get(join_path(self._base_path, "/fwversion"))
        _fw = _version.get("firmware")
        if _fw:
            _main = _fw.get("mainProcessor")
            if _main:
                self._main_processor_version = self._make_version(_main)
            _radio = _fw.get("radio")
            if _radio:
                self._radio_version = self._make_version(_radio)
662462
def get_q_version(q_home):
    """"""
    with open(os.path.join(q_home, 'q.k')) as f:
        for line in f:
            if line.startswith('k:'):
                return line[2:5]
    return '2.2'
562345
def get_firmware(self, components=()):
        
        self.oem_init()
        mcinfo = self.xraw_command(netfn=6, command=1)
        bmcver = '{0}.{1}'.format(
            ord(mcinfo['data'][2]), hex(ord(mcinfo['data'][3]))[2:])
        return self._oem.get_oem_firmware(bmcver, components)
966176
def version(self):
        """"""
        if not self.__version:
            command = (self.name, '--version')
            logger.debug(command)
            stdout, _ = subprocess.Popen(
                command, stdout=subprocess.PIPE).communicate()
            version_output = str(stdout)
            match = re.search(self.version_patt, version_output)
            if match is None:
                raise ServersError(
                    'Could not determine version of %s from string: %s'
                    % (self.name, version_output))
            version_string = match.group('version')
            self.__version = tuple(map(int, version_string.split('.')))
        return self.__version
1063660
def hardware_version(self):
        
        version = self._dll.JLINKARM_GetHardwareVersion()
        major = version / 10000 % 100
        minor = version / 100 % 100
        return '%d.%02d' % (major, minor)
201502
def match(self, version):
        """"""
        return all(spec.match(version) for spec in self.specs)
976619
def get_versions(self):

		'''
		
		'''

		# get all versions
		versions_response = self.repo.api.http_request('GET', '%s/fcr:versions' % self.uri)

		# parse response
		versions_graph = self.repo.api.parse_rdf_payload(versions_response.content, versions_response.headers)

		# loop through fedora.hasVersion
		for version_uri in versions_graph.objects(self.uri, self.rdf.prefixes.fedora.hasVersion):

			# get label
			version_label = versions_graph.value(version_uri, self.rdf.prefixes.fedora.hasVersionLabel, None).toPython()

			# affix version
			self._affix_version(version_uri, version_label)
858241
def extract_firmware(self):
        '''
        
        '''
        fields = ['Image Software']
        software, _ = self._extract_alternative_fields(
            fields, default="", field_type=str)
        return software
491127
def firmware_updates(self, firmware_updates):
        
        if firmware_updates is None:
            raise ValueError("Invalid value for `firmware_updates`, must not be `None`")
        if firmware_updates is not None and firmware_updates < 0:
            raise ValueError("Invalid value for `firmware_updates`, must be a value greater than or equal to `0`")

        self._firmware_updates = firmware_updates
86261
def firmware_checksum(self, firmware_checksum):
        
        if firmware_checksum is not None and len(firmware_checksum) > 64:
            raise ValueError("Invalid value for `firmware_checksum`, length must be less than or equal to `64`")

        self._firmware_checksum = firmware_checksum
809758
def get_version(self):
        """"""
        return mgz.const.VERSIONS[self._header.version], str(self._header.sub_version)[:5]
139208
def version(self):
        """"""
        res = self.client.service.Version()
        return '.'.join([ustr(x) for x in res[0]])
304752
def check_version(self, check, timeout=None, metadata=None,
                      credentials=None):
        """"""
        return self.stub.CheckVersion(check, timeout=timeout,
                                      metadata=metadata,
                                      credentials=credentials)
227824
def hardware_version(self):
        """"""

        hardware_string = self.hardware_string

        if not isinstance(hardware_string, bytes):
            hardware_string = self.hardware_string.encode('utf-8')

        if len(hardware_string) > 10:
            self._logger.warn("Truncating hardware string that was longer than 10 bytes: %s", self.hardware_string)

        if len(hardware_string) < 10:
            hardware_string += b'\0'*(10 - len(hardware_string))

        return [hardware_string]
225446
private void checkFirmwareVersion() {
        Log.i(TAG, "Checking Firmware version...");
        setState(OADState.CHECKING_FW_VERSION);
        mGattClient.getDeviceProfile().getFirmwareVersion(new DeviceProfile.VersionCallback() {
            @Override
            public void onComplete(String version) {

                // Check the Bean version against the Bundle version
                boolean updateNeeded = needsUpdate(firmwareBundle.version(), version);

                if (updateNeeded && oadApproval.isApproved()) {
                    // Needs update and client has approved, keep the update going

                    startOfferingImages();

                } else if (updateNeeded && !oadApproval.isApproved()) {
                    // Needs update but client has not approved, ask for approval

                    watchdog.pause();
                    oadListener.updateRequired(true);

                } else if (!updateNeeded && !oadApproval.isApproved()){
                    // Does not need update and the client has never approved. This means
                    // no update is required, and no firmware update ever occurred

                    finishNoUpdateOccurred();
                    oadListener.updateRequired(false);

                } else if (!updateNeeded && oadApproval.isApproved()) {
                    // Does not need update, and the client has approved. This means that
                    // the firmware process actually took place, and completed

                    finishUpdateOccurred();

                } else {
                    Log.w(TAG, "Unexpected OAD Condition!");
                }

            }
        });
    }
262573
def get_version_text(self):
        """"""
        try:
            version_text = self.device.send('uname -sr', timeout=10)
        except CommandError:
            self.log("Non Unix jumphost type detected")
            return None
            raise ConnectionError("Non Unix jumphost type detected.")
        return version_text
752106
def respond_fw(self, msg):
        """"""
        req_fw_type, req_fw_ver, req_blk = fw_hex_to_int(msg.payload, 3)
        _LOGGER.debug(
            'Received firmware request with firmware type %s, '
            'firmware version %s, block index %s',
            req_fw_type, req_fw_ver, req_blk)
        fw_type, fw_ver, fware = self._get_fw(
            msg, (self.unstarted, self.started), req_fw_type, req_fw_ver)
        if fware is None:
            return None
        blk_data = fware['data'][
            req_blk * FIRMWARE_BLOCK_SIZE:
            req_blk * FIRMWARE_BLOCK_SIZE + FIRMWARE_BLOCK_SIZE]
        msg = msg.copy(sub_type=self._const.Stream.ST_FIRMWARE_RESPONSE)
        msg.payload = fw_int_to_hex(fw_type, fw_ver, req_blk)
        # format blk_data into payload format
        msg.payload = msg.payload + binascii.hexlify(blk_data).decode('utf-8')
        return msg