From: Abukar Mohamed Date: Mon, 2 Mar 2020 14:44:30 +0000 (+0000) Subject: Update Kubectl and sdlgo versions X-Git-Tag: v0.4.3~2 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=f8b9966cb19eeeffc0100b8bb3a0b66937e51aba;p=ric-plt%2Fappmgr.git Update Kubectl and sdlgo versions Change-Id: Ia3b9249a9ea480693b18f5781e59e75de3b9d5a3 Signed-off-by: Abukar Mohamed --- diff --git a/Dockerfile b/Dockerfile index de76cd8..a19bd1b 100755 --- a/Dockerfile +++ b/Dockerfile @@ -30,7 +30,7 @@ RUN wget -nv https://storage.googleapis.com/kubernetes-helm/helm-${HELMVERSION}- && rm -rf linux-amd64 # Install kubectl from Docker Hub -COPY --from=lachlanevenson/k8s-kubectl:v1.10.3 /usr/local/bin/kubectl /usr/local/bin/kubectl +COPY --from=lachlanevenson/k8s-kubectl:v1.16.0 /usr/local/bin/kubectl /usr/local/bin/kubectl ENV GOPATH="/go" diff --git a/cmd/appmgr.go b/cmd/appmgr.go index b658367..78e7cbc 100755 --- a/cmd/appmgr.go +++ b/cmd/appmgr.go @@ -20,8 +20,8 @@ package main import ( - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restful" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restful" ) func main() { diff --git a/cmd/appmgr/api.go b/cmd/appmgr/api.go deleted file mode 100755 index 7acb7c7..0000000 --- a/cmd/appmgr/api.go +++ /dev/null @@ -1,380 +0,0 @@ -/* -================================================================================== - Copyright (c) 2019 AT&T Intellectual Property. - Copyright (c) 2019 Nokia - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -================================================================================== -*/ - -package main - -import ( - "encoding/json" - "errors" - "github.com/gorilla/mux" - "github.com/spf13/viper" - "log" - "net/http" - "time" -) - -// API functions - -func (m *XappManager) Initialize(h Helmer, cm ConfigMapper) { - m.cm = cm - m.helm = h - m.helm.SetCM(cm) - - m.router = mux.NewRouter().StrictSlash(true) - - resources := []Resource{ - {"GET", "/ric/v1/health/alive", m.getHealthStatus}, - {"GET", "/ric/v1/health/ready", m.getHealthStatus}, - - {"GET", "/ric/v1/xapps", m.getAllXapps}, - {"GET", "/ric/v1/xapps/search", m.searchAllXapps}, - {"GET", "/ric/v1/xapps/{name}", m.getXappByName}, - {"GET", "/ric/v1/xapps/{name}/instances/{id}", m.getXappInstanceByName}, - {"POST", "/ric/v1/xapps", m.deployXapp}, - {"DELETE", "/ric/v1/xapps/{name}", m.undeployXapp}, - - {"GET", "/ric/v1/subscriptions", m.getSubscriptions}, - {"POST", "/ric/v1/subscriptions", m.addSubscription}, - {"GET", "/ric/v1/subscriptions/{id}", m.getSubscription}, - {"DELETE", "/ric/v1/subscriptions/{id}", m.deleteSubscription}, - {"PUT", "/ric/v1/subscriptions/{id}", m.updateSubscription}, - - {"GET", "/ric/v1/config", m.getConfig}, - {"POST", "/ric/v1/config", m.createConfig}, - {"PUT", "/ric/v1/config", m.updateConfig}, - {"DELETE", "/ric/v1/config", m.deleteConfig}, - {"DELETE", "/ric/v1/config/{name}", m.deleteSingleConfig}, - } - - for _, resource := range resources { - handler := LogRestRequests(resource.HandlerFunc) - //handler = m.serviceChecker(handler) - m.router.Methods(resource.Method).Path(resource.Url).Handler(handler) - } - - go m.finalize(h) -} - -func (m *XappManager) finalize(h Helmer) { - m.sd = SubscriptionDispatcher{} - m.sd.Initialize() - - m.helm.Initialize() - - m.notifyClients() - m.ready = true -} - -func (m *XappManager) serviceChecker(inner http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.URL.RequestURI() == "/ric/v1/health/alive" || m.ready == true { - inner.ServeHTTP(w, r) - } else { - respondWithJSON(w, http.StatusServiceUnavailable, nil) - } - }) -} - -// API: XAPP handlers -func (m *XappManager) getHealthStatus(w http.ResponseWriter, r *http.Request) { - respondWithJSON(w, http.StatusOK, nil) -} - -func (m *XappManager) Run() { - host := viper.GetString("local.host") - if host == "" { - host = ":8080" - } - log.Printf("Xapp manager started ... serving on %s\n", host) - - log.Fatal(http.ListenAndServe(host, m.router)) -} - -func (m *XappManager) getXappByName(w http.ResponseWriter, r *http.Request) { - xappName, ok := getResourceId(r, w, "name") - if ok != true { - return - } - - if xapp, err := m.helm.Status(xappName); err == nil { - respondWithJSON(w, http.StatusOK, xapp) - } else { - respondWithError(w, http.StatusNotFound, err.Error()) - } -} - -func (m *XappManager) getXappInstanceByName(w http.ResponseWriter, r *http.Request) { - xappName, ok := getResourceId(r, w, "name") - if ok != true { - return - } - - xapp, err := m.helm.Status(xappName) - if err != nil { - respondWithError(w, http.StatusNotFound, err.Error()) - return - } - - xappInstanceName, ok := getResourceId(r, w, "id") - if ok != true { - return - } - - for _, v := range xapp.Instances { - if v.Name == xappInstanceName { - respondWithJSON(w, http.StatusOK, v) - return - } - } - Logger.Error("Xapp instance not found - url=%s", r.URL.RequestURI()) - - respondWithError(w, http.StatusNotFound, "Xapp instance not found") -} - -func (m *XappManager) getAllXapps(w http.ResponseWriter, r *http.Request) { - xapps, err := m.helm.StatusAll() - if err != nil { - respondWithError(w, http.StatusInternalServerError, err.Error()) - return - } - - respondWithJSON(w, http.StatusOK, xapps) -} - -func (m *XappManager) searchAllXapps(w http.ResponseWriter, r *http.Request) { - respondWithJSON(w, http.StatusOK, m.helm.SearchAll()) -} - -func (m *XappManager) deployXapp(w http.ResponseWriter, r *http.Request) { - if r.Body == nil { - Logger.Error("No xapp data found in request body - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusMethodNotAllowed, "No xapp data!") - return - } - - var cm XappDeploy - if err := json.NewDecoder(r.Body).Decode(&cm); err != nil { - Logger.Error("Invalid xapp data in request body - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusMethodNotAllowed, "Invalid xapp data!") - return - } - defer r.Body.Close() - - xapp, err := m.helm.Install(cm) - if err != nil { - respondWithError(w, http.StatusInternalServerError, err.Error()) - return - } - - for i := 0; i < 3; i++ { - if xapp, err = m.helm.Status(xapp.Name); xapp.Instances != nil { - break - } - time.Sleep(time.Duration(5) * time.Second) - } - - respondWithJSON(w, http.StatusCreated, xapp) - - m.sd.Publish(xapp, EventType("created")) -} - -func (m *XappManager) undeployXapp(w http.ResponseWriter, r *http.Request) { - xappName, ok := getResourceId(r, w, "name") - if ok != true { - return - } - - xapp, err := m.helm.Delete(xappName) - if err != nil { - respondWithError(w, http.StatusInternalServerError, err.Error()) - return - } - - respondWithJSON(w, http.StatusNoContent, nil) - - m.sd.Publish(xapp, EventType("deleted")) -} - -// API: resthook handlers -func (m *XappManager) getSubscriptions(w http.ResponseWriter, r *http.Request) { - respondWithJSON(w, http.StatusOK, m.sd.GetAll()) -} - -func (m *XappManager) getSubscription(w http.ResponseWriter, r *http.Request) { - if id, ok := getResourceId(r, w, "id"); ok == true { - if s, ok := m.sd.Get(id); ok { - respondWithJSON(w, http.StatusOK, s) - } else { - Logger.Error("Subscription not found - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusNotFound, "Subscription not found") - } - } -} - -func (m *XappManager) deleteSubscription(w http.ResponseWriter, r *http.Request) { - if id, ok := getResourceId(r, w, "id"); ok == true { - if _, ok := m.sd.Delete(id); ok { - respondWithJSON(w, http.StatusNoContent, nil) - } else { - Logger.Error("Subscription not found - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusNotFound, "Subscription not found") - } - } -} - -func (m *XappManager) addSubscription(w http.ResponseWriter, r *http.Request) { - var req SubscriptionReq - if r.Body == nil || json.NewDecoder(r.Body).Decode(&req) != nil { - Logger.Error("Invalid request payload - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusMethodNotAllowed, "Invalid request payload") - return - } - defer r.Body.Close() - - respondWithJSON(w, http.StatusCreated, m.sd.Add(req)) -} - -func (m *XappManager) updateSubscription(w http.ResponseWriter, r *http.Request) { - if id, ok := getResourceId(r, w, "id"); ok == true { - var req SubscriptionReq - if r.Body == nil || json.NewDecoder(r.Body).Decode(&req) != nil { - Logger.Error("Invalid request payload - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusMethodNotAllowed, "Invalid request payload") - return - } - defer r.Body.Close() - - if s, ok := m.sd.Update(id, req); ok { - respondWithJSON(w, http.StatusOK, s) - } else { - Logger.Error("Subscription not found - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusNotFound, "Subscription not found") - } - } -} - -func (m *XappManager) notifyClients() { - xapps, err := m.helm.StatusAll() - if err != nil { - Logger.Info("Couldn't fetch xapps status information: %v", err.Error()) - return - } - - m.sd.notifyClients(xapps, "updated") -} - -func (m *XappManager) getConfig(w http.ResponseWriter, r *http.Request) { - cfg := m.cm.UploadConfig() - respondWithJSON(w, http.StatusOK, cfg) -} - -func (m *XappManager) createConfig(w http.ResponseWriter, r *http.Request) { - var c XAppConfig - if parseConfig(w, r, &c) != nil { - return - } - - if errList, err := m.cm.CreateConfigMap(c); err != nil { - if err.Error() != "Validation failed!" { - respondWithError(w, http.StatusInternalServerError, err.Error()) - } else { - respondWithJSON(w, http.StatusUnprocessableEntity, errList) - } - return - } - respondWithJSON(w, http.StatusCreated, c.Metadata) -} - -func (m *XappManager) updateConfig(w http.ResponseWriter, r *http.Request) { - var c XAppConfig - if parseConfig(w, r, &c) != nil { - return - } - - if errList, err := m.cm.UpdateConfigMap(c); err != nil { - if err.Error() != "Validation failed!" { - respondWithError(w, http.StatusInternalServerError, err.Error()) - } else { - respondWithJSON(w, http.StatusInternalServerError, errList) - } - return - } - respondWithJSON(w, http.StatusOK, c.Metadata) -} - -func (m *XappManager) deleteSingleConfig(w http.ResponseWriter, r *http.Request) { - xappName, ok := getResourceId(r, w, "name") - if ok != true { - return - } - - md := ConfigMetadata{Name: xappName, Namespace: m.cm.GetNamespace(""), ConfigName: xappName + "-appconfig"} - m.delConfig(w, XAppConfig{Metadata: md}) -} - -func (m *XappManager) deleteConfig(w http.ResponseWriter, r *http.Request) { - var c XAppConfig - if parseConfig(w, r, &c) != nil { - return - } - - m.delConfig(w, c) -} - -func (m *XappManager) delConfig(w http.ResponseWriter, c XAppConfig) { - if _, err := m.cm.DeleteConfigMap(c); err != nil { - respondWithError(w, http.StatusInternalServerError, err.Error()) - return - } - respondWithJSON(w, http.StatusNoContent, nil) -} - -// Helper functions -func respondWithError(w http.ResponseWriter, code int, message string) { - respondWithJSON(w, code, map[string]string{"error": message}) -} - -func respondWithJSON(w http.ResponseWriter, code int, payload interface{}) { - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(code) - if payload != nil { - response, _ := json.Marshal(payload) - w.Write(response) - } -} - -func getResourceId(r *http.Request, w http.ResponseWriter, pattern string) (id string, ok bool) { - if id, ok = mux.Vars(r)[pattern]; ok != true { - Logger.Error("Couldn't resolve name/id from the request URL") - respondWithError(w, http.StatusMethodNotAllowed, "Couldn't resolve name/id from the request URL") - return - } - return -} - -func parseConfig(w http.ResponseWriter, r *http.Request, req *XAppConfig) error { - if r.Body == nil || json.NewDecoder(r.Body).Decode(&req) != nil { - Logger.Error("Invalid request payload - url=%s", r.URL.RequestURI()) - respondWithError(w, http.StatusMethodNotAllowed, "Invalid request payload") - return errors.New("Invalid payload") - } - defer r.Body.Close() - - return nil -} diff --git a/container-tag.yaml b/container-tag.yaml index fe1699b..6fc9ff3 100755 --- a/container-tag.yaml +++ b/container-tag.yaml @@ -1,4 +1,4 @@ # The Jenkins job uses this string for the tag in the image name # for example nexus3.o-ran-sc.org:10004/my-image-name:my-tag --- -tag: '0.3.3' +tag: '0.4.1' diff --git a/go.mod b/go.mod index 535dd89..ef703c7 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,14 @@ -module gerrit.oran-osc.org/r/ric-plt/appmgr +module gerrit.o-ran-sc.org/r/ric-plt/appmgr go 1.12 +replace gerrit.o-ran-sc.org/r/ric-plt/sdlgo => gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.5.2 + +replace gerrit.o-ran-sc.org/r/com/golog => gerrit.o-ran-sc.org/r/com/golog.git v0.0.1 + require ( gerrit.o-ran-sc.org/r/com/golog v0.0.1 - gerrit.oran-osc.org/r/ric-plt/sdlgo v0.0.0 + gerrit.o-ran-sc.org/r/ric-plt/sdlgo v0.0.0-00010101000000-000000000000 github.com/BurntSushi/toml v0.3.1 // indirect github.com/RaveNoX/go-jsonmerge v1.0.0 github.com/fsnotify/fsnotify v1.4.7 @@ -26,9 +30,7 @@ require ( github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.1.0 + golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56 // indirect golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 + golang.org/x/tools v0.0.0-20190617190820-da514acc4774 // indirect ) - -replace gerrit.oran-osc.org/r/ric-plt/sdlgo => gerrit.oran-osc.org/r/ric-plt/sdlgo.git v0.0.1 - -replace gerrit.o-ran-sc.org/r/com/golog => gerrit.o-ran-sc.org/r/com/golog.git v0.0.1 diff --git a/go.sum b/go.sum index 73d7342..6d3b60b 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ gerrit.o-ran-sc.org/r/com/golog.git v0.0.1 h1:9RfO/Whehaaq5KiJTT7s+YOzmi9mT1C3HktfhwwMEmw= gerrit.o-ran-sc.org/r/com/golog.git v0.0.1/go.mod h1:b8YB31U8/4iRpABioeSzGi/YMzOQ/Zq7hrJmmXKqlJk= gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.1.1/go.mod h1:2Y8gw2jqj9urI8VFqFQn7BX0J3A852+YrXVV9V8gOt4= +gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.5.2 h1:UK7awyRKIkVdokWvvkYvazlg3EWIfMnIqCcJxTnLlDA= +gerrit.o-ran-sc.org/r/ric-plt/sdlgo.git v0.5.2/go.mod h1:y2WhrCvdLkAKdH+ySdHSOSehACJkTMyZghCGVcqoZzc= gerrit.oran-osc.org/r/ric-plt/sdlgo.git v0.0.1 h1:l2dl31r++3xhgCumTzwvuo0/F415eqU4aFk/uDQ4WnM= gerrit.oran-osc.org/r/ric-plt/sdlgo.git v0.0.1/go.mod h1:LVhkNS82IofJTBK/VYPKiYed9MG/3OFwvWC6MGSDw1w= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= @@ -89,6 +91,8 @@ github.com/go-openapi/validate v0.19.4 h1:LGjO87VyXY3bIKjlYpXSFuLRG2mTeuYlZyeNwF github.com/go-openapi/validate v0.19.4/go.mod h1:BkJ0ZmXui7yB0bJXWSXgLPNTmbLVeX/3D1xn/N9mMUM= github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-redis/redis v6.15.3+incompatible h1:NZ0O90AhLSvSrvLZ/S9h7D4kl1mW2PrKyxL7MyBKO2g= +github.com/go-redis/redis v6.15.3+incompatible/go.mod h1:W2YCLaZryXHirdd9QqwkiVUxCQsrx8SbLq9Uqk7JS7A= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= @@ -187,6 +191,7 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a h1:1n5lsVfiQW3yfsRGu98756EH1YthsFqr/5mxHduZW2A= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/pkg/appmgr/appmgr.go b/pkg/appmgr/appmgr.go index 2bd1d59..26a0453 100755 --- a/pkg/appmgr/appmgr.go +++ b/pkg/appmgr/appmgr.go @@ -21,7 +21,7 @@ package appmgr import ( "flag" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/logger" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/logger" "github.com/fsnotify/fsnotify" "github.com/spf13/viper" "log" @@ -68,5 +68,5 @@ func loadConfig() { func Init() { loadConfig() Logger = logger.NewLogger("appmgr") - Logger.SetMdc("xm", "0.3.3") + Logger.SetMdc("xm", "0.4.1") } diff --git a/pkg/appmgr/types.go b/pkg/appmgr/types.go index 9b49b25..6000edb 100755 --- a/pkg/appmgr/types.go +++ b/pkg/appmgr/types.go @@ -20,7 +20,7 @@ package appmgr import ( - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" ) type ConfigMap struct { diff --git a/pkg/cm/cm.go b/pkg/cm/cm.go index fb80276..9ff2876 100755 --- a/pkg/cm/cm.go +++ b/pkg/cm/cm.go @@ -33,9 +33,9 @@ import ( "github.com/valyala/fastjson" "github.com/xeipuuv/gojsonschema" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/util" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/util" ) type CM struct{} @@ -311,4 +311,4 @@ func (cm *CM) doValidate(schema, cfg interface{}) (errList models.ConfigValidati appmgr.Logger.Info("Config validation successful!") return -} \ No newline at end of file +} diff --git a/pkg/cm/cm_test.go b/pkg/cm/cm_test.go index 56b2250..01f5bc5 100755 --- a/pkg/cm/cm_test.go +++ b/pkg/cm/cm_test.go @@ -26,9 +26,9 @@ import ( "reflect" "testing" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/util" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/util" ) var helmSearchOutput = ` diff --git a/pkg/helm/helm.go b/pkg/helm/helm.go index 886d015..345ea45 100755 --- a/pkg/helm/helm.go +++ b/pkg/helm/helm.go @@ -30,10 +30,10 @@ import ( "strings" "time" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/cm" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/util" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/cm" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/util" ) type Helm struct { diff --git a/pkg/helm/helm_test.go b/pkg/helm/helm_test.go index 2c08afb..27f53a7 100755 --- a/pkg/helm/helm_test.go +++ b/pkg/helm/helm_test.go @@ -25,9 +25,9 @@ import ( "strconv" "testing" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/util" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/util" ) var helmStatusOutput = ` diff --git a/pkg/restful/restful.go b/pkg/restful/restful.go index e4c149e..9124ecd 100755 --- a/pkg/restful/restful.go +++ b/pkg/restful/restful.go @@ -24,18 +24,18 @@ import ( "os" "time" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restapi" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restapi/operations" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restapi/operations/health" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restapi/operations/xapp" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restapi" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restapi/operations" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restapi/operations/health" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restapi/operations/xapp" "github.com/go-openapi/loads" "github.com/go-openapi/runtime/middleware" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/cm" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/helm" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/resthooks" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/cm" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/helm" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/resthooks" ) func NewRestful() *Restful { diff --git a/pkg/restful/types.go b/pkg/restful/types.go index 189962d..fbbf294 100755 --- a/pkg/restful/types.go +++ b/pkg/restful/types.go @@ -22,10 +22,10 @@ package restful import ( "net/http" - cfgmap "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/cm" - helmer "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/helm" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/restapi/operations" - resthook "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/resthooks" + cfgmap "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/cm" + helmer "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/helm" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/restapi/operations" + resthook "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/resthooks" ) type CmdOptions struct { diff --git a/pkg/resthooks/resthooks.go b/pkg/resthooks/resthooks.go index 471eec1..dd3a578 100755 --- a/pkg/resthooks/resthooks.go +++ b/pkg/resthooks/resthooks.go @@ -22,14 +22,14 @@ package resthooks import ( "bytes" "encoding/json" - sdl "gerrit.oran-osc.org/r/ric-plt/sdlgo" + sdl "gerrit.o-ran-sc.org/r/ric-plt/sdlgo" cmap "github.com/orcaman/concurrent-map" "github.com/segmentio/ksuid" "net/http" "time" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" ) func NewResthook(restoreData bool) *Resthook { diff --git a/pkg/resthooks/resthooks_test.go b/pkg/resthooks/resthooks_test.go index 176fd2d..14f7016 100755 --- a/pkg/resthooks/resthooks_test.go +++ b/pkg/resthooks/resthooks_test.go @@ -24,8 +24,8 @@ import ( "os" "testing" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" ) var rh *Resthook diff --git a/pkg/resthooks/types.go b/pkg/resthooks/types.go index e613476..2229abe 100755 --- a/pkg/resthooks/types.go +++ b/pkg/resthooks/types.go @@ -20,11 +20,11 @@ package resthooks import ( - sdl "gerrit.oran-osc.org/r/ric-plt/sdlgo" + sdl "gerrit.o-ran-sc.org/r/ric-plt/sdlgo" cmap "github.com/orcaman/concurrent-map" "net/http" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/models" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/models" ) type SubscriptionInfo struct { diff --git a/pkg/util/util.go b/pkg/util/util.go index 8ea4d40..d0f9bc9 100755 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -28,7 +28,7 @@ import ( "strings" "time" - "gerrit.oran-osc.org/r/ric-plt/appmgr/pkg/appmgr" + "gerrit.o-ran-sc.org/r/ric-plt/appmgr/pkg/appmgr" ) var execCommand = exec.Command