Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-11 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 10:

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

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-11 Thread danken
Dan Kenigsberg has submitted this change and it was merged.

Change subject: jsonrpc: provide more info when method not found
..


jsonrpc: provide more info when method not found

When there was no method to be invoked we returned generic exception
without any information about missing method. Now we return this info.


Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Signed-off-by: pkliczewski 
Reviewed-on: https://gerrit.ovirt.org/53714
Reviewed-by: Yaniv Bronhaim 
Reviewed-by: Nir Soffer 
Continuous-Integration: Jenkins CI
---
M lib/yajsonrpc/__init__.py
M tests/integration/jsonRpcTests.py
2 files changed, 16 insertions(+), 12 deletions(-)

Approvals:
  Piotr Kliczewski: Verified
  Nir Soffer: Looks good to me, approved
  Yaniv Bronhaim: Looks good to me, but someone else must approve
  Jenkins CI: Passed CI tests



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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Dan Kenigsberg 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-10 Thread automation
gerrit-hooks has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 9:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 8:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 8
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 7:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 6:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-07 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 5: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-06 Thread ybronhei
Yaniv Bronhaim has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-03-03 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 5: Verified+1

Verified by host deploying vdsm and seeing that there are no issues.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 5:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-29 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/53714/4/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 63: class JsonRpcMethodNotFoundError(JsonRpcError):
Line 64: def __init__(self, method_name):
Line 65: JsonRpcError.__init__(
Line 66: self, -32601,
Line 67: "The method %s does not exist or is not available." % 
method_name)
> Better use %r - if the error is leading or trailing whitespace, or non-prin
Done
Line 68: 
Line 69: 
Line 70: class JsonRpcInvalidParamsError(JsonRpcError):
Line 71: def __init__(self):


https://gerrit.ovirt.org/#/c/53714/4/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 138: with constructClient(self.log, bridge, ssl, type) as 
clientFactory:
Line 139: with self._client(clientFactory) as client:
Line 140: if type == "xml":
Line 141: response = client.send(missing_method, ())
Line 142: self.assertTrue("\"I_DO_NOT_EXIST :(\" is not 
supported"
> Why not:
Will check
Line 143: in response)
Line 144: else:
Line 145: with self.assertRaises(JsonRpcError) as cm:
Line 146: self._callTimeout(client, missing_method, [],


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-29 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/53714/4/lib/yajsonrpc/__init__.py
File lib/yajsonrpc/__init__.py:

Line 63: class JsonRpcMethodNotFoundError(JsonRpcError):
Line 64: def __init__(self, method_name):
Line 65: JsonRpcError.__init__(
Line 66: self, -32601,
Line 67: "The method %s does not exist or is not available." % 
method_name)
Better use %r - if the error is leading or trailing whitespace, or 
non-printable character in the method name, %r will expose this. This is true 
for most logs where you want to show user provided string.
Line 68: 
Line 69: 
Line 70: class JsonRpcInvalidParamsError(JsonRpcError):
Line 71: def __init__(self):


https://gerrit.ovirt.org/#/c/53714/4/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 138: with constructClient(self.log, bridge, ssl, type) as 
clientFactory:
Line 139: with self._client(clientFactory) as client:
Line 140: if type == "xml":
Line 141: response = client.send(missing_method, ())
Line 142: self.assertTrue("\"I_DO_NOT_EXIST :(\" is not 
supported"
Why not:

self.assertNotIn(missing_method, response)

?
Line 143: in response)
Line 144: else:
Line 145: with self.assertRaises(JsonRpcError) as cm:
Line 146: self._callTimeout(client, missing_method, [],


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-29 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 4: Verified+1

Verified by host deploying the host and seeing no issues.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 4:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-28 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/3/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
Line 152: self.assertTrue(missing_method in 
cm.exception.message)
> Better use assertIn() - we will get better error message on failures.
Done
Line 153: 
Line 154: @permutations(PERMUTATIONS)
Line 155: def testMethodBadParameters(self, ssl, type):
Line 156: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-27 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/3/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
Line 152: self.assertTrue(missing_method in 
cm.exception.message)
Better use assertIn() - we will get better error message on failures.
Line 153: 
Line 154: @permutations(PERMUTATIONS)
Line 155: def testMethodBadParameters(self, ssl, type):
Line 156: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 3:

* 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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-24 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/2/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 147:   CALL_ID)
Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
> So in another patch, we should fix the jsonrpc errors so the error code is 
OK, will push a patch outside of this topic
Line 152: 
Line 153: @permutations(PERMUTATIONS)
Line 154: def testMethodBadParameters(self, ssl, type):
Line 155: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-24 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/2/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 147:   CALL_ID)
Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
> It is instance attribute so we need to construct it.
So in another patch, we should fix the jsonrpc errors so the error code is a 
class attribute, and of course inherit from vdsm.exception.VdsmException.
Line 152: 
Line 153: @permutations(PERMUTATIONS)
Line 154: def testMethodBadParameters(self, ssl, type):
Line 155: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-24 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/2/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 147:   CALL_ID)
Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
> Will update
It is instance attribute so we need to construct it.
Line 152: 
Line 153: @permutations(PERMUTATIONS)
Line 154: def testMethodBadParameters(self, ssl, type):
Line 155: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-24 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/2/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 147:   CALL_ID)
Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
> You are not testing here that missing_method was included in the error.
Will update
Line 152: 
Line 153: @permutations(PERMUTATIONS)
Line 154: def testMethodBadParameters(self, ssl, type):
Line 155: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-23 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/2/tests/integration/jsonRpcTests.py
File tests/integration/jsonRpcTests.py:

Line 147:   CALL_ID)
Line 148: 
Line 149: self.assertEquals(
Line 150: cm.exception.code,
Line 151: 
JsonRpcMethodNotFoundError(missing_method).code)
You are not testing here that missing_method was included in the error.

Do we get the error attributes in the client, or only the error code?

If you want to check the code, you should do:

JsonRpcMethodNotFoundError.code

(Assuming that the code is a class attribute).
Line 152: 
Line 153: @permutations(PERMUTATIONS)
Line 154: def testMethodBadParameters(self, ssl, type):
Line 155: # Without a schema the server returns an internal error


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-18 Thread piotr . kliczewski
Piotr Kliczewski has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/1/vdsm/rpc/Bridge.py
File vdsm/rpc/Bridge.py:

Line 74: result = None
Line 75: try:
Line 76: fn = getattr(self, methodName)
Line 77: except AttributeError:
Line 78: raise yajsonrpc.JsonRpcMethodNotFoundError(methodName)
> Why do you fix dead code? better remove it before this patch so you don't h
OK will add a patch to remove dead code.
Line 79: 
Line 80: try:
Line 81: result = fn(argobj)
Line 82: except VdsmError as e:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Piotr Kliczewski 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-18 Thread nsoffer
Nir Soffer has posted comments on this change.

Change subject: jsonrpc: provide more info when method not found
..


Patch Set 1:

(1 comment)

https://gerrit.ovirt.org/#/c/53714/1/vdsm/rpc/Bridge.py
File vdsm/rpc/Bridge.py:

Line 74: result = None
Line 75: try:
Line 76: fn = getattr(self, methodName)
Line 77: except AttributeError:
Line 78: raise yajsonrpc.JsonRpcMethodNotFoundError(methodName)
Why do you fix dead code? better remove it before this patch so you don't have 
to "fix" it.
Line 79: 
Line 80: try:
Line 81: result = fn(argobj)
Line 82: except VdsmError as e:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: Nir Soffer 
Gerrit-Reviewer: Yaniv Bronhaim 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: Yes
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

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

Change subject: jsonrpc: provide more info when method not found
..


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-3.5', 'ovirt-3.4', 'ovirt-3.3'])

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
Gerrit-Reviewer: gerrit-hooks 
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: jsonrpc: provide more info when method not found

2016-02-18 Thread piotr . kliczewski
Piotr Kliczewski has uploaded a new change for review.

Change subject: jsonrpc: provide more info when method not found
..

jsonrpc: provide more info when method not found

When there was no method to be invoked we returned generic exception
without any information about missing method. Now we return this info.


Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Signed-off-by: pkliczewski 
---
M lib/yajsonrpc/__init__.py
M tests/integration/jsonRpcTests.py
M vdsm/rpc/Bridge.py
3 files changed, 15 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/53714/1

diff --git a/lib/yajsonrpc/__init__.py b/lib/yajsonrpc/__init__.py
index a5e42b8..3724a91 100644
--- a/lib/yajsonrpc/__init__.py
+++ b/lib/yajsonrpc/__init__.py
@@ -61,9 +61,10 @@
 
 
 class JsonRpcMethodNotFoundError(JsonRpcError):
-def __init__(self):
-JsonRpcError.__init__(self, -32601,
-  "The method does not exist / is not available.")
+def __init__(self, method_name):
+JsonRpcError.__init__(
+self, -32601,
+"The method %s does not exist or is not available." % method_name)
 
 
 class JsonRpcInvalidParamsError(JsonRpcError):
@@ -513,9 +514,9 @@
 if req.isNotification():
 return
 
-ctx.requestDone(JsonRpcResponse(None,
-JsonRpcMethodNotFoundError(),
-req.id))
+ctx.requestDone(JsonRpcResponse(
+None, JsonRpcMethodNotFoundError(mangledMethod),
+req.id))
 return
 
 try:
diff --git a/tests/integration/jsonRpcTests.py 
b/tests/integration/jsonRpcTests.py
index 7da9743..5a968ab 100644
--- a/tests/integration/jsonRpcTests.py
+++ b/tests/integration/jsonRpcTests.py
@@ -132,20 +132,23 @@
 
 @permutations(PERMUTATIONS)
 def testMethodMissingMethod(self, ssl, type):
+missing_method = "I.DO.NOT.EXIST :("
+
 bridge = _DummyBridge()
 with constructClient(self.log, bridge, ssl, type) as clientFactory:
 with self._client(clientFactory) as client:
 if type == "xml":
-response = client.send("I.DO.NOT.EXIST :(", ())
+response = client.send(missing_method, ())
 self.assertTrue("\"I.DO.NOT.EXIST :(\" is not supported"
 in response)
 else:
 with self.assertRaises(JsonRpcError) as cm:
-self._callTimeout(client, "I.DO.NOT.EXIST :(", [],
+self._callTimeout(client, missing_method, [],
   CALL_ID)
 
-self.assertEquals(cm.exception.code,
-  JsonRpcMethodNotFoundError().code)
+self.assertEquals(
+cm.exception.code,
+JsonRpcMethodNotFoundError(missing_method).code)
 
 @permutations(PERMUTATIONS)
 def testMethodBadParameters(self, ssl, type):
diff --git a/vdsm/rpc/Bridge.py b/vdsm/rpc/Bridge.py
index b967ee4..ffb2b0d 100644
--- a/vdsm/rpc/Bridge.py
+++ b/vdsm/rpc/Bridge.py
@@ -75,7 +75,7 @@
 try:
 fn = getattr(self, methodName)
 except AttributeError:
-raise yajsonrpc.JsonRpcMethodNotFoundError()
+raise yajsonrpc.JsonRpcMethodNotFoundError(methodName)
 
 try:
 result = fn(argobj)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib29240f002ab7c11744d164cf4e0ea5f47924929
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski 
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches