<div dir="ltr"><div>I uploaded changes for this implementation. </div><div>Although It doesn't pass a jenkins test, It will be help to understand how to implement.</div> <a href="https://review.openstack.org/#/c/70576/">https://review.openstack.org/#/c/70576/</a><br>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-02-03 Jae Sang Lee <span dir="ltr"><<a href="mailto:hyangii@gmail.com" target="_blank">hyangii@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div>A blueprint is being discussed about the configurable locked vm api.</div><div> <a href="https://blueprints.launchpad.net/nova/+spec/configurable-locked-vm-api" target="_blank">https://blueprints.launchpad.net/nova/+spec/configurable-locked-vm-api</a></div>

<div><br></div><div>The current implementation does check vm is locked using decorate func.</div><div>(@check_instance_lock)</div><div><br></div><div>For example)</div><div>    @wrap_check_policy</div><div>    <b>@check_instance_lock</b></div>

<div>    @check_instance_cell</div><div>    @check_instance_state(vm_state=None, task_state=None,</div><div>                          must_have_launched=False)</div><div>    def delete(self, context, instance):</div><div>

        """Terminate an instance."""</div><div>        LOG.debug(_("Going to try to terminate instance"), instance=instance)</div><div>        self._delete_instance(context, instance)</div>

<div><br></div><div>When administrator want to change check vm is locked</div><div>(for example, he doesn't want to check vm is locked for reboot api.), </div><div>He must modify compute.api source code, remove decorate function </div>

<div>and restart service in this implementation.</div><div><br></div><div>I suggest admin configuration file for restricted API.</div><div>Administrator just modify conf file, doesn't need to modify source code, </div>

<div>and doesn't need to restart service. It will be separated from source code. </div><div>If conf file is not exist, api check logic will be executed so far. </div><div>There are no confusion.</div><div><br></div><div>

I think this implementation is not critical, </div><div>but it can be useful for admin cloud service any better.</div><div><br></div><div>Can you take a small amount of time to discuss this blueprint? </div><div><br></div>

<div>Thanks a lot.</div><div><br></div><div><br></div></div></div>
</blockquote></div><br></div>