RIC-961:implement Xn and X2 component IDs correctly in E2M
[ric-plt/e2mgr.git] / E2Manager / mocks / e2t_instances_manager_mock.go
1 //
2 // Copyright 2019 AT&T Intellectual Property
3 // Copyright 2019 Nokia
4 //
5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //      http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 //  This source code is part of the near-RT RIC (RAN Intelligent Controller)
19 //  platform project (RICP).
20
21 package mocks
22
23 import (
24         "gerrit.o-ran-sc.org/r/ric-plt/nodeb-rnib.git/entities"
25         "github.com/stretchr/testify/mock"
26 )
27
28 type E2TInstancesManagerMock struct {
29         mock.Mock
30 }
31
32 func (m *E2TInstancesManagerMock) GetE2TInstance(e2tAddress string) (*entities.E2TInstance, error) {
33         args := m.Called(e2tAddress)
34
35         return args.Get(0).(*entities.E2TInstance), args.Error(1)
36 }
37
38 func (m *E2TInstancesManagerMock) AddE2TInstance(e2tInstanceAddress string, podName string) error {
39         args := m.Called(e2tInstanceAddress, podName)
40         return args.Error(0)
41 }
42
43 func (m *E2TInstancesManagerMock) RemoveE2TInstance(e2tAddress string) error {
44         args := m.Called(e2tAddress)
45         return args.Error(0)
46 }
47
48 func (m *E2TInstancesManagerMock) SelectE2TInstance() (string, error) {
49         args := m.Called()
50         return args.String(0), args.Error(1)
51 }
52
53 func (m *E2TInstancesManagerMock) AddRansToInstance(e2tAddress string, ranNames []string) error {
54         args := m.Called(e2tAddress, ranNames)
55         return args.Error(0)
56
57 }
58
59 func (m *E2TInstancesManagerMock) RemoveRanFromInstance(ranName string, e2tAddress string) error {
60         args := m.Called(ranName, e2tAddress)
61         return args.Error(0)
62
63 }
64
65 func (m *E2TInstancesManagerMock) GetE2TInstances() ([]*entities.E2TInstance, error) {
66         args := m.Called()
67
68         return args.Get(0).([]*entities.E2TInstance), args.Error(1)
69 }
70
71 func (m *E2TInstancesManagerMock) GetE2TInstancesNoLogs() ([]*entities.E2TInstance, error) {
72         args := m.Called()
73
74         return args.Get(0).([]*entities.E2TInstance), args.Error(1)
75 }
76
77 func (m *E2TInstancesManagerMock) ResetKeepAliveTimestamp(e2tAddress string) error {
78         args := m.Called(e2tAddress)
79         return args.Error(0)
80
81 }
82
83 func (m *E2TInstancesManagerMock) SetE2tInstanceState(e2tAddress string, currentState entities.E2TInstanceState, newState entities.E2TInstanceState) error {
84         args := m.Called(e2tAddress, currentState, newState)
85         return args.Error(0)
86 }
87
88 func (m *E2TInstancesManagerMock) GetE2TAddresses() ([]string, error) {
89         args := m.Called()
90         return args.Get(0).([]string), args.Error(1)
91 }
92
93 func (m *E2TInstancesManagerMock) ClearRansOfAllE2TInstances() error {
94         args := m.Called()
95         return args.Error(0)
96 }