def install(): apt_update(fatal=True) pkgs = determine_packages() apt_install(pkgs, fatal=True) install_cplane_packages() create_link() if config('cplane-version') == "1.3.7" or "1.3.8": configure_policy() restart_service()
def test_configure_policy(self, m_json_dump, m_json_load): data = {} self.open.return_value = None m_json_load.return_value = data cplane_utils.configure_policy() m_json_dump.assert_called_with({'update_ogr': 'rule:admin_or_\ owner', 'get_ogr': '', 'get_ogrs': '', 'delete_ogr': 'rule:admin_\ only', 'create_floatingip:floating_ip_address': 'rule:admin_or_\ owner'}, None, indent=4)