Creates a pipeline with the provided attributes.
		Args:
			name	required name string
			kwargs	{name, description, orgWide, aclEntries} user 
			specifiable ones only
			return	(status code, pipeline_dict) (as created)
183810
def create_pipeline(self, name, description, **kwargs):
		'''
		'''
		#req sanity check
		if not (name and description):
			return requests.codes.bad_request, None

		kwargs.update({'name':name, 'description':description})

		new_pl = StreakPipeline(**kwargs)
		uri = '/'.join([
						self.api_uri,
						self.pipelines_suffix
						])
		code, r_data = self._req('put', uri, new_pl.to_dict())
		
		return code, r_data
479014
def create_datacenter(call=None, kwargs=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The create_address function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    if kwargs.get('name') is None:
        raise SaltCloudExecutionFailure('The "name" parameter is required')

    if kwargs.get('location') is None:
        raise SaltCloudExecutionFailure('The "location" parameter is required')

    conn = get_conn()
    datacenter = Datacenter(name=kwargs['name'],
                            location=kwargs['location'],
                            description=kwargs.get('description'))

    response = conn.create_datacenter(datacenter)
    _wait_for_completion(conn, response, 60, 'create_datacenter')

    return response
673710
def CreateFlowArgs(self, flow_name=None):
    """"""
    if not self._flow_descriptors:
      self._flow_descriptors = {}

      result = self._context.SendRequest("ListFlowDescriptors", None)
      for item in result.items:
        self._flow_descriptors[item.name] = item

    try:
      flow_descriptor = self._flow_descriptors[flow_name]
    except KeyError:
      raise UnknownFlowName(flow_name)

    return utils.CopyProto(utils.UnpackAny(flow_descriptor.default_args))
1159607
def create(self, name, numShards, params=None):
        
        if params is None:
            params = {}
        params.update(
            name=name,
            numShards=numShards
        )
        return self.api('CREATE', params)
1234434
def create_attributes(klass, attributes, previous_object=None):
        

        return {
            'name': attributes.get(
                'name',
                previous_object.name if previous_object is not None else ''
            ),
            'description': attributes.get(
                'description',
                previous_object.description if previous_object is not None else ''
            ),
            'environments': attributes.get(
                'environments',
                [e.to_json() for e in previous_object.environments] if previous_object is not None else []  # Will default to master if empty
            )
        }
19691
def create(self, name):
        
        name = to_text(name)
        return self._post(
            'tags/create',
            data={'tag': {'name': name}},
            result_processor=lambda x: x['tag']
        )
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)
1031941
def _pipeline(self, name):
        
        if name == self.connection_name:
            return self

        try:
            return self._pipelines[name]
        except KeyError:
            pipe = Pipeline(name=name, autoexec=True)
            self._pipelines[name] = pipe
            return pipe
266598
def create_address(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The create_address function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'A name must be specified when creating an address.'
        )
        return False
    if 'region' not in kwargs:
        log.error(
            'A region must be specified for the address.'
        )
        return False

    name = kwargs['name']
    ex_region = kwargs['region']
    ex_address = kwargs.get("address", None)
    kwargs['region'] = _expand_region(kwargs['region'])

    conn = get_conn()

    __utils__['cloud.fire_event'](
        'event',
        'create address',
        'salt/cloud/address/creating',
        args=salt.utils.data.simple_types_filter(kwargs),
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    addy = conn.ex_create_address(name, ex_region, ex_address)

    __utils__['cloud.fire_event'](
        'event',
        'created address',
        'salt/cloud/address/created',
        args=salt.utils.data.simple_types_filter(kwargs),
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    log.info('Created GCE Address %s', name)

    return _expand_address(addy)
704123
def create_keypair(self, keypair_name):
        
        query = self.query_factory(
            action="CreateKeyPair", creds=self.creds, endpoint=self.endpoint,
            other_params={"KeyName": keypair_name})
        d = query.submit()
        return d.addCallback(self.parser.create_keypair)
653987
def required_string(name)
      required_custom(name) do |env|
        if value = env[name.to_s.upcase]
          {name => value}
        else
          raise ConfigError.new("A value must be provided for #{name.to_s.upcase}")
        end
      end
    end
388578
def create_snapshot(kwargs=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The create_snapshot function must be called with -f or --function.'
        )

    if not kwargs or 'name' not in kwargs:
        log.error(
            'A name must be specified when creating a snapshot.'
        )
        return False

    if 'disk_name' not in kwargs:
        log.error(
            'A disk_name must be specified when creating a snapshot.'
        )
        return False

    conn = get_conn()

    name = kwargs.get('name')
    disk_name = kwargs.get('disk_name')

    try:
        disk = conn.ex_get_volume(disk_name)
    except ResourceNotFoundError as exc:
        log.error(
            'Disk %s was not found. Exception was: %s',
            disk_name, exc, exc_info_on_loglevel=logging.DEBUG
        )
        return False

    __utils__['cloud.fire_event'](
        'event',
        'create snapshot',
        'salt/cloud/snapshot/creating',
        args={
            'name': name,
            'disk_name': disk_name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )

    snapshot = conn.create_volume_snapshot(disk, name)

    __utils__['cloud.fire_event'](
        'event',
        'created snapshot',
        'salt/cloud/snapshot/created',
        args={
            'name': name,
            'disk_name': disk_name,
        },
        sock_dir=__opts__['sock_dir'],
        transport=__opts__['transport']
    )
    return _expand_item(snapshot)
416458
def create_queue(name, attributes = {})
      response = action("CreateQueue", {"QueueName" => Queue.sanitize_name("#{queue_prefix}#{name}")}.merge(attributes))

      if response.success?
        Queue.new(self, response.doc.xpath("//QueueUrl").text)
      else
        raise "Could not create queue #{name}"
      end

    rescue AwsActionError => error
      if error.code == "AWS.SimpleQueueService.QueueDeletedRecently"
        raise QueueDeletedRecentlyError, error.message
      else
        raise error
      end
    end
125021
def pipeline_id_from_name(name, region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    r = {}
    result_pipelines = list_pipelines()
    if 'error' in result_pipelines:
        return result_pipelines

    for pipeline in result_pipelines['result']:
        if pipeline['name'] == name:
            r['result'] = pipeline['id']
            return r
    r['error'] = 'No pipeline found with name={0}'.format(name)
    return r
1056544
def create(cls, schema, name):
        
        fn = cls.tags.get(name, XBuiltin)
        return fn(schema, name)
761407
def create_datapipeline(self):
        """"""
        utils.banner("Creating Data Pipeline")
        dpobj = datapipeline.AWSDataPipeline(app=self.app, env=self.env, region=self.region, prop_path=self.json_path)
        dpobj.create_datapipeline()
        dpobj.set_pipeline_definition()
        if self.configs[self.env].get('datapipeline').get('activate_on_deploy'):
            dpobj.activate_pipeline()
861092
def _create_container_args(kwargs):
    
    # Copy over kwargs which can be copied directly
    create_kwargs = {}
    for key in copy.copy(kwargs):
        if key in RUN_CREATE_KWARGS:
            create_kwargs[key] = kwargs.pop(key)
    host_config_kwargs = {}
    for key in copy.copy(kwargs):
        if key in RUN_HOST_CONFIG_KWARGS:
            host_config_kwargs[key] = kwargs.pop(key)

    # Process kwargs which are split over both create and host_config
    ports = kwargs.pop('ports', {})
    if ports:
        host_config_kwargs['port_bindings'] = ports

    volumes = kwargs.pop('volumes', {})
    if volumes:
        host_config_kwargs['binds'] = volumes

    network = kwargs.pop('network', None)
    if network:
        create_kwargs['networking_config'] = {network: None}
        host_config_kwargs['network_mode'] = network

    # All kwargs should have been consumed by this point, so raise
    # error if any are left
    if kwargs:
        raise create_unexpected_kwargs_error('run', kwargs)

    create_kwargs['host_config'] = HostConfig(**host_config_kwargs)

    # Fill in any kwargs which need processing by create_host_config first
    port_bindings = create_kwargs['host_config'].get('PortBindings')
    if port_bindings:
        # sort to make consistent for tests
        create_kwargs['ports'] = [tuple(p.split('/', 1))
                                  for p in sorted(port_bindings.keys())]
    if volumes:
        if isinstance(volumes, dict):
            create_kwargs['volumes'] = [
                v.get('bind') for v in volumes.values()
            ]
        else:
            create_kwargs['volumes'] = [
                _host_volume_from_bind(v) for v in volumes
            ]
    return create_kwargs