| 1 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 2 | # not use this file except in compliance with the License. You may obtain |
| 3 | # a copy of the License at |
| 4 | # |
| 5 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | # |
| 7 | # Unless required by applicable law or agreed to in writing, software |
| 8 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 9 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 10 | # License for the specific language governing permissions and limitations |
| 11 | # under the License. |
| 12 | |
| 13 | from oslo_versionedobjects import base |
| 14 | from oslo_versionedobjects import fields |
| 15 | |
| 16 | from os_vif.objects import base as osv_base |
| 17 | |
| 18 | |
| 19 | @base.VersionedObjectRegistry.register |
| 20 | class InstanceInfo(osv_base.VersionedObject): |
| 21 | """Represents important information about a Nova instance.""" |
| 22 | # Version 1.0: Initial version |
| 23 | VERSION = '1.0' |
| 24 | |
| 25 | fields = { |
| 26 | # UUID of the instance |
| 27 | 'uuid': fields.UUIDField(), |
| 28 | # The instance name, directly from the Nova instance field of the |
| 29 | # same name |
| 30 | 'name': fields.StringField(), |
| 31 | # The project/tenant ID that owns the instance |
| 32 | 'project_id': fields.StringField(), |
| 33 | } |