RIC-961:implement Xn and X2 component IDs correctly in E2M
[ric-plt/e2mgr.git] / E2Manager / mocks / nodeb_controller_mock.go
index eafc935..923955a 100644 (file)
@@ -1,6 +1,7 @@
 //
 // Copyright 2019 AT&T Intellectual Property
 // Copyright 2019 Nokia
+// Copyright (c) 2020 Samsung Electronics Co., Ltd. All Rights Reserved.
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,6 +16,9 @@
 // limitations under the License.
 //
 
+//  This source code is part of the near-RT RIC (RAN Intelligent Controller)
+//  platform project (RICP).
+
 package mocks
 
 import (
@@ -42,6 +46,17 @@ func (c *NodebControllerMock) GetNodebIdList(writer http.ResponseWriter, r *http
        c.Called()
 }
 
+func (c *NodebControllerMock) GetNodebId(writer http.ResponseWriter, r *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusOK)
+
+       vars := mux.Vars(r)
+       ranName := vars["ranName"]
+
+       writer.Write([]byte(ranName))
+       c.Called()
+}
+
 func (c *NodebControllerMock) Shutdown(writer http.ResponseWriter, r *http.Request) {
        c.Called()
 }
@@ -58,16 +73,42 @@ func (c *NodebControllerMock) X2Reset(writer http.ResponseWriter, r *http.Reques
        c.Called()
 }
 
-func (c *NodebControllerMock) X2Setup(writer http.ResponseWriter, r *http.Request) {
+func (c *NodebControllerMock) UpdateGnb(writer http.ResponseWriter, r *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusOK)
+
+       c.Called()
+}
+
+func (c *NodebControllerMock) UpdateEnb(writer http.ResponseWriter, r *http.Request) {
        writer.Header().Set("Content-Type", "application/json")
        writer.WriteHeader(http.StatusOK)
 
        c.Called()
 }
 
-func (c *NodebControllerMock) EndcSetup(writer http.ResponseWriter, r *http.Request) {
+func (c *NodebControllerMock) AddEnb(writer http.ResponseWriter, r *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusCreated)
+       c.Called()
+}
+
+func (c *NodebControllerMock) DeleteEnb(writer http.ResponseWriter, r *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusNoContent)
+       c.Called()
+}
+
+func (c *NodebControllerMock) SetGeneralConfiguration(writer http.ResponseWriter, r *http.Request) {
        writer.Header().Set("Content-Type", "application/json")
        writer.WriteHeader(http.StatusOK)
 
        c.Called()
 }
+
+func (c *NodebControllerMock) HealthCheckRequest(writer http.ResponseWriter, r *http.Request) {
+       writer.Header().Set("Content-Type", "application/json")
+       writer.WriteHeader(http.StatusAccepted)
+
+       c.Called()
+}