Tuesday, 2017-01-24

*** wanghao has joined #openstack-mogan00:57
*** wanghao_ has joined #openstack-mogan01:13
*** wanghao has quit IRC01:13
*** kevinz has joined #openstack-mogan01:20
zhenguomorning mogan!01:52
zhenguoliusheng: 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
liushengzhenguo: sure, I like this!02:05
zhenguoliusheng: hah, thanks02:05
liushengzhenguo: does it has ben synced to our web page ?02:05
zhenguoliusheng: yes, i updated the web page, before submit the patch, hah02:06
liushengzhenguo: cool! hah02:06
zhenguoliusheng: need to add more APIs02:06
liushengzhenguo: APIs about what ?02:07
zhenguoliusheng: states and networks02:07
zhenguoliusheng: rebuild, rescue, attach/detach interfaces02:07
zhenguoliusheng: flaoting ip, security group, firewall02:07
zhenguoliusheng: seems nova already support attach/detach interfaces for baremetal intances, so it may be easy for us to implement02:08
liushengzhenguo: 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, lol02:09
liushengzhenguo: let's copy it from Nova02:09
zhenguoliusheng: haha02:09
zhenguoliusheng: maybe you can work for policy refactor02:09
liushengzhenguo: ok, I will do it02:10
zhenguoliusheng: thanks02:11
liushengzhenguo: np02:11
zhenguoliusheng: maybe we should not use a decorator, as we can't check the args02:12
zhenguoliusheng: like we can only add a policy for set_power_state, but can't set start, stop, reboot seperately02:12
liushengzhenguo: 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
liushengzhenguo: does this policy implementation referenced ironic's APIs ?02:16
zhenguoliusheng: no02:17
zhenguoliusheng: other projects just copied the codes in every API02:17
liushengzhenguo: lol02:17
zhenguoliusheng: hah02:17
zhenguoliusheng: this decorator is introduced by shaohe_feng, as he think they are ugly02:18
liushengzhenguo: hah02:18
zhenguoliusheng: but I think they keep ugly is because it can't satisfy02:18
zhenguoliusheng: we can be ugly like them to keep it at least work, hah02:19
liushengzhenguo: indeed decorator looks more clear, but it canno handle complex situations02:19
zhenguoliusheng: yes02:19
liushengzhenguo: we can refactor the decorator method to handle the methods' paremeters, but the paremeters maybe various, wdyt ?02:20
zhenguoliusheng: but seems you can't pass the parameters to decorator02:21
liushengzhenguo: or special cases special treatment ? or just remove all the decorators ?02:22
zhenguoliusheng: not sure, the simplest way is just remove all decorators02:22
zhenguoshaohe_feng: are you around?02:23
liushengzhenguo: we can get the paremeters of the funcs in decorators definition02:23
zhenguoliusheng: how?02:23
* zhenguo @policy_check('set_power', target)02:24
zhenguo@policy_check('set_power', target)02:25
zhenguodef set_power(target)02:25
zhenguoliusheng: this way can't work, as target can't be passed to decorator02:25
zhenguodef set_power(target):02:27
zhenguo    @policy_check('set_power', target)02:27
zhenguo    _set_power(target):02:27
zhenguo        .....02:27
liushengzhenguo: oh seems you are right02:27
zhenguoliusheng: you can only pass them like the above example02:27
zhenguoliusheng: but I think copy two lines of policy check is ok, and seems not that ugly than we expected02:28
liushengzhenguo: haha02:29
liushengzhenguo: still looks a bit ugly02:29
zhenguoliusheng: hah02:29
zhenguoliusheng: so jsut keep the way like other projects is ok02:29
liushengzhenguo: let me dig it02:30
zhenguoliusheng: ok, thanks02:30
liushengzhenguo: np02:30
*** yuntongjin has joined #openstack-mogan02:40
openstackgerritwanghao proposed openstack/mogan: [WIP]Quota support in Mogan(part 1)  https://review.openstack.org/41732603:31
openstackgerritwanghao proposed openstack/mogan: Quota support in Mogan(part 1)  https://review.openstack.org/41732603:43
*** yuntongjin has quit IRC03:55
*** kevinz has quit IRC05:09
*** yuntongjin has joined #openstack-mogan05:16
*** kevinz has joined #openstack-mogan06:11
shaohe_fengzhenguo: I'm here.07:30
zhenguoshaohe_feng: hi,07:30
shaohe_fengzhenguo: hi.07:30
zhenguoshaohe_feng: wrt policy check, do you have some suggestions, liusheng plans to work on that07:31
shaohe_fengzhenguo: we need to improve the authorization?07:31
zhenguoshaohe_feng: yes07:31
shaohe_fengzhenguo: let me have a go through the message.07:31
zhenguoshaohe_feng: ok,07:31
zhenguoshaohe_feng: are you in office or at home, how are you doing?07:36
shaohe_fengzhenguo: in office.07:37
zhenguoshaohe_feng: oh, have you been to hospital?07:38
shaohe_fengzhenguo: yes.07:38
shaohe_fengzhenguo: I can not stare at screen for a long time.07:38
zhenguoshaohe_feng: oh,07:39
shaohe_fengzhenguo: doctor says I need more rest.07:39
zhenguoshaohe_feng: yes, you must have rest,07:39
zhenguoshaohe_feng: but only rest can solve that problems?07:40
shaohe_fengzhenguo: about the authorization, there is one problem, the target can only be fetched dynamicly07:40
zhenguoshaohe_feng: yes, so a decorator not satisfied07:41
shaohe_fengzhenguo: no, I need a physical therapy07:41
shaohe_fengzhenguo: let me see how to solve this problem.07:42
shaohe_fengzhenguo: functools.partial is for this problem07:42
zhenguoshaohe_feng: oh, hope you will be good quickly07:42
zhenguoshaohe_feng: no quite familiar with that07:43
shaohe_fengzhenguo: Thank you. maybe I can recover after this festival07:43
zhenguoshaohe_feng: be alive again, hah,07:44
*** yuntongjin has quit IRC07:45
shaohe_fengzhenguo: y07:45
shaohe_fengzhenguo: power_off = functools.partial(set_power_state, "mogan:power:off", "off")07:49
shaohe_fengzhenguo: power_on = functools.partial(set_power_state, "mogan:power:on", "on")07:49
shaohe_fengzhenguo: reboot = functools.partial(set_power_state, "mogan:power:reboot", "reboot")07:50
shaohe_fengzhenguo: def set_power_state(policy, action)07:51
shaohe_fengzhenguo: def set_power_state(policy, action, target)07:51
zhenguoshaohe_feng: instead of that, how about just get rid of the decorator, and copied policy check in every functions, seems only two lines07:52
shaohe_fengzhenguo: just a rough idea07:52
zhenguoshaohe_feng: hah07:52
shaohe_fengzhenguo: decorator is building time instead a run time. this is a problem.07:54
zhenguoshaohe_feng: yes, I believe that's the reason why other projects don't use it07:55
*** openstackgerrit has quit IRC08:03
shaohe_fengzhenguo:  actually, we can get many info of a function during run time.08:06
shaohe_fengzhenguo: let me try.08:06
zhenguoshaohe_feng: yes, thanks08:07
zhenguoshaohe_feng: not sure if liusheng is already working on that08:07
zhenguoliusheng: are you around?08:07
shaohe_fengzhenguo: I notice, all openstack project do not use internal_redirection.08:08
liushengzhenguo: I didn't work on that08:09
liushengzhenguo, shaohe_feng any suggestion about the policy improvement ?08:12
liushengshaohe_feng: the situation may need to handle the paremeter in running time08:12
shaohe_fengliusheng: python is a reflection and introspection language.08:14
shaohe_fengzhenguo: liusheng: such as this link  http://stackoverflow.com/questions/218616/getting-method-parameter-names-in-python08:15
liushengzhenguo: yes, I know that08:15
liushengzhenguo: the inspect module08:15
shaohe_fengzhenguo: liusheng: this is an introspection example.08:15
liushengzhenguo: but we need the paremeter value, not the the paremeter name08:16
liushengzhenguo: the paremeter name always is 'target'08:16
liusheng    def power(self, instance_uuid, target):08:16
liushengshaohe_feng: ^^08:16
shaohe_fengliusheng: this link, can search:  "# if you want names and values as a dictionary:“08:18
zhenguoshaohe_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 that08:18
zhenguoit's only two lines in fact08:19
zhenguojust like you get rpc_instance in every function08:19
shaohe_fengliusheng: in nimble/common/policy.py , the wrap pass the "fn", we can get the info of this "fn"08:19
liushengshaohe_feng: yes, we can get the paremeters, but we may need to add specific process for the power state APIs08:20
zhenguoshaohe_feng: https://www.openstack.org/summit/boston-2017/call-for-presentations/08:31
zhenguoshaohe_feng: which category should we select08:31
zhenguoshaohe_feng: we can send a draft today08:33
zhenguoshaohe_feng: it can be updated before the deadline right?08:33
zhenguoshaohe_feng: maybe one for mogan, and one for mogan+valence08:33
shaohe_fengzhenguo: yes. what's the category list08:35
zhenguoshaohe_feng: you can check by following the link, when adding a new presentation08:35
shaohe_fengliusheng: Yes, seems some complex, we need some condition to choose the policy.08:36
shaohe_fengzhenguo: let me check.08:36
zhenguoshaohe_feng: thanks08:36
zhenguoshaohe_feng: I would like to add one with title like 'Decouple bare-metal and virtualization computing management'08:40
shaohe_fengzhenguo: let us filter one by one.08:42
shaohe_fengzhenguo: first category is Arch and Op08:43
zhenguoshaohe_feng: thanks, whats the GPU presentation category last summit08:43
* zhenguo brb08:44
shaohe_fengzhenguo: Architectural Decisions08:45
shaohe_fengzhenguo: GPU is "How To & Best Practices"08:45
*** kevinz has quit IRC09:44
*** wanghao_ has quit IRC10:26
*** wanghao has joined #openstack-mogan11:50
*** wanghao has quit IRC12:25
*** Jeffrey4l_ is now known as Jeffrey4l13:42
*** l4yerffeJ__ has joined #openstack-mogan19:10
*** l4yerffeJ_ has quit IRC19:10
*** l4yerffeJ has joined #openstack-mogan21:34
*** Jeffrey4l_ has joined #openstack-mogan21:34
*** l4yerffeJ__ has quit IRC21:35
*** Jeffrey4l has quit IRC21:35
*** l4yerffeJ has quit IRC22:16
*** l4yerffeJ has joined #openstack-mogan22:16

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!