Create a version for a particular service.
543774
def create_version(self, service_id, inherit_service_id=None, comment=None):
		""""""
		body = self._formdata({
			"service_id": service_id,
			"inherit_service_id": inherit_service_id,
			"comment": comment,
		}, FastlyVersion.FIELDS)
		content = self._fetch("/service/%s/version" % service_id, method="POST", body=body)
		return FastlyVersion(self, content)
1173743
def version(hostname, timeout=20, username=None, password=None):
    '''
    
    '''
    return __version(__connect(hostname, timeout, username, password))
304752
def check_version(self, check, timeout=None, metadata=None,
                      credentials=None):
        """"""
        return self.stub.CheckVersion(check, timeout=timeout,
                                      metadata=metadata,
                                      credentials=credentials)
564160
def _as_versioned_jar(self, internal_target):
    """"""
    jar, _ = internal_target.get_artifact_info()
    pushdb_entry = self._get_db(internal_target).get_entry(internal_target)
    return jar.copy(rev=pushdb_entry.version().version())
703889
def create_domain(self,
		service_id, 
		version_number, 
		name, 
		comment=None):
		""""""
		body = self._formdata({
			"name": name,
			"comment": comment,

		}, FastlyDomain.FIELDS)
		content = self._fetch("/service/%s/version/%d/domain" % (service_id, version_number), method="POST", body=body)
		return FastlyDomain(self, content)
672595
protected void doGlobalVersioning(StaplerRequest req) {
        if (req.getParameter("releaseVersion") != null) {
            releaseVersion = req.getParameter("releaseVersion");
        }
        if (req.getParameter("nextVersion") != null) {
            nextVersion = req.getParameter("nextVersion");
        }
    }
280017
def create_backend(self, 
		service_id,
		version_number, 
		name, 
		address,
		use_ssl=False,
		port=80,
		connect_timeout=1000,
		first_byte_timeout=15000,
		between_bytes_timeout=10000,
		error_threshold=0,
		max_conn=20,
		weight=100,
		auto_loadbalance=False,
		shield=None,
		request_condition=None,
		healthcheck=None,
		comment=None):
		""""""
		body = self._formdata({
			"name": name,
			"address": address,
			"use_ssl": use_ssl,
			"port": port,
			"connect_timeout": connect_timeout,
			"first_byte_timeout": first_byte_timeout,
			"between_bytes_timeout": between_bytes_timeout,
			"error_threshold": error_threshold,
			"max_conn": max_conn,
			"weight": weight,
			"auto_loadbalance": auto_loadbalance,
			"shield": shield,
			"request_condition": request_condition,
			"healthcheck": healthcheck,
			"comment": comment,
		}, FastlyBackend.FIELDS)
		content = self._fetch("/service/%s/version/%d/backend" % (service_id, version_number), method="POST", body=body)
		return FastlyBackend(self, content)
382845
def upgrade_api(request, client, version):
    """"""

    min_ver, max_ver = api_versions._get_server_version_range(client)
    if min_ver <= api_versions.APIVersion(version) <= max_ver:
        client = _nova.novaclient(request, version)
    return client
1046606
def create_version(self, project_id_or_key, version_name, extra_request_params={}):
        
        request_params = extra_request_params
        request_params["name"] = version_name
        return self.do("POST", "projects/{project_id_or_key}/versions",
                       url_params={"project_id_or_key": project_id_or_key},
                       request_params=request_params,
                       )
96597
def validate_version(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/validate" % (service_id, version_number))
		return self._status(content)
772005
def do_version():
    """"""
    v = ApiPool.ping.model.Version(
        name=ApiPool().current_server_name,
        version=ApiPool().current_server_api.get_version(),
        container=get_container_version(),
    )
    log.info("/version: " + pprint.pformat(v))
    return v
1326054
def _create_or_update_version(app_name, version, app_spec, try_update=True):
    
    # This has a race condition since the app could have been created or
    # published since we last looked.
    try:
        app_id = dxpy.api.app_new(app_spec)["id"]
        return app_id
    except dxpy.exceptions.DXAPIError as e:
        # TODO: detect this error more reliably
        if e.name == 'InvalidInput' and e.msg == 'Specified name and version conflict with an existing alias':
            print('App %s/%s already exists' % (app_spec["name"], version), file=sys.stderr)
            # The version number was already taken, so app/new doesn't work.
            # However, maybe it hasn't been published yet, so we might be able
            # to app-xxxx/update it.
            app_describe = dxpy.api.app_describe("app-" + app_name, alias=version)
            if app_describe.get("published", 0) > 0:
                return None
            return _update_version(app_name, version, app_spec, try_update=try_update)
        raise e
651986
def activate_version(self, service_id, version_number):
		""""""
		content = self._fetch("/service/%s/version/%d/activate" % (service_id, version_number), method="PUT")
		return FastlyVersion(self, content)
887012
def create(resource_path, previous_version=None, package='perch.migrations'):
    """"""
    pkg, obj = resource_path.rsplit('.', 1)
    module = importlib.import_module(pkg)
    resource = getattr(module, obj)
    version = uuid4().hex
    target_module = importlib.import_module(package)
    target_dir = os.path.dirname(target_module.__file__)
    target_file = os.path.join(target_dir, resource.resource_type + '_' + version + '.py')

    with open(target_file, 'w') as f:
        f.write(MIGRATION_TEMPLATE.format(
            resource_path=resource_path,
            resource_type=resource.resource_type,
            version=version,
            previous_version=previous_version or '',
        ))

    return target_file
1369770
def _release(level):
    """"""
    version, comment = _new_version(level)

    if version is not None:

        run(['git',
             'commit',
             str(VER_PATH.relative_to(BASE_PATH)),
             str(CHANGES_PATH.relative_to(BASE_PATH)),
             '--amend',
             '--no-edit',
             ])
        run(['git',
             'tag',
             '-a',
             'v' + version,
             '-m',
             '"' + comment + '"',
             ])
        run(['git',
             'push',
             'origin',
             '--tags',
             ])
        run(['git',
             'push',
             'origin',
             'master',
             '-f',
             ])
708760
function functionPublishVersion(name, description, hash) {
    return new Promise((resolve, reject) => {
        lambda.publishVersion({
            FunctionName: name,
            Description: description,
            CodeSha256: hash
        }, function(err, data) {
            if (err) return reject(err);
            resolve(data);
        });
    });
}
752254
def bundle(context, name):
    """"""
    if context.obj['db'].bundle(name):
        click.echo(click.style('bundle name already exists', fg='yellow'))
        context.abort()
    new_bundle = context.obj['db'].new_bundle(name)
    context.obj['db'].add_commit(new_bundle)

    # add default version
    new_version = context.obj['db'].new_version(created_at=new_bundle.created_at)
    new_version.bundle = new_bundle
    context.obj['db'].add_commit(new_version)

    click.echo(click.style(f"new bundle added: {new_bundle.name} ({new_bundle.id})", fg='green'))