Skip to content

Commit

Permalink
Merge branch 'dev_edgecore'
Browse files Browse the repository at this point in the history
  • Loading branch information
unkn0wn-user committed Dec 18, 2020
2 parents ae2d189 + d918756 commit 2820109
Show file tree
Hide file tree
Showing 346 changed files with 12,459 additions and 198 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ dmypy.json

# Tests
/test_cases/integration_tests/alcatel/output.txt
/test_cases/integration_tests/huawei/output.txt
/test_cases/integration_tests/huawei/output.txt
/test_cases/integration_tests/keymile/output.txt
/test_cases/integration_tests/edgecore/output.txt
/test_cases/integration_tests/pbn/output.txt
/test_cases/integration_tests/zhone/output.txt
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ Click [here](https://thola.io/posts/thola-fosdem/) for more information
### Supported Vendors
- Alcatel (nearly feature complete)
- Huawei (nearly feature complete)
- Edgecore (not implemented yet)
- Keymile (work in progress)
- Edgecore (nearly feature complete)
- Keymile (nearly feature complete)
- Pbn (not implemented yet)
- Zhone (not implemented yet)
- Zhone (work in progress)

### Supported network components

Expand All @@ -51,6 +51,7 @@ Click [here](https://thola.io/posts/thola-fosdem/) for more information
- ONTs
- CPEs
- Vlans
- Interfaces


## Download
Expand Down
16 changes: 8 additions & 8 deletions bootup/conf/bootstraps/create-alcatel-7360.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,21 @@ req='{

box_id=$(create_resource "$req" $ENDPOINT/boxen) || exit 1

# Create login credentials at the switch (admin operation)
# Admin user
req='{
"username": "admin",
"password": "secret"
"name": "Admin"
}'

admin_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)
admin_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)

# Admin user
# Create login credentials at the switch (admin operation)
req='{
"name": "admin",
"credentials_id": '$admin_credential_id'
"username": "admin",
"password": "secret",
"user_id": '$admin_id'
}'

admin_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)
admin_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

# PortProfile 1
req='{
Expand Down
154 changes: 154 additions & 0 deletions bootup/conf/bootstraps/create-edgecore-xxxx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
#!/bin/bash
# This file is part of the NESi software.
#
# Copyright (c) 2020
# Original Software Design by Ilya Etingof <https://github.com/etingof>.
#
# Software adapted by inexio <https://github.com/inexio>.
# - Janis Groß <https://github.com/unkn0wn-user>
# - Philip Konrath <https://github.com/Connyko65>
# - Alexander Dincher <https://github.com/Dinker1996>
#
# License: https://github.com/inexio/NESi/LICENSE.rst
#
# Example NESi REST API server bootstrapping
#
ENDPOINT=http://localhost:5000/nesi/v1

path="`dirname \"$0\"`"

. $path/functions.sh

#--------------------------------------------------------#
# #
# Subrack 0 #
# |---> Card 1 #
# | |-> Port 1/1 #
# | | |-> Interface 1/1 #
# #
#--------------------------------------------------------#
# #
# default Vlan 1 #
# Enable Credentials #
# Backup Credentials #
# #
#--------------------------------------------------------#

# Create a network device (admin operation)
req='{
"vendor": "EdgeCore",
"model": "ECS4120-28Fv2-I",
"version": "A",
"description": "EdgeCore ECS4120-28Fv2-I box",
"hostname": "ed-ge-co-re-1",
"mgmt_address": "10.0.0.12",
"software_version": "MA5623V800R016C00",
"network_protocol": "ssh",
"network_address": "127.0.0.1",
"network_port": 9023,
"dsl_mode": "tr165",
"uuid": "1111"
}'

box_id=$(create_resource "$req" $ENDPOINT/boxen) || exit 1

# Admin user
req='{
"name": "Admin",
"profile": "root"
}'

admin_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)

# Admin credentials
req='{
"username": "admin",
"password": "secret",
"user_id": '$admin_id'
}'

admin_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

# enable user
req='{
"name": "Enable",
"profile": "enable"
}'

enable_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)

# Super enable credentials
req='{
"username": "enable",
"password": "enable",
"user_id": '$enable_id'
}'

enable_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

# backup user
req='{
"name": "Backup",
"profile": "backup"
}'

backup_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)

# Super backup credentials
req='{
"username": "backup",
"password": "backup",
"user_id": '$backup_id'
}'

backup_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

### Subrack 0 ###

# Create a physical subrack at the network device (admin operation)
req='{
"name": "",
"description": "Pseudo Subrack"
}'

subrack_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/subracks)

### Unit-1 ###

# Create a physical card at the network device (admin operation)
req='{
"subrack_id": '$subrack_id',
"name": "1",
"product": "adsl"
}'

unit_1=$(create_resource "$req" $ENDPOINT/boxen/$box_id/cards)

### Port-1 ###

# Create a physical port at the network device (admin operation)
req='{
"card_id": '$unit_1',
"admin_state": "1",
"operational_state": "1"
}'

port_1_1=$(create_resource "$req" $ENDPOINT/boxen/$box_id/ports)

### Interface-1 ###

# Create a physical interface at the network device (admin operation)
req='{
"port_id": '$port_1_1'
}'

interface_3_1_1=$(create_resource "$req" $ENDPOINT/boxen/$box_id/interfaces)

# default Vlan
req='{
"number": 1,
"name": "default",
"description": "The standard Vlan"
}'

vlan_pppoe=$(create_resource "$req" $ENDPOINT/boxen/$box_id/vlans)
22 changes: 11 additions & 11 deletions bootup/conf/bootstraps/create-huawei-5623.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,28 +123,28 @@ req='{

box_id=$(create_resource "$req" $ENDPOINT/boxen) || exit 1

# Super Admin credentials
req='{
"username": "root",
"password": "secret"
}'

root_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

# Super Admin user
req='{
"name": "root",
"credentials_id": '$root_credential_id',
"name": "Root",
"level": "Super",
"profile": "root",
"append_info": "Super Admin",
"reenter_num": 3,
"reenter_num_temp": 3,
"lock_status": "Unlocked"
"lock_status": "unlocked"
}'

root_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/users)

# Super Admin credentials
req='{
"username": "root",
"password": "secret",
"user_id": '$root_id'
}'

root_credential_id=$(create_resource "$req" $ENDPOINT/boxen/$box_id/credentials)

# Service Profile
req='{
"name": "line_spectrum_1",
Expand Down
Loading

0 comments on commit 2820109

Please sign in to comment.