Module Expr Str Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore Str Assign NameStore Call NameLoad Dict Str Str Str Str Num Dict Str Str Str Num Dict Str Str Dict Str Str Num Dict Str Dict Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str keyword NameLoad keyword Call NameLoad SubscriptLoad NameLoad Index Str Assign ListStore NameStore Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad Call NameLoad keyword Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword NameLoad keyword NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad ListLoad Call NameLoad keyword Str Call NameLoad keyword Str Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad keyword Str Assign NameStore Call NameLoad ListLoad Call NameLoad keyword Str Call NameLoad keyword Str Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad ListLoad Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad keyword Str Assign NameStore Call NameLoad ListLoad Call NameLoad keyword Str Call NameLoad keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword Str decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return Call NameLoad ListLoad Call NameLoad keyword Str Call NameLoad keyword Call AttributeLoad Str attr Call NameLoad keyword Str keyword NameLoad Call NameLoad BinOpAdd BinOpAdd ListLoad Str Str Call NameLoad NameLoad ListLoad Str BinOpAdd Str NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str ListLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str keyword Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str keyword Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str keyword Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str keyword Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str keyword Str NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str Expr Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Str Dict Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Dict Str Dict Str Str Str Str decorator_list decorator_list
N/A N/A 
Tests for ``flocker.provision._install``.
 N/A yaml pyrsistent freeze thaw textwrap dedent _install task_configure_flocker_agent task_enable_flocker_agent run put run_from_args get_repository_url UnsupportedDistribution get_installable_version get_repo_options _remove_dataset_fields _remove_private_key UnknownAction DistributionNotSupported _ssh Put _effect sequence node.backends backend_loader testtools TestCase N/A __version__ flocker_version N/A THE_AGENT_YML_PATH /etc/flocker/agent.yml N/A BASIC_AGENT_YML N/A freeze N/A version control-service dataset logging 1 N/A hostname port 192.0.2.42 4524 N/A backend zfs N/A version formatters 1 N/A timestamped N/A datefmt format %Y-%m-%d %H:%M:%S %(asctime)s %(message)s ConfigureFlockerAgentTests N/A TestCase N/A N/A 
    Tests for ``task_configure_flocker_agent``.
     test_agent_yml N/A N/A self N/A N/A N/A 
        ```task_configure_flocker_agent`` writes a ``/etc/flocker/agent.yml``
        file which contains the backend configuration passed to it.
         N/A control_address N/A N/A BASIC_AGENT_YML N/A control-service N/A hostname N/A expected_pool some-test-pool N/A expected_backend_configuration N/A dict pool expected_pool N/A commands N/A task_configure_flocker_agent control_node control_address dataset_backend N/A N/A backend_loader get N/A N/A BASIC_AGENT_YML N/A dataset N/A backend dataset_backend_configuration expected_backend_configuration logging_config N/A thaw N/A BASIC_AGENT_YML N/A logging N/A N/A put_agent_yml N/A list N/A N/A effect intent N/A effect N/A N/A commands intent effects N/A isinstance N/A effect intent Put N/A expected_agent_config N/A N/A BASIC_AGENT_YML set dataset N/A N/A N/A BASIC_AGENT_YML N/A dataset update expected_backend_configuration N/A N/A N/A self assertEqual N/A N/A put content N/A N/A yaml safe_dump N/A thaw expected_agent_config path THE_AGENT_YML_PATH log_content_filter _remove_dataset_fields intent put_agent_yml N/A N/A EnableFlockerAgentTests N/A TestCase N/A N/A 
    Tests for ``task_enable_flocker_agent``.
     test_centos_sequence N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for the 'centos-7' distribution returns
        a sequence of systemctl enable and start commands for each agent.
         N/A distribution centos-7 N/A commands N/A task_enable_flocker_agent distribution distribution N/A expected_sequence N/A sequence N/A N/A run command systemctl enable flocker-dataset-agent N/A run command systemctl start flocker-dataset-agent N/A run command systemctl enable flocker-container-agent N/A run command systemctl start flocker-container-agent N/A N/A N/A self assertEqual commands expected_sequence N/A test_centos_sequence_managed N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for the 'centos-7' distribution
        returns a sequence of 'service restart' commands for each agent
        when the action passed down is "restart" (used for managed provider).
         N/A distribution centos-7 N/A commands N/A task_enable_flocker_agent distribution distribution action restart N/A expected_sequence N/A sequence N/A N/A run command systemctl enable flocker-dataset-agent N/A run command systemctl restart flocker-dataset-agent N/A run command systemctl enable flocker-container-agent N/A run command systemctl restart flocker-container-agent N/A N/A N/A self assertEqual commands expected_sequence N/A test_ubuntu_sequence N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for the 'ubuntu-14.04' distribution
        returns a sequence of 'service start' commands for each agent.
         N/A distribution ubuntu-14.04 N/A commands N/A task_enable_flocker_agent distribution distribution N/A expected_sequence N/A sequence N/A N/A run command service flocker-dataset-agent start N/A run command service flocker-container-agent start N/A N/A N/A self assertEqual commands expected_sequence N/A test_ubuntu_sequence_managed N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for the 'ubuntu-14.04' distribution
        returns a sequence of 'service restart' commands for each agent
        when the action passed down is "restart" (used for managed provider).
         N/A distribution ubuntu-14.04 N/A commands N/A task_enable_flocker_agent distribution distribution action restart N/A expected_sequence N/A sequence N/A N/A run command service flocker-dataset-agent restart N/A run command service flocker-container-agent restart N/A N/A N/A self assertEqual commands expected_sequence N/A test_sequence_invalid_action N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for a valid distribution
        but an invalid action raises a ``UnknownAction``.
         N/A distribution ubuntu-14.04 N/A N/A N/A self assertRaises UnknownAction task_enable_flocker_agent distribution distribution action stop N/A test_sequence_invalid_distro N/A N/A self N/A N/A N/A 
        ``task_enable_flocker_agent`` for a non supported
        distribution raises a ``DistributionNotSupported``.
         N/A distribution RedHat N/A N/A N/A self assertRaises DistributionNotSupported task_enable_flocker_agent distribution distribution action restart N/A N/A _centos7_install_commands N/A N/A version N/A N/A N/A 
    Construct the command sequence expected for installing Flocker on CentOS 7.

    :param str version: A Flocker native OS package version (a package name
        suffix) like ``"-1.2.3-1"``.

    :return: The sequence of commands expected for installing Flocker on
        CentOS7.
     N/A installable_version N/A get_installable_version flocker_version N/A N/A sequence N/A N/A run command yum clean all N/A run command N/A N/A yum install -y {} format N/A get_repository_url distribution centos-7 flocker_version installable_version N/A run_from_args N/A N/A N/A yum install N/A get_repo_options installable_version N/A -y N/A clusterhq-flocker-node version N/A GetRepoOptionsTests N/A TestCase N/A N/A 
    Tests for ``get_repo_options``.
     test_marketing_release N/A N/A self N/A N/A N/A 
        No extra repositories are enabled if the latest installable version
        is a marketing release.
         N/A N/A N/A self assertEqual N/A get_repo_options flocker_version 0.3.0 N/A N/A test_development_release N/A N/A self N/A N/A N/A 
        Enabling a testing repository is enabled if the latest installable
        version is not a marketing release.
         N/A N/A N/A self assertEqual N/A get_repo_options flocker_version 0.3.0.dev1 N/A --enablerepo=clusterhq-testing N/A N/A GetRepositoryURLTests N/A TestCase N/A N/A 
    Tests for ``get_repository_url``.
     test_centos_7 N/A N/A self N/A N/A N/A 
        It is possible to get a repository URL for CentOS 7 packages.
         N/A expected https://clusterhq-archive.s3.amazonaws.com/centos/clusterhq-release$(rpm -E %dist).noarch.rpm N/A N/A N/A self assertEqual N/A get_repository_url distribution centos-7 flocker_version 0.3.0 expected N/A test_ubuntu_14_04 N/A N/A self N/A N/A N/A 
        It is possible to get a repository URL for Ubuntu 14.04 packages.
         N/A expected https://clusterhq-archive.s3.amazonaws.com/ubuntu/$(lsb_release --release --short)/\$(ARCH) N/A N/A N/A self assertEqual N/A get_repository_url distribution ubuntu-14.04 flocker_version 0.3.0 expected N/A test_ubuntu_15_10 N/A N/A self N/A N/A N/A 
        It is possible to get a repository URL for Ubuntu 15.10 packages.
         N/A expected https://clusterhq-archive.s3.amazonaws.com/ubuntu/$(lsb_release --release --short)/\$(ARCH) N/A N/A N/A self assertEqual N/A get_repository_url distribution ubuntu-15.10 flocker_version 0.3.0 expected N/A test_unsupported_distribution N/A N/A self N/A N/A N/A 
        An ``UnsupportedDistribution`` error is thrown if a repository for the
        desired distribution cannot be found.
         N/A N/A N/A self assertRaises UnsupportedDistribution get_repository_url unsupported-os 0.3.0 N/A test_non_release_ubuntu N/A N/A self N/A N/A N/A 
        The operating system key for ubuntu has the suffix ``-testing`` for
        non-marketing releases.
         N/A expected https://clusterhq-archive.s3.amazonaws.com/ubuntu-testing/$(lsb_release --release --short)/\$(ARCH) N/A N/A N/A self assertEqual N/A get_repository_url distribution ubuntu-14.04 flocker_version 0.3.0.dev1 expected N/A test_non_release_centos N/A N/A self N/A N/A N/A 
        The operating system key for centos stays the same non-marketing
        releases.
         N/A expected https://clusterhq-archive.s3.amazonaws.com/centos/clusterhq-release$(rpm -E %dist).noarch.rpm N/A N/A N/A self assertEqual N/A get_repository_url distribution centos-7 flocker_version 0.3.0.dev1 expected N/A N/A PrivateKeyLoggingTest N/A TestCase N/A N/A 
    Test removal of private keys from logs.
     test_private_key_removed N/A N/A self N/A N/A N/A 
        A private key is removed for logging.
         N/A key N/A dedent 
            -----BEGIN PRIVATE KEY-----
            MFDkDKSLDDSf
            MFSENSITIVED
            MDKODSFJOEWe
            -----END PRIVATE KEY-----
             N/A N/A N/A self assertEqual N/A dedent 
                -----BEGIN PRIVATE KEY-----
                MFDk...REMOVED...OEWe
                -----END PRIVATE KEY-----
                 N/A _remove_private_key key N/A test_non_key_kept N/A N/A self N/A N/A N/A 
        Non-key data is kept for logging.
         N/A key some random data, not a key N/A N/A N/A self assertEqual key N/A _remove_private_key key N/A test_short_key_kept N/A N/A self N/A N/A N/A 
        A key that is suspiciously short is kept for logging.
         N/A key N/A dedent 
            -----BEGIN PRIVATE KEY-----
            short
            -----END PRIVATE KEY-----
             N/A N/A N/A self assertEqual key N/A _remove_private_key key N/A test_no_end_key_removed N/A N/A self N/A N/A N/A 
        A missing end tag does not prevent removal working.
         N/A key N/A dedent 
            -----BEGIN PRIVATE KEY-----
            MFDkDKSLDDSf
            MFSENSITIVED
            MDKODSFJOEWe
             N/A N/A N/A self assertEqual 
-----BEGIN PRIVATE KEY-----
MFDk...REMOVED...OEWe
 N/A _remove_private_key key N/A N/A DatasetLoggingTest N/A TestCase N/A N/A 
    Test removal of sensitive information from logged configuration files.
     test_dataset_logged_safely N/A N/A self N/A N/A N/A 
        Values are either the same or replaced by 'REMOVED'.
         N/A config N/A dataset N/A secret zone SENSITIVE keep N/A content N/A N/A yaml safe_dump config N/A logged N/A _remove_dataset_fields content N/A N/A N/A self assertEqual N/A N/A yaml safe_load logged N/A dataset N/A secret zone REMOVED keep N/A N/A