Activity log for bug #1536288

Date Who What changed Old value New value Message
2016-01-20 17:25:24 Richard Theis bug added bug
2016-01-20 17:26:17 Richard Theis python-openstacksdk: assignee Richard Theis (rtheis)
2016-01-21 14:10:09 Richard Theis description While investigating https://bugs.launchpad.net/python-openstacksdk/+bug/1461200, I found inconsistencies in the resource objects returned by the proxy interface methods. Take the following proxy interface example using network: example_network = self.conn.network.create_network( name='openstacksdk-example-project-network') print(example_network) for network in self.conn.network.networks(): print(network) network = self.conn.network.get_network(example_network.id) print(network) network = self.conn.network.get_network(example_network) print(network) network = self.conn.network.find_network(example_network.id) print(network) network = self.conn.network.update_network(example_network.id, admin_state_up=False) print(network) example_network.admin_state_up = False network = self.conn.network.update_network(example_network) print(network) Looking at both resource._attrs and dir(resource) for the network resource, the following inconsistencies were noted: 1) create_network(): resource._attrs only contains the values provided via attrs parameter (i.e. name) and dir(resource) does not contain attributes for port_security_enabled, provider:network_type, provider:physical_network, provider:segmentation_id and router:external. 2) networks(): resource._attrs and dir(resource) are complete 3) get_network(): dir(resource) does not contain attributes for port_security_enabled, provider:network_type, provider:physical_network, provider:segmentation_id and router:external. 4) find_network(): Same as networks(). 5) update_network(id): Same as create_network(). 6) update_network(resource): Same as get_network(). Some of the resource methods appear to be missing code to update attrs based on the response data. While investigating https://bugs.launchpad.net/python-openstacksdk/+bug/1461200, I found inconsistencies in the resource objects returned by the proxy interface methods. Take the following proxy interface example using network:         example_network = self.conn.network.create_network(             name='openstacksdk-example-project-network')         print(example_network)         for network in self.conn.network.networks():             print(network)         network = self.conn.network.get_network(example_network.id)         print(network)         network = self.conn.network.get_network(example_network)         print(network)         network = self.conn.network.find_network(example_network.id)         print(network)         network = self.conn.network.update_network(example_network.id,                                                    admin_state_up=False)         print(network)         example_network.admin_state_up = False         network = self.conn.network.update_network(example_network)         print(network) Looking at both resource._attrs and dir(resource) for the network resource, the following inconsistencies were noted: 1) create_network(): resource._attrs only contains the values provided via attrs parameter (i.e. name) and dir(resource) does not contain attributes for port_security_enabled, provider:network_type, provider:physical_network, provider:segmentation_id and router:external. 2) networks(): resource._attrs and dir(resource) are complete 3) get_network(): dir(resource) does not contain attributes for port_security_enabled, provider:network_type, provider:physical_network, provider:segmentation_id and router:external. 4) find_network(): Same as networks(). 5) update_network(id): Same as create_network(). 6) update_network(resource): Same as get_network(). Some of the resource methods appear to be missing code to update attrs based on the response data. Update from related bug https://bugs.launchpad.net/python-openstacksdk/+bug/1474478: I'm not sure why resource create only updates the id attribute https://github.com/stackforge/python-openstacksdk/blob/master/openstack/resource.py#L569 Why not just grab whatever attributes are available? Might be some created_at etc type attributes to add.
2016-01-22 17:16:13 OpenStack Infra python-openstacksdk: status New In Progress
2016-01-25 22:10:30 OpenStack Infra python-openstacksdk: status In Progress Fix Released