Load a container from persisted containers, whatever that is
323729
def _load_weird_container(container_name):
    
    # First must populate "get persisted container" list
    old_container_loading.load_all_containers_from_disk()
    # Load container from old json file
    container = old_container_loading.get_persisted_container(
        container_name)
    # Rotate coordinates to fit the new deck map
    rotated_container = database_migration.rotate_container_for_alpha(
        container)
    # Save to the new database
    database.save_new_container(rotated_container, container_name)
    return container
142724
def _get_container(self, path):
        """"""
        bucket = self.native_conn.get_bucket(path)
        return self.cont_cls.from_bucket(self, bucket)
246215
def _load(self, **kwargs):
        '''
        '''
        # Some kwargs should be popped before we do a load
        for key in self._meta_data['disallowed_load_parameters']:
            if key in kwargs:
                kwargs.pop(key)

        self._check_load_parameters(**kwargs)
        name = kwargs.pop('name', '')
        partition = kwargs.pop('partition', '')
        read_session = self._meta_data['icr_session']
        base_uri = self._meta_data['container']._meta_data['uri']

        load_uri = self._build_service_uri(base_uri, partition, name)
        response = read_session.get(load_uri, uri_as_parts=False, **kwargs)
        return self._produce_instance(response)
1189
async def _load_container(
            self, reader, container_type, params=None, container=None
    ):
        

        c_len = (
            container_type.SIZE
            if container_type.FIX_SIZE
            else await load_uvarint(reader)
        )
        if container and get_elem(container) and c_len != len(container):
            raise ValueError("Size mismatch")

        elem_type = container_elem_type(container_type, params)
        res = container if container else []
        for i in range(c_len):
            try:
                self.tracker.push_index(i)
                fvalue = await self.load_field(
                    reader,
                    elem_type,
                    params[1:] if params else None,
                    eref(res, i) if container else None,
                )
                self.tracker.pop()
            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e

            if not container:
                res.append(fvalue)
        return res
703032
def container_instance_from_string(id):
    """"""
    try:
        service, instance = id.rsplit('_', 1)
        instance = int(instance)
    except (TypeError, ValueError):
        raise context.ValueError("Invalid container id %r" % id)
    return _proto.ContainerInstance(service_name=service, instance=instance)
609433
def load_containers(self, service, configs, use_cache):
        
        if not isinstance(service, Service):
            raise TypeError("service must be and instance of service.  {0} was passed.".format(service))

        if not self.healthy():
            logger.error("unable to connect to container ship.")
            raise Exception('lost comms with our container ship')

        self._load_service_containers(service, configs, use_cache)
75981
async def container_dump(self, container, container_type, params=None, obj=None):
        
        elem_type = x.container_elem_type(container_type, params)
        obj = [] if not x.has_elem(obj) else x.get_elem(obj)

        # todo: pod container, just concat blobs / serialized content together. loading = size / elem size...
        if container is None:  # todo: reconsider
            return NoSetSentinel()  # if not self.modelize else ArrayModel(obj, xmr_type_to_type(elem_type))

        for idx, elem in enumerate(container):
            try:
                self.tracker.push_index(idx)
                fvalue = await self._dump_field(elem, elem_type, params[1:] if params else None)
                self.tracker.pop()

            except Exception as e:
                raise helpers.ArchiveException(e, tracker=self.tracker) from e

            if not isinstance(fvalue, NoSetSentinel):
                obj.append(fvalue)

        return obj if not self.modelize else ArrayModel(obj, xmr_type_to_type(elem_type))
62911
def persist(self, storageLevel):
        
        self.is_cached = True
        javaStorageLevel = self._sc._getJavaStorageLevel(storageLevel)
        self._jdstream.persist(javaStorageLevel)
        return self
386032
function load() {
		Object.keys(envs).forEach(function(envName) {
			environments[envName] = envs[envName];
		});
	}
1025808
def _get_containers(self):
        """"""
        buckets = self.native_conn.get_all_buckets()
        return [self.cont_cls.from_bucket(self, b) for b in buckets]
1011582
def load_aggregate(args):
    """"""
    repos = load_config(args.config, args.expand_env)
    dirmatch = args.dirmatch
    for repo_dict in repos:
        r = Repo(**repo_dict)
        logger.debug('%s' % r)
        if not match_dir(r.cwd, dirmatch):
            logger.info("Skip %s", r.cwd)
            continue
        r.aggregate()
        if args.do_push:
            r.push()
1113274
function(cid) {

    // Find and bind container.
    return findContainerThrows(cid)
    .bind({})
    .then(function(container) {
      this.container = container;
    })
    // Check if container is running.
    .then(function() {
      return isRunning(cid);
    })
    // Stop container if it is running.
    .then(function(isRunning) {
      var self = this;
      if (isRunning) {
        return Promise.fromNode(function(cb) {
          self.container.stop(cb);
        });
      }
    })
    // Wrap errors.
    .catch(function(err) {
      throw new VError(err, 'Error stopping container %s.', cid);
    });

  }
681345
def _get_container(self, path):
        """"""
        cont = self.native_conn.get_container(path)
        return self.cont_cls(self,
                             cont.name,
                             cont.object_count,
                             cont.size_used)
772990
def start_container(self, cls, **kwargs):
        """"""
        # Convert stylename strings to actual style elements.
        kwargs = self._replace_stylename(kwargs)
        # Create the container.
        container = cls(**kwargs)
        self._containers.append(container)
938111
def _get_container(self, path):
        """"""
        path = path.strip(SEP)
        if SEP in path:
            raise errors.InvalidNameException(
                "Path contains %s - %s" % (SEP, path))
        return self.cont_cls.from_path(self, path)
14780
def load(self):
        
        if self.exists():
            with open(self.dot_file, 'r') as handle:
                self.update(json.load(handle))
        if self.options['context'] is not None:
            self['context'] = self.options['context']
        else:
            self.options['context'] = self['context']
        if self.options['defaults'] is not None:
            self['defaults'] = self.options['defaults']
        else:
            self.options['defaults'] = self['defaults']
        if self.options['output'] is not None:
            self['output'] = self.options['output']

        if self.options.get('inclusive', False):
            self['inclusive'] = True

        if self.options.get('exclude', []):
            self['exclude'].extend(self.options['exclude'])

        if self['output'] is None:
            self['output'] = os.path.join(os.getcwd(), 'dockerstache-output')
        self['output_path'] = self.abs_output_dir()
        self['input_path'] = self.abs_input_dir()
        if self['context'] is not None:
            self['context_path'] = absolute_path(self['context'])
        if self['defaults'] is not None:
            self['defaults_path'] = absolute_path(self['defaults'])
407544
def load(self):
        """"""
        if self.is_file_persisted:
            self.object_file.open()
            temp = dill.loads(self.object_file.read())
            self.set_object(temp)
            self.object_file.close()