Returns the feature order constraints dict defined in featuremodel/productline/feature_order.json
    :param container_dir: the container dir.
    :return: dict
766122
def get_feature_order_constraints(container_dir):
    
    import json

    file_path = os.path.join(container_dir, '_lib/featuremodel/productline/feature_order.json')
    with open(file_path, 'r') as f:
        ordering_constraints = json.loads(f.read())

    return ordering_constraints
765405
def dependency (self):
        
        result = [p for p in self.lazy_properties if p.feature.dependency]
        result.extend(self.dependency_)
        return self.dependency_
742279
def GetLoadingOrder(self):
    """"""
    result = {}
    for filename, mapping in self._file_mapping.iteritems():
      loading_order = mapping['loading_order']
      if loading_order is not None:
        result[loading_order] = filename
    return list(result[key] for key in sorted(result))
677835
def constraints(self):
        
        try:
            return self._constraints
        except AttributeError:
            self._constraints = ConstraintDict()
            return self._constraints
254972
def constrain_cfgdict_list(cfgdict_list_, constraint_func):
    
    cfgdict_list = []
    for cfg_ in cfgdict_list_:
        cfg = cfg_.copy()
        if constraint_func(cfg) is not False and len(cfg) > 0:
            if cfg not in cfgdict_list:
                cfgdict_list.append(cfg)
    return cfgdict_list
1237185
def get_order_container(self, quote_id):
        

        quote = self.client['Billing_Order_Quote']
        container = quote.getRecalculatedOrderContainer(id=quote_id)
        return container
1259481
def getContainers(self):
        
        _containers = []
        for container in self.bika_setup.bika_containers.objectValues():
            containertype = container.getContainerType()
            if containertype and containertype.UID() == self.UID():
                _containers.append(container)
        return _containers
1029936
def in_constraints(self):
        
        expressions = []
        for uniqueid in self._in_constraints:
            expressions.append(self._bundle.get_parameter(context='constraint', uniqueid=uniqueid))
        return expressions
700425
def getConstraints(self):
        
        constraints = lock_and_call(
            lambda: self._impl.getConstraints(),
            self._lock
        )
        return EntityMap(constraints, Constraint)
787759
def get_parameter_dict(self, include_frozen=False):
        
        return OrderedDict(zip(
            self.get_parameter_names(include_frozen=include_frozen),
            self.get_parameter_vector(include_frozen=include_frozen),
        ))
1312833
def _make_dir(self, client_kwargs):
        
        with _handle_client_exception():
            # Object
            if 'obj' in client_kwargs:
                return self.client.put_object(
                    client_kwargs['container'], client_kwargs['obj'], b'')

            # Container
            return self.client.put_container(client_kwargs['container'])
1053327
def constraint_range_dict(self,*args,**kwargs):
        
        bins = self.bins(*args,**kwargs)
        return [{self.name+'__gte': a,self.name+'__lt': b} for a,b in zip(bins[:-1],bins[1:])]
        space = self.space(*args,**kwargs)
        resolution = space[1] - space[0]
        return [{self.name+'__gte': s,self.name+'__lt': s+resolution} for s in space]
1080229
def get_container_list(self) -> list:
        
        # Initialising empty list
        containers = []

        containers_list = self._client.containers.list()
        for c_list in containers_list:
            containers.append(c_list.short_id)
        return containers
209319
def get_init_container(self,
                           init_command,
                           init_args,
                           env_vars,
                           context_mounts,
                           persistence_outputs,
                           persistence_data):
        """"""
        env_vars = to_list(env_vars, check_none=True)
        env_vars += [
            get_env_var(name=constants.CONFIG_MAP_JOB_INFO_KEY_NAME,
                        value=json.dumps(self.labels)),
        ]
        return client.V1Container(
            name=self.init_container_name,
            image=self.init_docker_image,
            image_pull_policy=self.init_docker_image_pull_policy,
            command=init_command,
            env=env_vars,
            args=init_args,
            volume_mounts=context_mounts)
45417
def container_2_json(self):
        
        LOGGER.debug("Container.container_2_json")
        json_obj = {
            'containerID': self.id,
            'containerName': self.name,
            'containerGateURI': self.gate_uri,
            'containerPrimaryAdminGateID': self.primary_admin_gate_id,
            'containerParentContainerID': self.parent_container_id,
            'containerClusterID': self.child_containers_id,
            'containerChildContainersID': self.child_containers_id,
            'containerGatesID': self.gates_id,
            'containerNodesID': self.nodes_id,
            'containerCompany': self.company,
            'containerProduct': self.product,
            'containerType': self.type,
            'containerProperties': self.properties
        }
        return json_obj
177463
def list_containers(self):
        
        data = run_cmd(["machinectl", "list", "--no-legend", "--no-pager"],
                       return_output=True)
        output = []
        reg = re.compile(r"\s+")
        for line in data.split("\n"):
            stripped = line.strip()
            if stripped:
                parts = reg.split(stripped)
                name = parts[0]
                output.append(self.ContainerClass(None, None, name=name))
        return output
979605
def get_custom_container_files():
    

    def is_special_file(name):
        return name.startswith('.')

    res = []

    top = infer_config_base_dir()/'containers'
    for root, dirnames, files in os.walk(top):
        for name in filter(is_special_file, dirnames):
            dirnames.remove(name)

        res.extend(
            [
                os.path.join(root, name) for name in files
                if not is_special_file(name) and name.endswith('.json')
            ])

    return res