Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 3:

* Update tracker: IGNORE, no Bug-Url found
* Set MODIFIED::IGNORE, no Bug-Url found.

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 2: Verified+1

still passes unit tests

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: tests: split vmfakecon out of vmfakelib
..


tests: split vmfakecon out of vmfakelib

vmfakelib contains both a fake ClientIF and a fake libvirtconnection.
Unlike ClientIF, libvirtconnection is a smaller entity that is easier to
move and possible to import from lib/vdsm as well as from py3.

This patch moves libvirtconnection into another module so it is
usable by py3 tests.

Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Signed-off-by: Dan Kenigsberg 
Reviewed-on: https://gerrit.ovirt.org/63197
Reviewed-by: Francesco Romani 
Continuous-Integration: Jenkins CI
---
M tests/vmSecretTests.py
A tests/vmfakecon.py
M tests/vmfakelib.py
3 files changed, 172 insertions(+), 148 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Dan Kenigsberg: Verified
  Francesco Romani: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 2: Code-Review+2

for the greater good!

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 2:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-16 Thread fromani
Francesco Romani has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1: Code-Review-1

(1 comment)

-1 for visibility
Not a fan of this split, but will turn a blind eye for the greater good of py3. 
We just miss the copyright boilerplate.

https://gerrit.ovirt.org/#/c/63197/1/tests/vmfakecon.py
File tests/vmfakecon.py:

Line 1: import os
missing copyright boilerplate
Line 2: import xml.etree.ElementTree as etree
Line 3: 
Line 4: import libvirt
Line 5: 


-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-06 Thread danken
Dan Kenigsberg has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1: Verified+1

unit tests still pass

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Francesco Romani 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-05 Thread Tomas Golembiovsky
Tomas Golembiovsky has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1:

Actually, what about removing vmSecretTests.py from blacklisted tests? Or will 
that go into some other patch?

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-05 Thread Tomas Golembiovsky
Tomas Golembiovsky has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-05 Thread mzamazal
Milan Zamazal has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik 
Gerrit-Reviewer: Milan Zamazal 
Gerrit-Reviewer: Tomas Golembiovsky 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org


Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-02 Thread danken
Dan Kenigsberg has uploaded a new change for review.

Change subject: tests: split vmfakecon out of vmfakelib
..

tests: split vmfakecon out of vmfakelib

vmfakelib contains both a fake ClientIF and a fake libvirtconnection.
Unlike ClientIF, libvirtconnection is a smaller entity that is easier to
move and possible to import from lib/vdsm as well as from py3.

This patch moves libvirtconnection into another module so it is
usable by py3 tests.

Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Signed-off-by: Dan Kenigsberg 
---
M tests/vmSecretTests.py
A tests/vmfakecon.py
M tests/vmfakelib.py
3 files changed, 151 insertions(+), 148 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/63197/1

diff --git a/tests/vmSecretTests.py b/tests/vmSecretTests.py
index b680dea..698eb70 100644
--- a/tests/vmSecretTests.py
+++ b/tests/vmSecretTests.py
@@ -26,7 +26,7 @@
 from monkeypatch import Patch
 from testlib import VdsmTestCase, XMLTestCase
 from testlib import expandPermutations, permutations
-import vmfakelib
+import vmfakecon
 
 from vdsm import libvirtconnection
 from vdsm import response
@@ -70,7 +70,7 @@
 def test_register(self):
 params = make_secret(password="12345678")
 sec = secret.Secret(params)
-con = vmfakelib.Connection()
+con = vmfakecon.Connection()
 sec.register(con)
 virsec = con.secrets[sec.uuid]
 self.assertEqual(virsec.value, "12345678")
@@ -153,7 +153,7 @@
 class APITests(VdsmTestCase):
 
 def setUp(self):
-self.connection = vmfakelib.Connection()
+self.connection = vmfakecon.Connection()
 self.patch = Patch([
 (libvirtconnection, 'get', lambda: self.connection)
 ])
@@ -165,9 +165,9 @@
 
 def test_clear(self):
 self.connection.secrets = {
-"uuid1": vmfakelib.Secret(self.connection, "uuid1", "ceph",
+"uuid1": vmfakecon.Secret(self.connection, "uuid1", "ceph",
   "ovirt/name1", None),
-"uuid2": vmfakelib.Secret(self.connection, "uuid2", "ceph",
+"uuid2": vmfakecon.Secret(self.connection, "uuid2", "ceph",
   "name2", None),
 }
 secret.clear()
@@ -176,11 +176,11 @@
 
 def test_clear_skip_failed(self):
 def fail():
-raise vmfakelib.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
+raise vmfakecon.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
 self.connection.secrets = {
-"uuid1": vmfakelib.Secret(self.connection, "uuid1", "ceph",
+"uuid1": vmfakecon.Secret(self.connection, "uuid1", "ceph",
   "ovirt/name1", None),
-"uuid2": vmfakelib.Secret(self.connection, "uuid2", "ceph",
+"uuid2": vmfakecon.Secret(self.connection, "uuid2", "ceph",
   "ovirt/name2", None),
 }
 self.connection.secrets["uuid1"].undefine = fail
@@ -227,9 +227,9 @@
 
 def test_register_clear(self):
 self.connection.secrets = {
-"uuid1": vmfakelib.Secret(self.connection, "uuid1", "ceph",
+"uuid1": vmfakecon.Secret(self.connection, "uuid1", "ceph",
   "ovirt/name1", None),
-"uuid2": vmfakelib.Secret(self.connection, "uuid2", "ceph",
+"uuid2": vmfakecon.Secret(self.connection, "uuid2", "ceph",
   "name2", None),
 }
 sec = make_secret()
@@ -246,7 +246,7 @@
 
 def test_register_libvirt_error(self):
 def fail(xml):
-raise vmfakelib.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
+raise vmfakecon.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
 self.connection.secretDefineXML = fail
 res = secret.register([make_secret()])
 self.assertEqual(res, response.error("secretRegisterErr"))
@@ -280,7 +280,7 @@
 
 def test_unregister_libvirt_error(self):
 def fail(uuid):
-raise vmfakelib.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
+raise vmfakecon.Error(libvirt.VIR_ERR_INTERNAL_ERROR)
 self.connection.secretLookupByUUIDString = fail
 res = secret.unregister([str(uuid.uuid4())])
 self.assertEqual(res, response.error("secretUnregisterErr"))
diff --git a/tests/vmfakecon.py b/tests/vmfakecon.py
new file mode 100644
index 000..5d14c01
--- /dev/null
+++ b/tests/vmfakecon.py
@@ -0,0 +1,138 @@
+import os
+import xml.etree.ElementTree as etree
+
+import libvirt
+
+
+def Error(code, msg="fake error"):
+e = libvirt.libvirtError(msg)
+e.err = [code, None, msg]
+return e
+
+
+class Connection(object):
+
+def __init__(self, *args):
+self.secrets = {}
+
+def secretDefineXML(self, xml):
+uuid, usage_type, usage_id, description = parse_secret(xml)
+if uuid in 

Change in vdsm[master]: tests: split vmfakecon out of vmfakelib

2016-09-02 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: tests: split vmfakecon out of vmfakelib
..


Patch Set 1:

* Update tracker: IGNORE, no Bug-Url found
* Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' 
and is a valid url.
* Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.6', 
'ovirt-4.0'])

-- 
To view, visit https://gerrit.ovirt.org/63197
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id393cf07c0de8ea06dceec3d79e5d618f79fa6cc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/vdsm-patches@lists.fedorahosted.org