Property to provide reference to bios mappings instance

        It is calculated once when the first time it is queried. On refresh,
        this property gets reset.
499930
def bios_mappings(self):
        
        return BIOSMappings(
            self._conn, utils.get_subresource_path_by(
                self, ["Oem", "Hpe", "Links", "Mappings"]),
            redfish_version=self.redfish_version)
212800
def set_bios_settings(options, system_id = 1)
      r = response_handler(rest_patch("/redfish/v1/Systems/#{system_id}/bios/Settings/", body: options))
      @logger.warn(r) if r['error']
      true
    end
714367
def update_bios_data_by_post(self, data):
        
        bios_settings_data = {
            'Attributes': data
        }
        self._conn.post(self.path, data=bios_settings_data)
421998
def refresh(self, simp=None, isauto=0):
        

        if simp==None:
            simp = self.simp
        if self.autorefresh==0 and isauto==1:
            return
        sim = simp.contents
        size_changed = clibrebound.reb_display_copy_data(simp)
        clibrebound.reb_display_prepare_data(simp,c_int(self.orbits))
        if sim.N>0:
            self.particle_data = (c_char * (4*7*sim.N)).from_address(sim.display_data.contents.particle_data).raw
            if self.orbits:
                self.orbit_data = (c_char * (4*9*(sim.N-1))).from_address(sim.display_data.contents.orbit_data).raw
        if size_changed:
            #TODO: Implement better GPU size change
            pass
        if self.useroverlay==True:
            self.overlay = "REBOUND (%s), N=%d, t=%g"%(sim.integrator,sim.N,sim.t)
        elif self.useroverlay==None or self.useroverlay==False:
            self.overlay = ""
        else:
            self.overlay = self.useroverlay + ", N=%d, t=%g"%(sim.N,sim.t)
        self.N = sim.N
        self.t = sim.t
        self.count += 1
381514
function (ev) {
                // If the compute is no longer bound (because the same change event led to an unbind)
                // then do not call getValueAndBind, or we will leak bindings.
                if (computeState && !computeState.bound) {
                    return;
                }
                if (ev.batchNum === undefined || ev.batchNum !== batchNum) {
                    // store the old value
                    var oldValue = data.value,
                        // get the new value
                        newvalue = getValueAndBind();
                    // update the value reference (in case someone reads)
                    data.value = newvalue;
                    // if a change happened
                    if (newvalue !== oldValue) {
                        callback(newvalue, oldValue);
                    }
                    batchNum = batchNum = ev.batchNum;
                }


            }
1244521
public static void reset()
        throws StartupException
    {
        try {
            final InitialContext initCtx = new InitialContext();
            final javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env");
            Context.DBTYPE = (AbstractDatabase<?>) envCtx.lookup(INamingBinds.RESOURCE_DBTYPE);
            Context.DATASOURCE = (DataSource) envCtx.lookup(INamingBinds.RESOURCE_DATASOURCE);
            Context.TRANSMANAG = (TransactionManager) envCtx.lookup(INamingBinds.RESOURCE_TRANSMANAG);
            try {
                Context.TRANSMANAGTIMEOUT = 0;
                final Map<?, ?> props = (Map<?, ?>) envCtx.lookup(INamingBinds.RESOURCE_CONFIGPROPERTIES);
                if (props != null) {
                    final String transactionTimeoutString = (String) props.get(IeFapsProperties.TRANSACTIONTIMEOUT);
                    if (transactionTimeoutString != null) {
                        Context.TRANSMANAGTIMEOUT = Integer.parseInt(transactionTimeoutString);
                    }
                }
            } catch (final NamingException e) {
                // this is actual no error, so nothing is presented
                Context.TRANSMANAGTIMEOUT = 0;
            }
        } catch (final NamingException e) {
            throw new StartupException("eFaps context could not be initialized", e);
        }
    }
1075987
def hardware_instance_template
      template = {
        "processorCoreAmount" => @cores.to_i,
        "memoryCapacity" => @memory.to_i,
        "hostname" => @hostname,
        "domain" => @domain,
        "operatingSystemReferenceCode" => @os_reference_code,

        # Note : for the values below, we want to use the constants "true" and "false" not nil
        # the nil value (while false to Ruby) will not translate to XML properly
        "localDiskFlag" => !!@use_local_disk,
        "hourlyBillingFlag" => !!@hourly
      }

      template['privateNetworkOnlyFlag'] = true if @private_network_only

      template['datacenter']                     = {"name" => @datacenter.name}     if @datacenter
      template['userData']                       = [{'value' => @user_metadata}]    if @user_metadata
      template['networkComponents']              = [{'maxSpeed'=> @max_port_speed}] if @max_port_speed
      template['postInstallScriptUri']           = @provision_script_URI.to_s       if @provision_script_URI
      template['postInstallScriptUri']           = @provision_script_uri.to_s       if @provision_script_uri
      template['primaryNetworkComponent']        = { "networkVlan" => { "id" => @public_vlan_id.to_i } } if @public_vlan_id
      template['primaryBackendNetworkComponent'] = { "networkVlan" => {"id" => @private_vlan_id.to_i } } if @private_vlan_id
      template['sshKeys']                        = @ssh_key_ids.collect { |ssh_key| {'id'=> ssh_key.to_i } } if @ssh_key_ids

      if @disks && !@disks.empty?
        template['hardDrives'] = @disks.collect do |disk|
          {"capacity" => disk.to_i}
        end
      end

      template
    end
935183
public function refreshInstance()
  {
    $this->counter    = 0;
    $this->startedAt  = microtime(true);
    $this->expiresAt  = $this->computeExpiration();
    $this->setUpComponents($this->components);
  }
1171530
private void initializeDefaults() {
        String keyStoreType = getProperty(Constants.SSLPROP_KEY_STORE_TYPE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "keyStoreType: " + keyStoreType);

        if (keyStoreType == null && getProperty(Constants.SYSTEM_SSLPROP_KEY_STORE_TYPE) == null) {
            setProperty(Constants.SSLPROP_KEY_STORE_FILE_BASED, Constants.TRUE);
            setProperty(Constants.SSLPROP_KEY_STORE_TYPE, Constants.KEYSTORE_TYPE_PKCS12);
            keyStoreType = Constants.KEYSTORE_TYPE_PKCS12;
        } else {
            if (keyStoreType != null &&
                !keyStoreType.equals(Constants.KEYSTORE_TYPE_JKS) &&
                !keyStoreType.equals(Constants.KEYSTORE_TYPE_JCEKS) &&
                !keyStoreType.equals(Constants.KEYSTORE_TYPE_PKCS12)) {
                setProperty(Constants.SSLPROP_KEY_STORE_FILE_BASED, Constants.FALSE);
            } else {
                setProperty(Constants.SSLPROP_KEY_STORE_FILE_BASED, Constants.TRUE);
            }
        }

        String trustStoreType = getProperty(Constants.SSLPROP_TRUST_STORE_TYPE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "trustStoreType: " + trustStoreType);

        if (trustStoreType == null && getProperty(Constants.SYSTEM_SSLPROP_TRUST_STORE_TYPE) == null) {
            setProperty(Constants.SSLPROP_TRUST_STORE_FILE_BASED, Constants.TRUE);
            setProperty(Constants.SSLPROP_TRUST_STORE_TYPE, Constants.KEYSTORE_TYPE_PKCS12);
            trustStoreType = Constants.KEYSTORE_TYPE_PKCS12;
        } else {
            if (trustStoreType != null &&
                !trustStoreType.equals(Constants.KEYSTORE_TYPE_JKS) &&
                !trustStoreType.equals(Constants.KEYSTORE_TYPE_JCEKS) &&
                !trustStoreType.equals(Constants.KEYSTORE_TYPE_PKCS12)) {
                setProperty(Constants.SSLPROP_TRUST_STORE_FILE_BASED, Constants.FALSE);
            } else {
                setProperty(Constants.SSLPROP_TRUST_STORE_FILE_BASED, Constants.TRUE);
            }
        }

        JSSEProvider defaultProvider = JSSEProviderFactory.getInstance();

        if (getProperty(Constants.SSLPROP_KEY_MANAGER) == null)
            setProperty(Constants.SSLPROP_KEY_MANAGER, JSSEProviderFactory.getKeyManagerFactoryAlgorithm());

        if (getProperty(Constants.SSLPROP_KEY_STORE_PROVIDER) == null
            && null != defaultProvider.getKeyStoreProvider())
            setProperty(Constants.SSLPROP_KEY_STORE_PROVIDER, defaultProvider.getKeyStoreProvider());

        if (getProperty(Constants.SSLPROP_PROTOCOL) == null)
            setProperty(Constants.SSLPROP_PROTOCOL, defaultProvider.getDefaultProtocol());

        if (getProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION) == null)
            setProperty(Constants.SSLPROP_CLIENT_AUTHENTICATION, Constants.FALSE);

        if (getProperty(Constants.SSLPROP_CONTEXT_PROVIDER) == null)
            setProperty(Constants.SSLPROP_CONTEXT_PROVIDER, defaultProvider.getContextProvider());

        if (getProperty(Constants.SSLPROP_SECURITY_LEVEL) == null)
            setProperty(Constants.SSLPROP_SECURITY_LEVEL, Constants.SECURITY_LEVEL_HIGH);

        if (getProperty(Constants.SSLPROP_TRUST_MANAGER) == null)
            setProperty(Constants.SSLPROP_TRUST_MANAGER, JSSEProviderFactory.getTrustManagerFactoryAlgorithm());

        if (getProperty(Constants.SSLPROP_TRUST_STORE_PROVIDER) == null
            && null != defaultProvider.getKeyStoreProvider())
            setProperty(Constants.SSLPROP_TRUST_STORE_PROVIDER, defaultProvider.getKeyStoreProvider());

        if (getProperty(Constants.SSLPROP_VALIDATION_ENABLED) == null)
            setProperty(Constants.SSLPROP_VALIDATION_ENABLED, Constants.FALSE);

        if (getProperty(Constants.SSLPROP_TOKEN_ENABLED) == null)
            setProperty(Constants.SSLPROP_TOKEN_ENABLED, Constants.FALSE);

        String keyStore = getProperty(Constants.SSLPROP_KEY_STORE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "keyStore: " + keyStore);
        }
        String keyStoreName = getProperty(Constants.SSLPROP_KEY_STORE_NAME);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "keyStoreName: " + keyStoreName);
        }
        String keyStorePassword = getProperty(Constants.SSLPROP_KEY_STORE_PASSWORD);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "keyStorePassword: " + SSLConfigManager.mask(keyStorePassword));

        String trustStore = getProperty(Constants.SSLPROP_TRUST_STORE);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "trustStore: " + trustStore);
        }
        String trustStoreName = getProperty(Constants.SSLPROP_TRUST_STORE_NAME);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "trustStoreName: " + trustStoreName);
        }
        String trustStorePassword = getProperty(Constants.SSLPROP_TRUST_STORE_PASSWORD);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "trustStorePassword: " + SSLConfigManager.mask(trustStorePassword));

        // When only a trust store is specified, use it as the key store as well.
        if (keyStore == null && trustStore != null && trustStorePassword != null && trustStoreType != null) {
            setProperty(Constants.SSLPROP_KEY_STORE, trustStore);
            setProperty(Constants.SSLPROP_KEY_STORE_NAME, trustStoreName);
            setProperty(Constants.SSLPROP_KEY_STORE_PASSWORD, trustStorePassword);
            setProperty(Constants.SSLPROP_KEY_STORE_TYPE, trustStoreType);
        }
        // When only a key store is specified, use it as the trust store as well.
        else if (trustStore == null && keyStore != null && keyStorePassword != null && keyStoreType != null) {
            setProperty(Constants.SSLPROP_TRUST_STORE, keyStore);
            setProperty(Constants.SSLPROP_TRUST_STORE_NAME, keyStoreName);
            setProperty(Constants.SSLPROP_TRUST_STORE_PASSWORD, keyStorePassword);
            setProperty(Constants.SSLPROP_TRUST_STORE_TYPE, keyStoreType);
        }
    }
1211088
def consumer_initialize_task(processor, consumer_client, shard_id, cursor_position, cursor_start_time, cursor_end_time=None):
    
    try:
        processor.initialize(shard_id)
        is_cursor_persistent = False
        check_point = consumer_client.get_check_point(shard_id)
        if check_point['checkpoint'] and len(check_point['checkpoint']) > 0:
            is_cursor_persistent = True
            cursor = check_point['checkpoint']
        else:
            if cursor_position == CursorPosition.BEGIN_CURSOR:
                cursor = consumer_client.get_begin_cursor(shard_id)
            elif cursor_position == CursorPosition.END_CURSOR:
                cursor = consumer_client.get_end_cursor(shard_id)
            else:
                cursor = consumer_client.get_cursor(shard_id, cursor_start_time)

        end_cursor = None
        if cursor_end_time is not None:
            end_cursor = consumer_client.get_cursor(shard_id, cursor_end_time)

        return InitTaskResult(cursor, is_cursor_persistent, end_cursor)
    except Exception as e:
        return TaskResult(e)
673512
public void reset() {
		this.location = 0;
		this.first_created = 0;
		this.expiration = -1;
		this.validatorExpiration = -1;  // LI4537-24
		this.tableid = 0;
		this.key = null;
		this.value = null;
		this.next = 0;
		this.previous = 0;
		this.valuelen = -1;
		this.hash = 0;
		this.index = 0;
        this.size = -1;
        this.serializedKey        = null;
        this.serializedCacheValue = null;
        this.cacheValueSize = 0;
        this.cacheValueHashcode = 0;  // LI4337-17
        this.bAliasId = false;
        this.bValidHashcode = true;  // LI4337-17
	}
86996
def update_bios_data_by_patch(self, data):
        
        bios_settings_data = {
            'Attributes': data
        }
        self._conn.patch(self.path, data=bios_settings_data)
111366
@Override
    protected Object refresh(final NoSqlSession session, Object version)
    {
        log.debug("refresh " + session);
        ISerializableSession data = null;
        try
        {
            data = getKey(session.getClusterId());
        }
        catch (TranscoderException error)
        {
            throw (new IllegalStateException("unable to deserialize session: id=" + session.getClusterId(), error));
        }
        // check if our in memory version is the same as what is on KVS
        if (version != null)
        {
            long saved = 0;
            if (data != null)
            {
                saved = data.getVersion();

                if (saved == (Long) version)
                {
                    log.debug("refresh not needed");
                    return version;
                }
                version = Long.valueOf(saved);
            }
        }

        // If it doesn't exist, invalidate
        if (data == null)
        {
            log.debug("refresh:marking invalid, no object");
            session.invalidate();
            return null;
        }

        // If it has been flagged invalid, invalidate
        boolean valid = data.isValid();
        if (!valid)
        {
            log.debug("refresh:marking invalid, valid flag " + valid);
            session.invalidate();
            return null;
        }

        // We need to update the attributes. We will model this as a passivate,
        // followed by bindings and then activation.
        session.willPassivate();
        try
        {
            for (Enumeration<String> e = data.getAttributeNames(); e.hasMoreElements();)
            {
                String name = e.nextElement();
                Object value = data.getAttribute(name);
                // only bind value if it didn't exist in session
                if (!session.getNames().contains(name))
                {
                    session.doPutOrRemove(name, value);
                    session.bindValue(name, value);
                }
                else
                {
                    session.doPutOrRemove(name, value);
                }
            }

            // cleanup, remove values from session, that don't exist in data anymore:
            for (String name : session.getNames())
            {
                if (!data.getAttributeMap().containsKey(name))
                {
                    session.doPutOrRemove(name, null);
                    session.unbindValue(name, session.getAttribute(name));
                }
            }

            session.didActivate();
            return version;
        }
        catch (Exception e)
        {
            log.warn(e);
        }

        return null;
    }
35751
def _get_bios_settings_resource(self, data):
        """"""
        try:
            bios_settings_uri = data['links']['Settings']['href']
        except KeyError:
            msg = ('BIOS Settings resource not found.')
            raise exception.IloError(msg)

        status, headers, bios_settings = self._rest_get(bios_settings_uri)
        if status != 200:
            msg = self._get_extended_error(bios_settings)
            raise exception.IloError(msg)

        return headers, bios_settings_uri, bios_settings
434253
private boolean isRefreshIndexes()
    {

        if (clientProperties != null)
        {

            Object refreshIndexes = clientProperties.get(ESConstants.ES_REFRESH_INDEXES);

            if (refreshIndexes != null && refreshIndexes instanceof Boolean)
            {
                return (boolean) refreshIndexes;
            }
            else
            {
                return Boolean.parseBoolean((String) refreshIndexes);
            }

        }
        else
        {
            return this.setRereshIndexes;
        }
    }
1136583
protected void bindSubClass(HibernatePersistentEntity sub, PersistentClass parent,
                                InFlightMetadataCollector mappings, String sessionFactoryBeanName) {
        evaluateMapping(sub, defaultMapping);
        Mapping m = getMapping(parent.getMappedClass());
        Subclass subClass;
        boolean tablePerSubclass = m != null && !m.getTablePerHierarchy() && !m.isTablePerConcreteClass();
        boolean tablePerConcreteClass = m != null && m.isTablePerConcreteClass();
        final String fullName = sub.getName();
        if (tablePerSubclass) {
            subClass = new JoinedSubclass( parent, this.metadataBuildingContext);
        }
        else if(tablePerConcreteClass) {
            subClass = new UnionSubclass(parent, this.metadataBuildingContext);
        }
        else {
            subClass = new SingleTableSubclass(parent, this.metadataBuildingContext);
            // set the descriminator value as the name of the class. This is the
            // value used by Hibernate to decide what the type of the class is
            // to perform polymorphic queries
            Mapping subMapping = getMapping(sub);
            DiscriminatorConfig discriminatorConfig = subMapping != null ? subMapping.getDiscriminator() : null;

            subClass.setDiscriminatorValue(discriminatorConfig != null && discriminatorConfig.getValue() != null ? discriminatorConfig.getValue() : fullName);

            if (subMapping != null) {
                configureDerivedProperties(sub, subMapping);
            }
        }
        Integer bs = m.getBatchSize();
        if (bs != null) {
            subClass.setBatchSize(bs);
        }

        if (m.getDynamicUpdate()) {
            subClass.setDynamicUpdate(true);
        }
        if (m.getDynamicInsert()) {
            subClass.setDynamicInsert(true);
        }
        
        subClass.setAbstract(sub.isAbstract());
        subClass.setEntityName(fullName);
        subClass.setJpaEntityName(unqualify(fullName));

        parent.addSubclass(subClass);
        mappings.addEntityBinding(subClass);

        if (tablePerSubclass) {
            bindJoinedSubClass(sub, (JoinedSubclass) subClass, mappings, m, sessionFactoryBeanName);
        }
        else if( tablePerConcreteClass) {
            bindUnionSubclass(sub, (UnionSubclass) subClass, mappings, sessionFactoryBeanName);
        }
        else {
            bindSubClass(sub, subClass, mappings, sessionFactoryBeanName);
        }

        addMultiTenantFilterIfNecessary(sub, subClass, mappings, sessionFactoryBeanName);

        final java.util.Collection<PersistentEntity> childEntities = sub.getMappingContext().getDirectChildEntities(sub);
        if (!childEntities.isEmpty()) {
            // bind the sub classes
            bindSubClasses(sub, subClass, mappings, sessionFactoryBeanName);
        }
    }
793568
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'] and
                'UefiClass' in system['Oem']['Hp']['Bios']):
            bios_uefi_class_val = (system['Oem']['Hp']
                                         ['Bios']['UefiClass'])
        return mappings.GET_SUPPORTED_BOOT_MODE_RIS_MAP.get(
            bios_uefi_class_val)