Skip to content

Conversation

vaibhavbansal
Copy link

No description provided.

@coveralls
Copy link

Coverage Status

Coverage increased (+3.85%) when pulling 7057772 on vaibhavbansal:working into e775281 on rackspace:working.

@EdLeafe
Copy link
Contributor

EdLeafe commented Sep 26, 2013

Can you explain what problems you were seeing before this change? And why it's better to return just the id, instead of something like:

    dct = {"type": self.type, "ipVersion": self.ip_version}                         
    if self.id:                                                                     
        dct["id"] = self.id                                                         
    return dct                                                                      

@vaibhavbansal
Copy link
Author

Is case we want to share the vip with another lb and we pass in virtual_ips as a parameter the to_dict was ignoring the id. As a result everytime a new vip was getting generated for every loadbalancer. According to the LBaaS api doc if we want to share the vip we need to pass only the vip id. I haven't tried passing all the data along with the vip. But i think it will just get ignored as the id is enough for the LBaaS service to uniquely identify a vip

EdLeafe added a commit that referenced this pull request Sep 26, 2013
Fixes VirtualIP to_dict method to use vip id if available
@EdLeafe EdLeafe merged commit 2be32f4 into pycontribs:working Sep 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants