Integrates storage into grid.

        See :class:`~.grid.network.StorageControl` for more information.
964937
def integrate_storage(self, timeseries, position, **kwargs):
        
        StorageControl(edisgo=self, timeseries=timeseries,
                       position=position, **kwargs)
19012
def put(self):
        
        return self.manager.put(
            id=self.id,
            name=self.name,
            description=self.description,
            whitelisted_container_task_types=(
                self.whitelisted_container_task_types
            ),
            whitelisted_executable_task_types=(
                self.whitelisted_executable_task_types
            ),
        )
813960
def use(self, container):
        
        kw = self._kw.copy()
        kw["container"] = container
        s = Storage(**kw)
        yield s
        del s
1329493
function DataManager(hoist, type, bucket) {
    this.type = type;
    this.hoist = hoist;
    this.url = hoist._configs.data + "/" + type;
    this.bucket = bucket;
  }
1363566
async def AddToUnit(self, storages):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Storage',
                   request='AddToUnit',
                   version=4,
                   params=_params)
        _params['storages'] = storages
        reply = await self.rpc(msg)
        return reply
137097
private void configure(){
		addDecorator(ServiceStats.class, new ServiceStatsDecorator());
		addDecorator(ActionStats.class, new ActionStatsDecorator());
		addDecorator(ServletStats.class, new ServletStatsDecorator());
		addDecorator(FilterStats.class, new FilterStatsDecorator());
		addDecorator(CacheStats.class, new CacheStatsDecorator());
		addDecorator(StorageStats.class, new StorageStatsDecorator());
		addDecorator(MemoryStats.class, new MemoryStatsDecorator());
		addDecorator(MemoryPoolStats.class, new MemoryPoolStatsDecorator());
		addDecorator(VirtualMemoryPoolStats.class, new MemoryPoolStatsDecorator("VirtualMemoryPool"));
		addDecorator(ThreadCountStats.class, new ThreadCountDecorator());
		addDecorator(ThreadStateStats.class, new ThreadStatesDecorator());
		addDecorator(OSStats.class, new OSStatsDecorator());
		addDecorator(RuntimeStats.class, new RuntimeStatsDecorator());
		addDecorator(PageInBrowserStats.class, new PageInBrowserStatsDecorator());
		addDecorator(ErrorStats.class, new ErrorStatsDecorator());
		addDecorator(GCStats.class, new GCStatsDecorator());

		//counters
		addDecorator(CounterStats.class, new CounterStatsDecorator());
		addDecorator(MaleFemaleStats.class, new MaleFemaleStatsDecorator());
		addDecorator(GuestBasicPremiumStats.class, new GuestBasicPremiumStatsDecorator());

		//session
		addDecorator(SessionCountStats.class, new SessionCountDecorator());
	}
252676
def init_storage(self):
        """"""
        if not self.storage.exists('term'):
            self.storage.update({
                'term': 0,
            })

        self.storage.update({
            'voted_for': None
        })
598345
function Provider(storage) {
  Object.defineProperties(this, {

    /**
     * The provider storage.
     *
     * @property storage
     * @type Storage
     * @final
     */
    storage: {value: storage}

  });

  if (!(this.storage instanceof Storage))
    throw new TypeError('storage must be of type Storage');
}
615534
protected function initializeStorages()
    {
        foreach ($this->settings['storages'] as $storageName => $storageDefinition) {
            if (!isset($storageDefinition['storage'])) {
                throw new Exception(sprintf('The configuration for the resource storage "%s" defined in your settings has no valid "storage" option. Please check the configuration syntax and make sure to specify a valid storage class name.', $storageName), 1361467211);
            }
            if (!class_exists($storageDefinition['storage'])) {
                throw new Exception(sprintf('The configuration for the resource storage "%s" defined in your settings has not defined a valid "storage" option. Please check the configuration syntax and make sure that the specified class "%s" really exists.', $storageName, $storageDefinition['storage']), 1361467212);
            }
            $options = (isset($storageDefinition['storageOptions']) ? $storageDefinition['storageOptions'] : []);
            $this->storages[$storageName] = new $storageDefinition['storage']($storageName, $options);
        }
    }
406496
private void startStorageAdapter() throws Exception {
        // create the storage adapter that will write our metrics/inventory data to backend storage on server
        this.storageAdapter = new HawkularStorageAdapter();
        this.storageAdapter.initialize(
                feedId,
                configuration.getStorageAdapter(),
                diagnostics,
                httpClientBuilder);

        // provide our storage adapter to the proxies - allows external apps to use them to store its own data
        inventoryStorageProxy.setStorageAdapter(storageAdapter);

        // log our own diagnostic reports
        this.diagnosticsReporter = JBossLoggingReporter.forRegistry(this.diagnostics.getMetricRegistry())
                .convertRatesTo(TimeUnit.SECONDS)
                .convertDurationsTo(TimeUnit.MILLISECONDS)
                .outputTo(Logger.getLogger(getClass()))
                .withLoggingLevel(LoggingLevel.DEBUG)
                .build();

        if (this.configuration.getDiagnostics().isEnabled()) {
            diagnosticsReporter.start(this.configuration.getDiagnostics().getInterval(),
                    this.configuration.getDiagnostics().getTimeUnits());
        }
    }
639302
def get_storage(self, storage):
        
        res = self.get_request('/storage/' + str(storage))
        return Storage(cloud_manager=self, **res['storage'])
378576
private static void addToContainer(Container container,
                                     PackingPlan.InstancePlan instancePlan,
                                     Map<String, TreeSet<Integer>> componentIndexes,
                                     Set<Integer> taskIds) {
    container.add(instancePlan);
    String componentName = instancePlan.getComponentName();

    // update componentIndex and taskIds
    componentIndexes.computeIfAbsent(componentName, k -> new TreeSet<Integer>());
    componentIndexes.get(componentName).add(instancePlan.getComponentIndex());
    taskIds.add(instancePlan.getTaskId());
  }
385624
def create_storage(self, size=10, tier='maxiops', title='Storage disk', zone='fi-hel1', backup_rule={}):
        
        body = {
            'storage': {
                'size': size,
                'tier': tier,
                'title': title,
                'zone': zone,
                'backup_rule': backup_rule
            }
        }
        res = self.post_request('/storage', body)
        return Storage(cloud_manager=self, **res['storage'])
869963
public static void addComponent(final GridBagLayout gbl, final GridBagConstraints gbc,
		final int gridx, final int gridy, final Component component, final Container panelToAdd)
	{
		gbc.anchor = GridBagConstraints.CENTER;
		gbc.fill = GridBagConstraints.BOTH;
		gbc.insets = new Insets(5, 5, 5, 5);
		gbc.gridx = gridx;
		gbc.gridy = gridy;
		gbl.setConstraints(component, gbc);
		panelToAdd.add(component);
	}
1270074
def add_net(self, net):
        

        self.sanity_check_net(net)
        self.logic.add(net)
5717
def SetStorageProfiler(self, storage_profiler):
    
    self._storage_profiler = storage_profiler
    if self._storage_file:
      self._storage_file.SetStorageProfiler(storage_profiler)
93946
def add_grid(self, *args, **kwargs):
        
        from .grid import Grid
        grid = Grid(*args, **kwargs)
        return self.add_widget(grid)