func (args *OVFExportArgs) GetResourceName() string {
	if args.IsInstanceExport() {
		return args.InstanceName
	}
	return args.MachineImageName
}
GetResourceName returns name of the resource to be exported, either instance name or machine image name
package ovfexportdomain
import (
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"strings"
	"time"
	"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/assert"
	"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/daisyutils"
	"github.com/GoogleCloudPlatform/compute-image-tools/cli_tools/common/utils/flags"
)
const (
	InstanceNameFlagKey = "instance-name"
	MachineImageNameFlagKey = "machine-image-name"
	ClientIDFlagKey = "client-id"
	DestinationURIFlagKey = "destination-uri"
	ReleaseTrackFlagKey = "release-track"
	OvfFormatFlagKey = "ovf-format"
	mainWorkflowDir = "daisy_workflows/"
	Alpha = "alpha"
	Beta = "beta"
	GA = "ga"
)
type OVFExportArgs struct {
	InstanceName string
	MachineImageName string
	ClientID              string
	ClientVersion         string
	DestinationURI        string
	DiskExportFormat      string
	OsID                  string
	Network               string
	Subnet                string
	NoExternalIP          bool
	Zone                  string
	Timeout               time.Duration
	Project               string
	ScratchBucketGcsPath  string
	Oauth                 string
	Ce                    string
	GcsLogsDisabled       bool
	CloudLogsDisabled     bool
	StdoutLogsDisabled    bool
	ReleaseTrack          string
	BuildID               string
	ComputeServiceAccount string
	WorkflowDir string
	Region      string
	Started     time.Time
	DestinationDirectory string
	OvfName string
}
func NewOVFExportArgs(args []string) (*OVFExportArgs, error) {
	currentExecutablePath := filepath.Dir(os.Args[0])
	ovfExportArgs := &OVFExportArgs{
		WorkflowDir:      toWorkingDir(currentExecutablePath, mainWorkflowDir),
		Started:          time.Now(),
		DiskExportFormat: "vmdk",
		ReleaseTrack:     GA,
	}
	err := ovfExportArgs.registerFlags(args)
	return ovfExportArgs, err
}
func (args *OVFExportArgs) String() string {
	return fmt.Sprintf("%#v", args)
}
func (args *OVFExportArgs) IsInstanceExport() bool {
	return args.InstanceName != ""
}
func (args *OVFExportArgs) IsMachineImageExport() bool {
	return !args.IsInstanceExport()
}