'Creation of this object should basically cover all time consuming
collection.  Methods after that should not cause time delays due to
network operations or lengthy cpu operations.
The user should then get a single instance and make multiple method
calls on it.'

def __init__(self, instance, address=None, content=None, extra_md=None, network_info=None, vd_driver=None, network_metadata=None, request_context=None):

    if (not content):
        content = []
    ctxt = context.get_admin_context()
    instance.ec2_ids
    instance.keypairs
    instance.device_metadata
    instance = objects.Instance.obj_from_primitive(instance.obj_to_primitive())
    self.set_mimetype(MIME_TYPE_TEXT_PLAIN)
    self.instance = instance
    self.extra_md = extra_md
    self.availability_zone = instance.get('availability_zone')
    secgroup_api = openstack_driver.get_openstack_security_group_driver()
    self.security_groups = secgroup_api.get_instance_security_groups(ctxt, instance)
    self.mappings = _format_instance_mapping(ctxt, instance)
    if (instance.user_data is not None):
        self.userdata_raw = base64.decode_as_bytes(instance.user_data)
    else:
        self.userdata_raw = None
    self.address = address
    self.launch_metadata = utils.instance_meta(instance)
    self.password = password.extract_password(instance)
    self.uuid = instance.uuid
    self.content = {}
    self.files = []
    if (network_info is None):
        network_info = instance.info_cache.network_info
    if (network_metadata is None):
        self.network_metadata = netutils.get_network_metadata(network_info)
    else:
        self.network_metadata = network_metadata
    self.ip_info = ec2utils.get_ip_info_for_instance_from_nw_info(network_info)
    self.network_config = None
    cfg = netutils.get_injected_network_template(network_info)
    if cfg:
        key = ('%04i' % len(self.content))
        self.content[key] = cfg
        self.network_config = {'name': 'network_config', 'content_path': ('/%s/%s' % (CONTENT_DIR, key))}
    for (path, contents) in content:
        key = ('%04i' % len(self.content))
        self.files.append({'path': path, 'content_path': ('/%s/%s' % (CONTENT_DIR, key))})
        self.content[key] = contents
    if (vd_driver is None):
        vdclass = importutils.import_class(CONF.vendordata_driver)
    else:
        vdclass = vd_driver
    self.vddriver = vdclass(instance=instance, address=address, extra_md=extra_md, network_info=network_info)
    self.route_configuration = None
    self.vendordata_providers = {'StaticJSON': vendordata_json.JsonFileVendorData(instance=instance, address=address, extra_md=extra_md, network_info=network_info), 'DynamicJSON': vendordata_dynamic.DynamicVendorData(instance=instance, address=address, network_info=network_info, context=request_context)}
