cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Tutkowski <mike.tutkow...@solidfire.com>
Subject Comparing storage tags
Date Mon, 14 Jul 2014 22:20:07 GMT
Hi,

Am I missing something here or does this seem like a really frail way to
compare storage tags?

if (newDiskOffering.getTags() == null ||
!newDiskOffering.getTags().equals(diskOffering.getTags())) {

Unless the tags happen to be in the same order and have the same casing,
this seems like it would return that they are not equal when, in fact, they
could be equal.

This came up while looking at the resize-volume logic.

I guess I'll write a function to build up a list of strings for a given
storage tag and compare them in a case-insensitive fashion against the
incoming storage tags as a list of strings.

Talk to you later,

-- 
*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>*™*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message