You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Mike Tutkowski <mi...@solidfire.com> on 2013/03/28 06:54:53 UTC

VI Java API Question

Hi,

I was wondering if anyone could answer this question for me.  I've been
looking at all sorts of properties of various VI Java Objects to find out
how to do this and don't see any answers on the web either.

I have list line of code:

HostScsiDisk[] lstHostScsiDisks =
hostDatastoreSystem.queryAvailableDisksForVmfs(null);


I need to iterate through the lstHostScsiDisks (list of relevant and
available SCSI disks I can base a VMware Datastore off of) and find the one
that exists because it is the result of an iSCSI target that I just added
with this line of code (the first parameter is the name of the iSCSI
software adapter and the second is an array with one item, which contains
info about the iSCSI target):


hostStorageSystem.addInternetScsiStaticTargets(iScsiHbaDevice, aTargets);


What this comes down to is I add an iSCSI target and this leads to the
creation of a new HostScsiDisk.  I just don't see how to determine if the
HostScsiDisk I'm currently looking at (as I iterate through the list of
them) exists because of my earlier command to connect to an iSCSI target.


It is especially maddening because I can clearly see in vCenter when I look
at the details of such a SCSI disk that it knows what iSCSI target it came
from.  :)


Thanks for any assistance!


-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: VI Java API Question

Posted by Chip Childers <ch...@sungard.com>.
On Thu, Mar 28, 2013 at 08:01:32AM -0600, Mike Tutkowski wrote:
> Hi Chip,
> 
> I was actually using the open source one you referred to (1).
> 
> I had done some research on this a week or so ago and people were
> complaining about (2) and recommending (1).

So I agree that VIJava is a easier to consume library (Steve did a great
job on it), but understand that we're not using it today.  That's not a
blocker, but any patch that includes it as a dependency would need to
account for (and call out) the addition.

> 
> That book does look useful.  Maybe I'll stop in at the bookstore on my way
> into work.
> 
> Thanks!
> 
> 
> On Thu, Mar 28, 2013 at 7:21 AM, Chip Childers <ch...@sungard.com>wrote:
> 
> > On Thu, Mar 28, 2013 at 9:20 AM, Chip Childers
> > <ch...@sungard.com> wrote:
> > > On Wed, Mar 27, 2013 at 11:54:53PM -0600, Mike Tutkowski wrote:
> > >> Hi,
> > >>
> > >> I was wondering if anyone could answer this question for me.  I've been
> > >> looking at all sorts of properties of various VI Java Objects to find
> > out
> > >> how to do this and don't see any answers on the web either.
> > >
> > > Mike,
> > >
> > > Just so that I understand.  Are you using the VIJava [1] SDK (which is
> > > *not* from VMware), or are you using the VMware vSphere Java SDK [2]
> > > (which is). Currently we use the VMware vSphere Java SDK within the
> > > VMware HV plugin.
> > >
> > > -chip
> > >
> > > [1] http://vijava.sourceforge.net/
> > > [2]
> > http://communities.vmware.com/community/vmtn/developer/forums/java_toolkit
> >
> > Also, you might consider this book:
> >
> > http://www.amazon.com/gp/product/0137153635?ie=UTF8&tag=doublecloudor-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0137153635
> >
> > I found it very useful a couple of years back.
> >
> > -chip
> >
> 
> 
> 
> -- 
> *Mike Tutkowski*
> *Senior CloudStack Developer, SolidFire Inc.*
> e: mike.tutkowski@solidfire.com
> o: 303.746.7302
> Advancing the way the world uses the
> cloud<http://solidfire.com/solution/overview/?video=play>
> *™*

Re: VI Java API Question

Posted by Mike Tutkowski <mi...@solidfire.com>.
Hi Chip,

I was actually using the open source one you referred to (1).

I had done some research on this a week or so ago and people were
complaining about (2) and recommending (1).

That book does look useful.  Maybe I'll stop in at the bookstore on my way
into work.

Thanks!


On Thu, Mar 28, 2013 at 7:21 AM, Chip Childers <ch...@sungard.com>wrote:

> On Thu, Mar 28, 2013 at 9:20 AM, Chip Childers
> <ch...@sungard.com> wrote:
> > On Wed, Mar 27, 2013 at 11:54:53PM -0600, Mike Tutkowski wrote:
> >> Hi,
> >>
> >> I was wondering if anyone could answer this question for me.  I've been
> >> looking at all sorts of properties of various VI Java Objects to find
> out
> >> how to do this and don't see any answers on the web either.
> >
> > Mike,
> >
> > Just so that I understand.  Are you using the VIJava [1] SDK (which is
> > *not* from VMware), or are you using the VMware vSphere Java SDK [2]
> > (which is). Currently we use the VMware vSphere Java SDK within the
> > VMware HV plugin.
> >
> > -chip
> >
> > [1] http://vijava.sourceforge.net/
> > [2]
> http://communities.vmware.com/community/vmtn/developer/forums/java_toolkit
>
> Also, you might consider this book:
>
> http://www.amazon.com/gp/product/0137153635?ie=UTF8&tag=doublecloudor-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0137153635
>
> I found it very useful a couple of years back.
>
> -chip
>



-- 
*Mike Tutkowski*
*Senior CloudStack Developer, SolidFire Inc.*
e: mike.tutkowski@solidfire.com
o: 303.746.7302
Advancing the way the world uses the
cloud<http://solidfire.com/solution/overview/?video=play>
*™*

Re: VI Java API Question

Posted by Chip Childers <ch...@sungard.com>.
On Thu, Mar 28, 2013 at 9:20 AM, Chip Childers
<ch...@sungard.com> wrote:
> On Wed, Mar 27, 2013 at 11:54:53PM -0600, Mike Tutkowski wrote:
>> Hi,
>>
>> I was wondering if anyone could answer this question for me.  I've been
>> looking at all sorts of properties of various VI Java Objects to find out
>> how to do this and don't see any answers on the web either.
>
> Mike,
>
> Just so that I understand.  Are you using the VIJava [1] SDK (which is
> *not* from VMware), or are you using the VMware vSphere Java SDK [2]
> (which is). Currently we use the VMware vSphere Java SDK within the
> VMware HV plugin.
>
> -chip
>
> [1] http://vijava.sourceforge.net/
> [2] http://communities.vmware.com/community/vmtn/developer/forums/java_toolkit

Also, you might consider this book:
http://www.amazon.com/gp/product/0137153635?ie=UTF8&tag=doublecloudor-20&linkCode=as2&camp=1789&creative=9325&creativeASIN=0137153635

I found it very useful a couple of years back.

-chip

Re: VI Java API Question

Posted by Chip Childers <ch...@sungard.com>.
On Wed, Mar 27, 2013 at 11:54:53PM -0600, Mike Tutkowski wrote:
> Hi,
> 
> I was wondering if anyone could answer this question for me.  I've been
> looking at all sorts of properties of various VI Java Objects to find out
> how to do this and don't see any answers on the web either.

Mike,

Just so that I understand.  Are you using the VIJava [1] SDK (which is
*not* from VMware), or are you using the VMware vSphere Java SDK [2]
(which is). Currently we use the VMware vSphere Java SDK within the
VMware HV plugin.

-chip

[1] http://vijava.sourceforge.net/
[2] http://communities.vmware.com/community/vmtn/developer/forums/java_toolkit