<div>Ok .thanks Jay<br>I consider it is error in novaclient before. </div>
<div>it is my misunderstand. thank you very much!</div>
<div> </div>
<div>lizheming<br><br></div>
<div class="gmail_quote">2014/1/20 Jay Lau <span dir="ltr"><<a href="mailto:jay.lau.513@gmail.com" target="_blank">jay.lau.513@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div dir="ltr">
<div>
<div>It is being fixed <a href="https://review.openstack.org/#/c/61717/" target="_blank">https://review.openstack.org/#/c/61717/</a><br><br></div>Thanks,<br><br></div>Jay<br></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">2014/1/20 li zheming <span dir="ltr"><<a href="mailto:lizheminghw@gmail.com" target="_blank">lizheminghw@gmail.com</a>></span><br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div class="h5">
<div>hi all:</div>
<div> <span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">when I use cmd nova migration-list, it return error,like this:</span><br style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">
<span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> <a href="mailto:openstack@devstack:/home$" target="_blank">openstack@</a></span><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">devstack:</span><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">/home$ nova migration-list</span><br style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">
<span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> ERROR: 'unicode' object has no attribute 'iteritems'</span></div>
<div><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"></span> </div>
<div><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> <span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">I step the codes and find the codes have some error.</span></span></div>
<div><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
python-novaclient/novaclient/base.py</p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
class Manager(utils.HookableMixin):<br> ......<br> def _list(self, url, response_key, obj_class=None, body=None):<br> if body:<br> _resp, body = self.api.client.post(url, body=body)<br> else:<br>
_resp, body = self.api.client.get(url)</p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
if obj_class is None:<br> obj_class = self.resource_class</p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
data = body[response_key]<br> # NOTE(ja): keystone returns values as list as {'values': [ ... ]}<br> # unlike other services which just return the list...<br> <font color="#ff0000">if isinstance(data, dict):<br>
try:<br> data = data['values']<br> except KeyError:<br> pass</font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
with self.completion_cache('human_id', obj_class, mode="w"):<br> with self.completion_cache('uuid', obj_class, mode="w"):<br> return [obj_class(self, res, loaded=True)<br>
<font color="#ff0000"> for res in data if res]</font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
I set a breakpoint in "<font color="#ff0000">data = data['values']", and find the date is </font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#ff0000"> <span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> {u'objects': []}}, it has no key named values.</span></font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#ff0000"><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> it except a keyError and pass.</span></font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#ff0000"><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> if go "<font color="#ff0000"> for res in data if res</font><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> </span>", the res is unicode "object", this will</span></font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#ff0000"><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> <span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:14px/22px arial;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"> </span><span style="TEXT-TRANSFORM:none;TEXT-INDENT:0px;FONT:14px/22px arial;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px">occur error in the next fun. </span></span></font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
do you met this issue? and someone who know why the comment say "<font color="#ff0000">keystone returns values as list as {'values': [ ... ]}"</font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#ff0000"> but I think this is not relevant</font><font color="#333333"><font face="Arial"> about keystone. may be I misunderstand this codes. please give me more info about this code. </font></font></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<font color="#333333"><font face="Arial"> thank you very much!</font><br></font></p></span></span><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"><span style="TEXT-ALIGN:left;TEXT-TRANSFORM:none;TEXT-INDENT:0px;DISPLAY:inline!important;FONT:12px/18px 'Ubuntu Mono',monospace;WHITE-SPACE:normal;FLOAT:none;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px"></span></span></div>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
<br></p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
</p>
<p style="TEXT-ALIGN:left;PADDING-BOTTOM:0px;TEXT-TRANSFORM:none;TEXT-INDENT:0px;MARGIN:0px 0px 1.2em;PADDING-LEFT:0px;WIDTH:auto;PADDING-RIGHT:0px;FONT:12px/18px 'Ubuntu Mono',monospace;MAX-WIDTH:45em;WHITE-SPACE:normal;LETTER-SPACING:normal;COLOR:rgb(51,51,51);WORD-SPACING:0px;PADDING-TOP:0px">
</p><br></div></div>_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div><br>_______________________________________________<br>OpenStack-dev mailing list<br><a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br>