*** wanghao has joined #openstack-mogan | 00:57 | |
*** wanghao_ has joined #openstack-mogan | 01:13 | |
*** wanghao has quit IRC | 01:13 | |
*** kevinz has joined #openstack-mogan | 01:20 | |
zhenguo | morning mogan! | 01:52 |
---|---|---|
liusheng | morning | 02:01 |
zhenguo | liusheng: hi, I have changed the api doc, use a seperated instance networks and instance states instead of instance management, hope you will like this style. | 02:04 |
liusheng | zhenguo: sure, I like this! | 02:05 |
zhenguo | liusheng: hah, thanks | 02:05 |
liusheng | zhenguo: does it has ben synced to our web page ? | 02:05 |
zhenguo | liusheng: yes, i updated the web page, before submit the patch, hah | 02:06 |
liusheng | zhenguo: cool! hah | 02:06 |
zhenguo | liusheng: need to add more APIs | 02:06 |
liusheng | zhenguo: APIs about what ? | 02:07 |
zhenguo | liusheng: states and networks | 02:07 |
zhenguo | liusheng: rebuild, rescue, attach/detach interfaces | 02:07 |
zhenguo | liusheng: flaoting ip, security group, firewall | 02:07 |
zhenguo | liusheng: seems nova already support attach/detach interfaces for baremetal intances, so it may be easy for us to implement | 02:08 |
liusheng | zhenguo: oh, I'd like to pick some easy tasks now, lol, the console I have very basically tested ok for shellinabox, but I want to put it off after spring festival, since it is a big tasks, lol | 02:09 |
liusheng | zhenguo: let's copy it from Nova | 02:09 |
zhenguo | liusheng: haha | 02:09 |
zhenguo | liusheng: maybe you can work for policy refactor | 02:09 |
liusheng | zhenguo: ok, I will do it | 02:10 |
zhenguo | liusheng: thanks | 02:11 |
liusheng | zhenguo: np | 02:11 |
zhenguo | liusheng: maybe we should not use a decorator, as we can't check the args | 02:12 |
zhenguo | liusheng: like we can only add a policy for set_power_state, but can't set start, stop, reboot seperately | 02:12 |
liusheng | zhenguo: the decorator make things uniformly, but I am not sure can we refactor the decoractor method to handle this situations, may be it should be treated as special cases ? | 02:15 |
liusheng | zhenguo: does this policy implementation referenced ironic's APIs ? | 02:16 |
zhenguo | liusheng: no | 02:17 |
zhenguo | liusheng: other projects just copied the codes in every API | 02:17 |
liusheng | zhenguo: lol | 02:17 |
zhenguo | liusheng: hah | 02:17 |
zhenguo | liusheng: this decorator is introduced by shaohe_feng, as he think they are ugly | 02:18 |
liusheng | zhenguo: hah | 02:18 |
zhenguo | liusheng: but I think they keep ugly is because it can't satisfy | 02:18 |
zhenguo | liusheng: we can be ugly like them to keep it at least work, hah | 02:19 |
liusheng | zhenguo: indeed decorator looks more clear, but it canno handle complex situations | 02:19 |
zhenguo | liusheng: yes | 02:19 |
liusheng | zhenguo: we can refactor the decorator method to handle the methods' paremeters, but the paremeters maybe various, wdyt ? | 02:20 |
zhenguo | liusheng: but seems you can't pass the parameters to decorator | 02:21 |
liusheng | zhenguo: or special cases special treatment ? or just remove all the decorators ? | 02:22 |
zhenguo | liusheng: not sure, the simplest way is just remove all decorators | 02:22 |
zhenguo | shaohe_feng: are you around? | 02:23 |
liusheng | zhenguo: we can get the paremeters of the funcs in decorators definition | 02:23 |
zhenguo | liusheng: how? | 02:23 |
* zhenguo @policy_check('set_power', target) | 02:24 | |
zhenguo | @policy_check('set_power', target) | 02:25 |
zhenguo | def set_power(target) | 02:25 |
zhenguo | liusheng: this way can't work, as target can't be passed to decorator | 02:25 |
zhenguo | def set_power(target): | 02:27 |
zhenguo | @policy_check('set_power', target) | 02:27 |
zhenguo | _set_power(target): | 02:27 |
zhenguo | ..... | 02:27 |
zhenguo | _set_power(target) | 02:27 |
liusheng | zhenguo: oh seems you are right | 02:27 |
zhenguo | liusheng: you can only pass them like the above example | 02:27 |
zhenguo | liusheng: but I think copy two lines of policy check is ok, and seems not that ugly than we expected | 02:28 |
liusheng | zhenguo: haha | 02:29 |
liusheng | zhenguo: still looks a bit ugly | 02:29 |
zhenguo | liusheng: hah | 02:29 |
zhenguo | liusheng: so jsut keep the way like other projects is ok | 02:29 |
liusheng | zhenguo: let me dig it | 02:30 |
zhenguo | liusheng: ok, thanks | 02:30 |
liusheng | zhenguo: np | 02:30 |
*** yuntongjin has joined #openstack-mogan | 02:40 | |
openstackgerrit | wanghao proposed openstack/mogan: [WIP]Quota support in Mogan(part 1) https://review.openstack.org/417326 | 03:31 |
openstackgerrit | wanghao proposed openstack/mogan: Quota support in Mogan(part 1) https://review.openstack.org/417326 | 03:43 |
*** yuntongjin has quit IRC | 03:55 | |
*** kevinz has quit IRC | 05:09 | |
*** yuntongjin has joined #openstack-mogan | 05:16 | |
*** kevinz has joined #openstack-mogan | 06:11 | |
shaohe_feng | zhenguo: I'm here. | 07:30 |
zhenguo | shaohe_feng: hi, | 07:30 |
shaohe_feng | zhenguo: hi. | 07:30 |
zhenguo | shaohe_feng: wrt policy check, do you have some suggestions, liusheng plans to work on that | 07:31 |
shaohe_feng | zhenguo: we need to improve the authorization? | 07:31 |
zhenguo | shaohe_feng: yes | 07:31 |
shaohe_feng | zhenguo: let me have a go through the message. | 07:31 |
zhenguo | shaohe_feng: ok, | 07:31 |
zhenguo | shaohe_feng: are you in office or at home, how are you doing? | 07:36 |
shaohe_feng | zhenguo: in office. | 07:37 |
zhenguo | shaohe_feng: oh, have you been to hospital? | 07:38 |
shaohe_feng | zhenguo: yes. | 07:38 |
shaohe_feng | zhenguo: I can not stare at screen for a long time. | 07:38 |
zhenguo | shaohe_feng: oh, | 07:39 |
shaohe_feng | zhenguo: doctor says I need more rest. | 07:39 |
zhenguo | shaohe_feng: yes, you must have rest, | 07:39 |
zhenguo | shaohe_feng: but only rest can solve that problems? | 07:40 |
shaohe_feng | zhenguo: about the authorization, there is one problem, the target can only be fetched dynamicly | 07:40 |
zhenguo | shaohe_feng: yes, so a decorator not satisfied | 07:41 |
shaohe_feng | zhenguo: no, I need a physical therapy | 07:41 |
shaohe_feng | zhenguo: let me see how to solve this problem. | 07:42 |
shaohe_feng | zhenguo: functools.partial is for this problem | 07:42 |
zhenguo | shaohe_feng: oh, hope you will be good quickly | 07:42 |
zhenguo | shaohe_feng: no quite familiar with that | 07:43 |
shaohe_feng | zhenguo: Thank you. maybe I can recover after this festival | 07:43 |
zhenguo | shaohe_feng: be alive again, hah, | 07:44 |
*** yuntongjin has quit IRC | 07:45 | |
shaohe_feng | zhenguo: y | 07:45 |
shaohe_feng | zhenguo: power_off = functools.partial(set_power_state, "mogan:power:off", "off") | 07:49 |
shaohe_feng | zhenguo: power_on = functools.partial(set_power_state, "mogan:power:on", "on") | 07:49 |
shaohe_feng | zhenguo: reboot = functools.partial(set_power_state, "mogan:power:reboot", "reboot") | 07:50 |
shaohe_feng | zhenguo: def set_power_state(policy, action) | 07:51 |
shaohe_feng | zhenguo: def set_power_state(policy, action, target) | 07:51 |
zhenguo | shaohe_feng: instead of that, how about just get rid of the decorator, and copied policy check in every functions, seems only two lines | 07:52 |
shaohe_feng | zhenguo: just a rough idea | 07:52 |
zhenguo | shaohe_feng: hah | 07:52 |
shaohe_feng | zhenguo: decorator is building time instead a run time. this is a problem. | 07:54 |
zhenguo | shaohe_feng: yes, I believe that's the reason why other projects don't use it | 07:55 |
*** openstackgerrit has quit IRC | 08:03 | |
shaohe_feng | zhenguo: actually, we can get many info of a function during run time. | 08:06 |
shaohe_feng | zhenguo: let me try. | 08:06 |
zhenguo | shaohe_feng: yes, thanks | 08:07 |
zhenguo | shaohe_feng: not sure if liusheng is already working on that | 08:07 |
zhenguo | liusheng: are you around? | 08:07 |
shaohe_feng | zhenguo: I notice, all openstack project do not use internal_redirection. | 08:08 |
liusheng | zhenguo: I didn't work on that | 08:09 |
zhenguo | hah | 08:09 |
liusheng | zhenguo, shaohe_feng any suggestion about the policy improvement ? | 08:12 |
liusheng | shaohe_feng: the situation may need to handle the paremeter in running time | 08:12 |
shaohe_feng | liusheng: python is a reflection and introspection language. | 08:14 |
shaohe_feng | zhenguo: liusheng: such as this link http://stackoverflow.com/questions/218616/getting-method-parameter-names-in-python | 08:15 |
liusheng | zhenguo: yes, I know that | 08:15 |
liusheng | zhenguo: the inspect module | 08:15 |
shaohe_feng | zhenguo: liusheng: this is an introspection example. | 08:15 |
liusheng | zhenguo: but we need the paremeter value, not the the paremeter name | 08:16 |
liusheng | zhenguo: the paremeter name always is 'target' | 08:16 |
liusheng | def power(self, instance_uuid, target): | 08:16 |
liusheng | shaohe_feng: ^^ | 08:16 |
shaohe_feng | liusheng: this link, can search: "# if you want names and values as a dictionary:“ | 08:18 |
zhenguo | shaohe_feng, liusheng: yes, do you really think nova's policy check way is that urgly, I think is ok, as in fact we have may codes like that | 08:18 |
zhenguo | s/urgly/ugly | 08:18 |
zhenguo | it's only two lines in fact | 08:19 |
zhenguo | just like you get rpc_instance in every function | 08:19 |
shaohe_feng | liusheng: in nimble/common/policy.py , the wrap pass the "fn", we can get the info of this "fn" | 08:19 |
liusheng | shaohe_feng: yes, we can get the paremeters, but we may need to add specific process for the power state APIs | 08:20 |
zhenguo | shaohe_feng: https://www.openstack.org/summit/boston-2017/call-for-presentations/ | 08:31 |
zhenguo | shaohe_feng: which category should we select | 08:31 |
zhenguo | shaohe_feng: we can send a draft today | 08:33 |
zhenguo | shaohe_feng: it can be updated before the deadline right? | 08:33 |
zhenguo | shaohe_feng: maybe one for mogan, and one for mogan+valence | 08:33 |
shaohe_feng | zhenguo: yes. what's the category list | 08:35 |
zhenguo | shaohe_feng: you can check by following the link, when adding a new presentation | 08:35 |
shaohe_feng | liusheng: Yes, seems some complex, we need some condition to choose the policy. | 08:36 |
shaohe_feng | zhenguo: let me check. | 08:36 |
zhenguo | shaohe_feng: thanks | 08:36 |
zhenguo | shaohe_feng: I would like to add one with title like 'Decouple bare-metal and virtualization computing management' | 08:40 |
shaohe_feng | zhenguo: let us filter one by one. | 08:42 |
shaohe_feng | zhenguo: first category is Arch and Op | 08:43 |
zhenguo | shaohe_feng: thanks, whats the GPU presentation category last summit | 08:43 |
* zhenguo brb | 08:44 | |
shaohe_feng | zhenguo: Architectural Decisions | 08:45 |
shaohe_feng | zhenguo: GPU is "How To & Best Practices" | 08:45 |
*** kevinz has quit IRC | 09:44 | |
*** wanghao_ has quit IRC | 10:26 | |
*** wanghao has joined #openstack-mogan | 11:50 | |
*** wanghao has quit IRC | 12:25 | |
*** Jeffrey4l_ is now known as Jeffrey4l | 13:42 | |
*** l4yerffeJ__ has joined #openstack-mogan | 19:10 | |
*** l4yerffeJ_ has quit IRC | 19:10 | |
*** l4yerffeJ has joined #openstack-mogan | 21:34 | |
*** Jeffrey4l_ has joined #openstack-mogan | 21:34 | |
*** l4yerffeJ__ has quit IRC | 21:35 | |
*** Jeffrey4l has quit IRC | 21:35 | |
*** l4yerffeJ has quit IRC | 22:16 | |
*** l4yerffeJ has joined #openstack-mogan | 22:16 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!