// GetComponent returns a component representation
GetComponent returns a component representation
// GetComponent returns a component representation
func (cfd *ComponentFullDescription) GetComponent() Component {
	cmp := NewComponent(cfd.Name)
	cmp.Spec.App = cfd.Spec.App
	cmp.Spec.Ports = cfd.Spec.Ports
	cmp.Spec.Type = cfd.Spec.Type
	cmp.Spec.SourceType = string(config.LOCAL)
	cmp.Spec.StorageSpec = cfd.Spec.Storage.Items
	cmp.Spec.URLSpec = cfd.Spec.URL.Items
	for _, url := range cfd.Spec.URL.Items {
		cmp.Spec.URL = append(cmp.Spec.URL, url.Name)
	}
	for _, storage := range cfd.Spec.Storage.Items {
		cmp.Spec.Storage = append(cmp.Spec.URL, storage.Name)
	}
	cmp.ObjectMeta.Namespace = cfd.ObjectMeta.Namespace
	cmp.Status = cfd.Status
	cmp.Spec.Env = cfd.Spec.Env
	return cmp
}
func ( cfd * ComponentFullDescription ) GetComponent ( ) Component { cmp := NewComponent ( cfd . Name ) cmp . Spec . App = cfd . Spec . App cmp . Spec . Ports = cfd . Spec . Ports cmp . Spec . Type = cfd . Spec . Type cmp . Spec . SourceType = string ( config . LOCAL ) cmp . Spec . StorageSpec = cfd . Spec . Storage . Items cmp . Spec . URLSpec = cfd . Spec . URL . Items for _ , url := range cfd . Spec . URL . Items { cmp . Spec . URL = append ( cmp . Spec . URL , url . Name ) } for _ , storage := range cfd . Spec . Storage . Items { cmp . Spec . Storage = append ( cmp . Spec . URL , storage . Name ) } cmp . ObjectMeta . Namespace = cfd . ObjectMeta . Namespace cmp . Status = cfd . Status cmp . Spec . Env = cfd . Spec . Env return cmp }
GetComponent returns a component representation
GetComponent returns a component representation