def _CreateDependencies(self):
   """Validate and Create dependencies prior creating the VM."""
   self._CheckPrerequisites()
   self.firewall = os_network.OpenStackFirewall.GetFirewall()
   self.public_network = os_network.OpenStackFloatingIPPool(
       self.floating_ip_pool_name)
   self._UploadSSHPublicKey()
   self.firewall.AllowICMP(self)  # Allowing ICMP traffic (i.e. ping)
   self.AllowRemoteAccessPorts()
示例#2
0
 def _CreateDependencies(self):
     """Validate and Create dependencies prior creating the VM."""
     self._CheckPrerequisites()
     self.firewall = os_network.OpenStackFirewall.GetFirewall()
     self.public_network = os_network.OpenStackFloatingIPPool(
         OpenStackVirtualMachine.floating_network_id)
     self._UploadSSHPublicKey()
     source_range = self._GetInternalNetworkCIDR()
     self.firewall.AllowPort(self, os_network.MIN_PORT, os_network.MAX_PORT,
                             source_range)
     self.firewall.AllowICMP(self)  # Allowing ICMP traffic (i.e. ping)
     self.AllowRemoteAccessPorts()