Exemplo n.º 1
0
 def execute(self):
     LOG.info(_LI('Resizing instance: %s'), self.instance.name,
              instance=self.instance)
     wrap = vm.update(self.adapter, self.host_wrapper,
                      self.instance, self.flavor, entry=None,
                      name=self.vm_name)
     return wrap
Exemplo n.º 2
0
 def execute(self):
     LOG.info(_LI('Resizing instance: %s'),
              self.instance.name,
              instance=self.instance)
     wrap = vm.update(self.adapter,
                      self.host_wrapper,
                      self.instance,
                      self.flavor,
                      entry=None,
                      name=self.vm_name)
     return wrap
Exemplo n.º 3
0
 def test_update(self, mock_vmb, mock_get_inst):
     instance = objects.Instance(**powervm.TEST_INSTANCE)
     flavor, entry = mock.Mock(), mock.Mock()
     name = "new_name"
     entry.update.return_value = 'NewEntry'
     bldr = mock_vmb.return_value
     lpar_bldr = bldr.lpar_builder.return_value
     new_entry = vm.update(self.apt, 'mock_host_wrap', instance, flavor,
                           entry=entry, name=name)
     # Ensure the lpar was rebuilt
     lpar_bldr.rebuild.assert_called_once_with(entry)
     entry.update.assert_called_once_with()
     self.assertEqual(name, entry.name)
     self.assertEqual('NewEntry', new_entry)
Exemplo n.º 4
0
 def execute(self):
     return vm.update(self.adapter,
                      self.host_wrapper,
                      self.instance,
                      entry=None,
                      name=self.vm_name)
Exemplo n.º 5
0
 def execute_impl(self):
     return vm.update(self.adapter, self.host_wrapper,
                      self.instance, self.flavor, entry=None,
                      name=self.vm_name)