~cbehrens/nova/rpc-kombu

« back to all changes in this revision

Viewing changes to nova/virt/vmwareapi/vim_util.py

  • Committer: Tarmac
  • Author(s): Matthew Hooker
  • Date: 2011-08-10 14:53:53 UTC
  • mfrom: (1355.2.24 pylint-fixes)
  • Revision ID: tarmac-20110810145353-rmc0lkjirgunxe08
These fixes are the result of trolling the pylint violations here

https://jenkins.openstack.org/job/nova-pylint-errors/violations/

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
 
96
96
 
97
97
def build_property_spec(client_factory, type="VirtualMachine",
98
 
                        properties_to_collect=["name"],
 
98
                        properties_to_collect=None,
99
99
                        all_properties=False):
100
100
    """Builds the Property Spec."""
 
101
    if not properties_to_collect:
 
102
        properties_to_collect = ["name"]
 
103
 
101
104
    property_spec = client_factory.create('ns0:PropertySpec')
102
105
    property_spec.all = all_properties
103
106
    property_spec.pathSet = properties_to_collect
155
158
    return property_value
156
159
 
157
160
 
158
 
def get_objects(vim, type, properties_to_collect=["name"], all=False):
 
161
def get_objects(vim, type, properties_to_collect=None, all=False):
159
162
    """Gets the list of objects of the type specified."""
 
163
    if not properties_to_collect:
 
164
        properties_to_collect = ["name"]
 
165
 
160
166
    client_factory = vim.client.factory
161
167
    object_spec = build_object_spec(client_factory,
162
168
                        vim.get_service_content().rootFolder,