X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fxapp%2Fsubscription.go;h=efaf0f8697e9658c4eabe6db826e6d92eadc5601;hb=dba83dfb6f135fb2f6987e55beec8552c6a8b74e;hp=6a6983ce4bd208a1cb6e0caf0d24ceb5a8c61643;hpb=4623ad98eb5826c5fbb0928c972e9f02bed4a57a;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/subscription.go b/pkg/xapp/subscription.go index 6a6983c..efaf0f8 100755 --- a/pkg/xapp/subscription.go +++ b/pkg/xapp/subscription.go @@ -23,15 +23,16 @@ import ( "bytes" "encoding/json" "fmt" + "io/ioutil" + "net/http" + "os" + "time" + "github.com/go-openapi/loads" httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/runtime/middleware" "github.com/go-openapi/strfmt" "github.com/spf13/viper" - "io/ioutil" - "net/http" - "os" - "time" apiclient "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi" apicommon "gerrit.o-ran-sc.org/r/ric-plt/xapp-frame/pkg/clientapi/common" @@ -236,32 +237,3 @@ func (r *Subscriber) QuerySubscriptions() (models.SubscriptionList, error) { func (r *Subscriber) CreateTransport() *apiclient.RICSubscription { return apiclient.New(httptransport.New(r.remoteHost, r.remoteUrl, r.remoteProt), strfmt.Default) } - -/*func (r *Subscriber) getXappConfig() (appconfig models.XappConfigList, err error) { - - Logger.Error("Inside getXappConfig") - - var metadata models.ConfigMetadata - var xappconfig models.XAppConfig - name := viper.GetString("name") - configtype := "json" - metadata.XappName = &name - metadata.ConfigType = &configtype - - configFile, err := os.Open("/opt/ric/config/config-file.json") - if err != nil { - Logger.Error("Cannot open config file: %v", err) - return nil,errors.New("Could Not parse the config file") - } - - body, err := ioutil.ReadAll(configFile) - - defer configFile.Close() - - xappconfig.Metadata = &metadata - xappconfig.Config = body - - appconfig = append(appconfig,&xappconfig) - - return appconfig,nil -}*/