Beispiel #1
0
def set_defaults(project=None, connection=None):
    """Set defaults either explicitly or implicitly as fall-back.

    Uses the arguments to call the individual default methods.

    :type project: string
    :param project: Optional. The name of the project to connect to.

    :type connection: :class:`gcloud.pubsub.connection.Connection`
    :param connection: Optional. A connection provided to be the default.
    """
    set_default_project(project=project)
    set_default_connection(connection=connection)
Beispiel #2
0
def set_defaults(project=None, connection=None):
    """Set defaults either explicitly or implicitly as fall-back.

    Uses the arguments to call the individual default methods.

    :type project: string
    :param project: Optional. The name of the project to connect to.

    :type connection: :class:`gcloud.pubsub.connection.Connection`
    :param connection: Optional. A connection provided to be the default.
    """
    set_default_project(project=project)
    set_default_connection(connection=connection)
Beispiel #3
0
def set_defaults(bucket=None, project=None, connection=None):
    """Set defaults either explicitly or implicitly as fall-back.

    Uses the arguments to call the individual default methods.

    :type bucket: :class:`gcloud.storage.bucket.Bucket`
    :param bucket: Optional. The bucket to use as default.

    :type project: string
    :param project: Optional. The name of the project to connect to.

    :type connection: :class:`gcloud.storage.connection.Connection`
    :param connection: Optional. A connection provided to be the default.
    """
    set_default_project(project=project)
    set_default_connection(connection=connection)
    # NOTE: `set_default_bucket` is called after `set_default_connection`
    #       since `set_default_bucket` falls back to implicit connection.
    set_default_bucket(bucket=bucket)
Beispiel #4
0
def set_defaults(bucket=None, project=None, connection=None):
    """Set defaults either explicitly or implicitly as fall-back.

    Uses the arguments to call the individual default methods.

    :type bucket: :class:`gcloud.storage.bucket.Bucket`
    :param bucket: Optional. The bucket to use as default.

    :type project: string
    :param project: Optional. The name of the project to connect to.

    :type connection: :class:`gcloud.storage.connection.Connection`
    :param connection: Optional. A connection provided to be the default.
    """
    set_default_project(project=project)
    set_default_connection(connection=connection)
    # NOTE: `set_default_bucket` is called after `set_default_connection`
    #       since `set_default_bucket` falls back to implicit connection.
    set_default_bucket(bucket=bucket)
 def _callFUT(self, project=None):
     from gcloud._helpers import set_default_project
     return set_default_project(project=project)
Beispiel #6
0
 def _callFUT(self, project=None):
     from gcloud._helpers import set_default_project
     return set_default_project(project=project)