diff options
author | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-04-16 12:07:51 -0700 |
---|---|---|
committer | Kiran Kamineni <kiran.k.kamineni@intel.com> | 2019-04-16 12:07:55 -0700 |
commit | 244578803033f17781b10be283aef43fa6f0aa60 (patch) | |
tree | 8654944fbfcb77594f9f1cc8f367e97c4ace3ee3 /src/k8splugin/internal | |
parent | ef27495f054957e387c4f078dc9b9af9e40a2acc (diff) |
Rename plugin reference interface
Rename the plugin interface to something
more relevant. KubernetesResource will be
used to describe resources for creation.
Issue-ID: MULTICLOUD-557
Change-Id: I2fff5363b897b968e95b26257d8f26509fb567fd
Signed-off-by: Kiran Kamineni <kiran.k.kamineni@intel.com>
Diffstat (limited to 'src/k8splugin/internal')
-rw-r--r-- | src/k8splugin/internal/app/client.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/k8splugin/internal/app/client.go b/src/k8splugin/internal/app/client.go index cd1ec8a2..9b8873cc 100644 --- a/src/k8splugin/internal/app/client.go +++ b/src/k8splugin/internal/app/client.go @@ -30,8 +30,8 @@ import ( "k8s.io/helm/pkg/tiller" ) -// KubernetesResource is the interface that is implemented -type KubernetesResource interface { +// PluginReference is the interface that is implemented +type PluginReference interface { Create(yamlFilePath string, namespace string, client *KubernetesClient) (string, error) Delete(kind string, name string, namespace string, client *KubernetesClient) error } @@ -125,9 +125,10 @@ func (k *KubernetesClient) createGeneric(kind string, files []string, namespace return nil, pkgerrors.Wrap(err, "No ExportedVariable symbol found") } - genericPlugin, ok := symbol.(KubernetesResource) + //Assert if it implements the PluginReference interface + genericPlugin, ok := symbol.(PluginReference) if !ok { - return nil, pkgerrors.New("ExportedVariable is not KubernetesResource type") + return nil, pkgerrors.New("ExportedVariable is not PluginReference type") } //Iterate over each file of a particular kind here @@ -244,10 +245,10 @@ func (k *KubernetesClient) deleteGeneric(kind string, resources []string, namesp return pkgerrors.Wrap(err, "No ExportedVariable symbol found") } - //Assert that it implements the KubernetesResource - genericPlugin, ok := symbol.(KubernetesResource) + //Assert that it implements the PluginReference interface + genericPlugin, ok := symbol.(PluginReference) if !ok { - return pkgerrors.New("ExportedVariable is not KubernetesResource type") + return pkgerrors.New("ExportedVariable is not PluginReference type") } for _, res := range resources { |