Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report: lookup SLICE with match on SLICE_EXPIRED fails #394

Closed
wvdemeer opened this issue Aug 7, 2015 · 1 comment
Closed

Bug report: lookup SLICE with match on SLICE_EXPIRED fails #394

wvdemeer opened this issue Aug 7, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@wvdemeer
Copy link

wvdemeer commented Aug 7, 2015

A SLICE lookup call with both a match on SLICE_URN, and a match on "SLICE_EXPIRED: false", causes a server error.

Below is an example of the problem.

Request "lookup" call:

[
"SLICE",
[
   {
      "geni_type": "geni_sfa",
      "geni_version": "3",
      "geni_value": "... credential removed because not relevant ..."
      }
   ],
{
   "match": {
                 "SLICE_URN": [
                        "urn:publicid:IDN+ch.geni.net:ipv6proxy+slice+dummy"
                        ],
                 "SLICE_EXPIRED": false
                 }
   }
]

Server Reply:

{
"output": "[SERVER] SERVER_ERROR ('bool' object has no attribute 'lower')",
"code": 101,
"value": ""
}

I guess the server is expecting a string that contains the text "false", but a boolean is given. However, the API requires a boolean here.

tcmitchell added a commit to tcmitchell/geni-ch that referenced this issue Aug 7, 2015
Arguments denoted as BOOLEAN in the API spec are parsed as strings in
the argument checking. Make the BOOLEAN argument type more flexible by
allowing bool objects in addition to strings. Fixes GENI-NSF#394,
SLICE_EXPIRED caused a server error when a JSON boolean was passed.
@tcmitchell tcmitchell added the bug label Aug 7, 2015
@tcmitchell tcmitchell added this to the next-minor-release milestone Aug 7, 2015
@tcmitchell tcmitchell self-assigned this Aug 7, 2015
@tcmitchell
Copy link
Member

I was able to verify this issue with client.py. The BOOLEAN parsing in ArgumentCheck.py required the value to be in the set ['t', 'f', 'true', 'false']. It now allows values of type bool as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants