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>
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]: check-merged: split functions by logic and few nits
by Code Review
From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: check-merged: split functions by logic and few nits
......................................................................
check-merged: split functions by logic and few nits
adding local, var renames
Change-Id: I74f9326289b972abaef4507ab4d2582a8d641778
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M automation/check-merged.sh
1 file changed, 27 insertions(+), 18 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/25/70825/1
diff --git a/automation/check-merged.sh b/automation/check-merged.sh
index ef81436..e6933b9 100755
--- a/automation/check-merged.sh
+++ b/automation/check-merged.sh
@@ -6,17 +6,25 @@
# direct backend, but without KVM(much slower).
! [[ -c "/dev/kvm" ]] && mknod /dev/kvm c 10 232
+# Fix when running in an el* chroot in fc2* host
+[[ -e /usr/bin/qemu-kvm ]] \
+|| ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm
+# ENV vars
DISTRO='el7'
VM_NAME="vdsm_functional_tests_host-${DISTRO}"
AUTOMATION="$PWD"/automation
PREFIX="$AUTOMATION"/vdsm_functional
EXPORTS="$PWD"/exported-artifacts
-function prepare {
+function setup_env {
+ # TODO: ask lago to create this folder
+ mkdir "$EXPORTS"/lago-logs
+
# Creates RPMS
"$AUTOMATION"/build-artifacts.sh
+ # TODO: jenkins mock env should take care of that
if [[ -d "$PREFIX" ]]; then
pushd "$PREFIX"
echo 'cleaning old lago env'
@@ -25,15 +33,14 @@
rm -rf "$PREFIX"
fi
- # Fix when running in an el* chroot in fc2* host
- [[ -e /usr/bin/qemu-kvm ]] \
- || ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-kvm
lago init \
"$PREFIX" \
"$AUTOMATION"/lago-env.yml
cd "$PREFIX"
+
+ # TODO: remove --reposync-yum-config /dev/null if not needed
lago ovirt reposetup \
--reposync-yum-config /dev/null \
--custom-source "dir:$EXPORTS"
@@ -84,9 +91,6 @@
}
function run {
- mkdir "$EXPORTS"/lago-logs
- failed=0
-
lago start "$VM_NAME"
prepare_and_copy_yum_conf
@@ -95,28 +99,33 @@
# otherwise
lago ovirt deploy
+ # TODO: ask lago to have cooler way to keep the localrepo up
lago ovirt serve &
- PID=$!
+ local httpd_pid=$!
- fake_ksm_in_vm
+ fake_ksm_in_vm && run_all_tests
+ local failed=$?
+ kill $httpd_pid
+
+ return $failed
+}
+
+function run_all_tests {
run_infra_tests | tee "$EXPORTS/functional_tests_stdout.$DISTRO.log"
failed="${PIPESTATUS[0]}"
run_network_tests | tee -a "$EXPORTS/functional_tests_stdout.$DISTRO.log"
res="${PIPESTATUS[0]}"
[ "$res" -ne 0 ] && failed="$res"
+}
- kill $PID
-
- lago copy-from-vm \
- "$VM_NAME" \
- "/tmp/nosetests-${DISTRO}.xml" \
- "$EXPORTS/nosetests-${DISTRO}.xml" || :
+function collect_logs {
+ lago copy-from-vm "$VM_NAME" \
+ "/tmp/nosetests-${DISTRO}.xml" \
+ "$EXPORTS/nosetests-${DISTRO}.xml" || :
lago collect --output "$EXPORTS"/lago-logs
-
cp "$PREFIX"/current/logs/*.log "$EXPORTS"/lago-logs
- return $failed
}
function cleanup {
@@ -124,5 +133,5 @@
lago cleanup
}
-prepare && run && cleanup
+setup_env && run && collect_logs && cleanup
exit $?
--
To view, visit https://gerrit.ovirt.org/70825
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I74f9326289b972abaef4507ab4d2582a8d641778
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
7 years
Change in vdsm[master]: [WIP]ABRT integration
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: [WIP]ABRT integration
......................................................................
[WIP]ABRT integration
Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=917062
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M init/systemd/vdsmd.service.in
M init/vdsmd_init_common.sh.in
M lib/vdsm/tool/configurators/Makefile.am
A lib/vdsm/tool/configurators/abrt.py
M vdsm.spec.in
M vdsm/vdsm-logrotate
6 files changed, 138 insertions(+), 28 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/87/44287/1
diff --git a/init/systemd/vdsmd.service.in b/init/systemd/vdsmd.service.in
index d7d025f..ccacb2e 100644
--- a/init/systemd/vdsmd.service.in
+++ b/init/systemd/vdsmd.service.in
@@ -2,9 +2,10 @@
Description=Virtual Desktop Server Manager
Requires=multipathd.service libvirtd.service time-sync.target \
iscsid.service rpcbind.service supervdsmd.service sanlock.service \
- vdsm-network.service
+ vdsm-network.service abrtd.service
After=multipathd.service libvirtd.service iscsid.service rpcbind.service \
- supervdsmd.service sanlock.service vdsm-network.service
+ supervdsmd.service sanlock.service vdsm-network.service \
+ abrtd.service
Conflicts=libvirt-guests.service
Wants=mom-vdsm.service
diff --git a/init/vdsmd_init_common.sh.in b/init/vdsmd_init_common.sh.in
index 00e4054..df2878c 100644
--- a/init/vdsmd_init_common.sh.in
+++ b/init/vdsmd_init_common.sh.in
@@ -83,16 +83,6 @@
return 0
}
-task_configure_coredump() {
- local conf_file="@CONFDIR(a)/vdsm.conf"
- local getconfitem="@VDSMDIR@/get-conf-item"
-
- if "${getconfitem}" "${conf_file}" vars core_dump_enable false |
- tr A-Z a-z | grep -q true; then
- echo "/var/log/core/core.%p.%t.dump" > /proc/sys/kernel/core_pattern
- fi
-}
-
task_configure_vdsm_logs() {
local vdsm_logs="
@VDSMLOGDIR(a)/connectivity.log
@@ -296,7 +286,6 @@
--pre-start)
run_tasks " \
mkdirs \
- configure_coredump \
configure_vdsm_logs \
wait_for_network \
run_init_hooks \
diff --git a/lib/vdsm/tool/configurators/Makefile.am b/lib/vdsm/tool/configurators/Makefile.am
index 9fc7e57..f70b4bb 100644
--- a/lib/vdsm/tool/configurators/Makefile.am
+++ b/lib/vdsm/tool/configurators/Makefile.am
@@ -21,6 +21,7 @@
dist_configurators_PYTHON = \
__init__.py \
+ abrt.py \
certificates.py \
libvirt.py \
multipath.py \
diff --git a/lib/vdsm/tool/configurators/abrt.py b/lib/vdsm/tool/configurators/abrt.py
new file mode 100644
index 0000000..778f505
--- /dev/null
+++ b/lib/vdsm/tool/configurators/abrt.py
@@ -0,0 +1,132 @@
+# Copyright 2015 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+
+import sys
+import os
+
+from .import \
+ MAYBE, \
+ NO
+from .. import service
+from ... import utils
+from ... import constants
+
+from .. import conf_utils
+
+CONF_VERSION = '4.17.0'
+
+
+services = ("abrtd",)
+
+
+def configure():
+
+ conf_utils.remove_conf(FILES, CONF_VERSION)
+
+ for conf_file, content in FILES.items():
+ content['configure'](content, CONF_VERSION)
+
+
+def isconfigured():
+ """
+ Check if abrt is already configured for vdsm
+ """
+ ret = MAYBE
+
+ for path in (conf_utils.get_persisted_files(FILES)):
+ if not conf_utils.open_config(path, CONF_VERSION).hasConf():
+ ret = NO
+
+ if ret == MAYBE:
+ sys.stdout.write("abrt is already configured for vdsm\n")
+ else:
+ sys.stdout.write("abrt is not configured for vdsm\n")
+ return ret
+
+
+FILES = {
+ 'ABRT_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/abrt.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'DumpLocation': '/var/tmp/abrt'
+ },
+ },
+ ]
+ },
+ 'CCPP_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/plugins/CCpp.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'Backtrace': 'yes'
+ },
+ },
+ ]
+ },
+ 'PYTHON_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/plugins/python.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'Backtrace': 'yes'
+ },
+ },
+ ]
+ },
+ 'PKG_CONF': {
+ 'path': os.path.join(
+ constants.SYSCONF_PATH,
+ 'abrt/abrt-action-save-package-data.conf'
+ ),
+ 'configure': conf_utils.add_section,
+ 'removeConf': conf_utils.remove_section,
+ 'persisted': True,
+ 'fragments': [
+ {
+ 'conditions': {},
+ 'content': {
+ 'openGPGCheck': 'no'
+ },
+ },
+ ]
+ }
+}
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 21e1b50..6e524c5 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -132,6 +132,7 @@
Requires: nfs-utils
Requires: m2crypto
Requires: libnl3
+Requires: abrt-desktop
Requires: curl
Requires: %{name}-xmlrpc = %{version}-%{release}
Requires: %{name}-jsonrpc = %{version}-%{release}
@@ -709,13 +710,6 @@
/etc/sysctl.conf
fi
-# hack until we replace core dump with abrt
-if /usr/sbin/selinuxenabled; then
- /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?'
-fi
-/sbin/restorecon -R /var/log/core >/dev/null 2>&1
-# hack until we replace core dump with abrt
-
# VDSM installs vdsm-modules-load.d.conf file - the following command will
# refresh vdsm kernel modules requirements to start on boot
/bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
@@ -1097,6 +1091,7 @@
%{python_sitelib}/%{vdsm_name}/tool/conf_utils.py*
%{python_sitelib}/%{vdsm_name}/tool/configurator.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__*
+%{python_sitelib}/%{vdsm_name}/tool/configurators/abrt.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/libvirt.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/passwd.py*
diff --git a/vdsm/vdsm-logrotate b/vdsm/vdsm-logrotate
index e2027ac..17d26ab 100755
--- a/vdsm/vdsm-logrotate
+++ b/vdsm/vdsm-logrotate
@@ -7,12 +7,4 @@
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
-if [ -d /var/log/core ] ; then
- /usr/bin/find /var/log/core -type f -name '*xz' -mtime +7 -exec /bin/rm -f '{}' \;
- EXITVALUE=$?
- if [ $EXITVALUE != 0 ]; then
- /usr/bin/logger -t logrotate "ALERT clean old core files exited abnormally with [$EXITVALUE]"
- fi
-fi
-
exit $EXITVALUE
--
To view, visit https://gerrit.ovirt.org/44287
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ca5e66c9f029be75483b86414e328d074c7e454
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
7 years, 1 month
Change in vdsm[master]: [WIP]configurators: move configurator functions into conf_utils
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: [WIP]configurators: move configurator functions into conf_utils
......................................................................
[WIP]configurators: move configurator functions into conf_utils
Change-Id: Id67a0f51adb2d543c0542a48c020d34a13d1f2ed
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M lib/vdsm/tool/Makefile.am
A lib/vdsm/tool/conf_utils.py
M vdsm.spec.in
3 files changed, 110 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/86/44286/1
diff --git a/lib/vdsm/tool/Makefile.am b/lib/vdsm/tool/Makefile.am
index c8979ca..c3ed0cc 100644
--- a/lib/vdsm/tool/Makefile.am
+++ b/lib/vdsm/tool/Makefile.am
@@ -35,7 +35,8 @@
dump_bonding_defaults.py \
dump_volume_chains.py \
nwfilter.py \
- configfile.py \
+ conf_utils.py \
+ configfile.py \
configurator.py \
register.py \
restore_nets.py \
diff --git a/lib/vdsm/tool/conf_utils.py b/lib/vdsm/tool/conf_utils.py
new file mode 100644
index 0000000..1308097
--- /dev/null
+++ b/lib/vdsm/tool/conf_utils.py
@@ -0,0 +1,107 @@
+# Copyright 2015 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# Refer to the README and COPYING files for full details of the license
+#
+import os
+
+from .. configfile import (
+ ConfigFile,
+)
+
+from ... import utils
+
+if utils.isOvirtNode():
+ from ovirt.node.utils.fs import Config as NodeCfg
+
+
+def get_file(fname, files):
+ return files[fname]['path']
+
+
+def remove_conf(files, version):
+ for cfile, content in files.items():
+ content['removeConf'](content['path'], version)
+
+
+def add_section(content, version, vdsmConfiguration={}):
+ """
+ Add a 'configuration section by vdsm' part to a config file.
+ This section contains only keys not originally defined
+ The section headers will include the current configuration version.
+ """
+ configuration = {}
+ for fragment in content['fragments']:
+ if vdsmConfiguration:
+ if is_applicable(fragment, vdsmConfiguration):
+ configuration.update(fragment['content'])
+ else:
+ configuration.update(fragment['content'])
+ if configuration:
+ with open_config(content['path'], version) as conff:
+ for key, val in configuration.items():
+ conff.addEntry(key, val)
+
+
+def remove_section(path, version):
+ """
+ remove entire 'configuration section by vdsm' section.
+ section is removed regardless of it's version.
+ """
+ if os.path.exists(path):
+ with open_config(path, version) as conff:
+ conff.removeConf()
+
+
+def remove_file(content, vdsmConfiguration):
+ """
+ delete a file if it exists.
+ """
+ if utils.isOvirtNode():
+ NodeCfg().delete(content['path'])
+ else:
+ try:
+ os.unlink(content['path'])
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise
+
+
+def get_persisted_files(files):
+ """
+ get files where vdsm is expected to add a section.
+ """
+ return [
+ cfile['path'] for cfile in files.values()
+ if cfile['persisted']
+ ]
+
+
+def open_config(path, conf_version):
+ return ConfigFile(path, conf_version)
+
+
+def is_applicable(fragment, vdsmConfiguration):
+ """
+ Return true if 'fragment' should be included for current
+ configuration. An applicable fragment is a fragment who's list
+ of conditions are met according to vdsmConfiguration.
+ """
+ applyFragment = True
+ for key, booleanValue in fragment['conditions'].items():
+ if vdsmConfiguration[key] != booleanValue:
+ applyFragment = False
+ return applyFragment
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 5020d8b..21e1b50 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1094,6 +1094,7 @@
%{python_sitelib}/%{vdsm_name}/tool/dummybr.py*
%{python_sitelib}/%{vdsm_name}/tool/dump_bonding_defaults.py*
%{python_sitelib}/%{vdsm_name}/tool/nwfilter.py*
+%{python_sitelib}/%{vdsm_name}/tool/conf_utils.py*
%{python_sitelib}/%{vdsm_name}/tool/configurator.py*
%{python_sitelib}/%{vdsm_name}/tool/configurators/__init__*
%{python_sitelib}/%{vdsm_name}/tool/configurators/certificates.py*
--
To view, visit https://gerrit.ovirt.org/44286
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id67a0f51adb2d543c0542a48c020d34a13d1f2ed
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
7 years, 1 month
Change in vdsm[master]: yml: return type fixes for LVMVolumeGroup.getInfo
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for LVMVolumeGroup.getInfo
......................................................................
yml: return type fixes for LVMVolumeGroup.getInfo
Change-Id: I7fc2b2a3d1e8b4563b24c60601c44e851f2603e6
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 112 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/59708/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 2c139ea..d0d176c 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -131,15 +131,17 @@
- description: The SCSI Logical Unit Number associated with
this path
name: lun
- type: uint
+ type: string
+ datatype: uint
- description: The path size (in bytes)
name: capacity
- type: uint
+ type: string
+ datatype: uint
added: '3.6'
- description: The type of path (BlockDeviceType)
- name: deviceType
+ name: type
type: *BlockDeviceType
- description: The current state of this path
@@ -6755,6 +6757,63 @@
OK: All Physical Volumes are online
PARTIAL: One or more Physical Volumes are not available
+ PhisicalVolumeInfo: &PhisicalVolumeInfo
+ description: Phisical volume information.
+ name: PhisicalVolumeInfo
+ properties:
+ - description: The device logical size (in bytes)
+ name: capacity
+ type: string
+ datatype: uint
+
+ - description: The device size (in bytes)
+ name: devcapacity
+ type: string
+ datatype: uint
+
+ - description: A string identifying the device manufacturer
+ name: vendorID
+ type: string
+
+ - description: A string identifying the device model
+ name: productID
+ type: string
+
+ - description: The LVM physical volume associated with this device
+ name: pvUUID
+ type: *UUID
+
+ - description: The volume group associated with this device
+ name: vgUUID
+ type: *UUID
+
+ - description: Firmware version information
+ name: fwrev
+ type: string
+
+ - description: The type of storage device (BlockDeviceType)
+ name: devtype
+ type: *BlockDeviceType
+
+ - description: iSCSI session information
+ name: pathlist
+ type:
+ - *IscsiSessionInfo
+
+ - description: The globally unique identifier of the block device
+ name: GUID
+ type: *UUID
+
+ - description: The device serial number (if available)
+ name: serial
+ type: string
+
+ - description: Multipath information
+ name: pathstatus
+ type:
+ - *BlockDevicePathInfo
+ type: object
+
VolumeGroupInfo: &VolumeGroupInfo
added: '3.1'
description: Information about a Volume Group.
@@ -6766,12 +6825,8 @@
- description: The total capacity (in bytes)
name: vgsize
- type: uint
-
- - description: The storage type of this Volume Group's Physical
- Volumes
- name: deviceType
- type: *BlockDeviceType
+ type: string
+ datatype: uint
- description: The Volume Group name
name: name
@@ -6787,7 +6842,17 @@
- description: The amount of currently unassigned capacity (in bytes)
name: vgfree
- type: uint
+ type: string
+ datatype: uint
+
+ - description: The type of backing storage used by this domain
+ name: type
+ type: *StorageDomainType
+
+ - description: Phisical volume list
+ name: pvlist
+ type:
+ - *PhisicalVolumeInfo
type: object
VolumeStatus: &VolumeStatus
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index 1f319b1..30f5c9a 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -637,3 +637,40 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('StoragePool', 'getInfo'), ret)
+
+ def test_volume_group_info(self):
+ ret = {'state': 'OK',
+ 'vgsize': '53284438016',
+ 'name': 'b0d9c2e8-00e9-4e0e-a5d9-f9e17bb59974',
+ 'vgfree': '48855252992',
+ 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56',
+ 'pvlist': [{'vendorID': 'LIO-ORG',
+ 'capacity': '53284438016',
+ 'fwrev': '0000',
+ 'vgUUID': 'aE6hIQ-WY4M-yvgK-rNQi-YN4G-mauM-1xKp56',
+ 'pathlist': [{'connection': '10.35.0.99',
+ 'iqn': 'iqn.2003-01.org.dumbo.target',
+ 'portal': '1',
+ 'port': '3260',
+ 'initiatorname': 'default'}],
+ 'pathstatus': [{'type': 'iSCSI',
+ 'physdev': 'sdbh',
+ 'capacity': '53687091200',
+ 'state': 'active',
+ 'lun': '1'}],
+ 'devtype': 'iSCSI',
+ 'pvUUID': 'mzQhIy-eyno-YUaE-eFod-9JQU-AYeA-xgy0ma',
+ 'serial': 'SLIO-ORG_target3-01_77f3fd04-8038-4383-',
+ 'GUID': '3600140577f3fd048038438393cce45de',
+ 'devcapacity': '53687091200',
+ 'productID': 'target3-01'}],
+ 'type': 3,
+ 'attr': {'allocation': 'n',
+ 'partial': '-',
+ 'exported': '-',
+ 'permission': 'w',
+ 'clustered': '-',
+ 'resizeable': 'z'}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('LVMVolumeGroup', 'getInfo'), ret)
--
To view, visit https://gerrit.ovirt.org/59708
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7fc2b2a3d1e8b4563b24c60601c44e851f2603e6
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years, 1 month
Change in vdsm[master]: yml: return type fixes for StoragePool.getInfo
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: return type fixes for StoragePool.getInfo
......................................................................
yml: return type fixes for StoragePool.getInfo
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 72 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/59707/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 7dd95d1..2c139ea 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -5607,6 +5607,21 @@
7: The Storage Domain uses glusterfs
8: The Storage Domain uses cinder
+ StorageType: &StorageType
+ added: '3.1'
+ description: An enumeration of Storage Domain types.
+ name: StorageType
+ 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
+
StorageDomainInfo: &StorageDomainInfo
added: '3.1'
description: Information about a Storage Domain.
@@ -5666,6 +5681,18 @@
unattached: The domain is not attached to a Storage Pool
unknown: The status of the Storage Domain is not known
+ StorageStatus: &StorageStatus
+ added: '3.1'
+ description: An enumeration of Storage Domain statuses.
+ name: StorageDomainStatus
+ type: enum
+ values:
+ Active: The domain is attached to a Storage Pool and is activated
+ Attached: The domain is attached to a Storage Pool but is
+ deactivated
+ Unattached: The domain is not attached to a Storage Pool
+ Unknown: The status of the Storage Domain is not known
+
StorageDomainStatusMap: &StorageDomainStatusMap
added: '3.1'
description: A mapping of Storage Domain statuses indexed by Storage
@@ -5698,7 +5725,8 @@
properties:
- description: The remaining free disk space in bytes
name: diskfree
- type: int
+ type: string
+ datatype: int
- description: A list of alerts for this Storage Domain
name: alerts
@@ -5708,15 +5736,21 @@
- description: The total amount of disk space in the Storage
Domain in bytes
name: disktotal
- type: int
+ type: string
+ datatype: int
- description: Current Storage Domain status
name: status
- type: *StorageDomainStatus
+ type: *StorageStatus
- description: Indicates the Storage Domain version
name: version
type: int
+
+ - description: The filesystem path from where ISO images may
+ be referenced
+ name: isoprefix
+ type: string
type: object
StoragePoolDomainInfoMap: &StoragePoolDomainInfoMap
@@ -5749,15 +5783,16 @@
- description: The Storage Pool lock version
name: lver
- type: int
+ type: long
- description: The Storage Pool version
name: version
- type: int
+ type: string
+ datatype: int
- description: The type of storage managed by this Storage Pool
- name: domainType
- type: *StorageDomainType
+ name: type
+ type: *StorageType
- description: The Storage Pool name
name: name
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index eddb735..1f319b1 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -607,3 +607,33 @@
_schema.schema().verify_retval(
vdsmapi.MethodRep('StoragePool', 'getSpmStatus'), ret)
+
+ def test_info_storage(self):
+ ret = {'info':
+ {'name': 'No Description',
+ 'isoprefix': '',
+ 'pool_status': 'connected',
+ 'lver': 10,
+ 'domains': u'0900c0cd-8422-497a-85c5-1bb34b2b6b65:Active,794d',
+ 'master_uuid': '3d4accf7-74af-4ea0-b59b-eb9f10eedb83',
+ 'version': '3',
+ 'spm_id': 1,
+ 'type': 'ISCSI',
+ 'master_ver': 33},
+ 'dominfo': {u'0900c0cd-8422-497a-85c5-1bb34b2b6b65':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3},
+ u'794dc113-315f-43e3-ae47-0b7b1bf56427':
+ {'status': u'Active',
+ 'diskfree': '48855252992',
+ 'isoprefix': '',
+ 'alerts': [],
+ 'disktotal': '53284438016',
+ 'version': 3}}}
+
+ _schema.schema().verify_retval(
+ vdsmapi.MethodRep('StoragePool', 'getInfo'), ret)
--
To view, visit https://gerrit.ovirt.org/59707
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeadf2323d2a3535a5777d0cc16027cfb9e42f0e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years, 1 month
Change in vdsm[master]: yml: parameter type fixes for StoragePool.connect
by Piotr Kliczewski
Piotr Kliczewski has uploaded a new change for review.
Change subject: yml: parameter type fixes for StoragePool.connect
......................................................................
yml: parameter type fixes for StoragePool.connect
Change-Id: I19b6f25c17e697702ec61eba6b11f256c1df4d83
Signed-off-by: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
---
M lib/api/vdsm-api.yml
M tests/vdsmapi_test.py
2 files changed, 18 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/59702/1
diff --git a/lib/api/vdsm-api.yml b/lib/api/vdsm-api.yml
index 5eb091c..6cb6c9a 100644
--- a/lib/api/vdsm-api.yml
+++ b/lib/api/vdsm-api.yml
@@ -5599,11 +5599,11 @@
name: StorageDomainStatus
type: enum
values:
- Active: The domain is attached to a Storage Pool and is activated
- Attached: The domain is attached to a Storage Pool but is
+ active: The domain is attached to a Storage Pool and is activated
+ attached: The domain is attached to a Storage Pool but is
deactivated
- Unattached: The domain is not attached to a Storage Pool
- Unknown: The status of the Storage Domain is not known
+ unattached: The domain is not attached to a Storage Pool
+ unknown: The status of the Storage Domain is not known
StorageDomainStatusMap: &StorageDomainStatusMap
added: '3.1'
diff --git a/tests/vdsmapi_test.py b/tests/vdsmapi_test.py
index 38f5449..fac3bf4 100644
--- a/tests/vdsmapi_test.py
+++ b/tests/vdsmapi_test.py
@@ -502,3 +502,17 @@
_schema.schema().verify_args(
vdsmapi.MethodRep('StoragePool', 'connectStorageServer'),
params)
+
+ def test_sp_connect(self):
+ params = {u'masterVersion': 33,
+ u'domainDict':
+ {u'0900c0cd-8422-497a-85c5-1bb34b2b6b65': u'active',
+ u'794dc113-315f-43e3-ae47-0b7b1bf56427': u'active',
+ u'1d8235ee-c2ce-4c06-abd5-63b655fd66c5': u'active'},
+ u'storagepoolID': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'scsiKey': u'636d9c59-f7ba-4115-87a1-44d6563a9610',
+ u'masterSdUUID': u'3d4accf7-74af-4ea0-b59b-eb9f10eedb83',
+ u'hostID': 1}
+
+ _schema.schema().verify_args(
+ vdsmapi.MethodRep('StoragePool', 'connect'), params)
--
To view, visit https://gerrit.ovirt.org/59702
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19b6f25c17e697702ec61eba6b11f256c1df4d83
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
7 years, 1 month