deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Brady (JIRA)" <>
Subject [jira] [Commented] (DTACLOUD-574) Address Model should allow the use of an actual identifier for an instance instead of just the IP
Date Thu, 11 Jul 2013 14:43:48 GMT


Andrew Brady commented on DTACLOUD-574:

Notes from IRC for fixing issue. I'll try to get to it today.

<inspectrum> marios, (and others who were on the call): this is the model I'm looking
at, I don't see the "ip" attribute you're talking about:;a=blob;f=server/lib/deltacloud/models/address.rb;h=44d39242663baa6b4a08d104bff6231336af173d;hb=HEAD
<inspectrum> Am I perhaps looking at the wrong data model?
<marios> inspectrum: you're right - looks like it's just added in the xml serialization.
can you add a comment to the jira ticket. i'll try and address that asap
<marios> mfojtik: ^^
<inspectrum> I do see it in the client model
<mfojtik> looking
<mfojtik> so he 'ip' exists in client model but not in dc model?
<mfojtik> k, then I think the fix could be to add 'attr_accessor :ip' to Address in
Deltacloud and set it in openstack driver
<mfojtik> also set it to 'id' by default
<mfojtik> also worth to check the HAML view / json
<marios> mfojtik: i think ip is just added in xml view
<marios> mfojtik: it isn't defined in the model
<mfojtik> %ip< 5
<mfojtik> this is wrong :)
<marios> mfojtik: right :)
<marios> mfojtik: err.. wrong :)
<mfojtik> should be address.ip (but you need to add the 'ip' attibute)
<marios> mfojtik: exactly
<mfojtik>  = address.ip ||
<mfojtik> :-)
<mfojtik> (to make it backward compatible)
> Address Model should allow the use of an actual identifier for an instance instead of
just the IP
> -------------------------------------------------------------------------------------------------
>                 Key: DTACLOUD-574
>                 URL:
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Server
>            Reporter: Andrew Brady
>            Priority: Minor
>              Labels: easyfix
> The model for Address doesn't support setting both the address and the id. And, since
it doesn't support setting the href it doesn't allow accessing an address specifically by
id (which is how you would do it in OpenStack).
> Even just making the "to_hash" method on Address use a ternary on href and making that
attribute settable would be an acceptable solution. The only real use case is to be able to
retrieve address details for an individual address.
> An example from mock driver:
> <address href="http://localhost:3001/api/addresses/" id=""><ip></ip><actions><link
href="http://localhost:3001/api/addresses/" method="delete" rel="destroy"/><link
href="http://localhost:3001/api/addresses/" method="post" rel="associate"/></actions></address>
> But isn't an id, it's an IP

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message