Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad keyword Str FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num body Pass orelse Raise decorator_list Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call NameLoad NameLoad Return NameLoad decorator_list decorator_list Call NameLoad ListLoad Str Str Str FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad NameLoad decorator_list Call NameLoad Str ClassDef bases Call NameLoad keyword NameLoad keyword Lambda arguments args NameParam defaults Str body Expr Str FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults vararg kwarg body Expr Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad decorator_list Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call Call NameLoad NameLoad keyword Str Call NameLoad keyword NameLoad decorator_list ClassDef bases Call NameLoad keyword NameLoad keyword Call NameLoad body FunctionDef arguments args NameParam defaults body Expr Str For NameStore GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad If CompareIn NameLoad TupleLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad decorator_list decorator_list ClassDef bases Call NameLoad keyword NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr ListLoad NameLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr NameLoad Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad keyword Call NameLoad Assign NameStore BinOpAdd Str Call NameLoad Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Call NameLoad keyword Call NameLoad Assign NameStore BinOpAdd Str Call NameLoad Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad keyword Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad NameLoad attr keyword NameLoad keyword Call NameLoad Call NameLoad Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call NameLoad keyword Call NameLoad NameLoad Assign NameStore Call NameLoad GeneratorExp NameLoad comprehension NameStore NameLoad CompareEq AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword NameLoad Call NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr attr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Call NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad Call NameLoad Call NameLoad keyword Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad keyword Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Call NameLoad keyword Call NameLoad Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore ListComp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Functional tests for ``flocker.node.agents.gce`` using a GCE cluster.

In order to run these tests you'll need to define the following environment
variables::

    FLOCKER_FUNCTIONAL_TEST=TRUE
    FLOCKER_FUNCTIONAL_TEST_CLOUD_CONFIG_FILE=$HOME/acceptance.yml
    FLOCKER_FUNCTIONAL_TEST_CLOUD_PROVIDER=gce

The configuration stanza for the GCE backend should resemble:
``
gce:
    zone: <gce-region>
    project: <gce-project-name>
``

Note that, at this time, authentication is done using the implicit VM service
account.  When creating your GCE instance be sure to check ``Allow API access
to all Google Cloud services in the same project.``

 uuid uuid4 fixtures Fixture characteristic attributes twisted.python.components proxyForInterface testtools.matchers AllMatch AnyMatch Contains Equals MatchesAll MatchesException MatchesStructure Not Raises googleapiclient.errors HttpError blockdevice AlreadyAttachedVolume UnknownVolume MandatoryProfiles gce get_machine_zone get_machine_project GCEDiskTypes GCEVolumeException IGCEOperations provision._gce GCEInstanceBuilder testtools detach_destroy_volumes get_blockdeviceapi_with_cleanup get_minimum_allocatable_size make_iblockdeviceapi_tests make_icloudapi_tests make_iprofiledblockdeviceapi_tests require_backend testtools TestCase GCEComputeTestObjects N/A Fixture N/A N/A 
    Fixture for creating GCE resources that will be cleaned up at the end of
    the test.

    :ivar compute: The GCE compute interface object.
    :ivar project: The GCE project to create resources within.
    :ivar zone: The GCE zone to create resources within.
     _get_instance_builder N/A N/A self N/A N/A N/A 
        Returns an instance builder that can be used to create GCE instances.
         N/A N/A GCEInstanceBuilder compute N/A self compute project N/A self project zone N/A self zone N/A create_instance N/A N/A self instance_name N/A N/A N/A 
        Creates a GCE instance that will be destroyed at the end of the test.
        Blocks until the creation has concluded.

        :param unicode instance_name: The name of the new instance.

        :returns GCEInstance: The instance to use in the tests.
         N/A instance N/A N/A N/A N/A self _get_instance_builder create_instance instance_name machine_type f1-micro destroy_best_effort N/A N/A inst N/A N/A N/A N/A N/A N/A N/A inst destroy N/A N/A N/A HttpError N/A e N/A N/A N/A N/A N/A e resp status 404 N/A N/A N/A N/A N/A N/A N/A N/A self addCleanup N/A N/A N/A N/A N/A destroy_best_effort instance N/A instance N/A N/A N/A attributes N/A compute project zone gceblockdeviceapi_for_test N/A N/A test_case N/A N/A N/A 
    Create a ``GCEBlockDeviceAPI`` for use by tests.
     N/A N/A get_blockdeviceapi_with_cleanup test_case N/A N/A require_backend gce GCEBlockDeviceAPIInterfaceTests N/A N/A make_iblockdeviceapi_tests blockdevice_api_factory gceblockdeviceapi_for_test unknown_blockdevice_id_factory N/A N/A N/A test N/A a1234678 N/A N/A 
    :class:`IBlockDeviceAPI` Interface adherence Tests for
    :class:`GCEBlockDeviceAPI`.
     test_attach_elsewhere_attached_volume N/A N/A self N/A N/A N/A N/A N/A _RepeatProxy N/A object N/A N/A 
    Implementation of a proxy for an interface that calls each method of the
    underlying interface twice in a row, and returns the value from the second
    call.
     __init__ N/A N/A self _provider N/A N/A N/A 
        Construct a repeat proxy that calls each underlying method twice on the
        underlying provider.

        :param _provider: The underlying implementation to forward all calls
            to.
         N/A N/A self _provider _provider N/A __getattr__ N/A N/A self name N/A N/A N/A 
        Implementation of all methods that calls the underlying method twice,
        returning the result from the second call of the method.

        :param name: The name of the method to execute.
         N/A method N/A getattr N/A self _provider name duplicate_proxy N/A N/A N/A args kwargs N/A N/A N/A method args kwargs N/A N/A method args kwargs N/A N/A duplicate_proxy N/A N/A repeat_call_proxy_for N/A N/A interface provider N/A N/A N/A 
    Constructs an implementation of interface that calls the corresponding
    method on implementation twice for every call to a method.

    :interface param: The zope interface that the proxy should implement.
    :provider param: The underlying provider to proxy all method calls to.
     N/A N/A N/A proxyForInterface interface originalAttribute _original N/A _RepeatProxy _provider provider N/A GCEProfiledBlockDeviceApiTests N/A N/A make_iprofiledblockdeviceapi_tests profiled_blockdevice_api_factory gceblockdeviceapi_for_test dataset_size N/A get_minimum_allocatable_size N/A test_profile_respected N/A N/A self N/A N/A N/A 
        Override base class which verifies that errors are not raised when
        constructing mandatory profiles but also add a check that we
        have created the correct volume type for each profile.
         N/A profile N/A N/A c value N/A c N/A N/A MandatoryProfiles iterconstants N/A N/A dataset_id N/A uuid4 N/A N/A N/A self addCleanup detach_destroy_volumes N/A self api N/A new_volume N/A N/A N/A self api create_volume_with_profile dataset_id dataset_id size N/A self dataset_size profile_name profile N/A N/A profile N/A N/A N/A MandatoryProfiles GOLD value N/A N/A MandatoryProfiles SILVER value N/A N/A expected_disk_type N/A GCEDiskTypes SSD N/A N/A expected_disk_type N/A GCEDiskTypes STANDARD N/A disk N/A N/A N/A N/A self api _operations get_disk_details N/A new_volume blockdevice_id N/A actual_disk_type N/A disk N/A type N/A actual_disk_type N/A N/A N/A actual_disk_type split / N/A -1 N/A N/A N/A self assertThat actual_disk_type N/A Equals N/A expected_disk_type value N/A N/A Incorrect disk type for profile {} format profile N/A N/A GCECloudAPIInterfaceTests N/A N/A make_icloudapi_tests blockdevice_api_factory gceblockdeviceapi_for_test N/A N/A 
    :class:`ICloudAPI` Interface adherence Tests for
    :class:`GCEBlockDeviceAPI`.
     N/A GCEBlockDeviceAPITests N/A TestCase N/A N/A 
    Tests for :class:`GCEBlockDeviceAPI`.
     test_multiple_cluster N/A N/A self N/A N/A N/A 
        Two :class:`GCEBlockDeviceAPI` instances can be run with different
        cluster_ids. Volumes in one cluster do not show up in listing from the
        other.
         N/A gce_block_device_api_1 N/A gceblockdeviceapi_for_test self N/A gce_block_device_api_2 N/A gceblockdeviceapi_for_test self N/A cluster_1_dataset_id N/A uuid4 N/A cluster_2_dataset_id N/A uuid4 N/A N/A N/A gce_block_device_api_1 create_volume cluster_1_dataset_id N/A get_minimum_allocatable_size N/A N/A N/A gce_block_device_api_2 create_volume cluster_2_dataset_id N/A get_minimum_allocatable_size N/A N/A N/A self assertEqual N/A cluster_1_dataset_id N/A list N/A N/A x dataset_id N/A x N/A N/A gce_block_device_api_1 list_volumes N/A N/A N/A self assertEqual N/A cluster_2_dataset_id N/A list N/A N/A x dataset_id N/A x N/A N/A gce_block_device_api_2 list_volumes N/A test_create_duplicate_dataset_ids N/A N/A self N/A N/A N/A 
        Two :class:`GCEBlockDeviceAPI` instances can be run with different
        cluster_ids. Since users can specify the names of their
        dataset, Make sure that creating a 2 volumes with the same
        dataset_id raises GCEVolumeException.
         N/A gce_block_device_api_1 N/A gceblockdeviceapi_for_test self N/A gce_block_device_api_2 N/A gceblockdeviceapi_for_test self N/A shared_dataset_id N/A uuid4 N/A N/A N/A gce_block_device_api_1 create_volume shared_dataset_id N/A get_minimum_allocatable_size N/A N/A N/A self assertRaises GCEVolumeException N/A gce_block_device_api_2 create_volume shared_dataset_id N/A get_minimum_allocatable_size N/A test_list_live_nodes_pagination_and_removal N/A N/A self N/A N/A N/A 
        list_live_nodes should be able to walk pages to get all live nodes and
        should not have nodes after they are destroyed or stopped.

        Also, _stop_node and start_node should be able to take a node off-line
        and bring it back online.

        Sorry for testing two things in this test.

        Unfortunately, to verify pagination is working there must be two nodes
        running. Also, to test start_node and _stop_node, there must be a
        second instance started up. Since starting and stopping a node is time
        consuming, I decided to combine these into the same test. My apologies
        to future maintainers if this makes debugging failures less pleasant.
         N/A api N/A gceblockdeviceapi_for_test self N/A api N/A N/A api set _page_size 1 N/A gce_fixture N/A N/A self useFixture N/A GCEComputeTestObjects compute N/A N/A api _operations _compute project N/A get_machine_project zone N/A get_machine_zone N/A other_instance_name N/A functional-test- N/A unicode N/A uuid4 N/A other_instance N/A N/A gce_fixture create_instance other_instance_name N/A N/A N/A self assertThat N/A N/A api list_live_nodes N/A MatchesAll N/A Contains other_instance_name N/A Contains N/A N/A api compute_instance_id N/A N/A N/A api _stop_node other_instance_name N/A N/A N/A self assertThat N/A N/A api list_live_nodes N/A MatchesAll N/A Not N/A Contains other_instance_name N/A Contains N/A N/A api compute_instance_id N/A N/A N/A api start_node other_instance_name N/A N/A N/A self assertThat N/A N/A api list_live_nodes N/A MatchesAll N/A Contains other_instance_name N/A Contains N/A N/A api compute_instance_id N/A N/A N/A other_instance destroy N/A N/A N/A self assertThat N/A N/A api list_live_nodes N/A MatchesAll N/A Not N/A Contains other_instance_name N/A Contains N/A N/A api compute_instance_id N/A test_attach_elsewhere_attached_volume N/A N/A self N/A N/A N/A 
        An attempt to attach a ``BlockDeviceVolume`` already attached to
        another host raises ``AlreadyAttachedVolume``.
         N/A api N/A gceblockdeviceapi_for_test self N/A gce_fixture N/A N/A self useFixture N/A GCEComputeTestObjects compute N/A N/A api _operations _compute project N/A get_machine_project zone N/A get_machine_zone N/A instance_name N/A functional-test- N/A unicode N/A uuid4 N/A other_instance N/A N/A gce_fixture create_instance instance_name N/A new_volume N/A N/A api create_volume dataset_id N/A uuid4 size N/A get_minimum_allocatable_size N/A attached_volume N/A N/A api attach_volume N/A new_volume blockdevice_id attach_to N/A other_instance name N/A N/A N/A self assertRaises AlreadyAttachedVolume N/A api attach_volume blockdevice_id N/A attached_volume blockdevice_id attach_to N/A N/A api compute_instance_id N/A test_duplicated_calls N/A N/A self N/A N/A N/A 
        Verify that if every call to the :class:`GCEOperations` is
        duplicated that we handle the errors correctly.

        This should force some specific scheduling situations that resemble
        race conditions with another agent trying to converge to the same
        state, or a condition where the dataset agent as rebooted after a crash
        that happened in the middle of an :class:`IBlockDeviceAPI` call.

        In these situations we should verify that the second call to many of
        the underlying atomic methods would result in the correct underlying
        :class:`VolumeException`.
         N/A actual_api N/A gceblockdeviceapi_for_test self N/A operations N/A actual_api _operations N/A api N/A N/A actual_api set _operations N/A repeat_call_proxy_for IGCEOperations operations N/A dataset_id N/A uuid4 N/A N/A N/A self assertThat N/A N/A N/A N/A N/A N/A api create_volume dataset_id dataset_id size N/A get_minimum_allocatable_size N/A Raises N/A MatchesException GCEVolumeException N/A volumes N/A N/A api list_volumes N/A N/A N/A self assertThat volumes N/A AnyMatch N/A MatchesStructure dataset_id N/A Equals dataset_id N/A volume N/A next N/A v N/A v volumes N/A N/A v dataset_id dataset_id N/A compute_instance_id N/A N/A api compute_instance_id N/A N/A N/A self assertThat N/A N/A N/A N/A N/A N/A api attach_volume blockdevice_id N/A volume blockdevice_id attach_to compute_instance_id N/A Raises N/A MatchesException AlreadyAttachedVolume N/A N/A N/A self assertThat N/A N/A N/A api get_device_path N/A volume blockdevice_id path N/A Contains /dev/sd N/A N/A N/A api detach_volume blockdevice_id N/A volume blockdevice_id N/A N/A N/A self assertThat N/A N/A N/A N/A N/A N/A api destroy_volume blockdevice_id N/A volume blockdevice_id N/A Raises N/A MatchesException UnknownVolume N/A N/A N/A self assertThat N/A N/A api list_volumes N/A AllMatch N/A Not N/A MatchesStructure dataset_id N/A Equals dataset_id N/A test_list_volumes_walks_pages N/A N/A self N/A N/A N/A 
        Ensure that we can walk multiple pages returned from listing GCE
        volumes.
         N/A api N/A gceblockdeviceapi_for_test self N/A api N/A N/A api set _page_size 1 N/A volume_1 N/A N/A api create_volume dataset_id N/A uuid4 size N/A get_minimum_allocatable_size N/A volume_2 N/A N/A api create_volume dataset_id N/A uuid4 size N/A get_minimum_allocatable_size N/A blockdevice_ids N/A N/A v blockdevice_id N/A v N/A N/A api list_volumes N/A N/A N/A self assertThat blockdevice_ids N/A MatchesAll N/A Contains N/A volume_1 blockdevice_id N/A Contains N/A volume_2 blockdevice_id N/A N/A N/A api destroy_volume N/A volume_2 blockdevice_id N/A blockdevice_ids N/A N/A v blockdevice_id N/A v N/A N/A api list_volumes N/A N/A N/A self assertThat blockdevice_ids N/A MatchesAll N/A Contains N/A volume_1 blockdevice_id N/A Not N/A Contains N/A volume_2 blockdevice_id N/A N/A