trunk merge
This commit is contained in:
		@@ -376,6 +376,10 @@ class NoFloatingIpsDefinedForInstance(NoFloatingIpsDefined):
 | 
				
			|||||||
    message = _("Zero floating ips defined for instance %(instance_id)s.")
 | 
					    message = _("Zero floating ips defined for instance %(instance_id)s.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class NoMoreFloatingIps(NotFound):
 | 
				
			||||||
 | 
					    message = _("Zero floating ips available.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class KeypairNotFound(NotFound):
 | 
					class KeypairNotFound(NotFound):
 | 
				
			||||||
    message = _("Keypair %(keypair_name)s not found for user %(user_id)s")
 | 
					    message = _("Keypair %(keypair_name)s not found for user %(user_id)s")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -270,8 +270,10 @@ DEFINE_list('region_list',
 | 
				
			|||||||
DEFINE_string('connection_type', 'libvirt', 'libvirt, xenapi or fake')
 | 
					DEFINE_string('connection_type', 'libvirt', 'libvirt, xenapi or fake')
 | 
				
			||||||
DEFINE_string('aws_access_key_id', 'admin', 'AWS Access ID')
 | 
					DEFINE_string('aws_access_key_id', 'admin', 'AWS Access ID')
 | 
				
			||||||
DEFINE_string('aws_secret_access_key', 'admin', 'AWS Access Key')
 | 
					DEFINE_string('aws_secret_access_key', 'admin', 'AWS Access Key')
 | 
				
			||||||
DEFINE_integer('glance_port', 9292, 'glance port')
 | 
					# NOTE(sirp): my_ip interpolation doesn't work within nested structures
 | 
				
			||||||
DEFINE_string('glance_host', '$my_ip', 'glance host')
 | 
					DEFINE_list('glance_api_servers',
 | 
				
			||||||
 | 
					            ['127.0.0.1:9292'],
 | 
				
			||||||
 | 
					            'list of glance api servers available to nova (host:port)')
 | 
				
			||||||
DEFINE_integer('s3_port', 3333, 's3 port')
 | 
					DEFINE_integer('s3_port', 3333, 's3 port')
 | 
				
			||||||
DEFINE_string('s3_host', '$my_ip', 's3 host (for infrastructure)')
 | 
					DEFINE_string('s3_host', '$my_ip', 's3 host (for infrastructure)')
 | 
				
			||||||
DEFINE_string('s3_dmz', '$my_ip', 's3 dmz ip (for instances)')
 | 
					DEFINE_string('s3_dmz', '$my_ip', 's3 dmz ip (for instances)')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -115,6 +115,18 @@ class CloudTestCase(test.TestCase):
 | 
				
			|||||||
                                  public_ip=address)
 | 
					                                  public_ip=address)
 | 
				
			||||||
        db.floating_ip_destroy(self.context, address)
 | 
					        db.floating_ip_destroy(self.context, address)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_allocate_address(self):
 | 
				
			||||||
 | 
					        address = "10.10.10.10"
 | 
				
			||||||
 | 
					        allocate = self.cloud.allocate_address
 | 
				
			||||||
 | 
					        db.floating_ip_create(self.context,
 | 
				
			||||||
 | 
					                              {'address': address,
 | 
				
			||||||
 | 
					                               'host': self.network.host})
 | 
				
			||||||
 | 
					        self.assertEqual(allocate(self.context)['publicIp'], address)
 | 
				
			||||||
 | 
					        db.floating_ip_destroy(self.context, address)
 | 
				
			||||||
 | 
					        self.assertRaises(exception.NoMoreFloatingIps,
 | 
				
			||||||
 | 
					                          allocate,
 | 
				
			||||||
 | 
					                          self.context)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_associate_disassociate_address(self):
 | 
					    def test_associate_disassociate_address(self):
 | 
				
			||||||
        """Verifies associate runs cleanly without raising an exception"""
 | 
					        """Verifies associate runs cleanly without raising an exception"""
 | 
				
			||||||
        address = "10.10.10.10"
 | 
					        address = "10.10.10.10"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user