Skip to content

Commit

Permalink
Added storage device credentials to allow creating NetApp devices
Browse files Browse the repository at this point in the history
  • Loading branch information
Ignasi Barrera committed Jan 25, 2012
1 parent db09f62 commit 090f18e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions kahuna/plugins/environment/constants.py
Expand Up @@ -33,6 +33,8 @@
DEV_NAME = "Kai" # The name of the device
DEV_TYPE = StorageTechnologyType.LVM # The device type
DEV_ADDRESS = "10.60.21.177" # The device address
DEV_USER = None # The admin user of the storage device (used in NetApp)
DEV_PASS = None # The admin pass of the storage device (used in NetApp)

# Pool configuration
POOL_NAME = "abiquo" # The storage pool to use in the storage device
Expand Down
4 changes: 3 additions & 1 deletion kahuna/plugins/environment/infrastructure/storage.py
Expand Up @@ -35,7 +35,7 @@ def configure_tiers(self, datacenter, tname=TIER_NAME):

return tiers[0]

def create_device(self, datacenter, devname=DEV_NAME, devtype=DEV_TYPE,devaddress=DEV_ADDRESS, devmanaddress=DEV_ADDRESS):
def create_device(self, datacenter, devname=DEV_NAME, devtype=DEV_TYPE,devaddress=DEV_ADDRESS, devmanaddress=DEV_ADDRESS, user=DEV_USER, password=DEV_PASS):
""" Discovers and registers a storage device.
It discovers a remote storage device and registers it into the
Expand All @@ -49,6 +49,8 @@ def create_device(self, datacenter, devname=DEV_NAME, devtype=DEV_TYPE,devaddres
.type(devtype) \
.iscsiIp(devaddress) \
.managementIp(devmanaddress) \
.username(user) \
.password(password) \
.build()
device.save()
return device
Expand Down

0 comments on commit 090f18e

Please sign in to comment.