Create namespace with random name
        :return: name of new created namespace
970710
def create_namespace(self):
        
        name = 'namespace-{random_string}'.format(random_string=random_str(5))

        namespace = client.V1Namespace(metadata=client.V1ObjectMeta(name=name))

        self.core_api.create_namespace(namespace)

        logger.info("Creating namespace: %s", name)

        # save all namespaces created with this backend
        self.managed_namespaces.append(name)

        # wait for namespace to be ready
        Probe(timeout=30, pause=5, expected_retval=True,
              fnc=self._namespace_ready, namespace=name).run()

        return name
46870
def namespace(self, name=None, function=None, recursive=None):
        

        return (
            self._find_single(
                scopedef.scopedef_t._impl_matchers[namespace_t.namespace],
                name=name,
                function=function,
                recursive=recursive)
        )
901588
def newNsPropEatName(self, node, name, value):
        
        if node is None: node__o = None
        else: node__o = node._o
        ret = libxml2mod.xmlNewNsPropEatName(node__o, self._o, name, value)
        if ret is None:raise treeError('xmlNewNsPropEatName() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
1189019
def new(namespace, name, protected=False,
            attributes=dict(), api_url=fapi.PROD_API_ROOT):
        
        r = fapi.create_workspace(namespace, name, protected, attributes, api_url)
        fapi._check_response_code(r, 201)
        return Workspace(namespace, name, api_url)
1193648
def random_name_gen(size=6):
    """"""

    return ''.join(
        [random.choice(string.ascii_uppercase)] +
        [random.choice(string.ascii_uppercase + string.digits) for i in range(size - 1)]
    ) if size > 0 else ''
418722
def newNsPropEatName(self, ns, name, value):
        
        if ns is None: ns__o = None
        else: ns__o = ns._o
        ret = libxml2mod.xmlNewNsPropEatName(self._o, ns__o, name, value)
        if ret is None:raise treeError('xmlNewNsPropEatName() failed')
        __tmp = xmlAttr(_obj=ret)
        return __tmp
1146847
def _create_namespace(namespace, apiserver_url):
    '''  '''
    # Prepare URL
    url = "{0}/api/v1/namespaces".format(apiserver_url)
    # Prepare data
    data = {
        "kind": "Namespace",
        "apiVersion": "v1",
        "metadata": {
            "name": namespace,
        }
    }
    log.trace("namespace creation requests: %s", data)
    # Make request
    ret = _kpost(url, data)
    log.trace("result is: %s", ret)
    # Check requests status
    return ret
822605
def random_filename(path=None):
    """"""
    filename = uuid4().hex
    if path is not None:
        filename = os.path.join(path, filename)
    return filename
590403
def random_name():
    

    adj = _data.adjectives[random.randint(0, len(_data.adjectives) - 1)]
    noun = _data.nouns[random.randint(0, len(_data.nouns) - 1)]
    return "%s_%s" % (adj, noun)
330513
def add_name(self, name_attr, space_attr, new_schema):
        # type: (Text, Optional[Text], NamedSchema) -> Name
        
        to_add = Name(name_attr, space_attr, self.default_namespace)

        if to_add.fullname in VALID_TYPES:
            fail_msg = '%s is a reserved type name.' % to_add.fullname
            raise SchemaParseException(fail_msg)
        elif to_add.fullname in self.names:
            fail_msg = 'The name "%s" is already in use.' % to_add.fullname
            raise SchemaParseException(fail_msg)

        self.names[to_add.fullname] = new_schema
        return to_add
325934
def create_temp_space():
    
    # Truncating uuid to just take final 12 characters since space name
    # is used to name services and there is a 50 character limit on instance
    # names.  
    # MAINT: hacky with possible collisions
    unique_name = str(uuid.uuid4()).split('-')[-1]
    admin = predix.admin.cf.spaces.Space()
    res = admin.create_space(unique_name)

    space = predix.admin.cf.spaces.Space(
            guid=res['metadata']['guid'],
            name=res['entity']['name'])
    space.target()

    return space
413108
public static String createRandomName(String prefix) {
		Preconditions.checkNotNull(prefix, "Prefix must not be null.");

		long nameOffset;

		// obtain the next name offset by incrementing it atomically
		do {
			nameOffset = nextNameOffset.get();
		} while (!nextNameOffset.compareAndSet(nameOffset, nameOffset + 1L));

		return prefix + '_' + nameOffset;
	}
1052661
def CreateInstance(self, *args, **kwargs):
        

        inst = args[0] if args else kwargs['NewInstance']
        try:
            self.instances[self.default_namespace].append(inst)
        except KeyError:
            self.instances[self.default_namespace] = [inst]
        return inst.path
319863
def name():
        
        result = ""

        if RandomBoolean.chance(3, 5):
            result += random.choice(_name_prefixes) + " "

        result += random.choice(_first_names) + " " + random.choice(_last_names)

        if RandomBoolean.chance(5, 10):
            result += " " + random.choice(_name_suffixes)

        return result
926848
def newNodeEatName(self, name):
        
        ret = libxml2mod.xmlNewNodeEatName(self._o, name)
        if ret is None:raise treeError('xmlNewNodeEatName() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
1217132
def random(self, namespace=0):
        
        query = self.LIST.substitute(
            WIKI=self.uri,
            ENDPOINT=self.endpoint,
            LIST='random')
        query += "&rnlimit=1&rnnamespace=%d" % namespace

        emoji = [
            u'\U0001f32f',  # burrito or wrap
            u'\U0001f355',  # slice of pizza
            u'\U0001f35c',  # steaming bowl of ramen
            u'\U0001f363',  # sushi
            u'\U0001f369',  # doughnut
            u'\U0001f36a',  # cookie
            u'\U0001f36d',  # lollipop
            u'\U0001f370',  # strawberry shortcake
        ]

        action = 'random'
        if namespace:
            action = 'random:%d' % namespace

        self.set_status(action, random.choice(emoji))

        return query
748270
def random_name_filepath(path_full, length_random=5):
    '''
    '''
    path_full_pre_extension, extension = os.path.splitext(path_full)
    random_str = random_str_uuid(length_random)
    return "{}{}{}".format(path_full_pre_extension, random_str, extension)