Skip to content

Commit

Permalink
A couple of small fixes
Browse files Browse the repository at this point in the history
  - Add the '--tenant' parameter to 'keystone user-create' command
  - Remove needless backslash (\) characters at the end of commands

(Thanks Jakub Libosvar for the feedback)
  • Loading branch information
kashyapc committed Feb 10, 2015
1 parent d318fd0 commit 4c7c99b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions create-new-tenant-network.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,14 @@ privnetname=$5
privsubnetname=$6


# Create a tenant, user and associate a role/tenant to it.
# Create a tenant, user and associate a role/tenant to it
keystone tenant-create \
--name $tenantname

keystone user-create \
--name $username \
--pass fedora
--pass fedora \
--tenant $tenantname

keystone user-role-add \
--user $username \
Expand All @@ -90,24 +91,24 @@ neutron net-create $privnetname

neutron subnet-create $privnetname \
$subnetspace/24 \
--name $privsubnetname \
--name $privsubnetname


# Create a router
neutron router-create $routername


# Associate the router to the external network by setting its gateway.
# NOTE: This assumes, the external network name is 'ext'
# Associate the router to the external network by setting its gateway
# NOTE: This assumes the external network name is 'ext'
EXT_NET=$(neutron net-list | grep ext | awk '{print $2;}')
PRIV_NET=$(neutron subnet-list | grep $privsubnetname | awk '{print $2;}')
ROUTER_ID=$(neutron router-list | grep $routername | awk '{print $2;}')

neutron router-gateway-set \
$ROUTER_ID $EXT_NET \
$ROUTER_ID $EXT_NET

neutron router-interface-add \
$ROUTER_ID $PRIV_NET \
$ROUTER_ID $PRIV_NET


# Add Neutron security groups for this test tenant
Expand Down

0 comments on commit 4c7c99b

Please sign in to comment.