__init__(self,
name,
dev=None,
size=None,
wwn=None,
write_back=False)
(Constructor)
|
|
A FileIOStorageObject can be instantiated in two ways:
-
Creation mode: If dev and size are specified,
the underlying configFS object will be created with those parameters.
No FileIOStorageObject with the same name can pre-exist in the
parent Backstore in that mode, or instantiation will fail.
-
Lookup mode: If dev and size are not set, then
the FileIOStorageObject will be bound to the existing configFS object
in the parent Backstore having the specified name. The
underlying configFS object must already exist in that mode, or
instantiation will fail.
- Parameters:
name (string) - The name of the FileIOStorageObject.
dev (string) - The path to the backend file or block device to be used.
-
Examples: dev="/dev/sda",
dev="/tmp/myfile"
-
The only block device type that is accepted TYPE_DISK,
or partitions of a TYPE_DISK device. For other device
types, use pscsi.
size (int) - Size of the object, if not a block device
wwn (string) - T10 WWN Unit Serial, will generate if None
write_back (bool) - Should we create the StorageObject with write caching enabled?
Disabled by default
- Returns:
- A FileIOStorageObject object.
- Overrides:
node.CFSNode.__init__
|