Skip to content
This repository has been archived by the owner on Jun 14, 2022. It is now read-only.

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vvsviridov committed Jun 30, 2021
0 parents commit 33c3e35
Show file tree
Hide file tree
Showing 18 changed files with 1,660 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
.vscode
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Vyacheslav Sviridov

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
356 changes: 356 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
# Cli application based on ENM Topology Browser API

[![NPM][npm-badge]][npm]
[![LICENSE][license-badge]][license]
[![dependencies][dependencies-badge]][dependencies-david]

## Main goal

Main features is type suggestions everywhere where it is possible and detailed attributes and values description available in config mode.

## Installation

First you need **node.js** which can be downloaded from official site nodejs.org and installed as described in the docs.

Next clone or download this repository and run from the project root directory ...

```
npm i
```

... to install dependencies,

```
npm link
```

... to add application to your OS $PATH variable if you want to run it from anywhere.
Now you can launch apllication

```
tplg-cli -l USERNAME -p PASSWORD -u https://enm.your.company.domian.com
```

## Usage

Recommended environment is Windows Terminal (not _cmd.exe_) or any shell with rich formatting support. After application successfully launched you'll see root content and available commands.

```
PS C:\> tplg-cli -l USERNAME -p PASSWORD -u https://enm.your.company.domian.com
✔ Login in...
Authentication Successful
✔ Starting Topology Browser...
✔ Reading Topology...
SubNetwork=ONRM_ROOT_MO> (Use arrow keys or type to search)
> SubNetwork=Core
SubNetwork=LTE
SubNetwork=RBS
SubNetwork=RNC
show
config
up
home
exit
```

### Commands

> **Note:** _only `show` command can have parameter, all other commands haven't._
- `show` - shows current object's attributes
- `config` - enters _config_ mode
- `up` - navigate up one level
- `home` - navigate to root folder
- `exit` - logout and exit application

Start typing and you see only matches commands to your input.

```
SubNetwork=ONRM_ROOT_MO> subn
> SubNetwork=Core
SubNetwork=LTE
SubNetwork=RBS
SubNetwork=RNC
SubNetwork=ONRM_ROOT_MO> exi
>exit
```

You can navigate to the next level selecting object ...

```
SubNetwork=ONRM_ROOT_MO> subn
SubNetwork=Core
SubNetwork=LTE
SubNetwork=RBS
> SubNetwork=RNC
SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC>
> MeContext=RNC01
MeContext=RNCTEST
MeContext=TEST
```

View objects attributes ...

```
SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC> show
> show
✔ Reading Topology...
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC
SubNetworkId: RNC
SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC> MeContext=RNC01
> MeContext=RNC01
✔ Reading Topology...
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01> show
> show
✔ Reading Topology...
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01
MeContextId: RNC01
neType: RNC
platformType: CPP
```

... show attributes with filter

```
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01> show type
> show type
✔ Reading Topology...
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01
neType: RNC
platformType: CPP
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01>
```

Return one level up in FDN tree ...

```
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01> up
> up
✔ Reading Topology...
SubNetwork=ONRM_ROOT_MO,SubNetwork=RNC>
```

Return to the root from anywhere ...

```
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01> home
> home
✔ Reading Topology...
SubNetwork=ONRM_ROOT_MO>
```

And logout and exit ...

```
... Network=ONRM_ROOT_MO,SubNetwork=RNC,MeContext=RNC01> exit
> exit
✔ Logout...
Logout OK
PS C:\>
```

### Config Mode

To modify attributes _config_ mode is used.

Available commands are:

- `commit` - commiting changes to the network
- `check` - view configuration changes
- `end` - end config mode without commiting
- `exit` - logout and exit application

```
... ManagedElement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1> config
> config
✔ Reading Attributes...
✔ Reading Attributes Data...
syncStatus: SYNCHRONIZED
ipAddress: 10.10.11.1
managementState: NORMAL
radioAccessTechnology: 4G, 3G
... lement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(config)# (Use arrow keys or type to search)
> acBarringForCsfb
acBarringForEmergency
acBarringForMoData
acBarringForMoSignalling
...
commit
check
end
exit
(Move up and down to reveal more choices)
```

To modify attribute select it ...

```
... lement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(config)# userLabel
... ent=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)#
commit
check
end
exit
> get
set
description
```

Now you can get it ...

```
... ent=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)# get
> get
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RBS,MeContext=ERBS01,ManagedElement=1,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)
userLabel: test1
Type: STRING
```

And set it's value ...

```
... ent=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)# set
? userLabel (STRING): ? test_label
```

Check configuration before applying

```
... ent=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)# check
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RBS,MeContext=ERBS01,ManagedElement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1
userLabel: test_label
```

Applying changes to the network ...

```
... ent=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(userLabel)# commit
FDN: SubNetwork=ONRM_ROOT_MO,SubNetwork=RBS,MeContext=ERBS01,ManagedElement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1
userLabel: test_label
✔ Commiting Config...
Success
```

View attribute's description

```
... lement=ERBS01,ENodeBFunction=1,EUtranCellFDD=test1(config)# acBarringForCsfb
... S01,ENodeBFunction=1,EUtranCellFDD=test1(acBarringForCsfb)# description
acBarringForCsfb: COMPLEX_REF
DESCRIPTION
Access class barring parameters for mobile originating CSFB calls.
The information is broadcasted in SIB2.
TRAFFIC DISTURBANCES
Changing this attribute can cause loss of traffic.
IMMUTABLE
false
ACTIVE CHOICE CASE
null
COMPLEX_REF
AcBarringConfig: AcBarringConfig
acBarringTime: INTEGER default: 64
DESCRIPTION
Mean access barring time in seconds for mobile originating signalling.
IMMUTABLE
false
ACTIVE CHOICE CASE
null
CONSTRAINTS
Nullable: false
Value Resolution: null
acBarringForSpecialAC: LIST default: false,false,false,false,false
DESCRIPTION
Access class barring for AC 11-15. The first instance in the list is for AC 11, second is for AC 12, and so on.
IMMUTABLE
false
ACTIVE CHOICE CASE
null
CONSTRAINTS
Nullable: false
LISTREFERENCE
BOOLEAN
CONSTRAINTS
Nullable: true
acBarringFactor: INTEGER default: 95
DESCRIPTION
If the random number drawn by the UE is lower than this value, access is allowed. Otherwise the access is barred.
IMMUTABLE
false
ACTIVE CHOICE CASE
null
CONSTRAINTS
Nullable: false
Value Resolution: null
```

## Contribution

1. [Fork it]
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Known Issues

### flickering issue

In some windows terminal spinner may look flickery. To fix this you need to modify file ./node_modules/ora/index.js

Add 1 to _clearLine()_ on this line

```javascript
this.stream.clearLine(1);
```

### Issue with type SHORT

EMN returns error if commited configuration includes attributes with type SHORT. It is not an application issue and should be fixed in API by Ericsson.

## Credits

[Contact Me](https://github.com/vvsviridov/) to request new feature or bugs reporting.
Loading

0 comments on commit 33c3e35

Please sign in to comment.