Skip to content

Commit 013cea4

Browse files
committed
Allow setting cloud_bw as a peering attribute.
1 parent 55ae872 commit 013cea4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

examples/demos/sense-aws/config.fab

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ config:
3030
local_device:
3131
local_port:
3232
cloud_region: "us-east-1"
33+
cloud_vlan: 6
34+
cloud_bw: 1000
3335

3436
# FOR SENSE and FABRIC
3537
local_asn: "55038" # customer_asn (hard coded for now)
@@ -73,4 +75,4 @@ resource:
7375
controller: '{{ node.fabric_node }}'
7476
image: dtnaas/tools
7577
profile: fabfed
76-
count: 0 # SET THIS TO 1 if you want use janus service
78+
count: 1 # SET THIS TO 1 if you want use janus service

fabfed/provider/fabric/fabric_network.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def handle_facility_port(self):
173173
device = self.peering.attributes.get(Constants.RES_LOCAL_DEVICE)
174174
port = self.peering.attributes.get(Constants.RES_LOCAL_PORT)
175175
vlan = self.peering.attributes.get('cloud_vlan')
176+
bw = self.peering.attributes.get('cloud_bw', 50)
176177

177178
if not device:
178179
device = self.stitch_port.get(Constants.STITCH_PORT_DEVICE_NAME)
@@ -231,7 +232,7 @@ def handle_facility_port(self):
231232
site=cloud,
232233
labels=labels,
233234
peer_labels=peer_labels,
234-
capacities=Capacities(bw=50, mtu=mtu_size))
235+
capacities=Capacities(bw=int(bw), mtu=mtu_size))
235236

236237
logger.info("CreatedFacilityPort:" + facility_port.toJson())
237238
else:

0 commit comments

Comments
 (0)