def setUp(self): from haas.ext.switches.mock import LOCAL_STATE self.LOCAL_STATE = LOCAL_STATE fail_on_log_warnings() # Configure HaaS: config_testsuite() config_merge({ 'extensions': { 'haas.ext.switches.mock': '', 'haas.ext.obm.ipmi': '', 'haas.ext.obm.mock': '', 'haas.ext.network_allocators.null': None, 'haas.ext.network_allocators.vlan_pool': '', }, 'haas.ext.network_allocators.vlan_pool': { 'vlans': '100-200', }, }) config.load_extensions() newDB() # Initialize the db schema initial_db() # Populate the db with objects # Sanity check the start state: assert self.LOCAL_STATE['stock_switch_0']['free_port_0'] == {} self.request_context = app.test_request_context() self.request_context.push()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.auth.mock': '', 'haas.ext.auth.null': None, }, }) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.obm.ipmi': '', }, }) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.obm.ipmi': '' }, 'devel': { 'dry_run': None } }) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'haas.ext.switches.dell': { 'save': 'True' }, 'haas.ext.switches.nexus': { 'save': 'True' } }) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.network_allocators.null': None, 'haas.ext.network_allocators.vlan_pool': '' }, 'haas.ext.network_allocators.vlan_pool': { 'vlans': '100-104, 300, 702', # Arbitrary list }, }) load_extensions()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.auth.mock': '', # This extension is enabled by default in the tests, so we need to # disable it explicitly: 'haas.ext.auth.null': None, 'haas.ext.switches.mock': '', }, }) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'extensions': { 'haas.ext.auth.mock': '', # This extension is enabled by default in the tests, so we need to # disable it explicitly: 'haas.ext.auth.null': None, 'haas.ext.switches.mock': '', 'haas.ext.obm.mock': '' }, }) config.load_extensions()
def configure(): config_testsuite() config_merge( { "extensions": { "haas.ext.auth.mock": "", # This extension is enabled by default in the tests, so we need to # disable it explicitly: "haas.ext.auth.null": None, "haas.ext.switches.mock": "", "haas.ext.obm.mock": "", } } ) config.load_extensions()
def configure(): config_testsuite() config_merge({ 'auth': { # The tests in this module are checking the specific authorization # requirements of the API calls. as such, we don't want things to # fail due to complete lack of authentication, where they should # fail later when the specific authorization checks we're testing # for happen. 'require_authentication': 'False', }, 'extensions': { 'haas.ext.auth.database': '', 'haas.ext.auth.null': None, }, }) config.load_extensions()
def configure(): """Fixture which setups up haas.cfg, and loads extensions and such.""" tc.config_testsuite() tc.config_merge({ 'extensions': { 'haas.ext.auth.null': None, 'haas.ext.auth.keystone': '', }, 'haas.ext.auth.keystone': { 'auth_url': 'http://127.0.0.1:35357/v3', 'auth_protocol': 'http', 'username': '******', 'password': '******', 'project_name': 'admin', 'admin_user': '******', 'admin_password': '******', }, }) # the keystone client library actually bombs out if we don't configure # logging: config.configure_logging() config.load_extensions()
def configure(): config_testsuite() config.load_extensions()
def configure(): config_testsuite() config.configure_logging() config.load_extensions()
def configure(): config_testsuite() config_merge( {'extensions': {'haas.ext.obm.ipmi': '', }, }) config.load_extensions()
def configure(): config_testsuite() if not cfg.get('database', 'uri').startswith('postgresql:'): pytest.skip('Database migrations are only supported for postgresql.') init_db()