"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/cmd/bootstrap.py" between
keystone-16.0.1.tar.gz and keystone-17.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Ussuri" series (latest release).

bootstrap.py  (keystone-16.0.1):bootstrap.py  (keystone-17.0.0)
skipping to change at line 124 skipping to change at line 124
# NOTE(morganfainberg): Do not create the role if it already exists. # NOTE(morganfainberg): Do not create the role if it already exists.
try: try:
role_id = uuid.uuid4().hex role_id = uuid.uuid4().hex
role = {'name': role_name, 'id': role_id} role = {'name': role_name, 'id': role_id}
if self.immutable_roles: if self.immutable_roles:
role['options'] = {'immutable': True} role['options'] = {'immutable': True}
role = PROVIDERS.role_api.create_role(role_id, role) role = PROVIDERS.role_api.create_role(role_id, role)
LOG.info('Created role %s', role_name) LOG.info('Created role %s', role_name)
if not self.immutable_roles: if not self.immutable_roles:
LOG.warning("Role %(role)s was created as a mutable role. It " LOG.warning("Role %(role)s was created as a mutable role. It "
"is recommended to make this role immutable, " "is recommended to make this role immutable by "
"which will become the default behavior of the " "adding the 'immutable' resource option to this "
"bootstrap command in the future.You can opt into " "role, or re-running this command without "
"this behavior by using the --immutable-role " "--no-immutable-role.", {'role': role_name})
"flag, or update role %(role)s with the "
"'immutable' resource option.", {'role': role_name})
return role return role
except exception.Conflict: except exception.Conflict:
LOG.info('Role %s exists, skipping creation.', role_name) LOG.info('Role %s exists, skipping creation.', role_name)
# NOTE(davechen): There is no backend method to get the role # NOTE(davechen): There is no backend method to get the role
# by name, so build the hints to list the roles and filter by # by name, so build the hints to list the roles and filter by
# name instead. # name instead.
hints = driver_hints.Hints() hints = driver_hints.Hints()
hints.add_filter('name', role_name) hints.add_filter('name', role_name)
# Only return global roles, domain-specific roles can't be used in # Only return global roles, domain-specific roles can't be used in
# system assignments and bootstrap isn't designed to work with # system assignments and bootstrap isn't designed to work with
 End of changes. 1 change blocks. 
6 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)