~tritone-team/tritone/eucalyptus

« back to all changes in this revision

Viewing changes to clc/modules/core/src/main/java/edu/ucsb/eucalyptus/cloud/entities/Address.java

  • Committer: Bazaar Package Importer
  • Author(s): Dustin Kirkland
  • Date: 2009-12-01 21:09:28 UTC
  • mto: This revision was merged to the branch mainline in revision 75.
  • Revision ID: james.westby@ubuntu.com-20091201210928-o2dvg0ubljhb0ft6
Tags: upstream-1.6.1~bzr1083
ImportĀ upstreamĀ versionĀ 1.6.1~bzr1083

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
  private volatile boolean system = false;
246
246
  
247
247
  public boolean isAllocated() {
248
 
    return UNALLOCATED_USERID.equals( this.userId );
 
248
    return !UNALLOCATED_USERID.equals( this.userId );
249
249
  }
250
250
  
251
251
  public void allocate( String userId ) {
292
292
  }
293
293
  
294
294
  private static void removeAddress( String name ) {
295
 
    Addresses.getInstance( ).disable( name );
 
295
    try {
 
296
      Addresses.getInstance( ).disable( name );
 
297
    } catch ( NoSuchElementException e1 ) {
 
298
      LOG.debug( e1 );
 
299
    }
296
300
    EntityWrapper<Address> db = new EntityWrapper<Address>( );
297
301
    try {
298
302
      Address dbAddr = db.getUnique( new Address( name ) );
348
352
  }
349
353
  
350
354
  public boolean isSystemAllocated( ) {
351
 
    return Component.eucalyptus.name( ).equals( this.getUserId( ) ) && ( system || this.isAssigned( ) );
 
355
    return Component.eucalyptus.name( ).equals( this.getUserId( ) );
352
356
  }
353
357
  
354
358
  public boolean isAssigned( ) {