Change in vdsm[master]: storage: move storageServer to lib/vdsm
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: move storageServer to lib/vdsm
......................................................................
storage: move storageServer to lib/vdsm
Change-Id: I0fba9e9da91354a2e28fdf0ce754836ae61c7094
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/Makefile.am
R lib/vdsm/storage/storageServer.py
M tests/storage_storageserver_test.py
M vdsm.spec.in
M vdsm/storage/Makefile.am
M vdsm/storage/hsm.py
6 files changed, 10 insertions(+), 8 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/16/73116/1
diff --git a/lib/vdsm/storage/Makefile.am b/lib/vdsm/storage/Makefile.am
index 47bb7fb..096d903 100644
--- a/lib/vdsm/storage/Makefile.am
+++ b/lib/vdsm/storage/Makefile.am
@@ -52,6 +52,7 @@
resourceManager.py \
rwlock.py \
securable.py \
+ storageServer.py \
task.py \
taskManager.py \
threadPool.py \
diff --git a/vdsm/storage/storageServer.py b/lib/vdsm/storage/storageServer.py
similarity index 99%
rename from vdsm/storage/storageServer.py
rename to lib/vdsm/storage/storageServer.py
index 28c93d1..e6e80d4 100644
--- a/vdsm/storage/storageServer.py
+++ b/lib/vdsm/storage/storageServer.py
@@ -17,6 +17,7 @@
#
# Refer to the README and COPYING files for full details of the license
#
+from __future__ import absolute_import
import errno
import logging
diff --git a/tests/storage_storageserver_test.py b/tests/storage_storageserver_test.py
index ce0a8e7..40fba98 100644
--- a/tests/storage_storageserver_test.py
+++ b/tests/storage_storageserver_test.py
@@ -21,13 +21,13 @@
from monkeypatch import MonkeyPatch
from testlib import permutations, expandPermutations
from testlib import VdsmTestCase
-from storage.storageServer import GlusterFSConnection
-from storage.storageServer import IscsiConnection
-from storage.storageServer import MountConnection
-from storage import storageServer
from vdsm.gluster import cli as gluster_cli
from vdsm.gluster import exception as ge
+from vdsm.storage.storageServer import GlusterFSConnection
+from vdsm.storage.storageServer import IscsiConnection
+from vdsm.storage.storageServer import MountConnection
+from vdsm.storage import storageServer
class FakeSupervdsm(object):
diff --git a/vdsm.spec.in b/vdsm.spec.in
index b832882..7109533 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -941,7 +941,6 @@
%{_datadir}/%{vdsm_name}/storage/sd.py*
%{_datadir}/%{vdsm_name}/storage/sp.py*
%{_datadir}/%{vdsm_name}/storage/spbackends.py*
-%{_datadir}/%{vdsm_name}/storage/storageServer.py*
%{_datadir}/%{vdsm_name}/storage/volume.py*
%{_datadir}/%{vdsm_name}/storage/imageRepository/__init__.py*
%{_datadir}/%{vdsm_name}/storage/imageRepository/formatConverter.py*
@@ -1208,6 +1207,7 @@
%{python_sitelib}/%{vdsm_name}/storage/resourceManager.py*
%{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
%{python_sitelib}/%{vdsm_name}/storage/securable.py*
+%{python_sitelib}/%{vdsm_name}/storage/storageServer.py*
%{python_sitelib}/%{vdsm_name}/storage/task.py*
%{python_sitelib}/%{vdsm_name}/storage/taskManager.py*
%{python_sitelib}/%{vdsm_name}/storage/threadPool.py*
diff --git a/vdsm/storage/Makefile.am b/vdsm/storage/Makefile.am
index 29a45a4..29450dc 100644
--- a/vdsm/storage/Makefile.am
+++ b/vdsm/storage/Makefile.am
@@ -42,8 +42,8 @@
sd.py \
sp.py \
spbackends.py \
- storageServer.py \
- volume.py
+ volume.py \
+ $(NULL)
dist_vdsmexec_SCRIPTS = \
curl-img-wrap \
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 216dfd3..ccce68e 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -58,6 +58,7 @@
from vdsm.storage import multipath
from vdsm.storage import outOfProcess as oop
from vdsm.storage import resourceManager as rm
+from vdsm.storage import storageServer
from vdsm.storage import taskManager
from vdsm.storage import types
from vdsm.storage.constants import STORAGE
@@ -78,7 +79,6 @@
from sdc import sdCache
import image
import merge
-import storageServer
import sdm.api.create_volume
--
To view, visit https://gerrit.ovirt.org/73116
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fba9e9da91354a2e28fdf0ce754836ae61c7094
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 10 months
Change in vdsm[master]: storage: validateDirAccess: move to fileUtils
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: storage: validateDirAccess: move to fileUtils
......................................................................
storage: validateDirAccess: move to fileUtils
validateDirAccess is the only thing keeping storageServer out of
lib/vdsm.
fileUtils is not a perfect location for it, but I did not find a better
place.
Change-Id: I21ead1cb635f8224cb09f7319ffcb55eebe2a9e3
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/storage/fileUtils.py
M vdsm/storage/fileSD.py
M vdsm/storage/localFsSD.py
M vdsm/storage/nfsSD.py
M vdsm/storage/storageServer.py
5 files changed, 27 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/73115/1
diff --git a/lib/vdsm/storage/fileUtils.py b/lib/vdsm/storage/fileUtils.py
index 2e84d5f..71c7bef 100644
--- a/lib/vdsm/storage/fileUtils.py
+++ b/lib/vdsm/storage/fileUtils.py
@@ -37,7 +37,11 @@
import six
from vdsm import constants
+from vdsm import supervdsm
from vdsm.common.network import address
+
+from . import exception as se
+from . import outOfProcess
log = logging.getLogger('storage.fileUtils')
@@ -139,6 +143,25 @@
raise OSError(errno.EACCES, os.strerror(errno.EACCES))
+def validateDirAccess(dirPath):
+ try:
+ outOfProcess.getGlobalProcPool().fileUtils.validateAccess(dirPath)
+ supervdsm.getProxy().validateAccess(
+ constants.VDSM_USER,
+ (constants.VDSM_GROUP,), dirPath,
+ (os.R_OK | os.W_OK | os.X_OK))
+ supervdsm.getProxy().validateAccess(
+ constants.QEMU_PROCESS_USER,
+ (constants.DISKIMAGE_GROUP, constants.METADATA_GROUP), dirPath,
+ (os.R_OK | os.X_OK))
+ except OSError as e:
+ if e.errno == errno.EACCES:
+ raise se.StorageServerAccessPermissionError(dirPath)
+ raise
+
+ return True
+
+
def validateQemuReadable(targetPath):
"""
Validate that qemu process can read file
diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index ab9ae21..9d76c3c 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -41,7 +41,6 @@
from vdsm import constants
from vdsm.utils import stripNewLines
from vdsm.storage.constants import LEASE_FILEEXT
-from vdsm import supervdsm
REMOTE_PATH = "REMOTE_PATH"
@@ -64,27 +63,6 @@
ST_BYTES_PER_BLOCK = 512
_MOUNTLIST_IGNORE = ('/' + sd.BLOCKSD_DIR, '/' + sd.GLUSTERSD_DIR)
-
-getProcPool = oop.getGlobalProcPool
-
-
-def validateDirAccess(dirPath):
- try:
- getProcPool().fileUtils.validateAccess(dirPath)
- supervdsm.getProxy().validateAccess(
- constants.VDSM_USER,
- (constants.VDSM_GROUP,), dirPath,
- (os.R_OK | os.W_OK | os.X_OK))
- supervdsm.getProxy().validateAccess(
- constants.QEMU_PROCESS_USER,
- (constants.DISKIMAGE_GROUP, constants.METADATA_GROUP), dirPath,
- (os.R_OK | os.X_OK))
- except OSError as e:
- if e.errno == errno.EACCES:
- raise se.StorageServerAccessPermissionError(dirPath)
- raise
-
- return True
def validateFileSystemFeatures(sdUUID, mountDir):
diff --git a/vdsm/storage/localFsSD.py b/vdsm/storage/localFsSD.py
index 94db70d..a724a3d 100644
--- a/vdsm/storage/localFsSD.py
+++ b/vdsm/storage/localFsSD.py
@@ -59,7 +59,7 @@
if os.path.abspath(typeSpecificArg) != typeSpecificArg:
raise se.StorageDomainIllegalRemotePath(typeSpecificArg)
- fileSD.validateDirAccess(domPath)
+ fileUtils.validateDirAccess(domPath)
fileSD.validateFileSystemFeatures(sdUUID, domPath)
sd.validateDomainVersion(version)
diff --git a/vdsm/storage/nfsSD.py b/vdsm/storage/nfsSD.py
index 8c41952..fc020de 100644
--- a/vdsm/storage/nfsSD.py
+++ b/vdsm/storage/nfsSD.py
@@ -46,7 +46,7 @@
if not mount.isMounted(domPath):
raise se.StorageDomainFSNotMounted(domPath)
- fileSD.validateDirAccess(domPath)
+ fileUtils.validateDirAccess(domPath)
fileSD.validateFileSystemFeatures(sdUUID, domPath)
# Make sure there are no remnants of other domain
diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index dc3fd80..28c93d1 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -40,8 +40,6 @@
from vdsm.storage import mount
from vdsm.storage.mount import MountError
-import fileSD
-
IscsiConnectionParameters = namedtuple("IscsiConnectionParameters",
"target, iface, credentials")
@@ -163,7 +161,7 @@
six.reraise(t, v, tb)
else:
try:
- fileSD.validateDirAccess(
+ fileUtils.validateDirAccess(
self.getMountObj().getRecord().fs_file)
except se.StorageServerAccessPermissionError:
t, v, tb = sys.exc_info()
@@ -566,7 +564,7 @@
def checkTarget(self):
if not os.path.isdir(self._path):
raise se.StorageServerLocalNotDirError(self._path)
- fileSD.validateDirAccess(self._path)
+ fileUtils.validateDirAccess(self._path)
return True
def checkLink(self):
--
To view, visit https://gerrit.ovirt.org/73115
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I21ead1cb635f8224cb09f7319ffcb55eebe2a9e3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 10 months
Change in vdsm[master]: check-merged: adding virtTests
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: check-merged: adding virtTests
......................................................................
check-merged: adding virtTests
Change-Id: Ibdd67ff59beb20a13c187087e9cfa148ba705eb6
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M automation/check-merged.sh
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/37/70837/1
diff --git a/automation/check-merged.sh b/automation/check-merged.sh
index e6933b9..c913610 100755
--- a/automation/check-merged.sh
+++ b/automation/check-merged.sh
@@ -65,6 +65,20 @@
return $res
}
+function run_virt_tests {
+ local res=0
+ lago shell "$VM_NAME" -c \
+ " \
+ cd /usr/share/vdsm/tests
+ ./run_tests.sh \
+ --with-xunit \
+ --xunit-file=/tmp/nosetests-${DISTRO}.xml \
+ -s \
+ functional/virtTests.py \
+ " || res=$?
+ return $res
+}
+
function run_network_tests {
local res=0
lago shell "$VM_NAME" -c \
@@ -113,9 +127,13 @@
function run_all_tests {
run_infra_tests | tee "$EXPORTS/functional_tests_stdout.$DISTRO.log"
- failed="${PIPESTATUS[0]}"
+ local failed="${PIPESTATUS[0]}"
run_network_tests | tee -a "$EXPORTS/functional_tests_stdout.$DISTRO.log"
+ local res="${PIPESTATUS[0]}"
+ [ "$res" -ne 0 ] && failed="$res"
+
+ run_virt_tests | tee -a "$EXPORTS/functional_tests_stdout.$DISTRO.log"
res="${PIPESTATUS[0]}"
[ "$res" -ne 0 ] && failed="$res"
}
--
To view, visit https://gerrit.ovirt.org/70837
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdd67ff59beb20a13c187087e9cfa148ba705eb6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
6 years, 11 months
Change in vdsm[master]: automation: check-patch: make pylint on each patch
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has uploaded a new change for review.
Change subject: automation: check-patch: make pylint on each patch
......................................................................
automation: check-patch: make pylint on each patch
I'm not sure that this long test should be run on each and every patch,
but let us consider this.
Change-Id: Ib4f2f2ec78439ef560b305436160c3140b68e9f2
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M automation/check-patch.sh
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/69346/1
diff --git a/automation/check-patch.sh b/automation/check-patch.sh
index a866771..a401053 100755
--- a/automation/check-patch.sh
+++ b/automation/check-patch.sh
@@ -15,6 +15,7 @@
debuginfo-install -y python
TIMEOUT=600 make check NOSE_WITH_COVERAGE=1 NOSE_COVER_PACKAGE="$PWD/vdsm,$PWD/lib"
+make pylint
# Generate coverage report in HTML format
pushd tests
--
To view, visit https://gerrit.ovirt.org/69346
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4f2f2ec78439ef560b305436160c3140b68e9f2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
6 years, 12 months
Change in vdsm[master]: vdsm metrics: replace dots with underscore in entity names
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: vdsm metrics: replace dots with underscore in entity names
......................................................................
vdsm metrics: replace dots with underscore in entity names
statsd recognize dots as entering to subtree. If a nic name or vol name
include dot in their name, we shell convert it to underscore to avoid
recognize it as sub metric tree
Change-Id: If097f45d9f9d65bd056371234255e91609656ae5
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1433734
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M lib/vdsm/host/api.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/17/74417/1
diff --git a/lib/vdsm/host/api.py b/lib/vdsm/host/api.py
index d9ee16b..49244bb 100644
--- a/lib/vdsm/host/api.py
+++ b/lib/vdsm/host/api.py
@@ -86,7 +86,7 @@
try:
for dom in hoststats['storageDomains']:
- storage_prefix = prefix + '.storage.' + dom
+ storage_prefix = prefix + '.storage.' + dom.replace('.', '_')
dom_info = hoststats['storageDomains'][dom]
data[storage_prefix + '.delay'] = dom_info['delay']
data[storage_prefix + '.last_check'] = dom_info['lastCheck']
@@ -122,7 +122,7 @@
if 'network' in hoststats:
for interface in hoststats['network']:
if_info = hoststats['network'][interface]
- net_prefix = prefix + '.nic.' + interface
+ net_prefix = prefix + '.nic.' + interface.replace('.', '_')
data[net_prefix + '.speed'] = if_info['speed']
data[net_prefix + '.rx_errors'] = if_info['rxErrors']
data[net_prefix + '.tx_errors'] = if_info['txErrors']
--
To view, visit https://gerrit.ovirt.org/74417
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If097f45d9f9d65bd056371234255e91609656ae5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
7 years
Change in vdsm[master]: yml: return type fixes for Host.hostdevListByCaps
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for Host.hostdevListByCaps
......................................................................
yml: return type fixes for Host.hostdevListByCaps
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Change-Id: I6ad09c310a76dde9267824a337fadf3b1c02bd45
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 178 insertions(+), 54 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/03/59703/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 6cb6c9a..a289b7f 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -1382,57 +1382,119 @@
type: *BandwidthCurve
type: object
+ HostDeviceAddress: &HostDeviceAddress
+ description: A host device address
+ name: HostDeviceAddress
+ properties:
+ - description: bus
+ name: bus
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: device
+ name: device
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: slot
+ name: slot
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: domain
+ name: domain
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: function
+ name: function
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: host
+ name: host
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: target
+ name: target
+ type: string
+ datatype: uint
+
+ - defaultvalue: no-default
+ description: lun
+ name: lun
+ type: string
+ datatype: uint
+ type: object
+
HostDeviceParams: &HostDeviceParams
added: '3.6'
description: A host device parameters
name: HostDeviceParams
properties:
- - description: The iommu group which the device belongs
- to
- name: iommu_group
- type: uint
-
- description: The capability of the device (usually
pci, usb_device, scsi)
name: capability
type: string
- - description: String representation of the vendor
+ - defaultvalue: no-default
+ description: String representation of the vendor
name: vendor
type: string
- - defaultvalue: null
- description: Name of the physical function that this
- VF belongs to. Also reported for physical function
- itself, therefore in order to detect PF one must
- consider the tuple (totalvfs, physfn). (if sriov
- capable)
- name: physfn
- type: string
-
- - defaultvalue: null
- description: Number of available virtual functions
- (if sriov capable)
- name: totalvfs
- type: uint
-
- - description: Hexadecimal representation of the vendor
+ - defaultvalue: no-default
+ description: Hexadecimal representation of the vendor
name: vendor_id
type: string
- - description: String representation of the product
+ - defaultvalue: no-default
+ description: String representation of the product
specified by vendor
name: product
type: string
- - description: Name of the parent device
+ - defaultvalue: no-default
+ description: Name of the parent device
name: parent
type: string
- - description: Hexadecimal representation of the product
+ - defaultvalue: no-default
+ description: Hexadecimal representation of the product
specified by vendor
name: product_id
type: string
+
+ - defaultvalue: no-default
+ description: Assignable flag
+ name: is_assignable
+ type: boolean
+
+ - defaultvalue: no-default
+ description: Values like usbhid, usb, qxl or sd
+ name: driver
+ type: string
+
+ - defaultvalue: no-default
+ description: Network interface assigned to a device
+ name: interface
+ type: string
+
+ - defaultvalue: no-default
+ description: device udev path
+ name: udev_path
+ type: string
+
+ - defaultvalue: no-default
+ description: device address
+ name: address
+ type: *HostDeviceAddress
type: object
HostDevice: &HostDevice
@@ -1447,13 +1509,12 @@
HostDevices: &HostDevices
added: '3.6'
- description: Mapping of devices to their assignments
+ description: Mapping of device names to device details
name: HostDevices
- properties:
- - description: Name of the device
- name: deviceName
- type: *HostDevice
- type: object
+ key-type: string
+ name: HostDevices
+ type: map
+ value-type: *HostDevice
HostJobStatus: &HostJobStatus
added: '4.0'
@@ -7432,8 +7493,7 @@
- string
return:
description: A list of devices on the host
- type:
- - *HostDevices
+ type: *HostDevices
Host.hostdevChangeNumvfs:
added: '3.6'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index fac3bf4..bff578c 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -270,27 +270,6 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('Host', 'getStats'), ret)
- def test_badly_defined_ret_type(self):
- ret = {u'pci_0000_00_1b_0':
- {u'params':
- {u'product': u'7 Series/C210 Series Chipset Family ',
- u'vendor': u'Intel Corporation',
- u'product_id': u'0x1e20',
- u'parent': u'computer',
- u'vendor_id': u'0x8086',
- u'capability': u'pci',
- u'address': {u'slot': u'27',
- u'bus': u'0',
- u'domain': u'0',
- u'function': u'0'}}}}
-
- # type definition is broken for this verb
- with self.assertRaises(JsonRpcError) as e:
- _schema.schema().verify_retval(
- vdsmapi.MethodRep('Host', 'hostdevListByCaps'), ret)
-
- self.assertIn('is not a list', e.exception.message)
-
def test_allvmstats(self):
ret = [{'vcpuCount': '1',
'displayInfo': [{'tlsPort': u'5900',
@@ -516,3 +495,88 @@
_schema.schema().verify_args(
vdsmapi.MethodRep('StoragePool', 'connect'), params)
+
+ def test_host_list_caps(self):
+ ret = {'net_eth0_52_54_00_56_00_39':
+ {'params': {'capability': 'net',
+ 'interface': 'eth0',
+ 'parent': 'pci_0000_00_03_0',
+ 'is_assignable': 'true'}},
+ 'computer':
+ {'params': {'capability': 'system',
+ 'is_assignable': 'true',
+ 'product': 'Standard PC (i440FX + PIIX, 1996)'}},
+ 'usb_1_1_1_0':
+ {'params': {'capability': 'usb',
+ 'is_assignable': 'true',
+ 'driver': 'usbhid',
+ 'parent': 'usb_1_1'}},
+ 'scsi_target7_0_0':
+ {'params': {'capability': 'scsi_target',
+ 'is_assignable': 'true',
+ 'parent': 'scsi_host7'}},
+ 'usb_usb1':
+ {'params': {'product': '2.0 root hub',
+ 'vendor': 'Linux Foundation',
+ 'product_id': '0x0002',
+ 'parent': 'pci_0000_00_05_7',
+ 'vendor_id': '0x1d6b',
+ 'driver': 'usb',
+ 'capability': 'usb_device',
+ 'is_assignable': 'true',
+ 'address': {'device': '1', 'bus': '1'}}},
+ 'pci_0000_00_02_0':
+ {'params': {'product': 'QXL paravirtual graphic card',
+ 'vendor': 'Red Hat, Inc.',
+ 'product_id': '0x0100',
+ 'parent': 'computer',
+ 'vendor_id': '0x1b36',
+ 'driver': 'qxl',
+ 'capability': 'pci',
+ 'is_assignable': 'true',
+ 'address': {'slot': '2',
+ 'bus': '0',
+ 'domain': '0',
+ 'function': '0'}}},
+ 'scsi_5_0_0_18':
+ {'params': {'product': 'target1-18',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_target5_0_0',
+ 'driver': 'sd',
+ 'capability': 'scsi',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg2',
+ 'address': {'bus': '0',
+ 'host': '5',
+ 'target': '0',
+ 'lun': '18'}}},
+ 'scsi_host5':
+ {'params': {'capability': 'scsi_host',
+ 'is_assignable': 'true',
+ 'parent': 'computer'}},
+ 'scsi_generic_sg26':
+ {'params': {'capability': 'scsi_generic',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg26',
+ 'parent': 'scsi_6_0_0_14'}},
+ 'scsi_6_0_0_14':
+ {'params': {'product': 'target2-14',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_target6_0_0',
+ 'driver': 'sd',
+ 'capability': 'scsi',
+ 'is_assignable': 'true',
+ 'udev_path': '/dev/sg26',
+ 'address': {'bus': '0',
+ 'host': '6',
+ 'target': '0',
+ 'lun': '14'}}},
+ 'block_sdr_36001405292bb96f19064f81b884fa63f':
+ {'params': {'capability': 'storage',
+ 'is_assignable': 'true',
+ 'product': 'target1-03',
+ 'vendor': 'LIO-ORG',
+ 'parent': 'scsi_5_0_0_3'}}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('Host', 'hostdevListByCaps'), ret)
--
To view, visit https://gerrit.ovirt.org/59703
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ad09c310a76dde9267824a337fadf3b1c02bd45
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years
Change in vdsm[master]: yml: parameter type fixes for StoragePool.connectStorageServer
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: parameter type fixes for StoragePool.connectStorageServer
......................................................................
yml: parameter type fixes for StoragePool.connectStorageServer
Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 55 insertions(+), 82 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/01/59701/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index b537e8e..5eb091c 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -342,66 +342,6 @@
type: int
type: object
- IscsiCredentialsLogin: &IscsiCredentialsLogin
- added: '3.1'
- description: Login credentials for an
- ISCI target.
- name: IscsiCredentialsLogin
- properties:
- - description: The username used for
- authentication to an ISCI target
- name: username
- type: string
-
- - description: The password associated
- with the given username
- name: password
- type: string
- type: object
-
- IscsiCredentialsType: &IscsiCredentialsType
- added: '3.1'
- description: An enumeration of ISCSI login
- credentials types.
- name: IscsiCredentialsType
- type: enum
- values:
- chap: Challenge-Handshake Authentication Protocol
-
- IscsiCredentials: &IscsiCredentials
- added: '3.1'
- description: This structure stores ISCSI credentials.
- name: IscsiCredentials
- properties:
- - description: Type-specific authentication
- credentials
- name: params
- type: *IscsiCredentialsLogin
-
- - defaultvalue: chap
- description: The type of authentication to
- be used
- name: authType
- type: *IscsiCredentialsType
- type: object
-
- IscsiPortal: &IscsiPortal
- added: '3.1'
- description: A host/port pair that identifies
- an ISCSI target.
- name: IscsiPortal
- properties:
- - defaultvalue: 3260
- description: A port number
- name: port
- type: int
-
- - description: A fully-qualified domain name
- (FQDN) or IP address
- name: host
- type: string
- type: object
-
IscsiConnectionParameters: &IscsiConnectionParameters
added: '3.1'
description: Parameters for initiating a new ISCSI connection.
@@ -410,27 +350,37 @@
- defaultvalue: 1
description: The Target Portal Group Tag to use
name: tpgt
- type: int
+ type: string
+ datatype: int
- - description: An IscsiPortal to identify the requested
- target
- name: portal
- type: *IscsiPortal
+ - defaultvalue: 3260
+ description: A port number
+ name: port
+ type: string
+ typedata: int
+
+ - description: A fully-qualified domain name
+ (FQDN) or IP address
+ name: connection
+ type: string
- description: The ISCSI Qualified Name
name: iqn
type: string
- - defaultvalue: null
- description: An IscsiCredentials containing the required
- authentication information
- name: credentials
- type: *IscsiCredentials
-
- - defaultvalue: default
- description: The ISCSI interface name
- name: iface
+ - description: The username used for
+ authentication to an ISCI target
+ name: user
type: string
+
+ - description: The password associated
+ with the given username
+ name: password
+ type: string
+
+ - description: Id
+ name: id
+ type: *UUID
type: object
LocalFsConnectionParameters: &LocalFsConnectionParameters
@@ -5587,14 +5537,14 @@
name: StorageDomainType
type: enum
values:
- CIFS: The Storage Domain uses CIFS/SMB based storage
- FCP: The Storage Domain uses FibreChannel based storage
- ISCSI: The Storage Domain uses iSCSI based storage
- LOCALFS: The Storage Domain uses storage on the local file system
- NFS: The Storage Domain uses Network File System based storage
- SHAREDFS: The Storage Domain uses storage from a Linux VFS file
- system
- UNKNOWN: The type is not known
+ 2: The Storage Domain uses FibreChannel based storage
+ 3: The Storage Domain uses iSCSI based storage
+ 4: The Storage Domain uses storage on the local file system
+ 1: The Storage Domain uses Network File System based storage
+ 0: The type is not known
+ 6: The Storage Domain uses posix file system
+ 7: The Storage Domain uses glusterfs
+ 8: The Storage Domain uses cinder
StorageDomainInfo: &StorageDomainInfo
added: '3.1'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index f80a27c..38f5449 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -479,3 +479,26 @@
sub_id = '|virt|VM_status|426aef82-ea1d-4442-91d3-fd876540e0f0'
_events_schema.events_schema().verify_event_params(sub_id, params)
+
+ def test_connect_server(self):
+ params = {u'connectionParams':
+ [{u'id': u'a454a600-b3b7-46ea-8032-717deedcd219',
+ u'connection': u'10.35.0.99',
+ u'iqn': u'iqn.2003-01.org.dumbo.target1',
+ u'user': u'',
+ u'tpgt': u'1',
+ u'password': '********',
+ u'port': u'3260'},
+ {u'id': u'48b086ae-6d80-4d6f-96ac-43c6ffcaab3e',
+ u'connection': u'10.35.0.99',
+ u'iqn': u'iqn.2003-01.org.dumbo.target2',
+ u'user': u'',
+ u'tpgt': u'1',
+ u'password': '********',
+ u'port': u'3260'}],
+ u'storagepoolID': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'domainType': 3}
+
+ _schema.schema().verify_args(
+ vdsmapi.MethodRep('StoragePool', 'connectStorageServer'),
+ params)
--
To view, visit https://gerrit.ovirt.org/59701
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9fe2ffc3bc2327eefaae794b7b366e8202d2f2a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years
Change in vdsm[master]: [RFC] procutils: Introduce the procutils module
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has posted comments on this change.
Change subject: [RFC] procutils: Introduce the procutils module
......................................................................
Patch Set 2:
(5 comments)
https://gerrit.ovirt.org/#/c/74927/2//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2017-03-28 03:38:45 +0300
Line 4: Commit: Nir Soffer <nsoffer(a)redhat.com>
Line 5: CommitDate: 2017-03-31 05:18:48 +0300
Line 6:
Line 7: [RFC] procutils: Introduce the procutils module
rpc means request for comments here? we usually use WIP or drafts
Line 8:
Line 9: This module provide utilities for working with subprocesses.
Line 10:
Line 11: The first utility is procutils.communicate(), replacing both AsyncProc,
Line 5: CommitDate: 2017-03-31 05:18:48 +0300
Line 6:
Line 7: [RFC] procutils: Introduce the procutils module
Line 8:
Line 9: This module provide utilities for working with subprocesses.
what else do you see in this module? why not to add timed_communicate as you suggested in the past? is this part copied from Popen.communicate py3 implementation?
Line 10:
Line 11: The first utility is procutils.communicate(), replacing both AsyncProc,
Line 12: and CommandStream. This function allows reading from 2 streams in the
Line 13: same time, without using callbacks as in CommandStream, and avoiding the
Line 8:
Line 9: This module provide utilities for working with subprocesses.
Line 10:
Line 11: The first utility is procutils.communicate(), replacing both AsyncProc,
Line 12: and CommandStream. This function allows reading from 2 streams in the
write here where its needed
Line 13: same time, without using callbacks as in CommandStream, and avoiding the
Line 14: performance issues and complexity of AsyncProc.
Line 15:
Line 16: procutils.communicate() does not support writing to and reading from a
Line 35: test_asyncproc_read 1.00g in 17.02 seconds (0.06g/s) OK
Line 36: test_asyncproc_write 1.00g in 13.71 seconds (0.07g/s) OK
Line 37: test_plain_read 1.00g in 0.45 seconds (2.22g/s) OK
Line 38: test_read 1.00g in 0.53 seconds (1.89g/s) OK
Line 39: test_write 1.00g in 0.49 seconds (2.04g/s) OK
g is gb ? where is the comparation here?
Line 40:
Line 41: Change-Id: I7d193caa5da0ed564b4fab12aa85e3751f1a1df7
Line 36: test_asyncproc_write 1.00g in 13.71 seconds (0.07g/s) OK
Line 37: test_plain_read 1.00g in 0.45 seconds (2.22g/s) OK
Line 38: test_read 1.00g in 0.53 seconds (1.89g/s) OK
Line 39: test_write 1.00g in 0.49 seconds (2.04g/s) OK
Line 40:
should this function replace all communicate calls?
Line 41: Change-Id: I7d193caa5da0ed564b4fab12aa85e3751f1a1df7
--
To view, visit https://gerrit.ovirt.org/74927
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I7d193caa5da0ed564b4fab12aa85e3751f1a1df7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
7 years
Change in vdsm[master]: vdsm-tool: Introducing firewalld configurator
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: vdsm-tool: Introducing firewalld configurator
......................................................................
Patch Set 7: Code-Review-1
(4 comments)
https://gerrit.ovirt.org/#/c/74883/7/automation/build-artifacts.packages....
File automation/build-artifacts.packages.fc24:
Line 14: python-coverage
Line 15: python2-decorator
Line 16: python-dateutil
Line 17: python-devel
Line 18: python-firewall
why bother with f24? we should kick it off master.
Line 19: python-nose
Line 20: python-inotify
Line 21: python-ioprocess
Line 22: python-mock
https://gerrit.ovirt.org/#/c/74883/7/automation/build-artifacts.packages....
File automation/build-artifacts.packages.fc25:
Line 15: python2-decorator
Line 16: python2-dateutil
Line 17: python3-dateutil
Line 18: python-devel
Line 19: python-firewall
I suspect you need python3-firewall to avoid CI-1
14:44:54 from firewall.client import FirewallClient
14:44:54 ImportError: No module named 'firewall'
Line 20: python-nose
Line 21: python-inotify
Line 22: python-ioprocess
Line 23: python-mock
https://gerrit.ovirt.org/#/c/74883/7/lib/vdsm/tool/configurators/firewall...
File lib/vdsm/tool/configurators/firewalld.py:
Line 31: 'ssh',
Line 32: # TODO: add remaining services
Line 33: )
Line 34:
Line 35: OPTIONAL_SERVICES = (
we don't have "optional services". We have two options: virt and gluster.
try:
import vdsm.gluster.api
except ImportError:
pass
else:
REQUIRED_SERVICE += (glusterfs, ...)
would be enough.
Line 36: 'glusterfs',
Line 37: # TODO: add remaining services
Line 38: )
Line 39:
PS7, Line 67: rpm
we should not bother about RPMs here; I'm still dreaming about Debian port.
--
To view, visit https://gerrit.ovirt.org/74883
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8b9b5f533de0b609c15a2482b2fba0ae713c3c33
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Leon Goldberg <lgoldber(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
7 years
Change in vdsm[master]: network: report dpdk ports as nics
by Code Review
From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has posted comments on this change.
Change subject: network: report dpdk ports as nics
......................................................................
Patch Set 10:
(1 comment)
https://gerrit.ovirt.org/#/c/73987/10/lib/vdsm/network/netinfo/cache.py
File lib/vdsm/network/netinfo/cache.py:
PS10, Line 106: dev.isDPDK()
> frankly, testing
Oh, I see that you had that, and Eddy asked to change it.
let it be, don't change this again :-/
--
To view, visit https://gerrit.ovirt.org/73987
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I67b2083e9c6f032472fd75f6800c864083ffdef5
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes
7 years