# Push Upgrade API Scripts
These scripts are designed to work with the Salesforce Push Upgrade API (in Pilot in Winter 16) which exposes new objects via the Tooling API that allow interacting with push upgrades in a packaging org. The main purpose of these scripts is to use the Push Upgrade API to automate push upgrades through Jenkins.
# push_api.py - Python Wrapper for Push Upgrade API
This python file provides wrapper classes around the Tooling API objects and abstracts interaction with them and their related data to make writing scripts easier. All the other scripts in this directory use the SalesforcePushApi wrapper to interact with the Tooling API.
Initializing the SalesforcePushApi wrapper can be done with the following python code:
push_api = SalesforcePushApi(sf_user, sf_pass, sf_serverurl)
You can also pass two optional keyword args to the initialization to control the wrapper's behavior
* **lazy**: A list of objects that should be lazily looked up. Currently, the only implementations for this are 'jobs' and 'subscribers'. If either are included in the list, they will be looked up on demand when needed by a referenced object. For example, if you are querying all jobs and subscribers is not set to lazy, all subscribers will first be retrieved. If lazy is enabled, subscriber orgs will only be retrieved when trying to resolve references for a particular job. Generally, if you have a lot of subscribers and only expect your script to need to lookup a small number of them, enabling lazy for subscribers will reduce api calls and cause the script to run faster.
* **default_where**: A dictionary with Push Upgrade API objects as key and a value containing a SOQL WHERE clause statement which is applied to all queries against the object to effectively set the universe for a given object. For example:
default_where = {'PackageSubscriber': "OrgType = 'Sandbox'"}
In the example above, the wrapper would never return a PackageSubscriber which is not a Sandbox org.
# Push Scripts
## Common Environment Variables
The push scripts are all designed to receive their arguments via environment variables. The following are common amongst all of the Push Scripts
* **SF_USERNAME**: The Salesforce username for the packaging org
* **SF_PASSWORD**: The Salesforce password and security token for the packaging org
* **SF_SERVERURL**: The login url for the Salesforce packaging org.
## get_version_id.py
Takes a namespace and version string and looks up the given version. Returns the version's Salesforce Id.
The script handles parsing the version number string into a SOQL query against the MetadataPackageVersion object with the correct MajorVersion, MinorVersion, PatchVersion, ReleaseState, and BuildNumber (i.e. Beta number).
### Required Environment Variables
* **NAMESPACE**: The Package's namespace prefix
* **VERSION_NUMBER**: The version number string.
## orgs_for_push.py
Takes a MetadataPackageVersion Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line which can be fed into the schedule_push.py script.
### Required Environment Variables
* **VERSION**: The MetadataPackageVersion Id of the version you want to push upgrade. This is used to look for all users not on the version or a newer version
### Optional Environment Variables
* **SUBSCRIBER_WHERE**: An extra filter to be applied to all Subscriber queries. For example, setting this to OrgType = 'Sandbox' would find all Sandbox orgs eligible for push upgrade to the specified version
## failed_orgs_for_push.py
Takes a PackagePushRequest Id and optionally a where clause to filter Subscribers and returns a list of OrgId's one per line for all orgs which failed the
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共136个文件
py:85个
rst:14个
txt:10个
资源分类:Python库 所属语言:Python 资源全名:cumulusci-2.0.0b60.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
Python库 | cumulusci-2.0.0b60.tar.gz (136个子文件)
make.bat 6KB
setup.cfg 418B
MANIFEST.in 359B
LICENSE 2KB
Makefile 7KB
README.md 4KB
README.md 2KB
example1.md 330B
not-zip-safe 1B
PKG-INFO 49KB
PKG-INFO 49KB
cumulus_ci_workflow.png 179KB
image12.png 106KB
image3.png 77KB
image17.png 67KB
github-commit_status_error.png 52KB
github-commit_status_pass.png 51KB
github-creating_a_uat_release.png 50KB
image15.png 26KB
image1.png 4KB
salesforce.py 47KB
config.py 36KB
cli.py 31KB
metadata.py 26KB
push_api.py 24KB
test_keychain.py 22KB
test_parser.py 19KB
bulkdata.py 17KB
test_merge.py 16KB
tasks.py 16KB
test_provider.py 15KB
testrunner.py 14KB
keychain.py 13KB
test_flows.py 13KB
package.py 13KB
test_config.py 12KB
test_generator.py 10KB
manual_instructions.py 10KB
parser.py 9KB
conf.py 9KB
util.py 8KB
provider.py 8KB
merge.py 8KB
utils.py 8KB
generator.py 7KB
tasks.py 7KB
flows.py 7KB
util.py 6KB
test_salesforce.py 6KB
command.py 6KB
soap_envelopes.py 6KB
sfdx.py 5KB
salesforce.py 5KB
test_tasks.py 4KB
exceptions.py 4KB
mrbelvedere.py 4KB
package_zip.py 4KB
util_github_api.py 4KB
metaxml.py 4KB
test_sfdx.py 4KB
test_command.py 3KB
managed_src.py 3KB
apextestsdb.py 3KB
util_github_api.py 3KB
ee_src.py 3KB
release.py 3KB
test_salesforce.py 3KB
batch.py 3KB
github_api.py 3KB
apexdoc.py 2KB
setup.py 2KB
commit.py 2KB
modify.py 2KB
test_package.py 2KB
task.py 2KB
util.py 2KB
test_salesforce.py 2KB
anon.py 2KB
tag.py 1KB
utils.py 1KB
utils.py 1KB
logger.py 524B
base.py 509B
exceptions.py 416B
exceptions.py 307B
__init__.py 276B
pull_request.py 270B
exceptions.py 178B
__init__.py 157B
__init__.py 56B
__init__.py 56B
__init__.py 56B
__init__.py 24B
__init__.py 24B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
__init__.py 0B
共 136 条
- 1
- 2
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 数据库sql语句数据库sql语句
- web期末作业设计网页.pdf
- 傅里叶变换、滤波器、FFT等经典算法的matlab仿真设计.pdf
- DELPHItcp实例DELPHItcp实例DELPHItcp实例DELPHItcp实例DELPHItcp实例DELPHItcp
- 课程设计-Python-学生管理系统
- 全智 A33 a20 a10 升级工具
- excel最全资料,含excel批量上传图片代码、excel各函数/技巧的使用说明和案例等
- 致远 A8+ 协同管理软件 V9.0 用户操作手册(集团版)
- 基于flume+kafka+HBase+spark+ElasticSearch的用户轨迹查询大数据开发项目
- Talent划词翻译插件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功