diff options
author | Andy Grover <agrover@redhat.com> | 2013-04-25 10:04:06 -0700 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2013-04-25 10:04:06 -0700 |
commit | 1421d684ba8990b79abc34dcac46f6f646b95a9b (patch) | |
tree | 0c7800fc508d49ef8a967f047cb66d00b39a433e | |
parent | 063c95e66c19cf5014f9b643bd5253db72f00e5f (diff) | |
download | rtslib-fb-1421d684ba8990b79abc34dcac46f6f646b95a9b.tar.gz |
Exception msg cleanup
rtslib no longer takes strings for size params, the caller is responsible
for converting that into a number of bytes.
Signed-off-by: Andy Grover <agrover@redhat.com>
-rw-r--r-- | rtslib/tcm.py | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/rtslib/tcm.py b/rtslib/tcm.py index 190cbf6..71c90ab 100644 --- a/rtslib/tcm.py +++ b/rtslib/tcm.py @@ -399,21 +399,8 @@ class RDMCPStorageObject(StorageObject): @param name: The name of the RDMCPStorageObject. @type name: string - @param size: The size of the ramdrive to create: - - If size is an int, it represents a number of bytes - - If size is a string, the following units can be used : - - B{B} or no unit present for bytes - - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes) - - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes) - - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes) - - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes) - Example: size="1MB" for a one megabytes storage object. - - Note that the size will be rounded to the closest multiple - of page size. For instance, a size of 100000 Bytes will be - rounded to 24 pages, really 98304 Bytes. - - The base value for kilo is 1024, aka 1kB = 1024B. - Strictly speaking, we use kiB, MiB, etc. - @type size: string or int + @param size: The size of the ramdrive to create, in bytes. + @type size: int @param wwn: T10 WWN Unit Serial, will generate if None @type wwn: string @return: A RDMCPStorageObject object. @@ -500,19 +487,8 @@ class FileIOStorageObject(StorageObject): partitions of a I{TYPE_DISK} device. For other device types, use pscsi. @type dev: string - @param size: The maximum size to allocate for the file. - Not used for block devices. - - If size is an int, it represents a number of bytes - - If size is a string, the following units can be used : - - B{B} or no unit present for bytes - - B{k}, B{K}, B{kB}, B{KB} for kB (kilobytes) - - B{m}, B{M}, B{mB}, B{MB} for MB (megabytes) - - B{g}, B{G}, B{gB}, B{GB} for GB (gigabytes) - - B{t}, B{T}, B{tB}, B{TB} for TB (terabytes) - Example: size="1MB" for a one megabytes storage object. - - The base value for kilo is 1024, aka 1kB = 1024B. - Strictly speaking, we use kiB, MiB, etc. - @type size: string or int + @param size: Size of the object, if not a block device + @type size: int @param wwn: T10 WWN Unit Serial, will generate if None @type wwn: string @param write_back: Should we create the StorageObject with |