[one-users] Question regarding Image.allocate method
Carlos Martín Sánchez
cmartin at opennebula.org
Fri Mar 7 01:36:53 PST 2014
FYI, the java oca files can be downloaded from here:
http://downloads.opennebula.org/packages/opennebula-4.4.0/
Regards
--
Carlos Martín, MSc
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | cmartin at opennebula.org |
@OpenNebula<http://twitter.com/opennebula><cmartin at opennebula.org>
On Thu, Mar 6, 2014 at 3:51 PM, Javier Fontan <jfontan at opennebula.org>wrote:
> I think that's an old version of the java client api talking to a
> newer OpenNebula. With multiple datastores this ID should be
> specified.
>
> On Thu, Mar 6, 2014 at 2:45 PM, Roxana Ioana Roman
> <rroxanaioana at gmail.com> wrote:
> > I thought that there should be one too..But I am using the Image from
> > org.opennebula.client.image, and it only has this method:
> > public static OneResponse allocate(Client client, String string) { ..}
> >
> >
> > And I tried the previous imageTemplate from the command line (with
> oneimage
> > create ... and the datastore id) and it worked.
> > Am I using to wrong version of the java api or the wrong method?
> > Thank you!
> >
> >
> > 2014-03-06 15:37 GMT+02:00 Javier Fontan <jfontan at opennebula.org>:
> >
> >> There's one more parameter in that method, the datastore id.
> >>
> >> allocate(Client client, java.lang.String description, int datastoreId)
> >>
> >> http://docs.opennebula.org/doc/4.4/oca/java/
> >>
> >> On Thu, Mar 6, 2014 at 1:26 PM, Roxana Ioana Roman
> >> <rroxanaioana at gmail.com> wrote:
> >> > Hello!
> >> > I am trying to allocate a new image in OpenNebula using the
> >> > Image.allocate(client,imageTemplate) method from the Java api.
> >> >
> >> > I am doing:
> >> > OneResponse resonse =Image.allocate(client, image.toString());
> >> >
> >> > where image.toString() is:
> >> >
> >> > NAME = "ImageTest"
> >> > PATH = /var/lib/one/datastores/108/c10ddf1eb1bb078c4b1116652c5c9a55
> >> > PUBLIC = YES
> >> > PERSISTENT = NO
> >> > TYPE = OS
> >> > DESCRIPTION = "this is a test"
> >> >
> >> > response.getErrorMessage() is :"Not enough parameters"
> >> >
> >> > But as I read from:
> >> >
> >> >
> http://archives.opennebula.org/documentation:archives:rel3.4:img_template
> >> > I have set all the required parameters.
> >> > Do you know what am I missing? Any help will be much appreciated.
> >> >
> >> > Thank you!
> >> > Regards,
> >> > --
> >> > Roxana Ioana Roman
> >> >
> >> >
> >> > _______________________________________________
> >> > Users mailing list
> >> > Users at lists.opennebula.org
> >> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
> >> >
> >>
> >>
> >>
> >> --
> >> Javier Fontán Muiños
> >> Developer
> >> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> >> www.OpenNebula.org | @OpenNebula | github.com/jfontan
> >
> >
> >
> >
> > --
> > Roxana Ioana Roman
> > 0743112732
>
>
>
> --
> Javier Fontán Muiños
> Developer
> OpenNebula - The Open Source Toolkit for Data Center Virtualization
> www.OpenNebula.org | @OpenNebula | github.com/jfontan
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140307/ecfcd534/attachment-0002.htm>
More information about the Users
mailing list