Sets the boot priority for this QEMU VM.

        :param boot_priority: QEMU boot priority
340794
def boot_priority(self, boot_priority):
        

        self._boot_priority = boot_priority
        log.info('QEMU VM "{name}" [{id}] has set the boot priority to {boot_priority}'.format(name=self._name,
                                                                                               id=self._id,
                                                                                               boot_priority=self._boot_priority))
601983
def set_vm_status(self, device='FLOPPY',
                      boot_option='BOOT_ONCE', write_protect='YES'):
        
        return self._call_method('set_vm_status', device, boot_option,
                                 write_protect)
1270357
def set_temporary_boot_order(boot_target)
      response = rest_get('/redfish/v1/Systems/1/')
      boottargets = response_handler(response)['Boot']['BootSourceOverrideSupported']
      unless boottargets.include? boot_target
        raise "BootSourceOverrideTarget value - #{boot_target} is not supported. Valid values are: #{boottargets}"
      end
      new_action = { 'Boot' => { 'BootSourceOverrideTarget' => boot_target } }
      response = rest_patch('/redfish/v1/Systems/1/', body: new_action)
      response_handler(response)
      true
    end
1284200
def set_priorities(SO_methods, ask):
    
    # if ask set to 1, then can change priorities
    SO_methods = [meth.strip() for meth in SO_methods]
    SO_defaults = ['SO-SUN', 'SO-GPS-DIFF', 'SO-SUN-SIGHT', 'SO-SIGHT', 'SO-SIGHT-BS',
                   'SO-CMD-NORTH', 'SO-MAG', 'SO-SM', 'SO-REC', 'SO-V', 'SO-CORE', 'SO-NO']
    SO_priorities, prior_list = [], []
    if len(SO_methods) >= 1:
        for l in range(len(SO_defaults)):
            if SO_defaults[l] in SO_methods:
                SO_priorities.append(SO_defaults[l])
    pri, change = 0, "1"
    if ask == 1:
        print("""These methods of sample orientation were found:
      They have been assigned a provisional priority (top = zero, last = highest number) """)
        for m in range(len(SO_defaults)):
            if SO_defaults[m] in SO_methods:
                SO_priorities[SO_methods.index(SO_defaults[m])] = pri
                pri += 1
        while change == "1":
            prior_list = SO_priorities
            for m in range(len(SO_methods)):
                print(SO_methods[m], SO_priorities[m])
            change = input("Change these?  1/[0] ")
            if change != "1":
                break
        SO_priorities = []
        for l in range(len(SO_methods)):
            print(SO_methods[l])
            print(" Priority?   ", prior_list)
            pri = int(input())
            SO_priorities.append(pri)
            del prior_list[prior_list.index(pri)]
    return SO_priorities
1240203
public void setPriority(Integer priority) {        
        if (priority == null) {
            _properties.remove(AMQP_PROP_PRIORITY);
            return;
        }
        
        int priorityValue = priority.intValue();
        if ((priorityValue < 0) || (priorityValue > 9)) {
            String s = "AMQP 0-9-1 spec mandates 'priority' value to be between 0 and 9";
            throw new IllegalStateException(s);
        }
        
        _properties.put(AMQP_PROP_PRIORITY, priority);
    }
564616
def encode_priority(self, facility, priority):
        
        return (facility << 3) | self.priority_map.get(priority, self.LOG_WARNING)
644585
public void setPriority(SessionPriority prio) throws IOException {
    if (failException != null) {
      throw failException;
    }

    sessionInfo.priority = prio;

    SessionInfo newInfo = new SessionInfo(sessionInfo);
    cmNotifier.addCall(
        new ClusterManagerService.sessionUpdateInfo_args(sessionId, newInfo));
  }
873080
def bootpxe(reboot = false, persistent = false)
      bootstatus = config.bootpxe(persistent)
      # Only reboot if setting the boot flag was successful
      power.cycle if reboot && bootstatus
    end
886749
def _wait_for_machine_booted(name, suffictinet_texts=None):
        
        # TODO: rewrite it using probes module in utils
        suffictinet_texts = suffictinet_texts or ["systemd-logind"]
        # optionally use: "Unit: machine"
        for foo in range(constants.DEFAULT_RETRYTIMEOUT):
            time.sleep(constants.DEFAULT_SLEEP)
            out = run_cmd(
                ["machinectl", "--no-pager", "status", name],
                ignore_status=True, return_output=True)
            for restr in suffictinet_texts:
                if restr in out:
                    time.sleep(constants.DEFAULT_SLEEP)
                    return True
        raise ConuException(
            "Unable to start machine %s within %d (machinectl status command dos not contain %s)" %
            (name, constants.DEFAULT_RETRYTIMEOUT, suffictinet_texts))
997015
def prioritize():
    

    while True:
        hp_qs = Message.objects.high_priority().using('default')
        mp_qs = Message.objects.medium_priority().using('default')
        lp_qs = Message.objects.low_priority().using('default')
        while hp_qs.count() or mp_qs.count():
            while hp_qs.count():
                for message in hp_qs.order_by("when_added"):
                    yield message
            while hp_qs.count() == 0 and mp_qs.count():
                yield mp_qs.order_by("when_added")[0]
        while hp_qs.count() == 0 and mp_qs.count() == 0 and lp_qs.count():
            yield lp_qs.order_by("when_added")[0]
        if Message.objects.non_deferred().using('default').count() == 0:
            break
798182
def set_vm_status(self, device='FLOPPY',
                      boot_option='BOOT_ONCE', write_protect='YES'):
        
        dic = {'DEVICE': device.upper()}
        xml = self._create_dynamic_xml(
            'SET_VM_STATUS', 'RIB_INFO', 'write', dic)

        if six.PY2:
            child_iterator = xml.getiterator()
        else:
            child_iterator = xml.iter()

        for child in child_iterator:
            if child.tag == 'SET_VM_STATUS':
                etree.SubElement(child, 'VM_BOOT_OPTION',
                                 VALUE=boot_option.upper())
                etree.SubElement(child, 'VM_WRITE_PROTECT',
                                 VALUE=write_protect.upper())

        d = self._request_ilo(xml)
        data = self._parse_output(d)
        return data
711105
def get_boot_order(interface, key)
      max_boot = Global.global.system_properties.max_boot_position

      (1..max_boot).inject([]) do |order, position|
        order << interface.get_boot_order(position)
        order
      end
    end
1288228
def enable_yum_priority_obsoletes(path="/etc/yum/pluginconf.d/priorities.conf"):
    """"""
    config = configparser.ConfigParser()
    config.read(path)
    config.set('main', 'check_obsoletes', '1')
    with open(path, 'w') as fout:
        config.write(fout)
146776
def add_priority(self, name, **attrs):
        
        return Priorities(self.requester).create(self.id, name, **attrs)
516495
def new(self, boot_system_id):
        # type: (bytes) -> None
        '''
        
        '''
        if self._initialized:
            raise Exception('Boot Record already initialized')

        self.boot_system_identifier = boot_system_id.ljust(32, b'\x00')
        self.boot_identifier = b'\x00' * 32
        self.boot_system_use = b'\x00' * 197  # This will be set later

        self._initialized = True
873992
def setbridgeprio(self, prio):
        
        _runshell([brctlexe, 'setbridgeprio', self.name, str(prio)],
            "Could not set bridge priority in %s." % self.name)
1178662
def set_defaults(self, address):
        
        if address is not None:
            self.set_address(address)
        self.set_low_priority()
        self.set_no_rtr()