[ 
https://issues.apache.org/jira/browse/DTACLOUD-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13233783#comment-13233783
 ] 

Ronelle Landy commented on DTACLOUD-10:
---------------------------------------

Using the Mock driver, the following information on hardware profiles available 
is returned:

curl -X GET --user "username:password" 
"http://localhost:3010/api/hardware_profiles?format=xml";
<?xml version='1.0' encoding='utf-8' ?>
<hardware_profiles>
  <hardware_profile href='http://localhost:3010/api/hardware_profiles/m1-small' 
id='m1-small'>
    <name>m1-small</name>
    <property kind='fixed' name='architecture' unit='label' value='i386' />
    <property kind='fixed' name='memory' unit='MB' value='1740.8' />
    <property kind='fixed' name='storage' unit='GB' value='160' />
    <property kind='fixed' name='cpu' unit='count' value='1' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3010/api/hardware_profiles/m1-large' 
id='m1-large'>
    <name>m1-large</name>
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='range' name='memory' unit='MB' value='10240'>
      <param href='http://localhost:3010/api/instances' method='post' 
name='hwp_memory' operation='create' />
      <range first='7680' last='15360' />
    </property>
    <property kind='enum' name='storage' unit='GB' value='850'>
      <param href='http://localhost:3010/api/instances' method='post' 
name='hwp_storage' operation='create' />
      <enum>
        <entry value='850' />
        <entry value='1024' />
      </enum>
    </property>
    <property kind='range' name='cpu' unit='count' value='1'>
      <param href='http://localhost:3010/api/instances' method='post' 
name='hwp_cpu' operation='create' />
      <range first='1' last='6' />
    </property>
  </hardware_profile>
  <hardware_profile 
href='http://localhost:3010/api/hardware_profiles/m1-xlarge' id='m1-xlarge'>
    <name>m1-xlarge</name>
    <property kind='fixed' name='architecture' unit='label' value='x86_64' />
    <property kind='range' name='memory' unit='MB' value='12288'>
      <param href='http://localhost:3010/api/instances' method='post' 
name='hwp_memory' operation='create' />
      <range first='12288' last='32768' />
    </property>
    <property kind='enum' name='storage' unit='GB' value='1024'>
      <param href='http://localhost:3010/api/instances' method='post' 
name='hwp_storage' operation='create' />
      <enum>
        <entry value='1024' />
        <entry value='2048' />
        <entry value='4096' />
      </enum>
    </property>
    <property kind='fixed' name='cpu' unit='count' value='4' />
  </hardware_profile>
  <hardware_profile href='http://localhost:3010/api/hardware_profiles/opaque' 
id='opaque'>
    <name>opaque</name>
  </hardware_profile>
</hardware_profiles>

Looking at the Opaque hardware profile, an 'empty' profile is returned ie; 
there are no 'nil' values, just no fields listed for cpu, arch etc. Not sure if 
this addresses the concern or not.

                
> Hardware Profile Properties do not distinguish, values that determine, 
> nothing, everything, something
> -----------------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-10
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-10
>             Project: DeltaCloud
>          Issue Type: Bug
>            Reporter: Martyn Taylor
>            Assignee: Michal Fojtik
>
> At present HWP's can contain nil values for each of its cpu, memory, storage 
> and architecture fields.  
> This can be seen when using the MockDriver, in the Opaque HWP.  In this case 
> nil means that this HWP does not offer anything in this HWP Property i.e. 
> CPU, mem etc....
> In addition, GoGrid does not allow us to specify the architecture for of its 
> HWP.  but it will give you an instance of some arbitrary architecture at 
> runtime.  This case is also currently represented as 'nil'.
> Using nil in this was causes ambiguity, In the two cases above, nil in one 
> sense means "we offer nothing", nil in another means "we offer something, but 
> what we offer is not specified"
> There needs to be some way to determine the difference between the two cases:
> A proposed solution to this problem, is to add an extra 'enum'  value to the 
> 'kind' field of the HWP Property Object, This can be used to represent an 
> 'unspecified' value, as in the GoGrid case above. nil can then continue to be 
> used as representing "offer nothing" as in the MockDriver case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to