On Tue, May 13, 2014 at 7:39 PM, Hrvoje Ribicic <[email protected]> wrote:

> On Tue, May 13, 2014 at 10:43 AM, 'Jose A. Lopes' via ganeti-devel <
> [email protected]> wrote:
>
>> This helper method either picks up the package passed through the OS
>> parameters or creates a new package and updates the instance's OS
>> parameters.  This allows users to add their own OS install package.
>>
>> Signed-off-by: Jose A. Lopes <[email protected]>
>> ---
>>  lib/cmdlib/instance.py | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/lib/cmdlib/instance.py b/lib/cmdlib/instance.py
>> index d730175..f2fb187 100644
>> --- a/lib/cmdlib/instance.py
>> +++ b/lib/cmdlib/instance.py
>> @@ -1508,6 +1508,17 @@ class LUInstanceCreate(LogicalUnit):
>>            result.Warn("Failed to run rename script for %s on node %s" %
>>                        (self.op.instance_name, self.pnode.name),
>> self.LogWarning)
>>
>> +  def UpdateInstanceOsInstallPackage(self, feedback_fn, instance):
>>
>
> Missing docstring ;)
>
>
>> +    if "os-install-package" in instance.osparams:
>> +      feedback_fn("Using OS install package '%s'" %
>> +                  instance.osparams["os-install-package"])
>> +    else:
>> +      result = self.rpc.call_os_export(instance.primary_node, instance)
>> +      result.Raise("Could not export OS '%s'" % instance.os)
>> +      instance.osparams["os-install-package"] = result.payload
>> +
>> +      feedback_fn("Created OS install package '%s'" % result.payload)
>> +
>>    def Exec(self, feedback_fn):
>>      """Create and add the instance to the cluster.
>>
>> --
>> 1.9.1.423.g4596e3a
>>
>>
> My comment for patch 17 may require some changes here - please look at
> that one first.
>

Actually, scratch that, just the docstring here :)

Reply via email to