def create_device(self, datacenter, devname, devspec, devaddress,
            devmanaddress, user, password):
        log.info("Creating storage device %s at %s..." % (devname,
            devaddress))
        device = StorageDevice.builder(self.__context, datacenter) \
                 .name(devname) \
                 .type(devspec.getType()) \
                 .iscsiIp(devaddress) \
                 .iscsiPort(devspec.getDefaultIscsiPort()) \
                 .managementIp(devmanaddress) \
                 .managementPort(devspec.getDefaultManagementPort()) \
                 .username(user) \
                 .password(password) \
                 .build()
        device.save()
        return device
Discovers and registers a storage device
dataset/ETHPy150Open nacx/kahuna/kahuna/plugins/environment/infrastructure/storage.py/InfrastructureStorage.create_device