-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5b760e
commit c08dc5f
Showing
1 changed file
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
## 本手順でできること | ||
**CLIから以下のshowコマンドを実行できます** | ||
- show area | ||
- show area_device | ||
- show area_location | ||
- show device | ||
- show device_interface | ||
- show device_location | ||
- show link | ||
- show interface | ||
- show waypoint | ||
- show waypoint_interface | ||
- show l2_interface | ||
- show l3_interface | ||
|
||
|
||
## 基本構文 | ||
```bash | ||
python [file path]/network_sketcher.py [command] --master [master file path] | ||
``` | ||
出力を1行で表示したい場合は --one_msg オプションを追加 | ||
```bash | ||
python [file path]/network_sketcher.py [command] --master [master file path] --one_msg | ||
``` | ||
* 以下のように[command] 、--one_msg 、--master [master file path] の場所は変更可能<br> | ||
python [file path]/network_sketcher.py --one_msg -master [master file path] [command]<br> | ||
|
||
|
||
## show area | ||
全てのエリア名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show area --master [master file path] | ||
``` | ||
|
||
* ex.<br> | ||
#python .\network_sketcher.py show area --master "C:\work\\[MASTER]test.xlsx"<br> | ||
DC-TOP1<br> | ||
DC-TOP2<br> | ||
DC-TOP3<br> | ||
|
||
## show area_device | ||
各エリア内の全てのデバイス名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show area_device --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show area_device --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['Site1', ['L2sw-x', 'L3sw-1', 'L3sw-2', 'R-1', 'R-2']]<br> | ||
|
||
## show area_location | ||
Areaの配置情報を表示します。相対的な位置情報となります。 | ||
```bash | ||
python [file path]/network_sketcher.py show area_location --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show area_location --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['DC-TOP1', 'DC-TOP2', 'DC-TOP3']<br> | ||
['Site1', 'Site2']<br> | ||
|
||
## show device | ||
全てのデバイス名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show device --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show device --master "C:\work\\[MASTER]test.xlsx"<br> | ||
DEVICE1<br> | ||
DEVICE10<br> | ||
DEVICE11<br> | ||
DEVICE12<br> | ||
|
||
## show device_interface | ||
全てのデバイスの全てのインタフェース名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show device_interface --master [master file path] | ||
``` | ||
* ex.<br> | ||
python .\network_sketcher.py show device_interface --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['DEVICE6', ['GigabitEthernet 0/3']]<br> | ||
['DEVICE5', ['GigabitEthernet 0/4']]<br> | ||
['DEVICE10', ['GigabitEthernet 0/5']]<br> | ||
|
||
## show device_location | ||
各エリア内のデバイスの配置情報を表示します。相対的な位置情報となります。'AIR'は空白を意味します。 | ||
```bash | ||
python [file path]/network_sketcher.py show device_location --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show device_location --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['_tmp_', [['_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', 'DEVICE1', 'DEVICE2', '_AIR_'], ['_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', 'DEVICE3'], ['_AIR_', '_AIR_', 'DEVICE4', '_AIR_', '_AIR_', 'DEVICE5', 'DEVICE6', 'DEVICE7'], ['DEVICE8', 'DEVICE9', 'DEVICE10', 'DEVICE11', 'DEVICE12', '_AIR_', '_AIR_', '_AIR_']]]<br> | ||
|
||
* 解説 | ||
Area名:_tmp_<br> | ||
デバイス配置:<br> | ||
['_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', 'DEVICE1', 'DEVICE2', '_AIR_']<br> | ||
['_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', '_AIR_', 'DEVICE3']<br> | ||
['_AIR_', '_AIR_', 'DEVICE4', '_AIR_', '_AIR_', 'DEVICE5', 'DEVICE6', 'DEVICE7']<br> | ||
['DEVICE8', 'DEVICE9', 'DEVICE10', 'DEVICE11', 'DEVICE12', '_AIR_', '_AIR_', '_AIR_']<br> | ||
|
||
## show link | ||
L1の結線情報を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show link --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show link --master "C:\work\\[MASTER]test.xlsx"<br> | ||
[['DEVICE1', 'GigabitEthernet 0/0'], ['DEVICE4', 'GigabitEthernet 0/0']]<br> | ||
[['DEVICE1', 'GigabitEthernet 0/4'], ['DEVICE5', 'GigabitEthernet 0/4']]<br> | ||
[['DEVICE10', 'GigabitEthernet 0/5'], ['DEVICE4', 'GigabitEthernet 0/5']]<br> | ||
|
||
## show interface | ||
各デバイスの全てのL1インタフェースの詳細情報を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show interface --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show interface --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['DEVICE1', 'GE 0/0', 'GigabitEthernet 0/0', 'Auto', 'Auto', '1000BASE-T']<br> | ||
['DEVICE1', 'GE 0/2', 'GigabitEthernet 0/2', 'Auto', 'Auto', '1000BASE-T']<br> | ||
['DEVICE1', 'GE 0/4', 'GigabitEthernet 0/4', 'Auto', 'Auto', '1000BASE-T']<br> | ||
['DEVICE10', 'GE 0/5', 'GigabitEthernet 0/5', 'Auto', 'Auto', '1000BASE-T']<br> | ||
|
||
## show waypoint | ||
全てのWaypoint名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show waypoint --master [master file path] | ||
``` | ||
* ex.<br> | ||
python .\network_sketcher.py show waypoint --master "C:\work\\[MASTER]test.xlsx"<br> | ||
WAN-1<br> | ||
WAN-Dum3<br> | ||
|
||
## show waypoint_interface | ||
各waypointの全てのインタフェース名を表示します。 | ||
```bash | ||
python [file path]/network_sketcher.py show waypoint_interface --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show waypoint_interface --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['WAN-1', ['GigabitEthernet 0/0', 'GigabitEthernet 0/19', 'GigabitEthernet 0/31', 'GigabitEthernet 0/45', 'GigabitEthernet 0/46', 'GigabitEthernet 0/53', 'GigabitEthernet 0/54']]<br> | ||
['WAN-Dum3', ['GigabitEthernet 0/6', 'GigabitEthernet 0/10', 'GigabitEthernet 0/13', 'GigabitEthernet 0/14', 'GigabitEthernet 0/26']]<br> | ||
|
||
## show l2_interface | ||
L2インタフェースの詳細情報を表示します。DEVICEファイル内の入力可能な情報をエクスポートしたものです。 | ||
```bash | ||
python [file path]/network_sketcher.py show l2_interface --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show l2_interface --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['FW-12', 'GigabitEthernet 0/32', '', '', '']<br> | ||
['FW-12', 'GigabitEthernet 0/33', '', '', '']<br> | ||
['FW-12', 'GigabitEthernet 0/36', '', '', '']<br> | ||
['FW-12', 'GigabitEthernet 0/37', '', '', '']<br> | ||
|
||
## show l3_interface | ||
L3インタフェースの詳細情報を表示します。DEVICEファイル内の入力可能な情報をエクスポートしたものです。 | ||
```bash | ||
python [file path]/network_sketcher.py show l3_interface --master [master file path] | ||
``` | ||
* ex.<br> | ||
#python .\network_sketcher.py show l3_interface --master "C:\work\\[MASTER]test.xlsx"<br> | ||
['FW-12', 'GigabitEthernet 0/32', '', '10.0.2.1/29']<br> | ||
['FW-12', 'GigabitEthernet 0/33', '', '10.0.2.9/29']<br> | ||
['FW-12', 'GigabitEthernet 0/36', '', '10.0.2.17/29']<br> | ||
['FW-12', 'GigabitEthernet 0/37', '', '10.0.2.25/29']<br> | ||
['FW-12', 'GigabitEthernet 0/38', '', '10.0.5.57/29']<br> |