-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test.bas
43 lines (29 loc) · 877 Bytes
/
Test.bas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Attribute VB_Name = "Test"
Public Sub CreateCliCmdObject()
baseUrl = "https://enm.example.com"
login = "login"
password = "password"
Dim oEnmCliCmd As clsEnmCliCmd
Set oEnmCliCmd = New clsEnmCliCmd
With oEnmCliCmd
.login baseUrl, login, password
cmd = "cmedit get NetworkElement=Node1"
response = .execute(cmd)
.logout
End With
ActiveSheet.Range("A1") = response
End Sub
Sub Rest_Execution()
baseUrl = "https://enm.example.com"
login = "login"
password = "password"
Dim oEnmRest As clsEnmRest
Set oEnmRest = New clsEnmRest
With oEnmRest
.login baseUrl, login, password
payLoad = "{""name"": ""readCells"",""fdn"": ""NetworkElement=BSC1""}"
response = .execute(payLoad)
.logout
End With
ActiveSheet.Range("A2") = response
End Sub