Creates a new reader user with access to the specified bundle Ids
437857
def createReaderUser(self,accessibleBundles=None):
        """"""

        url = self.__serviceAccount.get_url() + '/' + \
              self.__serviceAccount.get_instance_id()+ '/v2/users/new'

        headers = {'content-type': 'application/json'}
        data = {}
        data['type'] = 'READER'
        if accessibleBundles is not None:
            data['bundles']=accessibleBundles
        json_data = json.dumps(data)
        response = self.__perform_rest_call(requestURL=url, restType='POST', body=json_data, headers=headers)
        return response
1136335
def _create_user(ctx):
    """"""

    username, passhash = _get_credentials(ctx.obj['username'],
                                          ctx.obj['password'],
                                          ctx.obj['db'])

    if ctx.obj['db'].objectmodels['user'].count({'name': username}) > 0:
        raise KeyError()

    new_user = ctx.obj['db'].objectmodels['user']({
        'uuid': str(uuid4()),
        'created': std_now()
    })

    new_user.name = username
    new_user.passhash = passhash

    return new_user
1277499
def create_reader(self, name, *args, **kwargs):
        """"""
        self._check_format(name)
        return self._formats[name]['reader'](*args, **kwargs)
1018878
def NewWalker(self, reader):
        
        if reader is None: reader__o = None
        else: reader__o = reader._o
        ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o)
        return ret
1314067
@Override
    public User createUser(String username, String password)
            throws AuthenticationException {
        String user = file_store.getProperty(username);
        if (user != null) {
            throw new AuthenticationException("User '" + username
                    + "' already exists.");
        }
        // Encrypt the new password
        String ePwd = encryptPassword(password);
        file_store.put(username, ePwd);
        try {
            saveUsers();
        } catch (IOException e) {
            throw new AuthenticationException("Error changing password: ", e);
        }

        return getUser(username);
    }
602305
function getReaddirAttributes(bundle) {
		debugLS('in getReaddirAttributes');
		var defered = q.defer();
		self.iReadMultiple([
			'FILE_IO_NAME_READ_LEN',
			'FILE_IO_ATTRIBUTES',
			'FILE_IO_SIZE',
		])
		.then(function(results) {
			debugLS('in getReaddirAttributes res', results);
			results.forEach(function(result) {
				if(!result.isErr) {
					bundle[result.data.name] = result.data;
				}
			});
			// console.log("HERE!@'");
			// bundle.FILE_IO_NAME_READ_LEN = 0;
			defered.resolve(bundle);
		}, function(err) {
			debugLS('in getReaddirAttributes err', err);
			bundle.isError = true;
			bundle.errorStep = 'getReaddirAttributes';
			bundle.error = modbusMap.getErrorInfo(err);
			bundle.errorCode = err;
			defered.reject(bundle);
		});
		return defered.promise;
	}
180957
def create_user(self, user):
        
        self.run("useradd -m %s" % user)
        usr =  getpwnam(user)
        return usr
651739
def refresh(self):
        
        self._bundles = {}

        bundles = self._api.get_bundles(self._document.id)
        for bundle in bundles:
            self._bundles[bundle['identifier']] = Bundle(self._api, self._document, bundle)
        
        return self
755034
def create_reader_instances(self,
                                filenames=None,
                                reader=None,
                                reader_kwargs=None):
        """"""
        return load_readers(filenames=filenames,
                            reader=reader,
                            reader_kwargs=reader_kwargs,
                            ppp_config_dir=self.ppp_config_dir)
323328
def _bse_cli_create_bundle(args):
    ''''''
    bundle.create_bundle(args.bundle_file, args.fmt, args.reffmt, args.archive_type, args.data_dir)
    return "Created " + args.bundle_file
404440
function userReqFromBundle(mId) {
  const possibleIds = nodejsIds(mId);
  const bundleName = Object.keys(_bundles).find(bn => {
    const {nameSpace, user} = _bundles[bn];
    return possibleIds.some(d => {
      if (nameSpace) {
        const parsed = parse(d);
        if (parsed.bareId.slice(0, nameSpace.length + 1) === nameSpace + '/') {
          d = parsed.prefix + parsed.bareId.slice(nameSpace.length + 1);
        }
      }

      if (user.hasOwnProperty(d)) return true;
      const p = parse(d);
      // For module with unknown plugin prefix, try bareId.
      // This relies on dumber bundler's default behaviour, it write in bundle config
      // both 'foo.html' and 'text!foo.html'.
      if (p.prefix) return user.hasOwnProperty(p.bareId);
    });
  });

  if (bundleName) {
    return loadBundle(bundleName)
    .then(() => {
      if (userSpace.has(mId)) return userSpace.req(mId);
      // mId is not directly defined in the bundle, it could be
      // behind a customised plugin or ext plugin.
      const tried = tryPlugin(mId, userSpace);
      if (tried) return tried;
      throw new Error(`module "${mId}" is missing from bundle "${bundleName}"`);
    });
  }
}
272038
protected void initInputReaders() throws Exception {
		final int numInputs = getNumTaskInputs();
		final MutableReader<?>[] inputReaders = new MutableReader<?>[numInputs];

		int currentReaderOffset = 0;

		for (int i = 0; i < numInputs; i++) {
			//  ---------------- create the input readers ---------------------
			// in case where a logical input unions multiple physical inputs, create a union reader
			final int groupSize = this.config.getGroupSize(i);

			if (groupSize == 1) {
				// non-union case
				inputReaders[i] = new MutableRecordReader<IOReadableWritable>(
						getEnvironment().getInputGate(currentReaderOffset),
						getEnvironment().getTaskManagerInfo().getTmpDirectories());
			} else if (groupSize > 1){
				// union case
				InputGate[] readers = new InputGate[groupSize];
				for (int j = 0; j < groupSize; ++j) {
					readers[j] = getEnvironment().getInputGate(currentReaderOffset + j);
				}
				inputReaders[i] = new MutableRecordReader<IOReadableWritable>(
						new UnionInputGate(readers),
						getEnvironment().getTaskManagerInfo().getTmpDirectories());
			} else {
				throw new Exception("Illegal input group size in task configuration: " + groupSize);
			}

			currentReaderOffset += groupSize;
		}
		this.inputReaders = inputReaders;

		// final sanity check
		if (currentReaderOffset != this.config.getNumInputs()) {
			throw new Exception("Illegal configuration: Number of input gates and group sizes are not consistent.");
		}
	}
655538
public Reader createScript(Charset charset, ResourceBundle bundle) {

		Properties props = new Properties();
		updateProperties(bundle, props, charset);
		return doCreateScript(props);
	}
559141
private Instance insertNewBundle()
    {
        Instance ret = null;
        try {
            final Insert insert = new Insert(DBPropertiesUpdate.TYPE_PROPERTIES_BUNDLE);
            insert.add("Name", this.bundlename);
            insert.add("UUID", this.bundeluuid);
            insert.add("Sequence", this.bundlesequence);
            insert.add("CacheOnStart", this.cacheOnStart);
            insert.executeWithoutAccessCheck();
            ret = insert.getInstance();
            insert.close();
        } catch (final EFapsException e) {
            DBPropertiesUpdate.LOG.error("insertNewBundle()", e);
        }
        return ret;
    }
666140
@Override
	public Reader getResourceBundleReader(String bundleName) throws ResourceNotFoundException {

		ReadableByteChannel inchannel = getResourceBundleChannel(bundleName, false);
		return Channels.newReader(inchannel, charset.newDecoder(), -1);
	}
109852
def user_url(user, bundle):
    
    if not user:
        return False

    bundle = bundle.admin_site.get_bundle_for_model(User)
    edit = None

    if bundle:
        edit = bundle.get_view_url('main', user)
    return edit
992556
def new_bundle(self, assignment_class=None, **kwargs):
        

        if not ('id' in kwargs and bool(kwargs['id'])) or assignment_class is not None:
            kwargs['id'] = self.number(assignment_class)

        ds = self._db.new_dataset(**kwargs)
        self._db.commit()

        b = self.bundle(ds.vid)
        b.state = Bundle.STATES.NEW

        b.set_last_access(Bundle.STATES.NEW)

        b.set_file_system(source_url=self._fs.source(b.identity.source_path),
                          build_url=self._fs.build(b.identity.source_path))

        bs_meta = b.build_source_files.file(File.BSFILE.META)
        bs_meta.set_defaults()
        bs_meta.record_to_objects()
        bs_meta.objects_to_record()
        b.commit()

        self._db.commit()
        return b