Beispiel #1
0
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
Beispiel #2
0
 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))
Beispiel #3
0
 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))
Beispiel #4
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='image')
Beispiel #5
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='network')
Beispiel #6
0
def list_opts():
    return auth.add_auth_opts(opts)
Beispiel #7
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='baremetal-introspection')
def list_opts():
    return opts + auth.add_auth_opts([])
Beispiel #9
0
def list_opts():
    return auth.add_auth_opts([], service_type='baremetal')
Beispiel #10
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='compute')
Beispiel #11
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='image')
Beispiel #12
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='baremetal-introspection')
Beispiel #13
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='volumev3')
Beispiel #14
0
def list_opts():
    return opts + auth.add_auth_opts([])
Beispiel #15
0
def list_opts():
    return auth.add_auth_opts(opts, service_type='object-store')