docker run -d --name dbass -p 6379:6379 --env DBAAS_SERVICE_HOST=10.0.2.15 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/dbass:1.0.0
-#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RIC_ID="bbbccc-abcd0e/20" --env RMR_VCTL_FILE=/tmp/rmr.verbose nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
-docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RIC_ID="bbbccc-abcd0e/20" --env RMR_VCTL_FILE=/tmp/rmr.verbose snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
+#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RMR_VCTL_FILE=/tmp/rmr.verbose nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
+docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env DBAAS_SERVICE_HOST=10.0.2.15 --env RMR_VCTL_FILE=/tmp/rmr.verbose snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
#docker cp e2mgr:/opt/E2Manager/router.txt .
sleep 2
#docker create --name e2 --env sctp=5577 --env nano=38000 --env loglevel=debug --env print=1 -p 38000:38000 nexus3.o-ran-sc.org:10004/ric-plt-e2:$E2T_TAG
docker rm -f e2mgr
#docker pull nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
docker pull snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
-#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 RIC_ID="bbbccc-abcd0e/20" nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
-docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 RIC_ID="bbbccc-abcd0e/20" snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
+#docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 nexus3.o-ran-sc.org:10004/ric-plt-e2mgr:$E2M_TAG
+docker run -d --name e2mgr -p 3800:3800 -p 3801:3801 --env RMR_RTG_SVC=10.0.2.15 --env DBAAS_SERVICE_HOST=10.0.2.15 snapshot.docker.ranco-dev-tools.eastus.cloudapp.azure.com:10001/e2mgr:$E2M_TAG
docker ps
fi
\ No newline at end of file
// This source code is part of the near-RT RIC (RAN Intelligent Controller)
// platform project (RICP).
-
package configuration
import (
MaxMsgSize int
}
RoutingManager struct {
- BaseUrl string
- }
- RicId struct {
- PlmnId string
- RicNearRtId string
+ BaseUrl string
}
NotificationResponseBuffer int
BigRedButtonTimeoutSec int
MaxConnectionAttempts int
MaxRnibConnectionAttempts int
RnibRetryIntervalMs int
- KeepAliveResponseTimeoutMs int
+ KeepAliveResponseTimeoutMs int
KeepAliveDelayMs int
E2TInstanceDeletionTimeoutMs int
+ GlobalRicId struct {
+ PlmnId string
+ RicNearRtId string
+ }
}
func ParseConfiguration() *Configuration {
config.KeepAliveResponseTimeoutMs = viper.GetInt("keepAliveResponseTimeoutMs")
config.KeepAliveDelayMs = viper.GetInt("KeepAliveDelayMs")
config.E2TInstanceDeletionTimeoutMs = viper.GetInt("e2tInstanceDeletionTimeoutMs")
+ config.populateGlobalRicIdConfig(viper.Sub("globalRicId"))
return &config
}
}
c.RoutingManager.BaseUrl = rmConfig.GetString("baseUrl")
}
+
+func (c *Configuration) populateGlobalRicIdConfig(globalRicIdConfig *viper.Viper) {
+ if globalRicIdConfig == nil {
+ panic(fmt.Sprintf("#configuration.populateGlobalRicIdConfig - failed to populate Global RicId configuration: The entry 'globalRicId' not found\n"))
+ }
+ c.GlobalRicId.PlmnId = globalRicIdConfig.GetString("plmnId")
+ c.GlobalRicId.RicNearRtId = globalRicIdConfig.GetString("ricNearRtId")
+}
assert.Equal(t, 4500, config.KeepAliveResponseTimeoutMs)
assert.Equal(t, 1500, config.KeepAliveDelayMs)
assert.Equal(t, 15000, config.E2TInstanceDeletionTimeoutMs)
+ assert.NotNil(t, config.GlobalRicId)
+ assert.NotEmpty(t, config.GlobalRicId.PlmnId)
+ assert.NotEmpty(t, config.GlobalRicId.RicNearRtId)
}
func TestParseConfigurationFileNotFoundFailure(t *testing.T) {
"logging": map[string]interface{}{"logLevel": "info"},
"http": map[string]interface{}{"port": 3800},
"routingManager": map[string]interface{}{"baseUrl": "http://iltlv740.intl.att.com:8080/ric/v1/handles/"},
+ "globalRicId": map[string]interface{}{"plmnId": "131014", "ricNearRtId": "556670"},
}
buf, err := yaml.Marshal(yamlMap)
if err != nil {
"rmr": map[string]interface{}{"port": 3801, "maxMsgSize": 4096},
"http": map[string]interface{}{"port": 3800},
"routingManager": map[string]interface{}{"baseUrl": "http://iltlv740.intl.att.com:8080/ric/v1/handles/"},
+ "globalRicId": map[string]interface{}{"plmnId": "131014", "ricNearRtId": "556670"},
}
buf, err := yaml.Marshal(yamlMap)
if err != nil {
"rmr": map[string]interface{}{"port": 3801, "maxMsgSize": 4096},
"logging": map[string]interface{}{"logLevel": "info"},
"routingManager": map[string]interface{}{"baseUrl": "http://iltlv740.intl.att.com:8080/ric/v1/handles/"},
+ "globalRicId": map[string]interface{}{"plmnId": "131014", "ricNearRtId": "556670"},
}
buf, err := yaml.Marshal(yamlMap)
if err != nil {
"rmr": map[string]interface{}{"port": 3801, "maxMsgSize": 4096},
"logging": map[string]interface{}{"logLevel": "info"},
"http": map[string]interface{}{"port": 3800},
+ "globalRicId": map[string]interface{}{"plmnId": "131014", "ricNearRtId": "556670"},
}
buf, err := yaml.Marshal(yamlMap)
if err != nil {
assert.PanicsWithValue(t, "#configuration.populateRoutingManagerConfig - failed to populate Routing Manager configuration: The entry 'routingManager' not found\n",
func() { ParseConfiguration() })
}
+
+func TestGlobalRicIdConfigNotFoundFailure(t *testing.T) {
+ configPath := "../resources/configuration.yaml"
+ configPathTmp := "../resources/configuration.yaml_tmp"
+ err := os.Rename(configPath, configPathTmp)
+ if err != nil {
+ t.Errorf("#TestGlobalRicIdConfigNotFoundFailure - failed to rename configuration file: %s\n", configPath)
+ }
+ defer func() {
+ err = os.Rename(configPathTmp, configPath)
+ if err != nil {
+ t.Errorf("#TestGlobalRicIdConfigNotFoundFailure - failed to rename configuration file: %s\n", configPath)
+ }
+ }()
+ yamlMap := map[string]interface{}{
+ "rmr": map[string]interface{}{"port": 3801, "maxMsgSize": 4096},
+ "logging": map[string]interface{}{"logLevel": "info"},
+ "http": map[string]interface{}{"port": 3800},
+ "routingManager": map[string]interface{}{"baseUrl": "http://iltlv740.intl.att.com:8080/ric/v1/handles/"},
+ }
+ buf, err := yaml.Marshal(yamlMap)
+ if err != nil {
+ t.Errorf("#TestGlobalRicIdConfigNotFoundFailure - failed to marshal configuration map\n")
+ }
+ err = ioutil.WriteFile("../resources/configuration.yaml", buf, 0644)
+ if err != nil {
+ t.Errorf("#TestGlobalRicIdConfigNotFoundFailure - failed to write configuration file: %s\n", configPath)
+ }
+ assert.PanicsWithValue(t, "#configuration.populateGlobalRicIdConfig - failed to populate Global RicId configuration: The entry 'globalRicId' not found\n",
+ func() { ParseConfiguration() })
+}