Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • Description
    • Returns the name of the current image that is loaded on the resource(currentimage.txt file).
    • The name corresponds to the imagerevisionimage.imagename name column in the database.
    • Returning a name implies that the resource is accessible.
    • The OS.pm will probably handle this subroutine.
  • Expected Beginning State
    • Resource is accessible.
  • Expected Ending State
    • The resource state should be identical to before get_current_image_name was called.
  • Called By
    • Provisioning module's node_status() subroutine.
    • Used to determine if the OS and provisioning engine agree on the current image loaded on a resource.
    • Can be used to determine if a resource is accessible.  A valid string will be returned if the resource is accessible.
  • Arguments & Calling Environment
    • Must only be called as an object method of an OS object ($os->get_current_image_name())
    • No arguments
  • Return Values
    • String
      • String contains a VCL image name
    • 0
      • Computer is accessible but failed to determine the current loaded image
    • Undefined
      • Computer is not accessible

...

  • Description
    • reserve() gets called by new.pm after a machine has been reloaded if the state is "new" (new.pm also handles the "reload" state and others)
    • It should perform the steps necessary to take a reloaded machine and prepare it for a particular reservation
    • Anything reservation-specific that doesn't require knowing the user's IP should be done in reserve()
    • After reserve() has run, the state can be changed to reserved and the "Connect" button can be presented to the user
    • reserve() would normally add the reservation user and any users set in imagemeta usergroup to the computer, set their passwords, and add them to the appropriate groups
    • reserve() does not configure the firewall or do anything networking related because at the time it's called, the state has not been changed to reserved and the user has not been shown the "Connect" button.  Hence, the user's IP is not known.
    • reserve() is called by new.pm before the "Connect" button is shown to the user because adding several user accounts may take a long time.  If adding users was done after the state was changed to reserved, a user could attempt to connect before all of the users accounts were added.
  • Expected Beginning State
    • Request state is pending/new 
    • Computer has been reloaded
  • Expected Ending State
    • Computer has been configured for a particular reservation
    • User accounts have been added and configured
    • Request state can be changed to reserved and the "Connect" button can be presented to the user
  • Called By
    • new.pm
  • Arguments & Calling Environment
    • Must only be called as an object method of an OS object ($os->get_current_image_name>reserve())
    • No arguments
  • Return Values
    • True (1) 
      • Computer has successfully been configured for a particular reservation
    • False (0 or undefined) 
      • Computer could not be configured for a particular reservation

...