"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/resource/backends/sql_model.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).

sql_model.py  (keystone-16.0.1):sql_model.py  (keystone-17.0.0)
skipping to change at line 13 skipping to change at line 13
# a copy of the License at # a copy of the License at
# #
# http://www.apache.org/licenses/LICENSE-2.0 # http://www.apache.org/licenses/LICENSE-2.0
# #
# Unless required by applicable law or agreed to in writing, software # Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from six import text_type
from sqlalchemy import orm from sqlalchemy import orm
from sqlalchemy.orm import collections from sqlalchemy.orm import collections
from keystone.common import resource_options from keystone.common import resource_options
from keystone.common import sql from keystone.common import sql
from keystone.resource.backends import base from keystone.resource.backends import base
from keystone.resource.backends import resource_options as ro from keystone.resource.backends import resource_options as ro
class Project(sql.ModelBase, sql.ModelDictMixinWithExtras): class Project(sql.ModelBase, sql.ModelDictMixinWithExtras):
# NOTE(henry-nash): From the manager and above perspective, the domain_id # NOTE(henry-nash): From the manager and above perspective, the domain_id
skipping to change at line 104 skipping to change at line 103
if self._tags: if self._tags:
return [tag.name for tag in self._tags] return [tag.name for tag in self._tags]
return [] return []
@tags.setter @tags.setter
def tags(self, values): def tags(self, values):
new_tags = [] new_tags = []
for tag in values: for tag in values:
tag_ref = ProjectTag() tag_ref = ProjectTag()
tag_ref.project_id = self.id tag_ref.project_id = self.id
tag_ref.name = text_type(tag) tag_ref.name = str(tag)
new_tags.append(tag_ref) new_tags.append(tag_ref)
self._tags = new_tags self._tags = new_tags
class ProjectTag(sql.ModelBase, sql.ModelDictMixin): class ProjectTag(sql.ModelBase, sql.ModelDictMixin):
def to_dict(self): def to_dict(self):
d = super(ProjectTag, self).to_dict() d = super(ProjectTag, self).to_dict()
return d return d
__tablename__ = 'project_tag' __tablename__ = 'project_tag'
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

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