def list_opts(): # NOTE(jtaryma): Function add_auth_opts uses deepcopy on passed array. # Since deepcopy does not support regex, to enable regex # protocol restriction for 'url' option, empty array is # passed. The result is appended to opts array and resorted. cinder_opts = opts + auth.add_auth_opts([]) cinder_opts.sort(key=lambda x: x.name) return cinder_opts
def test_add_auth_opts(self): opts = ironic_auth.add_auth_opts([]) # check that there is no duplicates names = {o.dest for o in opts} self.assertEqual(len(names), len(opts)) # NOTE(pas-ha) checking for most standard auth and session ones only expected = {'timeout', 'insecure', 'cafile', 'certfile', 'keyfile', 'auth_type', 'auth_url', 'username', 'password', 'tenant_name', 'project_name', 'trust_id', 'domain_id', 'user_domain_id', 'project_domain_id'} self.assertTrue(expected.issubset(names))
def test_add_auth_opts(self): opts = ironic_auth.add_auth_opts([]) # check that there is no duplicates names = {o.dest for o in opts} self.assertEqual(len(names), len(opts)) # NOTE(pas-ha) checking for most standard auth and session ones only expected = { 'timeout', 'insecure', 'cafile', 'certfile', 'keyfile', 'auth_type', 'auth_url', 'username', 'password', 'tenant_name', 'project_name', 'trust_id', 'domain_id', 'user_domain_id', 'project_domain_id' } self.assertTrue(expected.issubset(names))
def list_opts(): return auth.add_auth_opts(opts, service_type='image')
def list_opts(): return auth.add_auth_opts(opts, service_type='network')
def list_opts(): return auth.add_auth_opts(opts)
def list_opts(): return auth.add_auth_opts(opts, service_type='baremetal-introspection')
def list_opts(): return opts + auth.add_auth_opts([])
def list_opts(): return auth.add_auth_opts([], service_type='baremetal')
def list_opts(): return auth.add_auth_opts(opts, service_type='compute')
def list_opts(): return auth.add_auth_opts(opts, service_type='image')
def list_opts(): return auth.add_auth_opts(opts, service_type='baremetal-introspection')
def list_opts(): return auth.add_auth_opts(opts, service_type='volumev3')
def list_opts(): return opts + auth.add_auth_opts([])
def list_opts(): return auth.add_auth_opts(opts, service_type='object-store')