summaryrefslogtreecommitdiffstats
path: root/src/rsync/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/rsync/pkg')
-rw-r--r--src/rsync/pkg/client/client.go2
-rw-r--r--src/rsync/pkg/grpc/installappserver/installappserver.go3
-rw-r--r--src/rsync/pkg/grpc/register.go40
3 files changed, 2 insertions, 43 deletions
diff --git a/src/rsync/pkg/client/client.go b/src/rsync/pkg/client/client.go
index 0eaded22..a489b951 100644
--- a/src/rsync/pkg/client/client.go
+++ b/src/rsync/pkg/client/client.go
@@ -187,4 +187,4 @@ func (c *Client) IsReachable() error {
return fmt.Errorf("Kubernetes cluster unreachable")
}
return nil
-} \ No newline at end of file
+}
diff --git a/src/rsync/pkg/grpc/installappserver/installappserver.go b/src/rsync/pkg/grpc/installappserver/installappserver.go
index d70000c0..3a24dab8 100644
--- a/src/rsync/pkg/grpc/installappserver/installappserver.go
+++ b/src/rsync/pkg/grpc/installappserver/installappserver.go
@@ -16,10 +16,9 @@ package installappserver
import (
"context"
"encoding/json"
- "log"
-
con "github.com/onap/multicloud-k8s/src/rsync/pkg/context"
"github.com/onap/multicloud-k8s/src/rsync/pkg/grpc/installapp"
+ "log"
)
type installappServer struct {
diff --git a/src/rsync/pkg/grpc/register.go b/src/rsync/pkg/grpc/register.go
index fb462505..60bd50d6 100644
--- a/src/rsync/pkg/grpc/register.go
+++ b/src/rsync/pkg/grpc/register.go
@@ -19,8 +19,6 @@ import (
"strings"
log "github.com/onap/multicloud-k8s/src/orchestrator/pkg/infra/logutils"
- controller "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module/controller"
- mtypes "github.com/onap/multicloud-k8s/src/orchestrator/pkg/module/types"
)
const default_host = "localhost"
@@ -58,41 +56,3 @@ func GetServerHostPort() (string, int) {
}
return host, port
}
-
-func RegisterGrpcServer(host string, port int) error {
- // expect name of this rsync program to be in env variable "RSYNC_NAME" - e.g. RSYNC_NAME="rsync"
- // This will be the name of the controller that is registered in the orchestrator controller API
- // This same name will be used as the key name for intents in the deployment intent group
- serviceName := os.Getenv(ENV_RSYNC_NAME)
- if serviceName == "" {
- serviceName = default_rsync_name
- log.Info("Using default name for rsync service name", log.Fields{
- "Name": serviceName,
- })
- }
-
- client := controller.NewControllerClient()
-
- // Create or update the controller entry
- controller := controller.Controller{
- Metadata: mtypes.Metadata{
- Name: serviceName,
- },
- Spec: controller.ControllerSpec{
- Host: host,
- Port: port,
- Type: controller.CONTROLLER_TYPE_ACTION,
- Priority: controller.MinControllerPriority,
- },
- }
- _, err := client.CreateController(controller, true)
- if err != nil {
- log.Error("Failed to create/update a gRPC controller", log.Fields{
- "Error": err,
- "Controller": serviceName,
- })
- return err
- }
-
- return nil
-}