Skip to content

Commit cdf55eb

Browse files
committed
add readme docs
1 parent 8465e7d commit cdf55eb

File tree

1 file changed

+38
-0
lines changed
  • packaging-api-samples/update-services

1 file changed

+38
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Update VLAN Services
2+
This script is utility script to update VLAN ID attribute on services in existing blueprints
3+
4+
5+
### Usage
6+
- install all dependencies in requirements.txt (note that quali-utils packaging api is hosted in download center)
7+
- add credentials to credentials.py
8+
- Run cli.py, passing in target VLAN service, existing vlan id, and the new desired vlan id
9+
10+
Sample Command
11+
```commandline
12+
python .\cli.py "VLAN Manual" 129 169
13+
```
14+
15+
Sample output
16+
```commandline
17+
Starting Flow. Changing service 'VLAN Manual' VLAN 129 --> 169
18+
starting blueprint search
19+
System Blueprint Count: 148
20+
found target blueprint vlan dev
21+
Target blueprints found: 1
22+
search done after 17 seconds
23+
processing blueprint vlan dev
24+
['C:\\Users\\natti.k\\code\\quali\\venvs\\cloudshell-api-script-samples\\PY39_cloudshell\\lib\\site-packages\\quali_utils\\QualiSystems.Packaging.exe', 'GetTopologyNames', '--packagepath', 'vlan dev.zip']
25+
['C:\\Users\\natti.k\\code\\quali\\venvs\\cloudshell-api-script-samples\\PY39_cloudshell\\lib\\site-packages\\quali_utils\\QualiSystems.Packaging.exe', 'SetAttributeToService', '--packagepath', 'vlan dev.zip', '--topologyna
26+
me', 'vlan dev', '--servicealias', 'VLAN Manual', '--attributename', 'VLAN ID', '--attributevalue', '169', '--publish', 'False']
27+
done processing vlan dev after 5 seconds
28+
Update flow done after total 23 seconds
29+
```
30+
31+
32+
### Implementation Details
33+
This script uses the following flow:
34+
- automation api to search system for target blueprints
35+
- quali REST api to download target blueprint packages
36+
- cleans package of everything except topologies folder to optimize the import request
37+
- packaging api updates target attribute
38+
- Quali REST api loads package back into server

0 commit comments

Comments
 (0)