cumulusci.salesforce_api package

Submodules

exception cumulusci.salesforce_api.exceptions.MetadataApiError(message, response)[source]

Bases: cumulusci.core.exceptions.CumulusCIFailure

exception cumulusci.salesforce_api.exceptions.MetadataComponentFailure(message, response)[source]

Bases: cumulusci.salesforce_api.exceptions.MetadataApiError

exception cumulusci.salesforce_api.exceptions.MetadataParseError(message, response)[source]

Bases: cumulusci.salesforce_api.exceptions.MetadataApiError

exception cumulusci.salesforce_api.exceptions.MissingOAuthError[source]

Bases: cumulusci.core.exceptions.CumulusCIException

exception cumulusci.salesforce_api.exceptions.MissingOrgCredentialsError[source]

Bases: cumulusci.core.exceptions.CumulusCIException

python interface to the Salesforce Metadata API based on mrbelvedere/mpinstaller/mdapi.py

class cumulusci.salesforce_api.metadata.ApiDeploy(task, package_zip, purge_on_delete=None, api_version=None, check_only=False, test_level=None, run_tests=None)[source]

Bases: cumulusci.salesforce_api.metadata.BaseMetadataApiCall

soap_action_start = 'deploy'
soap_action_status = 'checkDeployStatus'
soap_envelope_start = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <deploy xmlns="http://soap.sforce.com/2006/04/metadata">\n <ZipFile>{package_zip}</ZipFile>\n <DeployOptions>\n <allowMissingFiles>false</allowMissingFiles>\n <autoUpdatePackage>false</autoUpdatePackage>\n <checkOnly>{check_only}</checkOnly>\n <ignoreWarnings>true</ignoreWarnings>\n <performRetrieve>false</performRetrieve>\n <purgeOnDelete>{purge_on_delete}</purgeOnDelete>\n <rollbackOnError>true</rollbackOnError>\n <runAllTests>false</runAllTests>\n <singlePackage>true</singlePackage>\n {test_level}\n {run_tests}\n </DeployOptions>\n </deploy>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_status = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkDeployStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n <includeDetails>true</includeDetails>\n </checkDeployStatus>\n </soap:Body>\n</soap:Envelope>'
class cumulusci.salesforce_api.metadata.ApiListMetadata(task, metadata_type, metadata=None, folder=None, as_of_version=None)[source]

Bases: cumulusci.salesforce_api.metadata.BaseMetadataApiCall

soap_action_start = 'listMetadata'
soap_envelope_start = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <listMetadata xmlns="http://soap.sforce.com/2006/04/metadata">\n <queries>\n <type>{metadata_type}</type>{folder}\n </queries>\n <asOfVersion>{as_of_version}</asOfVersion>\n </listMetadata>\n </soap:Body>\n</soap:Envelope>'
class cumulusci.salesforce_api.metadata.ApiRetrieveInstalledPackages(task, api_version=None)[source]

Bases: cumulusci.salesforce_api.metadata.BaseMetadataApiCall

check_interval = 1
soap_action_result = 'checkRetrieveStatus'
soap_action_start = 'retrieve'
soap_action_status = 'checkStatus'
soap_envelope_result = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkRetrieveStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkRetrieveStatus>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_start = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <retrieve xmlns="http://soap.sforce.com/2006/04/metadata">\n <retrieveRequest>\n <apiVersion>{api_version}</apiVersion>\n <unpackaged>\n <types>\n <members>*</members>\n <name>InstalledPackage</name>\n </types>\n <version>{api_version}</version>\n </unpackaged>\n </retrieveRequest>\n </retrieve>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_status = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkStatus>\n </soap:Body>\n</soap:Envelope>'
class cumulusci.salesforce_api.metadata.ApiRetrievePackaged(task, package_name, api_version)[source]

Bases: cumulusci.salesforce_api.metadata.BaseMetadataApiCall

check_interval = 1
soap_action_result = 'checkRetrieveStatus'
soap_action_start = 'retrieve'
soap_action_status = 'checkStatus'
soap_envelope_result = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkRetrieveStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkRetrieveStatus>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_start = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <retrieve xmlns="http://soap.sforce.com/2006/04/metadata">\n <retrieveRequest>\n <apiVersion>{api_version}</apiVersion>\n <packageNames>{package_name}</packageNames>\n </retrieveRequest>\n </retrieve>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_status = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkStatus>\n </soap:Body>\n</soap:Envelope>'
class cumulusci.salesforce_api.metadata.ApiRetrieveUnpackaged(task, package_xml, api_version)[source]

Bases: cumulusci.salesforce_api.metadata.BaseMetadataApiCall

check_interval = 1
soap_action_result = 'checkRetrieveStatus'
soap_action_start = 'retrieve'
soap_action_status = 'checkStatus'
soap_envelope_result = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkRetrieveStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkRetrieveStatus>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_start = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <retrieve xmlns="http://soap.sforce.com/2006/04/metadata">\n <retrieveRequest>\n <apiVersion>{api_version}</apiVersion>\n <unpackaged>\n {package_xml}\n </unpackaged>\n </retrieveRequest>\n </retrieve>\n </soap:Body>\n</soap:Envelope>'
soap_envelope_status = '<?xml version="1.0" encoding="utf-8"?>\n<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">\n <soap:Header>\n <SessionHeader xmlns="http://soap.sforce.com/2006/04/metadata">\n <sessionId>###SESSION_ID###</sessionId>\n </SessionHeader>\n </soap:Header>\n <soap:Body>\n <checkStatus xmlns="http://soap.sforce.com/2006/04/metadata">\n <asyncProcessId>{process_id}</asyncProcessId>\n </checkStatus>\n </soap:Body>\n</soap:Envelope>'
class cumulusci.salesforce_api.metadata.BaseMetadataApiCall(task, api_version=None)[source]

Bases: object

check_interval = 1
soap_action_result = None
soap_action_start = None
soap_action_status = None
soap_envelope_result = None
soap_envelope_start = None
soap_envelope_status = None
class cumulusci.salesforce_api.package_zip.BasePackageZipBuilder[source]

Bases: object

class cumulusci.salesforce_api.package_zip.CreatePackageZipBuilder(name, api_version)[source]

Bases: cumulusci.salesforce_api.package_zip.BasePackageZipBuilder

class cumulusci.salesforce_api.package_zip.DestructiveChangesZipBuilder(destructive_changes, version)[source]

Bases: cumulusci.salesforce_api.package_zip.BasePackageZipBuilder

class cumulusci.salesforce_api.package_zip.InstallPackageZipBuilder(namespace, version, activateRSS=False, password=None)[source]

Bases: cumulusci.salesforce_api.package_zip.BasePackageZipBuilder

api_version = '43.0'
class cumulusci.salesforce_api.package_zip.UninstallPackageZipBuilder(namespace, version)[source]

Bases: cumulusci.salesforce_api.package_zip.DestructiveChangesZipBuilder

class cumulusci.salesforce_api.package_zip.ZipfilePackageZipBuilder(zipfile)[source]

Bases: cumulusci.salesforce_api.package_zip.BasePackageZipBuilder

cumulusci.salesforce_api.utils.get_simple_salesforce_connection(project_config, org_config, api_version=None)[source]

Module contents