Revision bd0807fe lib/rapi/rlib2.py
b/lib/rapi/rlib2.py | ||
---|---|---|
1026 | 1026 |
if not isinstance(data, dict): |
1027 | 1027 |
raise http.HttpBadRequest("Invalid body contents, not a dictionary") |
1028 | 1028 |
|
1029 |
ostype = baserlib.CheckParameter(data, "os") |
|
1029 |
ostype = baserlib.CheckParameter(data, "os", default=None)
|
|
1030 | 1030 |
start = baserlib.CheckParameter(data, "start", exptype=bool, |
1031 | 1031 |
default=True) |
1032 | 1032 |
osparams = baserlib.CheckParameter(data, "osparams", default=None) |
... | ... | |
1062 | 1062 |
raise http.HttpBadRequest("Can't combine query and body parameters") |
1063 | 1063 |
|
1064 | 1064 |
body = self.request_body |
1065 |
else: |
|
1066 |
if not self.queryargs: |
|
1067 |
raise http.HttpBadRequest("Missing query parameters") |
|
1065 |
elif self.queryargs: |
|
1068 | 1066 |
# Legacy interface, do not modify/extend |
1069 | 1067 |
body = { |
1070 | 1068 |
"os": self._checkStringVariable("os"), |
1071 | 1069 |
"start": not self._checkIntVariable("nostartup"), |
1072 | 1070 |
} |
1071 |
else: |
|
1072 |
body = {} |
|
1073 | 1073 |
|
1074 | 1074 |
ops = _ParseInstanceReinstallRequest(self.items[0], body) |
1075 | 1075 |
|
Also available in: Unified diff