Class: OvirtSDK4::StorageServerConnectionsService
- Defined in:
- lib/ovirtsdk4/services.rb,
lib/ovirtsdk4/services.rb
Instance Method Summary collapse
-
#add(connection, opts = {}) ⇒ StorageConnection
Creates a new storage connection.
-
#add_glusterfs(connection, opts = {}) ⇒ StorageConnection
Add a Glusterfs storage connection to the system.
-
#add_iscsi(connection, opts = {}) ⇒ StorageConnection
Add a iSCSI storage connection to the system.
-
#add_local(connection, opts = {}) ⇒ StorageConnection
Add a local storage connection to the system.
-
#add_nfs(connection, opts = {}) ⇒ StorageConnection
Add a nfs storage connection to the system.
-
#add_vfs(connection, opts = {}) ⇒ StorageConnection
Add a vfs storage connection to the system.
-
#list(opts = {}) ⇒ Array<StorageConnection>
Returns the list of storage connections.
-
#service(path) ⇒ Service
Locates the service corresponding to the given path.
-
#storage_connection_service(id) ⇒ StorageServerConnectionService
Locates the
storage_connection
service.
Methods inherited from Service
Instance Method Details
#add(connection, opts = {}) ⇒ StorageConnection
Creates a new storage connection.
For example, to create a new storage connection for the NFS server mynfs.example.com
and NFS share
/export/mydata
send a request like this:
POST /ovirt-engine/api/storageconnections
With a request body like this:
<storage_connection>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/export/mydata</path>
<host>
<name>myhost</name>
</host>
</storage_connection>
23981 23982 23983 |
# File 'lib/ovirtsdk4/services.rb', line 23981 def add(connection, opts = {}) internal_add(connection, StorageConnection, ADD, opts) end |
#add_glusterfs(connection, opts = {}) ⇒ StorageConnection
Add a Glusterfs storage connection to the system.
24008 24009 24010 |
# File 'lib/ovirtsdk4/services.rb', line 24008 def add_glusterfs(connection, opts = {}) internal_add(connection, StorageConnection, ADD_GLUSTERFS, opts) end |
#add_iscsi(connection, opts = {}) ⇒ StorageConnection
Add a iSCSI storage connection to the system.
24035 24036 24037 |
# File 'lib/ovirtsdk4/services.rb', line 24035 def add_iscsi(connection, opts = {}) internal_add(connection, StorageConnection, ADD_ISCSI, opts) end |
#add_local(connection, opts = {}) ⇒ StorageConnection
Add a local storage connection to the system.
24096 24097 24098 |
# File 'lib/ovirtsdk4/services.rb', line 24096 def add_local(connection, opts = {}) internal_add(connection, StorageConnection, ADD_LOCAL, opts) end |
#add_nfs(connection, opts = {}) ⇒ StorageConnection
Add a nfs storage connection to the system.
24123 24124 24125 |
# File 'lib/ovirtsdk4/services.rb', line 24123 def add_nfs(connection, opts = {}) internal_add(connection, StorageConnection, ADD_NFS, opts) end |
#add_vfs(connection, opts = {}) ⇒ StorageConnection
Add a vfs storage connection to the system.
24150 24151 24152 |
# File 'lib/ovirtsdk4/services.rb', line 24150 def add_vfs(connection, opts = {}) internal_add(connection, StorageConnection, ADD_VFS, opts) end |
#list(opts = {}) ⇒ Array<StorageConnection>
Returns the list of storage connections.
The order of the returned list of connections isn’t guaranteed.
24069 24070 24071 |
# File 'lib/ovirtsdk4/services.rb', line 24069 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
24172 24173 24174 24175 24176 24177 24178 24179 24180 24181 |
# File 'lib/ovirtsdk4/services.rb', line 24172 def service(path) if path.nil? || path == '' return self end index = path.index('/') if index.nil? return storage_connection_service(path) end return storage_connection_service(path[0..(index - 1)]).service(path[(index +1)..-1]) end |
#storage_connection_service(id) ⇒ StorageServerConnectionService
Locates the storage_connection
service.
24161 24162 24163 |
# File 'lib/ovirtsdk4/services.rb', line 24161 def storage_connection_service(id) StorageServerConnectionService.new(self, id) end |