diff options
| author | Jason Koelker <jason@koelker.net> | 2011-09-14 10:14:21 -0500 |
|---|---|---|
| committer | Jason Koelker <jason@koelker.net> | 2011-09-14 10:14:21 -0500 |
| commit | dff4897056f41333dadd7b110692d80a409eb29a (patch) | |
| tree | 6b300be2e3db6c6c303c92d764e787ce3ae40618 | |
| parent | 7c727b7700298e0d280e11cb2e06b177ee63a83b (diff) | |
add get_vifs_by_instance and stub get_instance_ids_by_ip_filter
| -rw-r--r-- | nova/network/manager.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py index da360720b..3ba6766c0 100644 --- a/nova/network/manager.py +++ b/nova/network/manager.py @@ -396,6 +396,34 @@ class NetworkManager(manager.SchedulerDependentManager): self.compute_api.trigger_security_group_members_refresh(admin_context, group_ids) + def get_vifs_by_instance(self, context, instance_id): + vifs = self.db.virtual_interface_get_by_instance(context, + instance_id) + return vifs + + def get_instance_ids_by_ip_filter(self, context, ip_filter): +# def _regexp_filter_by_ipv6(instance, filter_re): +# for interface in instance['virtual_interfaces']: +# fixed_ipv6 = interface.get('fixed_ipv6') +# if fixed_ipv6 and filter_re.match(fixed_ipv6): +# return True +# return False + +# def _regexp_filter_by_ip(instance, filter_re): +# for interface in instance['virtual_interfaces']: +# for fixed_ip in interface['fixed_ips']: +# if not fixed_ip or not fixed_ip['address']: +# continue +# if filter_re.match(fixed_ip['address']): +# return True +# for floating_ip in fixed_ip.get('floating_ips', []): +# if not floating_ip or not floating_ip['address']: +# continue +# if filter_re.match(floating_ip['address']): +# return True +# return False + return [] + def _get_networks_for_instance(self, context, instance_id, project_id, requested_networks=None): """Determine & return which networks an instance should connect to.""" |
