X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=cmd%2Fvesmgr%2Fconfig.go;h=fafb15b81addc70e8156c1489571d89d3fd37913;hb=refs%2Ftags%2F0.4.0;hp=77b4ca8ea712860966496dcd76d6d33cd28922ff;hpb=3e79fbe717397e8996b1c58989750012cb0e767f;p=ric-plt%2Fvespamgr.git diff --git a/cmd/vesmgr/config.go b/cmd/vesmgr/config.go index 77b4ca8..fafb15b 100644 --- a/cmd/vesmgr/config.go +++ b/cmd/vesmgr/config.go @@ -13,6 +13,10 @@ * 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. + * + * This source code is part of the near-RT RIC (RAN Intelligent Controller) + * platform project (RICP). + * */ package main @@ -31,6 +35,7 @@ import ( const defaultReportingEntityID = "00000000-0000-0000-0000-000000000000" const defaultVNFName = "Vespa" +const defaultNFNamingCode = "ricp" func readSystemUUID() string { data, err := ioutil.ReadFile("/sys/class/dmi/id/product_uuid") @@ -48,6 +53,14 @@ func getVNFName() string { return VNFName } +func getNFNamingCode() string { + NFNamingCode := os.Getenv("VESMGR_NFNAMINGCODE") + if NFNamingCode == "" { + return defaultNFNamingCode + } + return NFNamingCode +} + func basicVespaConf() VESAgentConfiguration { var vespaconf = VESAgentConfiguration{ DataDir: "/tmp/data", @@ -57,17 +70,8 @@ func basicVespaConf() VESAgentConfiguration { ReportingEntityName: "Vespa", ReportingEntityID: readSystemUUID(), MaxSize: 2000000, - NfNamingCode: "hsxp", - NfcNamingCodes: []NfcNamingCode{ - NfcNamingCode{ - Type: "oam", - Vnfcs: []string{"lr-ope-0", "lr-ope-1", "lr-ope-2"}, - }, - NfcNamingCode{ - Type: "etl", - Vnfcs: []string{"lr-pro-0", "lr-pro-1"}, - }, - }, + NfNamingCode: getNFNamingCode(), + NfcNamingCodes: []NfcNamingCode{}, RetryInterval: time.Second * 5, MaxMissed: 2, },