1 # Copyright 2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
15 """Generic class to hold sotware version information shown in the report
18 class Version(object):
19 """Container to keep software version details
21 def __init__(self, name, version, git_tag='NA'):
22 """Create Version object with given data
24 self._version = {'name' : name, 'version' : version, 'git_tag' : git_tag}
26 def set_value(self, key, value):
27 """Upate given `key` by given `value`
29 self._version[key] = value
32 """Get content of version object