aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBin Yang <bin.yang@windriver.com>2019-07-23 07:30:35 +0000
committerGerrit Code Review <gerrit@onap.org>2019-07-23 07:30:35 +0000
commitb3df7a557a37cf60a4d549a60651897ef3411b34 (patch)
tree7238d7df7fbb0a804d350c4becf557c03afd5b88
parentf83526881ac7758638b1e7e0e1bcf2ab8cd13133 (diff)
parentbb6e23a2fb0f83bbb2b5f5c31afff83448ae8d8b (diff)
Merge "Adapt network plugin to interface restrictions"
-rw-r--r--src/k8splugin/plugins/network/plugin.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/k8splugin/plugins/network/plugin.go b/src/k8splugin/plugins/network/plugin.go
index e69a075b..ca5aa959 100644
--- a/src/k8splugin/plugins/network/plugin.go
+++ b/src/k8splugin/plugins/network/plugin.go
@@ -18,8 +18,8 @@ import (
"regexp"
utils "github.com/onap/multicloud-k8s/src/k8splugin/internal"
- "github.com/onap/multicloud-k8s/src/k8splugin/internal/app"
"github.com/onap/multicloud-k8s/src/k8splugin/internal/helm"
+ "github.com/onap/multicloud-k8s/src/k8splugin/internal/plugin"
pkgerrors "github.com/pkg/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
@@ -43,7 +43,7 @@ func extractData(data string) (cniType, networkName string) {
}
// Create an ONAP Network object
-func (p networkPlugin) Create(yamlFilePath string, namespace string, client *app.KubernetesClient) (string, error) {
+func (p networkPlugin) Create(yamlFilePath string, namespace string, client plugin.KubernetesConnector) (string, error) {
network := &v1.OnapNetwork{}
if _, err := utils.DecodeYAML(yamlFilePath, network); err != nil {
return "", pkgerrors.Wrap(err, "Decode network object error")
@@ -69,19 +69,19 @@ func (p networkPlugin) Create(yamlFilePath string, namespace string, client *app
}
// Get a Network
-func (p networkPlugin) Get(resource helm.KubernetesResource, namespace string, client *app.KubernetesClient) (string, error) {
+func (p networkPlugin) Get(resource helm.KubernetesResource, namespace string, client plugin.KubernetesConnector) (string, error) {
return "", nil
}
// List of Networks
func (p networkPlugin) List(gvk schema.GroupVersionKind, namespace string,
- client *app.KubernetesClient) ([]helm.KubernetesResource, error) {
+ client plugin.KubernetesConnector) ([]helm.KubernetesResource, error) {
return nil, nil
}
// Delete an existing Network
-func (p networkPlugin) Delete(resource helm.KubernetesResource, namespace string, client *app.KubernetesClient) error {
+func (p networkPlugin) Delete(resource helm.KubernetesResource, namespace string, client plugin.KubernetesConnector) error {
cniType, networkName := extractData(resource.Name)
typePlugin, ok := utils.LoadedPlugins[cniType+"-network"]
if !ok {