Remove default=None when set value in Config
By default oslo.cfg sets the default values as None [1], there is no need
to explicitly do this.
[1] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L829
Change-Id: I97c70439c76fd17712f79371dd0ebc0ab12caabf
Closes-bug: #1323975
Jiong Liu
7 years ago
30 | 30 | |
31 | 31 | credential_opts = [ |
32 | 32 | # auth_type opt |
33 | cfg.StrOpt('auth_type', default=None, | |
33 | cfg.StrOpt('auth_type', | |
34 | 34 | help="The type of authentication credential to create. " |
35 | 35 | "Possible values are 'token', 'password', 'keystone_token', " |
36 | 36 | "and 'keystone_password'. Required if no context is passed to " |
37 | 37 | "the credential factory."), |
38 | 38 | |
39 | 39 | # token opt |
40 | cfg.StrOpt('token', default=None, secret=True, | |
40 | cfg.StrOpt('token', secret=True, | |
41 | 41 | help="Token for authentication. Required for 'token' and " |
42 | 42 | "'keystone_token' auth_type if no context is passed to the " |
43 | 43 | "credential factory."), |
44 | 44 | |
45 | 45 | # password opts |
46 | cfg.StrOpt('username', default=None, | |
46 | cfg.StrOpt('username', | |
47 | 47 | help="Username for authentication. Required for 'password' " |
48 | 48 | "auth_type. Optional for the 'keystone_password' auth_type."), |
49 | cfg.StrOpt('password', default=None, secret=True, | |
49 | cfg.StrOpt('password', secret=True, | |
50 | 50 | help="Password for authentication. Required for 'password' and " |
51 | 51 | "'keystone_password' auth_type."), |
52 | 52 | |
53 | 53 | # keystone credential opts |
54 | cfg.StrOpt('user_id', default=None, | |
54 | cfg.StrOpt('user_id', | |
55 | 55 | help="User ID for authentication. Optional for " |
56 | 56 | "'keystone_token' and 'keystone_password' auth_type."), |
57 | cfg.StrOpt('user_domain_id', default=None, | |
57 | cfg.StrOpt('user_domain_id', | |
58 | 58 | help="User's domain ID for authentication. Optional for " |
59 | 59 | "'keystone_token' and 'keystone_password' auth_type."), |
60 | cfg.StrOpt('user_domain_name', default=None, | |
60 | cfg.StrOpt('user_domain_name', | |
61 | 61 | help="User's domain name for authentication. Optional for " |
62 | 62 | "'keystone_token' and 'keystone_password' auth_type."), |
63 | cfg.StrOpt('trust_id', default=None, | |
63 | cfg.StrOpt('trust_id', | |
64 | 64 | help="Trust ID for trust scoping. Optional for " |
65 | 65 | "'keystone_token' and 'keystone_password' auth_type."), |
66 | cfg.StrOpt('domain_id', default=None, | |
66 | cfg.StrOpt('domain_id', | |
67 | 67 | help="Domain ID for domain scoping. Optional for " |
68 | 68 | "'keystone_token' and 'keystone_password' auth_type."), |
69 | cfg.StrOpt('domain_name', default=None, | |
69 | cfg.StrOpt('domain_name', | |
70 | 70 | help="Domain name for domain scoping. Optional for " |
71 | 71 | "'keystone_token' and 'keystone_password' auth_type."), |
72 | cfg.StrOpt('project_id', default=None, | |
72 | cfg.StrOpt('project_id', | |
73 | 73 | help="Project ID for project scoping. Optional for " |
74 | 74 | "'keystone_token' and 'keystone_password' auth_type."), |
75 | cfg.StrOpt('project_name', default=None, | |
75 | cfg.StrOpt('project_name', | |
76 | 76 | help="Project name for project scoping. Optional for " |
77 | 77 | "'keystone_token' and 'keystone_password' auth_type."), |
78 | cfg.StrOpt('project_domain_id', default=None, | |
78 | cfg.StrOpt('project_domain_id', | |
79 | 79 | help="Project's domain ID for project. Optional for " |
80 | 80 | "'keystone_token' and 'keystone_password' auth_type."), |
81 | cfg.StrOpt('project_domain_name', default=None, | |
81 | cfg.StrOpt('project_domain_name', | |
82 | 82 | help="Project's domain name for project. Optional for " |
83 | 83 | "'keystone_token' and 'keystone_password' auth_type."), |
84 | 84 | cfg.BoolOpt('reauthenticate', default=True, |