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_connectionservice.
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 HTTP/1.1
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>
24899 24900 24901 |
# File 'lib/ovirtsdk4/services.rb', line 24899 def add(connection, opts = {}) internal_add(connection, StorageConnection, ADD, opts) end |
#add_glusterfs(connection, opts = {}) ⇒ StorageConnection
Add a Glusterfs storage connection to the system.
24926 24927 24928 |
# File 'lib/ovirtsdk4/services.rb', line 24926 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.
24953 24954 24955 |
# File 'lib/ovirtsdk4/services.rb', line 24953 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.
25014 25015 25016 |
# File 'lib/ovirtsdk4/services.rb', line 25014 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.
25041 25042 25043 |
# File 'lib/ovirtsdk4/services.rb', line 25041 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.
25068 25069 25070 |
# File 'lib/ovirtsdk4/services.rb', line 25068 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.
24987 24988 24989 |
# File 'lib/ovirtsdk4/services.rb', line 24987 def list(opts = {}) internal_get(LIST, opts) end |
#service(path) ⇒ Service
Locates the service corresponding to the given path.
25090 25091 25092 25093 25094 25095 25096 25097 25098 25099 |
# File 'lib/ovirtsdk4/services.rb', line 25090 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.
25079 25080 25081 |
# File 'lib/ovirtsdk4/services.rb', line 25079 def storage_connection_service(id) StorageServerConnectionService.new(self, id) end |