'Implements GenericVmValidateBomDeployer interface.'

def do_determine_instance_ip(self):

    options = self.options
    response = check_run_quick('gcloud    compute    instances    describe    --format    json    --account    {gcloud_account}    --project    {project}    --zone    {zone}    {instance}'.format(gcloud_account=options.deploy_hal_google_service_account, project=options.deploy_google_project, zone=options.deploy_google_zone, instance=options.deploy_google_instance), dup_stderr_to_stdout=False)
    nic = json.JSONDecoder().decode(response.stdout)['networkInterfaces'][0]
    use_internal_ip = options.deploy_google_use_internal_ip
    if use_internal_ip:
        return nic['networkIP']
    return nic['accessConfigs'][0]['natIP']
