Hi,
We have planned to replace quantum network manager in nova project with quantum api v2.0 calls.
I have found that nova will call following 34 network api methods:
class API(base.Base):
# called in compute manager
def get_instance_nw_info(self, context, instance):
pass
def add_fixed_ip_to_instance(self, context, instance, network_id):
# libvirt does not support
pass
def remove_fixed_ip_from_instance(self, context, instance, address):
# libvirt does not support
"""Removes a fixed ip from instance from specified network."""
args = {'instance_id': instance['id'],
'host': instance['host'],
'address': address}
pass
def deallocate_for_instance(self, context, instance, **kwargs):
"""Deallocates all network structures related to instance."""
args = kwargs
args['instance_id'] = instance['id']
args['project_id'] = instance['project_id']
args['host'] = instance['host']
pass
def allocate_for_instance(self, context, instance, **kwargs):
pass
def setup_networks_on_host(self, context, instance, host=None,
teardown=False):
# setup dhcp info on host
pass
# called in floating_ips controller
def get_fixed_ip(self, context, id):
#fixed_ip_id
pass
def get_floating_ip(self, context, id):
pass
def get_floating_ips_by_project(self, context):
pass
def get_floating_ip_by_address(self, context, address):
pass
def allocate_floating_ip(self, context, pool=None):
pass
def release_floating_ip(self, context, address,
affect_auto_assigned=False):
pass
def disassociate_floating_ip(self, context, address,
affect_auto_assigned=False):
pass
#called in FloatingIPPool
def get_floating_ip_pools(self, context):
pass
#called in get meta handler
def get_fixed_ip_by_address(self, context, address):
pass
#called in FloatingIPDNSEntryController
def get_dns_entries_by_name(self):
pass
def get_dns_entries_by_address(self):
pass
def add_dns_entry(self):
pass
def modify_dns_entry(self):
pass
def delete_dns_entry(self):
pass
#called in FloatingIPDNSDomainController
def get_dns_domains(self):
pass
def create_private_dns_domain(self):
pass
def create_public_dns_domain(self):
pass
def delete_dns_domain(self):
pass
#called in network controller
def get_all(self, context):
pass
def get(self, context, network_uuid):
pass
def delete(self, context, network_uuid):
pass
def disassociate(self, context, network_uuid):
pass
#called in compute api
def validate_networks(self, context, requested_networks):
pass
def get_instance_uuids_by_ip_filter(self, context, filters):
pass
def associate_floating_ip(self, context, floating_address, fixed_address,
affect_auto_assigned=False):
pass
# called in ServerVirtualInterfaceController
def get_vifs_by_instance(self, context, instance):
pass
#unknown
def add_network_to_project(self, context, project_id):
pass
def get_vif_by_mac_address(self, context, mac_address):
pass
def get_floating_ips_by_fixed_address(self, context, fixed_address):
pass
There are some called in compute manager, some called in compute api,
most called in controllers under nova/api/openstack/compute/contrib. Some even are seemingly not called at all.
Our current quantum api is much finer grained compared to the api needed by nova. There seems to be a disparity between them. For example, nova does not need to add a port to a network, plugin an interface api at all. It just needs coarse grained api such as allocate_for_instance and deallocate_for_instance etc.
How do we implement quantum api v2.0? It is fine grained or coarse grained.
Any ideas?
Thanks
Yong Sheng Gong
-- Mailing list: https://launchpad.net/~netstack Post to : netstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~netstack More help : https://help.launchpad.net/ListHelp