Greetings,
There is a way to instantiate Windows based instances on IBM SCE. The trick
is to use ex_configurationData argument. You can bypass NodeAuthSSHKey
completely. I've tried it just now and it works. Tomaz I'm happy for this
to be included in the official libcloud docs. If Jira is needed let me
know...
Example:
~~~~~~~~~~~~~~~~~~~~~~~~~
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
Driver = get_driver(Provider.IBM)
conn = Driver("username", "password")
images = conn.list_images()
for i in images:
if i.id == '20014110':
win=i
locations=conn.list_locations()
for i in locations:
if i.id == '82':
location=i
size=conn.list_sizes()[2]
node = conn.create_node(name="windows box", image=win, size=size,
ex_configurationData={'UserName':'someone', 'Password':'My0wnPass'},
location=location)
conn.list_nodes()
~~~~~~~~~~~~~~~~~~~~~~~~~
On 16 April 2013 06:11, Tomaz Muraus <[email protected]> wrote:
> I just quickly glanced over the code (
>
> https://github.com/apache/libcloud/blob/trunk/libcloud/compute/drivers/ibm_sce.py#L208
> )
> and it looks like that the driver currently only supports public key
> authentication.
>
> I'm not too familiar with the IBM SCE API myself, but if the API support
> this functionality, it should probably be relatively easy to add it and
> external contributions are always more than welcome.
>
> P.S. Please also CC mailing list ([email protected]) on the future
> emails.
>
> On Mon, Apr 15, 2013 at 1:05 PM, Mihai Garbia <[email protected]
> >wrote:
>
> > Can you give me an example of how it would look like for Windows. I
> > already know how to do it to provision Linux (it is a string name
> > representing a SSH key stored in SCE), but for windows only user and
> > password is required.
> >
> > Thanks.
> >
> > Mihai
> >
> > ------------------------------
> > Blog: experimentenaturiste.blogspot.ro
> >
> >
> > --- On *Mon, 15/4/13, Tomaz Muraus <[email protected]>* wrote:
> >
> >
> > From: Tomaz Muraus <[email protected]>
> > Subject: Re: String format for Windows provisioning on IBM SCE
> > To: [email protected]
> > Cc: [email protected]
> > Date: Monday, 15 April, 2013, 22:56
> >
> >
> > I'm not totally sure about the IBM SCE driver and Windows instances, but
> > usually you pass an instance of NodeAuthSSHKey or NodeAuthPassword class
> to
> > the create_node method as an "auth" argument.
> >
> > On Mon, Apr 15, 2013 at 4:59 AM, Mihai Garbia <[email protected]<
> http://mc/[email protected]>
> > > wrote:
> >
> >
> > Hello,
> >
> > Can you tell me what is the string format for user and password on
> > provisioning a Windows instance in IBM SCE using libcloud?
> >
> > I'm using NodeDriver(BaseDriver) : -> create_node to create a Windows
> > instance in IBM SCE.
> >
> > I cant find in the documentation what is the string format for the
> > username and password. This is what the docs for create_node say:
> > auth: L{NodeAuthSSHKey} or L{NodeAuthPassword}
> >
> > I tried with "user:pass" as in the official SCE API, but it does not work
> > in libcloud.
> >
> > The error I'm getting is:
> > "Exception: Error 412: The parameter (UserName) is required while
> creating
> > Windows instance."
> >
> >
> > Thanks.
> >
> >
> > Mihai
> >
> >
> >
> >
>
--
sengork