Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Code:
- l = db.instance_get_all_by_filters(self.context, {'deleted':False})
- print "returned list: %s" % l
- l = db.instance_get_all_by_filters(self.context, {})
- print "returned list: %s" % l
- print l[0].__dict__
- Output:
- called with (<nova.context.RequestContext object at 0x441d8d0>, {'deleted': False}, created_at, desc, None, None)
- returned list: []
- called with (<nova.context.RequestContext object at 0x441d8d0>, {}, created_at, desc, None, None)
- returned list: [<nova.db.sqlalchemy.models.Instance object at 0x36bc350>]
- {'vm_state': None, 'availability_zone': None, 'terminated_at': None, 'ramdisk_id': None, 'instance_type_id': None, 'updated_at': None, 'vm_mode': None, 'ephemeral_gb': None, 'deleted_at': None, 'reservation_id': u'a', 'id': 1, 'security_groups': [], 'disable_terminate': False, 'root_device_name': None, 'user_id': None, 'uuid': u'30c1e92e-d98d-41ff-a45f-39c12a0955bd', 'server_name': None, 'default_swap_device': None, 'info_cache': <nova.db.sqlalchemy.models.InstanceInfoCache object at 0x3160450>, 'hostname': u'fake_name', 'launched_on': None, 'display_description': None, 'key_data': None, 'deleted': False, 'power_state': None, 'default_ephemeral_device': None, 'progress': None, 'project_id': u'fake', 'launched_at': None, 'scheduled_at': None, '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x3160550>, 'access_ip_v6': None, 'access_ip_v4': None, 'kernel_id': None, 'key_name': None, 'user_data': None, 'host': u'host1', 'display_name': None, 'task_state': None, 'shutdown_terminate': False, 'root_gb': None, 'locked': None, 'created_at': datetime.datetime(2012, 10, 27, 18, 32, 16, 475450), 'launch_index': None, 'metadata': [], 'memory_mb': None, 'instance_type': None, 'vcpus': None, 'image_ref': u'1', 'architecture': None, 'auto_disk_config': None, 'os_type': None, 'config_drive': None}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement