156
149
# TODO(Vek): Need to pass context in for access to auth_token
157
150
raise NotImplementedError()
159
def list_instances_detail(self):
160
"""Return a list of InstanceInfo for all registered VMs"""
161
# TODO(Vek): Need to pass context in for access to auth_token
162
raise NotImplementedError()
164
def spawn(self, context, instance, image_meta,
165
network_info=None, block_device_info=None):
152
def spawn(self, context, instance, image_meta, injected_files,
153
admin_password, network_info=None, block_device_info=None):
167
155
Create a new instance/VM/domain on the virtualization platform.
251
241
"""Detach the disk attached to the instance"""
252
242
raise NotImplementedError()
254
def compare_cpu(self, cpu_info):
255
"""Compares given cpu info against host
257
Before attempting to migrate a VM to this host,
258
compare_cpu is called to ensure that the VM will
261
:param cpu_info: (str) JSON structure describing the source CPU.
262
:returns: None if migration is acceptable
263
:raises: :py:class:`~nova.exception.InvalidCPUInfo` if migration
266
raise NotImplementedError()
268
244
def migrate_disk_and_power_off(self, context, instance, dest,
269
245
instance_type, network_info):
330
306
"""resume guest state when a host is booted"""
331
307
raise NotImplementedError()
333
def rescue(self, context, instance, network_info, image_meta):
309
def rescue(self, context, instance, network_info, image_meta,
334
311
"""Rescue the specified instance"""
335
312
raise NotImplementedError()
357
334
:param host: hostname that compute manager is currently running
360
# TODO(Vek): Need to pass context in for access to auth_token
361
337
raise NotImplementedError()
363
339
def live_migration(self, ctxt, instance_ref, dest,
364
post_method, recover_method):
365
"""Spawning live_migration operation for distributing high-load.
340
post_method, recover_method, block_migration=False,
342
"""Live migration of an instance to another host.
367
:param ctxt: security context
344
:params ctxt: security context
345
:params instance_ref:
369
346
nova.db.sqlalchemy.models.Instance object
370
347
instance object that is migrated.
371
:param dest: destination host
348
:params dest: destination host
373
350
post operation method.
374
351
expected nova.compute.manager.post_live_migration.
375
:param recover_method:
352
:params recover_method:
376
353
recovery method when any exception occurs.
377
354
expected nova.compute.manager.recover_live_migration.
380
# TODO(Vek): Need to pass context in for access to auth_token
355
:params block_migration: if true, migrate VM disk.
356
:params migrate_data: implementation specific params.
359
raise NotImplementedError()
361
def check_can_live_migrate_destination(self, ctxt, instance_ref,
362
block_migration=False,
363
disk_over_commit=False):
364
"""Check if it is possible to execute live migration.
366
This runs checks on the destination host, and then calls
367
back to the source host to check the results.
369
:param ctxt: security context
370
:param instance_ref: nova.db.sqlalchemy.models.Instance
371
:param dest: destination host
372
:param block_migration: if true, prepare for block migration
373
:param disk_over_commit: if true, allow disk over commit
375
raise NotImplementedError()
377
def check_can_live_migrate_destination_cleanup(self, ctxt,
379
"""Do required cleanup on dest host after check_can_live_migrate calls
381
:param ctxt: security context
382
:param dest_check_data: result of check_can_live_migrate_destination
384
raise NotImplementedError()
386
def check_can_live_migrate_source(self, ctxt, instance_ref,
388
"""Check if it is possible to execute live migration.
390
This checks if the live migration can succeed, based on the
391
results from check_can_live_migrate_destination.
393
:param context: security context
394
:param instance_ref: nova.db.sqlalchemy.models.Instance
395
:param dest_check_data: result of check_can_live_migrate_destination
381
397
raise NotImplementedError()
383
399
def refresh_security_group_rules(self, security_group_id):
478
494
# TODO(Vek): Need to pass context in for access to auth_token
479
495
raise NotImplementedError()
497
def filter_defer_apply_on(self):
498
"""Defer application of IPTables rules"""
501
def filter_defer_apply_off(self):
502
"""Turn off deferral of IPTables rules and apply the rules now"""
481
505
def unfilter_instance(self, instance, network_info):
482
506
"""Stop filtering instance"""
483
507
# TODO(Vek): Need to pass context in for access to auth_token
506
530
# TODO(Vek): Need to pass context in for access to auth_token
507
531
raise NotImplementedError()
509
def agent_update(self, instance, url, md5hash):
533
def change_instance_metadata(self, context, instance, diff):
511
Update agent on the specified instance.
535
Applies a diff to the instance metadata.
513
The first parameter is an instance of nova.compute.service.Instance,
514
and so the instance is being specified as instance.name. The second
515
parameter is the URL of the agent to be fetched and updated on the
516
instance; the third is the md5 hash of the file for verification
537
This is an optional driver method which is used to publish
538
changes to the instance's metadata to the hypervisor. If the
539
hypervisor has no means of publishing the instance metadata to
540
the instance, then this method should not be implemented.
519
# TODO(Vek): Need to pass context in for access to auth_token
520
raise NotImplementedError()
522
544
def inject_network_info(self, instance, nw_info):
523
545
"""inject network info for specified instance"""
548
570
# TODO(Vek): Need to pass context in for access to auth_token
549
571
raise NotImplementedError()
573
def get_host_uptime(self, host):
574
"""Returns the result of calling "uptime" on the target host."""
575
# TODO(Vek): Need to pass context in for access to auth_token
576
raise NotImplementedError()
551
578
def plug_vifs(self, instance, network_info):
552
579
"""Plug VIFs into networks."""
553
580
# TODO(Vek): Need to pass context in for access to auth_token
625
652
def add_to_aggregate(self, context, aggregate, host, **kwargs):
626
653
"""Add a compute host to an aggregate."""
654
#NOTE(jogo) Currently only used for XenAPI-Pool
627
655
raise NotImplementedError()
629
657
def remove_from_aggregate(self, context, aggregate, host, **kwargs):
630
658
"""Remove a compute host from an aggregate."""
631
659
raise NotImplementedError()
661
def undo_aggregate_operation(self, context, op, aggregate_id,
662
host, set_error=True):
663
"""Undo for Resource Pools"""
664
raise NotImplementedError()
633
666
def get_volume_connector(self, instance):
634
667
"""Get connector information for the instance for attaching to volumes.