Create a new baremetal flavor.

        :param name: the name of the flavor
172598
def create_flavor(self, name):
        
        self.add_environment_file(user='stack', filename='stackrc')
        self.run('openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 1 baremetal', user='stack', success_status=(0, 1))
        self.run('openstack flavor set --property "cpu_arch"="x86_64" --property "capabilities:boot_option"="local" baremetal', user='stack')
        self.run('openstack flavor set --property "capabilities:profile"="baremetal" baremetal', user='stack')
241243
def create_default_element(self, name):
        

        found = self.root.find(name)
        if found is not None:
            return found
        ele = ET.Element(name)
        self.root.append(ele)
        return ele
763360
def add_name_variant(self, name):
        
        self._ensure_field('name', {})
        self.obj['name'].setdefault('name_variants', []).append(name)
724303
def set_name(self, name, kind_attr=None):
        
        self.name = name
        self.kind_attr = kind_attr or "{name}_kind".format(name=name)
        if self.cname is None:
            self.cname = name

        return self
1146841
def new(self, name):
        
        #XXX:dc: assert that the name is somewhat sane and follows python
        # naming conventions
        next_id = 0
        cls_name = '_'.join((name, next_id))
        with open(pjoin(self.migration_home, name), "w+") as new_migration:
            print >> new_migration, migration_tmpl.format(
                cls_name=cls_name, migration_name=name)
1325073
def flavor_access_add(flavor_id, project_id, profile=None, **kwargs):
    '''
    
    '''
    conn = _auth(profile, **kwargs)
    return conn.flavor_access_add(flavor_id, project_id)
625540
def create_main_target (self, name):
        
        assert isinstance(name, basestring)
        if not self.built_main_targets_:
            self.build_main_targets ()

        return self.main_targets_.get (name, None)
295855
def newProp(self, name, value):
        
        ret = libxml2mod.xmlNewProp(self._o, name, value)
        if ret is None:raise treeError('xmlNewProp() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
1159607
def create(self, name, numShards, params=None):
        
        if params is None:
            params = {}
        params.update(
            name=name,
            numShards=numShards
        )
        return self.api('CREATE', params)
203138
def _make_name(current, new):
    '''
    
    '''

    current_tokens = current.split()
    new_tokens = new.split()

    new = ' '.join(
        new_token for new_token in new_tokens
        if new_token not in current_tokens
    )

    return '/'.join((current, new))
1098819
def newCharRef(self, name):
        
        ret = libxml2mod.xmlNewCharRef(self._o, name)
        if ret is None:raise treeError('xmlNewCharRef() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
19691
def create(self, name):
        
        name = to_text(name)
        return self._post(
            'tags/create',
            data={'tag': {'name': name}},
            result_processor=lambda x: x['tag']
        )
1013872
def _init_name_core(self, name: str):
        """"""
        self.__regex = re.compile(rf'^{self._pattern}$')
        self.name = name
163621
def name(self, name):
        
        weight, width, custom_name = self._splitName(name)
        self.set_all_name_components(name, weight, width, custom_name)
219489
def generate(self, name: str, **kwargs: Dict[str, str]) -> str:
        
        template = self.patterns[name]
        return template.substitute(kwargs)
488870
def create(cls, name, trust_all_cas=True):
        
        json = {'name': name,
                'trust_all_cas': trust_all_cas}

        return ElementCreator(cls, json)
442667
def add_parameter(self, param_name, description=None, default=0, unit=None):
        

        if description is None:
            description = "Parameter called {}".format(param_name)

        if unit is None:
            unit = "-"
        
        name_check = lambda x: x['name'] == param_name
        name_check_list = list(filter(name_check, self.ext_params))
        if len(name_check_list) == 0:
            self.ext_params.append({'name': param_name, 'description': description, 'default': default, 'unit': unit})
        else:
            print('{} already exists - choose a different name'.format(param_name))