Create pod failed due to invalid parameter
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-tricircleclient |
Fix Released
|
Medium
|
Sindhu Devale |
Bug Description
If we want to add a new pod in Tricircle, issue command like:
openstack --debug --os-region-
then failure will happen, it's because that the command is translated into curl:
REQ: curl -g -i -X POST http://
"dc_name" and pod_az_name are not provided in the command, so it should not be passed as "null" in curl request, these two parameter are no need to be included in the curl request, i.e, if it's optional parameter, then there is no need to use "null" value in the curl request...
Changed in python-tricircleclient: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
assignee: | nobody → Sindhu Devale (sindhu-devale-3) |
Changed in python-tricircleclient: | |
assignee: | Sindhu Devale (sindhu-devale-3) → Chaoyi Huang (joehuang) |
assignee: | Chaoyi Huang (joehuang) → Victor Morales (electrocucaracha) |
Changed in python-tricircleclient: | |
assignee: | Victor Morales (electrocucaracha) → Sindhu Devale (sindhu-devale-3) |
Changed in python-tricircleclient: | |
assignee: | Sindhu Devale (sindhu-devale-3) → Victor Morales (electrocucaracha) |
Changed in python-tricircleclient: | |
assignee: | Victor Morales (electrocucaracha) → Sindhu Devale (sindhu-devale-3) |
Sindhu,
The main problem is that those values are optional but they considered as required in the _pod_from_args function, can you apply this change?
diff --git a/tricircleclie nt/v1/pods_ cli.py b/tricircleclie nt/v1/pods_ cli.py nt/v1/pods_ cli.py nt/v1/pods_ cli.py command. ShowOne) :
index 232247e..73cbef0 100644
--- a/tricircleclie
+++ b/tricircleclie
@@ -46,11 +46,20 @@ class CreatePod(
@staticmethod args(parsed_ args): args.region_ name, args.availabili ty_zone, args.pod_ availability_ zone, args.data_ center, args.region_ name, args.availabili ty_zone, args.pod_ availability_ zone: 'pod_az_ name'] = parsed_ args.pod_ availability_ zone args.data_ center: args.data_ center
def _pod_from_
- return {'pod': {'region_name': parsed_
- 'az_name': parsed_
- 'pod_az_name': parsed_
- 'dc_name': parsed_
- }}
+ result = {
+ 'pod':
+ {
+ 'region_name': parsed_
+ 'az_name': parsed_
+ }
+ }
+ if parsed_
+ result[
+
+ if parsed_
+ result['dc_name'] = parsed_
+
+ return result
def get_parser(self, prog_name): parser( prog_name)
parser = super(CreatePod, self).get_