'This method sets up CD for an Azure Web App thru Team Services'

def setup_continuous_delivery(self, resource_group_name, name, repo_url, branch, git_token, slot, cd_app_type, cd_account, cd_create_account, location):

    profile = Profile()
    subscription = profile.get_subscription()
    user = profile.get_current_account_user()
    (cred, _, _) = profile.get_login_credentials(subscription_id=None)
    cd_manager = ContinuousDeliveryManager(self._update_progress)
    auth_token = profile.get_access_token_for_resource(user, None, cd_manager.get_vsts_app_id())
    cd_manager.set_repository_info(repo_url, branch, git_token)
    cd_manager.set_azure_web_info(resource_group_name, name, cred, subscription['id'], subscription['name'], subscription['tenantId'], location)
    vsts_cd_status = cd_manager.setup_continuous_delivery(slot, cd_app_type, cd_account, cd_create_account, auth_token)
    return vsts_cd_status
