diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index e7145e7..7c604be 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -28,7 +28,7 @@
 
 # format string to use for log messages with context (string
 # value)
-#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user)s %(tenant)s] %(instance)s%(message)s
+#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s
 
 # format string to use for log messages without context
 # (string value)
@@ -43,7 +43,7 @@
 #logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s
 
 # list of logger=LEVEL pairs (list value)
-#default_log_levels=amqplib=WARN,sqlalchemy=WARN,boto=WARN,suds=INFO,keystone=INFO,paramiko=INFO
+#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,iso8601=WARN
 
 # publish error events (boolean value)
 #publish_errors=false
@@ -59,12 +59,13 @@
 # it like this (string value)
 #instance_uuid_format="[instance: %(uuid)s] "
 
-# If this option is specified, the logging configuration file
-# specified is used and overrides any other logging options
-# specified. Please see the Python logging module
-# documentation for details on logging configuration files.
-# (string value)
-#log_config=<None>
+# The name of logging configuration file. It does not disable
+# existing loggers, but just appends specified logging
+# configuration to any other existing logging options. Please
+# see the Python logging module documentation for details on
+# logging configuration files. (string value)
+# Deprecated group/name - [DEFAULT]/log_config
+#log_config_append=<None>
 
 # DEPRECATED. A logging.Formatter log message format string
 # which may use any of the available logging.LogRecord
@@ -94,329 +95,61 @@
 #syslog_log_facility=LOG_USER
 
 
-[image]
+[baremetal]
 
 #
 # Options defined in tempest.config
 #
 
-# Catalog type of the Image service. (string value)
-#catalog_type=image
-
-# The image region name to use. If empty, the value of
-# identity.region is used instead. If no such region is found
-# in the service catalog, the first found one is used. (string
+# Catalog type of the baremetal provisioning service. (string
 # value)
-#region=
-
-# http accessible image (string value)
-#http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
+#catalog_type=baremetal
 
 
-[object-storage]
+[boto]
 
 #
 # Options defined in tempest.config
 #
 
-# Catalog type of the Object-Storage service. (string value)
-#catalog_type=object-store
+# EC2 URL (string value)
+#ec2_url=http://localhost:8773/services/Cloud
 
-# The object-storage region name to use. If empty, the value
-# of identity.region is used instead. If no such region is
-# found in the service catalog, the first found one is used.
-# (string value)
-#region=
+# S3 URL (string value)
+#s3_url=http://localhost:8080
 
-# Number of seconds to time on waiting for a containerto
-# container synchronization complete. (integer value)
-#container_sync_timeout=120
+# AWS Secret Key (string value)
+#aws_secret=<None>
 
-# Number of seconds to wait while looping to check thestatus
-# of a container to container synchronization (integer value)
-#container_sync_interval=5
+# AWS Access Key (string value)
+#aws_access=<None>
 
-# Role to add to users created for swift tests to enable
-# creating containers (string value)
-#operator_role=Member
+# S3 Materials Path (string value)
+#s3_materials_path=/opt/stack/devstack/files/images/s3-materials/cirros-0.3.0
 
+# ARI Ramdisk Image manifest (string value)
+#ari_manifest=cirros-0.3.0-x86_64-initrd.manifest.xml
 
-[network]
+# AMI Machine Image manifest (string value)
+#ami_manifest=cirros-0.3.0-x86_64-blank.img.manifest.xml
 
-#
-# Options defined in tempest.config
-#
+# AKI Kernel Image manifest (string value)
+#aki_manifest=cirros-0.3.0-x86_64-vmlinuz.manifest.xml
 
-# Catalog type of the Neutron service. (string value)
-#catalog_type=network
+# Instance type (string value)
+#instance_type=m1.tiny
 
-# The network region name to use. If empty, the value of
-# identity.region is used instead. If no such region is found
-# in the service catalog, the first found one is used. (string
-# value)
-#region=
+# boto Http socket timeout (integer value)
+#http_socket_timeout=3
 
-# The cidr block to allocate tenant networks from (string
-# value)
-#tenant_network_cidr=10.100.0.0/16
+# boto num_retries on error (integer value)
+#num_retries=1
 
-# The mask bits for tenant networks (integer value)
-#tenant_network_mask_bits=28
+# Status Change Timeout (integer value)
+#build_timeout=60
 
-# Whether tenant network connectivity should be evaluated
-# directly (boolean value)
-#tenant_networks_reachable=false
-
-# Id of the public network that provides external connectivity
-# (string value)
-#public_network_id=
-
-# Id of the public router that provides external connectivity
-# (string value)
-#public_router_id=
-
-
-[data_processing]
-
-#
-# Options defined in tempest.config
-#
-
-# Catalog type of the data processing service. (string value)
-#catalog_type=data_processing
-
-
-[object-storage-feature-enabled]
-
-#
-# Options defined in tempest.config
-#
-
-# Set to True if the Container Quota middleware is enabled
-# (boolean value)
-#container_quotas=true
-
-# Set to True if the Account Quota middleware is enabled
-# (boolean value)
-#accounts_quotas=true
-
-# Set to True if the Crossdomain middleware is enabled
-# (boolean value)
-#crossdomain=true
-
-# Set to True if the TempURL middleware is enabled (boolean
-# value)
-#tempurl=true
-
-
-[network-feature-enabled]
-
-#
-# Options defined in tempest.config
-#
-
-# A list of enabled extensions with a special entry all which
-# indicates every extension is enabled (list value)
-#api_extensions=all
-
-
-[volume-feature-enabled]
-
-#
-# Options defined in tempest.config
-#
-
-# Runs Cinder multi-backend test (requires 2 backends)
-# (boolean value)
-#multi_backend=false
-
-# A list of enabled extensions with a special entry all which
-# indicates every extension is enabled (list value)
-#api_extensions=all
-
-# Is the v1 volume API enabled (boolean value)
-#api_v1=true
-
-
-[image-feature-enabled]
-
-#
-# Options defined in tempest.config
-#
-
-# Is the v2 image API enabled (boolean value)
-#api_v2=true
-
-# Is the v1 image API enabled (boolean value)
-#api_v1=true
-
-
-[compute-admin]
-
-#
-# Options defined in tempest.config
-#
-
-# Administrative Username to use for Nova API requests.
-# (string value)
-#username=admin
-
-# Administrative Tenant name to use for Nova API requests.
-# (string value)
-#tenant_name=admin
-
-# API key to use when authenticating as admin. (string value)
-#password=pass
-
-
-[volume]
-
-#
-# Options defined in tempest.config
-#
-
-# Time in seconds between volume availability checks. (integer
-# value)
-#build_interval=10
-
-# Timeout in seconds to wait for a volume to becomeavailable.
-# (integer value)
-#build_timeout=300
-
-# Catalog type of the Volume Service (string value)
-#catalog_type=volume
-
-# The volume region name to use. If empty, the value of
-# identity.region is used instead. If no such region is found
-# in the service catalog, the first found one is used. (string
-# value)
-#region=
-
-# Name of the backend1 (must be declared in cinder.conf)
-# (string value)
-#backend1_name=BACKEND_1
-
-# Name of the backend2 (must be declared in cinder.conf)
-# (string value)
-#backend2_name=BACKEND_2
-
-# Backend protocol to target when creating volume types
-# (string value)
-#storage_protocol=iSCSI
-
-# Backend vendor to target when creating volume types (string
-# value)
-#vendor_name=Open Source
-
-# Disk format to use when copying a volume to image (string
-# value)
-#disk_format=raw
-
-
-[compute-feature-enabled]
-
-#
-# Options defined in tempest.config
-#
-
-# If false, skip all nova v3 tests. (boolean value)
-#api_v3=true
-
-# If false, skip disk config tests (boolean value)
-#disk_config=true
-
-# A list of enabled extensions with a special entry all which
-# indicates every extension is enabled (list value)
-#api_extensions=all
-
-# A list of enabled v3 extensions with a special entry all
-# which indicates every extension is enabled (list value)
-#api_v3_extensions=all
-
-# Does the test environment support changing the admin
-# password? (boolean value)
-#change_password=false
-
-# Does the test environment support snapshots? (boolean value)
-#create_image=false
-
-# Does the test environment support resizing? (boolean value)
-#resize=false
-
-# Does the test environment support live migration available?
-# (boolean value)
-#live_migration=false
-
-# Does the test environment use block devices for live
-# migration (boolean value)
-#block_migration_for_live_migration=false
-
-# Does the test environment block migration support cinder
-# iSCSI volumes (boolean value)
-#block_migrate_cinder_iscsi=false
-
-
-[identity]
-
-#
-# Options defined in tempest.config
-#
-
-# Catalog type of the Identity service. (string value)
-#catalog_type=identity
-
-# Set to True if using self-signed SSL certificates. (boolean
-# value)
-#disable_ssl_certificate_validation=false
-
-# Full URI of the OpenStack Identity API (Keystone), v2
-# (string value)
-#uri=<None>
-
-# Full URI of the OpenStack Identity API (Keystone), v3
-# (string value)
-#uri_v3=<None>
-
-# The identity region name to use. Also used as the other
-# services' region name unless they are set explicitly. If no
-# such region is found in the service catalog, the first found
-# one is used. (string value)
-#region=RegionOne
-
-# Username to use for Nova API requests. (string value)
-#username=demo
-
-# Tenant name to use for Nova API requests. (string value)
-#tenant_name=demo
-
-# Role required to administrate keystone. (string value)
-#admin_role=admin
-
-# API key to use when authenticating. (string value)
-#password=pass
-
-# Username of alternate user to use for Nova API requests.
-# (string value)
-#alt_username=<None>
-
-# Alternate user's Tenant name to use for Nova API requests.
-# (string value)
-#alt_tenant_name=<None>
-
-# API key to use when authenticating as alternate user.
-# (string value)
-#alt_password=<None>
-
-# Administrative Username to use forKeystone API requests.
-# (string value)
-#admin_username=admin
-
-# Administrative Tenant name to use for Keystone API requests.
-# (string value)
-#admin_tenant_name=admin
-
-# API key to use when authenticating as admin. (string value)
-#admin_password=pass
+# Status Change Test Interval (integer value)
+#build_interval=1
 
 
 [cli]
@@ -436,44 +169,6 @@
 #timeout=15
 
 
-[stress]
-
-#
-# Options defined in tempest.config
-#
-
-# Directory containing log files on the compute nodes (string
-# value)
-#nova_logdir=<None>
-
-# Maximum number of instances to create during test. (integer
-# value)
-#max_instances=16
-
-# Controller host. (string value)
-#controller=<None>
-
-# Controller host. (string value)
-#target_controller=<None>
-
-# ssh user. (string value)
-#target_ssh_user=<None>
-
-# Path to private key. (string value)
-#target_private_key_path=<None>
-
-# regexp for list of log files. (string value)
-#target_logfiles=<None>
-
-# time (in seconds) between log file error checks. (integer
-# value)
-#log_check_interval=60
-
-# The number of threads created while stress test. (integer
-# value)
-#default_thread_number_per_action=4
-
-
 [compute]
 
 #
@@ -584,77 +279,68 @@
 # (integer value)
 #shelved_offload_time=0
 
+# Allows test cases to create/destroy tenants and users. This
+# option enables isolated test cases and better parallel
+# execution, but also requires that OpenStack Identity API
+# admin credentials are known. (boolean value)
+#allow_tenant_isolation=false
 
-[scenario]
+
+[compute-admin]
 
 #
 # Options defined in tempest.config
 #
 
-# Directory containing image files (string value)
-#img_dir=/opt/stack/new/devstack/files/images/cirros-0.3.1-x86_64-uec
+# Administrative Username to use for Nova API requests.
+# (string value)
+#username=admin
 
-# AMI image file name (string value)
-#ami_img_file=cirros-0.3.1-x86_64-blank.img
+# Administrative Tenant name to use for Nova API requests.
+# (string value)
+#tenant_name=admin
 
-# ARI image file name (string value)
-#ari_img_file=cirros-0.3.1-x86_64-initrd
-
-# AKI image file name (string value)
-#aki_img_file=cirros-0.3.1-x86_64-vmlinuz
-
-# ssh username for the image file (string value)
-#ssh_user=cirros
-
-# specifies how many resources to request at once. Used for
-# large operations testing. (integer value)
-#large_ops_number=0
+# API key to use when authenticating as admin. (string value)
+#password=pass
 
 
-[boto]
+[compute-feature-enabled]
 
 #
 # Options defined in tempest.config
 #
 
-# EC2 URL (string value)
-#ec2_url=http://localhost:8773/services/Cloud
+# If false, skip all nova v3 tests. (boolean value)
+#api_v3=true
 
-# S3 URL (string value)
-#s3_url=http://localhost:8080
+# If false, skip disk config tests (boolean value)
+#disk_config=true
 
-# AWS Secret Key (string value)
-#aws_secret=<None>
+# A list of enabled v3 extensions with a special entry all
+# which indicates every extension is enabled (list value)
+#api_v3_extensions=all
 
-# AWS Access Key (string value)
-#aws_access=<None>
+# Does the test environment support changing the admin
+# password? (boolean value)
+#change_password=false
 
-# S3 Materials Path (string value)
-#s3_materials_path=/opt/stack/devstack/files/images/s3-materials/cirros-0.3.0
+# Does the test environment support snapshots? (boolean value)
+#create_image=false
 
-# ARI Ramdisk Image manifest (string value)
-#ari_manifest=cirros-0.3.0-x86_64-initrd.manifest.xml
+# Does the test environment support resizing? (boolean value)
+#resize=false
 
-# AMI Machine Image manifest (string value)
-#ami_manifest=cirros-0.3.0-x86_64-blank.img.manifest.xml
+# Does the test environment support live migration available?
+# (boolean value)
+#live_migration=false
 
-# AKI Kernel Image manifest (string value)
-#aki_manifest=cirros-0.3.0-x86_64-vmlinuz.manifest.xml
+# Does the test environment use block devices for live
+# migration (boolean value)
+#block_migration_for_live_migration=false
 
-# Instance type (string value)
-#instance_type=m1.tiny
-
-# boto Http socket timeout (integer value)
-#http_socket_timeout=3
-
-# boto num_retries on error (integer value)
-#num_retries=1
-
-# Status Change Timeout (integer value)
-#build_timeout=60
-
-# Status Change Test Interval (integer value)
-#build_interval=1
+# Does the test environment block migration support cinder
+# iSCSI volumes (boolean value)
+#block_migrate_cinder_iscsi=false
 
 
 [dashboard]
@@ -670,6 +356,238 @@
 #login_url=http://localhost/auth/login/
 
 
+[data_processing]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the data processing service. (string value)
+#catalog_type=data_processing
+
+
+[debug]
+
+#
+# Options defined in tempest.config
+#
+
+# Enable diagnostic commands (boolean value)
+#enable=true
+
+
+[identity]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Identity service. (string value)
+#catalog_type=identity
+
+# Set to True if using self-signed SSL certificates. (boolean
+# value)
+#disable_ssl_certificate_validation=false
+
+# Full URI of the OpenStack Identity API (Keystone), v2
+# (string value)
+#uri=<None>
+
+# Full URI of the OpenStack Identity API (Keystone), v3
+# (string value)
+#uri_v3=<None>
+
+# The identity region name to use. Also used as the other
+# services' region name unless they are set explicitly. If no
+# such region is found in the service catalog, the first found
+# one is used. (string value)
+#region=RegionOne
+
+# Username to use for Nova API requests. (string value)
+#username=demo
+
+# Tenant name to use for Nova API requests. (string value)
+#tenant_name=demo
+
+# Role required to administrate keystone. (string value)
+#admin_role=admin
+
+# API key to use when authenticating. (string value)
+#password=pass
+
+# Username of alternate user to use for Nova API requests.
+# (string value)
+#alt_username=<None>
+
+# Alternate user's Tenant name to use for Nova API requests.
+# (string value)
+#alt_tenant_name=<None>
+
+# API key to use when authenticating as alternate user.
+# (string value)
+#alt_password=<None>
+
+# Administrative Username to use forKeystone API requests.
+# (string value)
+#admin_username=admin
+
+# Administrative Tenant name to use for Keystone API requests.
+# (string value)
+#admin_tenant_name=admin
+
+# API key to use when authenticating as admin. (string value)
+#admin_password=pass
+
+
+[image]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Image service. (string value)
+#catalog_type=image
+
+# The image region name to use. If empty, the value of
+# identity.region is used instead. If no such region is found
+# in the service catalog, the first found one is used. (string
+# value)
+#region=
+
+# http accessible image (string value)
+#http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
+
+
+[image-feature-enabled]
+
+#
+# Options defined in tempest.config
+#
+
+# Is the v2 image API enabled (boolean value)
+#api_v2=true
+
+# Is the v1 image API enabled (boolean value)
+#api_v1=true
+
+
+[input-scenario]
+
+#
+# Options defined in tempest.config
+#
+
+# Matching images become parameters for scenario tests (string
+# value)
+#image_regex=^cirros-0.3.1-x86_64-uec$
+
+# Matching flavors become parameters for scenario tests
+# (string value)
+#flavor_regex=^m1.(micro|nano|tiny)$
+
+# SSH verification in tests is skippedfor matching images
+# (string value)
+#non_ssh_image_regex=^.*[Ww]in.*$
+
+# List of user mapped to regex to matching image names.
+# (string value)
+#ssh_user_regex=[["^.*[Cc]irros.*$", "root"]]
+
+
+[network]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Neutron service. (string value)
+#catalog_type=network
+
+# The network region name to use. If empty, the value of
+# identity.region is used instead. If no such region is found
+# in the service catalog, the first found one is used. (string
+# value)
+#region=
+
+# The cidr block to allocate tenant networks from (string
+# value)
+#tenant_network_cidr=10.100.0.0/16
+
+# The mask bits for tenant networks (integer value)
+#tenant_network_mask_bits=28
+
+# Whether tenant network connectivity should be evaluated
+# directly (boolean value)
+#tenant_networks_reachable=false
+
+# Id of the public network that provides external connectivity
+# (string value)
+#public_network_id=
+
+# Id of the public router that provides external connectivity
+# (string value)
+#public_router_id=
+
+
+[network-feature-enabled]
+
+#
+# Options defined in tempest.config
+#
+
+# A list of enabled extensions with a special entry all which
+# indicates every extension is enabled (list value)
+#api_extensions=all
+
+# A list of enabled extensions with a special entry all which
+# indicates every extension is enabled (list value)
+#api_extensions=all
+
+# A list of enabled extensions with a special entry all which
+# indicates every extension is enabled (list value)
+#api_extensions=all
+
+
+[object-storage]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Object-Storage service. (string value)
+#catalog_type=object-store
+
+# The object-storage region name to use. If empty, the value
+# of identity.region is used instead. If no such region is
+# found in the service catalog, the first found one is used.
+# (string value)
+#region=
+
+# Number of seconds to time on waiting for a container to
+# container synchronization complete. (integer value)
+#container_sync_timeout=120
+
+# Number of seconds to wait while looping to check the status
+# of a container to container synchronization (integer value)
+#container_sync_interval=5
+
+# Role to add to users created for swift tests to enable
+# creating containers (string value)
+#operator_role=Member
+
+
+[object-storage-feature-enabled]
+
+#
+# Options defined in tempest.config
+#
+
+# A list of the enabled optional discoverable apis. A single
+# entry, all, indicates that all of these features are
+# expected to be enabled (list value)
+#discoverable_apis=all
+
+
 [orchestration]
 
 #
@@ -685,12 +603,6 @@
 # value)
 #region=
 
-# Allows test cases to create/destroy tenants and users. This
-# option enables isolated test cases and better parallel
-# execution, but also requires that OpenStack Identity API
-# admin credentials are known. (boolean value)
-#allow_tenant_isolation=false
-
 # Time in seconds between build status checks. (integer value)
 #build_interval=1
 
@@ -715,14 +627,30 @@
 #max_template_size=524288
 
 
-[debug]
+[scenario]
 
 #
 # Options defined in tempest.config
 #
 
-# Enable diagnostic commands (boolean value)
-#enable=true
+# Directory containing image files (string value)
+#img_dir=/opt/stack/new/devstack/files/images/cirros-0.3.1-x86_64-uec
+
+# AMI image file name (string value)
+#ami_img_file=cirros-0.3.1-x86_64-blank.img
+
+# ARI image file name (string value)
+#ari_img_file=cirros-0.3.1-x86_64-initrd
+
+# AKI image file name (string value)
+#aki_img_file=cirros-0.3.1-x86_64-vmlinuz
+
+# ssh username for the image file (string value)
+#ssh_user=cirros
+
+# specifies how many resources to request at once. Used for
+# large operations testing. (integer value)
+#large_ops_number=0
 
 
 [service_available]
@@ -767,4 +695,114 @@
 # value)
 #savanna=false
 
+# Whether or not Ironic is expected to be available (boolean
+# value)
+#ironic=false
+
+
+[stress]
+
+#
+# Options defined in tempest.config
+#
+
+# Directory containing log files on the compute nodes (string
+# value)
+#nova_logdir=<None>
+
+# Maximum number of instances to create during test. (integer
+# value)
+#max_instances=16
+
+# Controller host. (string value)
+#controller=<None>
+
+# Controller host. (string value)
+#target_controller=<None>
+
+# ssh user. (string value)
+#target_ssh_user=<None>
+
+# Path to private key. (string value)
+#target_private_key_path=<None>
+
+# regexp for list of log files. (string value)
+#target_logfiles=<None>
+
+# time (in seconds) between log file error checks. (integer
+# value)
+#log_check_interval=60
+
+# The number of threads created while stress test. (integer
+# value)
+#default_thread_number_per_action=4
+
+
+[telemetry]
+
+#
+# Options defined in tempest.config
+#
+
+# Catalog type of the Telemetry service. (string value)
+#catalog_type=metering
+
+
+[volume]
+
+#
+# Options defined in tempest.config
+#
+
+# Time in seconds between volume availability checks. (integer
+# value)
+#build_interval=10
+
+# Timeout in seconds to wait for a volume to becomeavailable.
+# (integer value)
+#build_timeout=300
+
+# Catalog type of the Volume Service (string value)
+#catalog_type=volume
+
+# The volume region name to use. If empty, the value of
+# identity.region is used instead. If no such region is found
+# in the service catalog, the first found one is used. (string
+# value)
+#region=
+
+# Name of the backend1 (must be declared in cinder.conf)
+# (string value)
+#backend1_name=BACKEND_1
+
+# Name of the backend2 (must be declared in cinder.conf)
+# (string value)
+#backend2_name=BACKEND_2
+
+# Backend protocol to target when creating volume types
+# (string value)
+#storage_protocol=iSCSI
+
+# Backend vendor to target when creating volume types (string
+# value)
+#vendor_name=Open Source
+
+# Disk format to use when copying a volume to image (string
+# value)
+#disk_format=raw
+
+
+[volume-feature-enabled]
+
+#
+# Options defined in tempest.config
+#
+
+# Runs Cinder multi-backend test (requires 2 backends)
+# (boolean value)
+#multi_backend=false
+
+# Is the v1 volume API enabled (boolean value)
+#api_v1=true
+
 
diff --git a/requirements.txt b/requirements.txt
index cd11aa7..3b3e1fa 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,11 +14,12 @@
 python-neutronclient>=2.3.0,<3
 python-cinderclient>=1.0.6
 python-heatclient>=0.2.3
+python-swiftclient>=1.5
 testresources>=0.2.4
 keyring>=1.6.1,<2.0
 testrepository>=0.0.17
 oslo.config>=1.2.0
-eventlet>=0.13.0
 six>=1.4.1
 iso8601>=0.1.8
 fixtures>=0.3.14
+testscenarios>=0.4
diff --git a/run_tempest.sh b/run_tempest.sh
new file mode 100755
index 0000000..be9b38a
--- /dev/null
+++ b/run_tempest.sh
@@ -0,0 +1,158 @@
+#!/usr/bin/env bash
+
+function usage {
+  echo "Usage: $0 [OPTION]..."
+  echo "Run Tempest test suite"
+  echo ""
+  echo "  -V, --virtual-env        Always use virtualenv.  Install automatically if not present"
+  echo "  -N, --no-virtual-env     Don't use virtualenv.  Run tests in local environment"
+  echo "  -n, --no-site-packages   Isolate the virtualenv from the global Python environment"
+  echo "  -f, --force              Force a clean re-build of the virtual environment. Useful when dependencies have been added."
+  echo "  -u, --update             Update the virtual environment with any newer package versions"
+  echo "  -s, --smoke              Only run smoke tests"
+  echo "  -t, --serial             Run testr serially"
+  echo "  -C, --config             Config file location"
+  echo "  -h, --help               Print this usage message"
+  echo "  -d, --debug              Debug this script -- set -o xtrace"
+  echo "  -l, --logging            Enable logging"
+  echo "  -L, --logging-config     Logging config file location.  Default is etc/logging.conf"
+  echo "  -- [TESTROPTIONS]        After the first '--' you can pass arbitrary arguments to testr "
+}
+
+testrargs=""
+venv=.venv
+with_venv=tools/with_venv.sh
+serial=0
+always_venv=0
+never_venv=0
+no_site_packages=0
+force=0
+wrapper=""
+config_file=""
+update=0
+logging=0
+logging_config=etc/logging.conf
+
+if ! options=$(getopt -o VNnfusthdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,serial,help,debug,config:,logging,logging-config: -- "$@")
+then
+    # parse error
+    usage
+    exit 1
+fi
+
+eval set -- $options
+first_uu=yes
+while [ $# -gt 0 ]; do
+  case "$1" in
+    -h|--help) usage; exit;;
+    -V|--virtual-env) always_venv=1; never_venv=0;;
+    -N|--no-virtual-env) always_venv=0; never_venv=1;;
+    -n|--no-site-packages) no_site_packages=1;;
+    -f|--force) force=1;;
+    -u|--update) update=1;;
+    -d|--debug) set -o xtrace;;
+    -C|--config) config_file=$2; shift;;
+    -s|--smoke) testrargs+="smoke"; noseargs+="--attr=type=smoke";;
+    -t|--serial) serial=1;;
+    -l|--logging) logging=1;;
+    -L|--logging-config) logging_config=$2; shift;;
+    --) [ "yes" == "$first_uu" ] || testrargs="$testrargs $1"; first_uu=no  ;;
+    *) testrargs="$testrargs $1"; noseargs+=" $1" ;;
+  esac
+  shift
+done
+
+if [ -n "$config_file" ]; then
+    config_file=`readlink -f "$config_file"`
+    export TEMPEST_CONFIG_DIR=`dirname "$config_file"`
+    export TEMPEST_CONFIG=`basename "$config_file"`
+fi
+
+if [ $logging -eq 1 ]; then
+    if [ ! -f "$logging_config" ]; then
+        echo "No such logging config file: $logging_config"
+        exit 1
+    fi
+    logging_config=`readlink -f "$logging_config"`
+    export TEMPEST_LOG_CONFIG_DIR=`dirname "$logging_config"`
+    export TEMPEST_LOG_CONFIG=`basename "$logging_config"`
+fi
+
+cd `dirname "$0"`
+
+if [ $no_site_packages -eq 1 ]; then
+  installvenvopts="--no-site-packages"
+fi
+
+function testr_init {
+  if [ ! -d .testrepository ]; then
+      ${wrapper} testr init
+  fi
+}
+
+function run_tests {
+  testr_init
+  ${wrapper} find . -type f -name "*.pyc" -delete
+  export OS_TEST_PATH=./tempest/test_discover
+  if [ $serial -eq 1 ]; then
+      ${wrapper} testr run --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
+  else
+      ${wrapper} testr run --parallel --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
+  fi
+}
+
+function run_tests_nose {
+    export NOSE_WITH_OPENSTACK=1
+    export NOSE_OPENSTACK_COLOR=1
+    export NOSE_OPENSTACK_RED=15.00
+    export NOSE_OPENSTACK_YELLOW=3.00
+    export NOSE_OPENSTACK_SHOW_ELAPSED=1
+    export NOSE_OPENSTACK_STDOUT=1
+    export TEMPEST_PY26_NOSE_COMPAT=1
+    if [[ "x$noseargs" =~ "tempest" ]]; then
+        noseargs="$testrargs"
+    else
+        noseargs="$noseargs tempest"
+    fi
+    ${wrapper} nosetests $noseargs
+}
+
+if [ $never_venv -eq 0 ]
+then
+  # Remove the virtual environment if --force used
+  if [ $force -eq 1 ]; then
+    echo "Cleaning virtualenv..."
+    rm -rf ${venv}
+  fi
+  if [ $update -eq 1 ]; then
+      echo "Updating virtualenv..."
+      python tools/install_venv.py $installvenvopts
+  fi
+  if [ -e ${venv} ]; then
+    wrapper="${with_venv}"
+  else
+    if [ $always_venv -eq 1 ]; then
+      # Automatically install the virtualenv
+      python tools/install_venv.py $installvenvopts
+      wrapper="${with_venv}"
+    else
+      echo -e "No virtual environment found...create one? (Y/n) \c"
+      read use_ve
+      if [ "x$use_ve" = "xY" -o "x$use_ve" = "x" -o "x$use_ve" = "xy" ]; then
+        # Install the virtualenv and run the test suite in it
+        python tools/install_venv.py $installvenvopts
+        wrapper=${with_venv}
+      fi
+    fi
+  fi
+fi
+
+py_version=`${wrapper} python --version 2>&1`
+if [[ $py_version =~ "2.6" ]] ; then
+    run_tests_nose
+else
+    run_tests
+fi
+retval=$?
+
+exit $retval
diff --git a/run_tests.sh b/run_tests.sh
index 3c9c051..285b372 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -2,21 +2,18 @@
 
 function usage {
   echo "Usage: $0 [OPTION]..."
-  echo "Run Tempest test suite"
+  echo "Run Tempest unit tests"
   echo ""
   echo "  -V, --virtual-env        Always use virtualenv.  Install automatically if not present"
   echo "  -N, --no-virtual-env     Don't use virtualenv.  Run tests in local environment"
   echo "  -n, --no-site-packages   Isolate the virtualenv from the global Python environment"
   echo "  -f, --force              Force a clean re-build of the virtual environment. Useful when dependencies have been added."
   echo "  -u, --update             Update the virtual environment with any newer package versions"
-  echo "  -s, --smoke              Only run smoke tests"
   echo "  -t, --serial             Run testr serially"
-  echo "  -C, --config             Config file location"
   echo "  -p, --pep8               Just run pep8"
+  echo "  -c, --coverage           Generate coverage report"
   echo "  -h, --help               Print this usage message"
   echo "  -d, --debug              Debug this script -- set -o xtrace"
-  echo "  -l, --logging            Enable logging"
-  echo "  -L, --logging-config     Logging config file location.  Default is etc/logging.conf"
   echo "  -- [TESTROPTIONS]        After the first '--' you can pass arbitrary arguments to testr "
 }
 
@@ -29,13 +26,12 @@
 never_venv=0
 no_site_packages=0
 force=0
+coverage=0
 wrapper=""
 config_file=""
 update=0
-logging=0
-logging_config=etc/logging.conf
 
-if ! options=$(getopt -o VNnfustphdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,serial,pep8,help,debug,config:,logging,logging-config: -- "$@")
+if ! options=$(getopt -o VNnfuctphd -l virtual-env,no-virtual-env,no-site-packages,force,update,serial,coverage,pep8,help,debug -- "$@")
 then
     # parse error
     usage
@@ -53,33 +49,15 @@
     -f|--force) force=1;;
     -u|--update) update=1;;
     -d|--debug) set -o xtrace;;
-    -C|--config) config_file=$2; shift;;
     -p|--pep8) let just_pep8=1;;
-    -s|--smoke) testrargs+="smoke"; noseargs+="--attr=type=smoke";;
+    -c|--coverage) coverage=1;;
     -t|--serial) serial=1;;
-    -l|--logging) logging=1;;
-    -L|--logging-config) logging_config=$2; shift;;
     --) [ "yes" == "$first_uu" ] || testrargs="$testrargs $1"; first_uu=no  ;;
     *) testrargs="$testrargs $1"; noseargs+=" $1" ;;
   esac
   shift
 done
 
-if [ -n "$config_file" ]; then
-    config_file=`readlink -f "$config_file"`
-    export TEMPEST_CONFIG_DIR=`dirname "$config_file"`
-    export TEMPEST_CONFIG=`basename "$config_file"`
-fi
-
-if [ $logging -eq 1 ]; then
-    if [ ! -f "$logging_config" ]; then
-        echo "No such logging config file: $logging_config"
-        exit 1
-    fi
-    logging_config=`readlink -f "$logging_config"`
-    export TEMPEST_LOG_CONFIG_DIR=`dirname "$logging_config"`
-    export TEMPEST_LOG_CONFIG=`basename "$logging_config"`
-fi
 
 cd `dirname "$0"`
 
@@ -96,6 +74,7 @@
 function run_tests {
   testr_init
   ${wrapper} find . -type f -name "*.pyc" -delete
+  export OS_TEST_PATH=./tempest/tests
   if [ $serial -eq 1 ]; then
       ${wrapper} testr run --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
   else
@@ -103,22 +82,6 @@
   fi
 }
 
-function run_tests_nose {
-    export NOSE_WITH_OPENSTACK=1
-    export NOSE_OPENSTACK_COLOR=1
-    export NOSE_OPENSTACK_RED=15.00
-    export NOSE_OPENSTACK_YELLOW=3.00
-    export NOSE_OPENSTACK_SHOW_ELAPSED=1
-    export NOSE_OPENSTACK_STDOUT=1
-    export TEMPEST_PY26_NOSE_COMPAT=1
-    if [[ "x$noseargs" =~ "tempest" ]]; then
-        noseargs="$testrargs"
-    else
-        noseargs="$noseargs tempest"
-    fi
-    ${wrapper} nosetests $noseargs
-}
-
 function run_pep8 {
   echo "Running flake8 ..."
   if [ $never_venv -eq 1 ]; then
@@ -163,12 +126,11 @@
     exit
 fi
 
-py_version=`${wrapper} python --version 2>&1`
-if [[ $py_version =~ "2.6" ]] ; then
-    run_tests_nose
-else
-    run_tests
+if [$coverage -eq 1] ; then
+    $testrargs = "--coverage $testrargs"
 fi
+
+run_tests
 retval=$?
 
 if [ -z "$testrargs" ]; then
diff --git a/tempest/api/__init__.py b/tempest/api/__init__.py
index 0b3d2db..e69de29 100644
--- a/tempest/api/__init__.py
+++ b/tempest/api/__init__.py
@@ -1,16 +0,0 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
-# Copyright 2012 OpenStack Foundation
-# All Rights Reserved.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
-#    not use this file except in compliance with the License. You may obtain
-#    a copy of the License at
-#
-#         http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#    License for the specific language governing permissions and limitations
-#    under the License.
diff --git a/tempest/api/baremetal/__init__.py b/tempest/api/baremetal/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/baremetal/__init__.py
diff --git a/tempest/api/baremetal/base.py b/tempest/api/baremetal/base.py
new file mode 100644
index 0000000..3aad1b5
--- /dev/null
+++ b/tempest/api/baremetal/base.py
@@ -0,0 +1,171 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import functools
+
+from tempest import clients
+from tempest.common.utils import data_utils
+from tempest import exceptions as exc
+from tempest import test
+
+
+def creates(resource):
+    """Decorator that adds resources to the appropriate cleanup list."""
+
+    def decorator(f):
+        @functools.wraps(f)
+        def wrapper(cls, *args, **kwargs):
+            result = f(cls, *args, **kwargs)
+            body = result[resource]
+
+            if 'uuid' in body:
+                cls.created_objects[resource].add(body['uuid'])
+
+            return result
+        return wrapper
+    return decorator
+
+
+class BaseBaremetalTest(test.BaseTestCase):
+    """Base class for Baremetal API tests."""
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseBaremetalTest, cls).setUpClass()
+
+        if not cls.config.service_available.ironic:
+            skip_msg = ('%s skipped as Ironic is not available' % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        mgr = clients.AdminManager()
+        cls.client = mgr.baremetal_client
+
+        cls.created_objects = {'chassis': set(),
+                               'port': set(),
+                               'node': set()}
+
+    @classmethod
+    def tearDownClass(cls):
+        """Ensure that all created objects get destroyed."""
+
+        try:
+            for resource, uuids in cls.created_objects.iteritems():
+                delete_method = getattr(cls.client, 'delete_%s' % resource)
+                for u in uuids:
+                    delete_method(u, ignore_errors=exc.NotFound)
+        finally:
+            super(BaseBaremetalTest, cls).tearDownClass()
+
+    @classmethod
+    @creates('chassis')
+    def create_chassis(cls, description=None, expect_errors=False):
+        """
+        Wrapper utility for creating test chassis.
+
+        :param description: A description of the chassis. if not supplied,
+            a random value will be generated.
+        :return: Created chassis.
+
+        """
+        description = description or data_utils.rand_name('test-chassis-')
+        resp, body = cls.client.create_chassis(description=description)
+
+        return {'chassis': body, 'response': resp}
+
+    @classmethod
+    @creates('node')
+    def create_node(cls, chassis_id, cpu_arch='x86', cpu_num=8, storage=1024,
+                    memory=4096, driver='fake'):
+        """
+        Wrapper utility for creating test baremetal nodes.
+
+        :param cpu_arch: CPU architecture of the node. Default: x86.
+        :param cpu_num: Number of CPUs. Default: 8.
+        :param storage: Disk size. Default: 1024.
+        :param memory: Available RAM. Default: 4096.
+        :return: Created node.
+
+        """
+        resp, body = cls.client.create_node(chassis_id, cpu_arch=cpu_arch,
+                                            cpu_num=cpu_num, storage=storage,
+                                            memory=memory, driver=driver)
+
+        return {'node': body, 'response': resp}
+
+    @classmethod
+    @creates('port')
+    def create_port(cls, node_id, address=None):
+        """
+        Wrapper utility for creating test ports.
+
+        :param address: MAC address of the port. If not supplied, a random
+            value will be generated.
+        :return: Created port.
+
+        """
+        address = address or data_utils.rand_mac_address()
+        resp, body = cls.client.create_port(address=address, node_id=node_id)
+
+        return {'port': body, 'response': resp}
+
+    @classmethod
+    def delete_chassis(cls, chassis_id):
+        """
+        Deletes a chassis having the specified UUID.
+
+        :param uuid: The unique identifier of the chassis.
+        :return: Server response.
+
+        """
+
+        resp, body = cls.client.delete_chassis(chassis_id)
+
+        if chassis_id in cls.created_objects['chassis']:
+            cls.created_objects['chassis'].remove(chassis_id)
+
+        return resp
+
+    @classmethod
+    def delete_node(cls, node_id):
+        """
+        Deletes a node having the specified UUID.
+
+        :param uuid: The unique identifier of the node.
+        :return: Server response.
+
+        """
+
+        resp, body = cls.client.delete_node(node_id)
+
+        if node_id in cls.created_objects['node']:
+            cls.created_objects['node'].remove(node_id)
+
+        return resp
+
+    @classmethod
+    def delete_port(cls, port_id):
+        """
+        Deletes a port having the specified UUID.
+
+        :param uuid: The unique identifier of the port.
+        :return: Server response.
+
+        """
+
+        resp, body = cls.client.delete_port(port_id)
+
+        if port_id in cls.created_objects['port']:
+            cls.created_objects['port'].remove(port_id)
+
+        return resp
diff --git a/tempest/api/baremetal/test_api_discovery.py b/tempest/api/baremetal/test_api_discovery.py
new file mode 100644
index 0000000..32f3d50
--- /dev/null
+++ b/tempest/api/baremetal/test_api_discovery.py
@@ -0,0 +1,46 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.baremetal import base
+from tempest import test
+
+
+class TestApiDiscovery(base.BaseBaremetalTest):
+    """Tests for API discovery features."""
+
+    @test.attr(type='smoke')
+    def test_api_versions(self):
+        resp, descr = self.client.get_api_description()
+        expected_versions = ('v1',)
+
+        versions = [version['id'] for version in descr['versions']]
+
+        for v in expected_versions:
+            self.assertIn(v, versions)
+
+    @test.attr(type='smoke')
+    def test_default_version(self):
+        resp, descr = self.client.get_api_description()
+        default_version = descr['default_version']
+
+        self.assertEqual(default_version['id'], 'v1')
+
+    @test.attr(type='smoke')
+    def test_version_1_resources(self):
+        resp, descr = self.client.get_version_description(version='v1')
+        expected_resources = ('nodes', 'chassis',
+                              'ports', 'links', 'media_types')
+
+        for res in expected_resources:
+            self.assertIn(res, descr)
diff --git a/tempest/api/baremetal/test_chassis.py b/tempest/api/baremetal/test_chassis.py
new file mode 100644
index 0000000..35a93ca
--- /dev/null
+++ b/tempest/api/baremetal/test_chassis.py
@@ -0,0 +1,78 @@
+# -*- coding: utf-8 -*-
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.baremetal import base
+from tempest.common.utils import data_utils
+from tempest import exceptions as exc
+from tempest import test
+
+
+class TestChassis(base.BaseBaremetalTest):
+    """Tests for chassis."""
+
+    @test.attr(type='smoke')
+    def test_create_chassis(self):
+        descr = data_utils.rand_name('test-chassis-')
+        ch = self.create_chassis(description=descr)['chassis']
+
+        self.assertEqual(ch['description'], descr)
+
+    @test.attr(type='smoke')
+    def test_create_chassis_unicode_description(self):
+        # Use a unicode string for testing:
+        # 'We ♡ OpenStack in Ukraine'
+        descr = u'В Україні ♡ OpenStack!'
+        ch = self.create_chassis(description=descr)['chassis']
+
+        self.assertEqual(ch['description'], descr)
+
+    @test.attr(type='smoke')
+    def test_show_chassis(self):
+        descr = data_utils.rand_name('test-chassis-')
+        uuid = self.create_chassis(description=descr)['chassis']['uuid']
+
+        resp, chassis = self.client.show_chassis(uuid)
+
+        self.assertEqual(chassis['uuid'], uuid)
+        self.assertEqual(chassis['description'], descr)
+
+    @test.attr(type="smoke")
+    def test_list_chassis(self):
+        created_ids = [self.create_chassis()['chassis']['uuid']
+                       for i in range(0, 5)]
+
+        resp, body = self.client.list_chassis()
+        loaded_ids = [ch['uuid'] for ch in body['chassis']]
+
+        for i in created_ids:
+            self.assertIn(i, loaded_ids)
+
+    @test.attr(type='smoke')
+    def test_delete_chassis(self):
+        uuid = self.create_chassis()['chassis']['uuid']
+
+        self.delete_chassis(uuid)
+
+        self.assertRaises(exc.NotFound, self.client.show_chassis, uuid)
+
+    @test.attr(type='smoke')
+    def test_update_chassis(self):
+        chassis_id = self.create_chassis()['chassis']['uuid']
+
+        new_description = data_utils.rand_name('new-description-')
+        self.client.update_chassis(chassis_id, description=new_description)
+
+        resp, chassis = self.client.show_chassis(chassis_id)
+        self.assertEqual(chassis['description'], new_description)
diff --git a/tempest/api/baremetal/test_nodes.py b/tempest/api/baremetal/test_nodes.py
new file mode 100644
index 0000000..f9b65ed
--- /dev/null
+++ b/tempest/api/baremetal/test_nodes.py
@@ -0,0 +1,97 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import six
+
+from tempest.api.baremetal import base
+from tempest import exceptions as exc
+from tempest import test
+
+
+class TestNodes(base.BaseBaremetalTest):
+    '''Tests for baremetal nodes.'''
+
+    def setUp(self):
+        super(TestNodes, self).setUp()
+
+        self.chassis = self.create_chassis()['chassis']
+
+    @test.attr(type='smoke')
+    def test_create_node(self):
+        params = {'cpu_arch': 'x86_64',
+                  'cpu_num': '12',
+                  'storage': '10240',
+                  'memory': '1024'}
+
+        node = self.create_node(self.chassis['uuid'], **params)['node']
+
+        for key in params:
+            self.assertEqual(node['properties'][key], params[key])
+
+    @test.attr(type='smoke')
+    def test_delete_node(self):
+        node = self.create_node(self.chassis['uuid'])['node']
+        node_id = node['uuid']
+
+        resp = self.delete_node(node_id)
+
+        self.assertEqual(resp['status'], '204')
+        self.assertRaises(exc.NotFound, self.client.show_node, node_id)
+
+    @test.attr(type='smoke')
+    def test_show_node(self):
+        params = {'cpu_arch': 'x86_64',
+                  'cpu_num': '4',
+                  'storage': '100',
+                  'memory': '512'}
+
+        created_node = self.create_node(self.chassis['uuid'], **params)['node']
+        resp, loaded_node = self.client.show_node(created_node['uuid'])
+
+        for key, val in created_node.iteritems():
+            if key not in ('created_at', 'updated_at'):
+                self.assertEqual(loaded_node[key], val)
+
+    @test.attr(type='smoke')
+    def test_list_nodes(self):
+        uuids = [self.create_node(self.chassis['uuid'])['node']['uuid']
+                 for i in range(0, 5)]
+
+        resp, body = self.client.list_nodes()
+        loaded_uuids = [n['uuid'] for n in body['nodes']]
+
+        for u in uuids:
+            self.assertIn(u, loaded_uuids)
+
+    @test.attr(type='smoke')
+    def test_update_node(self):
+        props = {'cpu_arch': 'x86_64',
+                 'cpu_num': '12',
+                 'storage': '10',
+                 'memory': '128'}
+
+        node = self.create_node(self.chassis['uuid'], **props)['node']
+        node_id = node['uuid']
+
+        new_props = {'cpu_arch': 'x86',
+                     'cpu_num': '1',
+                     'storage': '10000',
+                     'memory': '12300'}
+
+        self.client.update_node(node_id, properties=new_props)
+        resp, node = self.client.show_node(node_id)
+
+        for name, value in six.iteritems(new_props):
+            if name not in ('created_at', 'updated_at'):
+                self.assertEqual(node['properties'][name], value)
diff --git a/tempest/api/baremetal/test_ports.py b/tempest/api/baremetal/test_ports.py
new file mode 100644
index 0000000..8249705
--- /dev/null
+++ b/tempest/api/baremetal/test_ports.py
@@ -0,0 +1,85 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.baremetal import base
+from tempest.common.utils import data_utils
+from tempest import exceptions as exc
+from tempest import test
+
+
+class TestPorts(base.BaseBaremetalTest):
+    """Tests for ports."""
+
+    def setUp(self):
+        super(TestPorts, self).setUp()
+
+        chassis = self.create_chassis()['chassis']
+        self.node = self.create_node(chassis['uuid'])['node']
+
+    @test.attr(type='smoke')
+    def test_create_port(self):
+        node_id = self.node['uuid']
+        address = data_utils.rand_mac_address()
+
+        port = self.create_port(node_id=node_id, address=address)['port']
+
+        self.assertEqual(port['address'], address)
+        self.assertEqual(port['node_uuid'], node_id)
+
+    @test.attr(type='smoke')
+    def test_delete_port(self):
+        node_id = self.node['uuid']
+        port_id = self.create_port(node_id=node_id)['port']['uuid']
+
+        resp = self.delete_port(port_id)
+
+        self.assertEqual(resp['status'], '204')
+        self.assertRaises(exc.NotFound, self.client.show_port, port_id)
+
+    @test.attr(type='smoke')
+    def test_show_port(self):
+        node_id = self.node['uuid']
+        address = data_utils.rand_mac_address()
+
+        port_id = self.create_port(node_id=node_id,
+                                   address=address)['port']['uuid']
+
+        resp, port = self.client.show_port(port_id)
+
+        self.assertEqual(port['uuid'], port_id)
+        self.assertEqual(port['address'], address)
+
+    @test.attr(type='smoke')
+    def test_list_ports(self):
+        node_id = self.node['uuid']
+
+        uuids = [self.create_port(node_id=node_id)['port']['uuid']
+                 for i in range(0, 5)]
+
+        resp, body = self.client.list_ports()
+        loaded_uuids = [p['uuid'] for p in body['ports']]
+
+        for u in uuids:
+            self.assertIn(u, loaded_uuids)
+
+    @test.attr(type='smoke')
+    def test_update_port(self):
+        node_id = self.node['uuid']
+        port_id = self.create_port(node_id=node_id)['port']['uuid']
+
+        new_address = data_utils.rand_mac_address()
+        self.client.update_port(port_id, address=new_address)
+
+        resp, body = self.client.show_port(port_id)
+        self.assertEqual(body['address'], new_address)
diff --git a/tempest/api/baremetal/test_ports_negative.py b/tempest/api/baremetal/test_ports_negative.py
new file mode 100644
index 0000000..423313cb
--- /dev/null
+++ b/tempest/api/baremetal/test_ports_negative.py
@@ -0,0 +1,42 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.baremetal import base
+from tempest.common.utils import data_utils
+from tempest import exceptions as exc
+from tempest import test
+
+
+class TestPortsNegative(base.BaseBaremetalTest):
+    """Negative tests for ports."""
+
+    def setUp(self):
+        super(TestPortsNegative, self).setUp()
+
+        chassis = self.create_chassis()['chassis']
+        self.node = self.create_node(chassis['uuid'])['node']
+
+    @test.attr(type='negative')
+    def test_create_port_invalid_mac(self):
+        node_id = self.node['uuid']
+        address = 'not an uuid'
+
+        self.assertRaises(exc.BadRequest,
+                          self.create_port, node_id=node_id, address=address)
+
+    @test.attr(type='negative')
+    def test_create_port_wrong_node_id(self):
+        node_id = str(data_utils.rand_uuid())
+
+        self.assertRaises(exc.BadRequest, self.create_port, node_id=node_id)
diff --git a/tempest/api/compute/admin/test_servers.py b/tempest/api/compute/admin/test_servers.py
index 6fe3186..2160949 100644
--- a/tempest/api/compute/admin/test_servers.py
+++ b/tempest/api/compute/admin/test_servers.py
@@ -44,6 +44,7 @@
         cls.s2_name = data_utils.rand_name('server')
         resp, server = cls.create_test_server(name=cls.s2_name,
                                               wait_until='ACTIVE')
+        cls.s2_id = server['id']
 
     def _get_unused_flavor_id(self):
         flavor_id = data_utils.rand_int_id(start=1000)
@@ -64,6 +65,22 @@
         self.assertEqual([], servers)
 
     @attr(type='gate')
+    def test_list_servers_filter_by_error_status(self):
+        # Filter the list of servers by server error status
+        params = {'status': 'error'}
+        resp, server = self.client.reset_state(self.s1_id, state='error')
+        resp, body = self.non_admin_client.list_servers(params)
+        # Reset server's state to 'active'
+        resp, server = self.client.reset_state(self.s1_id, state='active')
+        # Verify server's state
+        resp, server = self.client.get_server(self.s1_id)
+        self.assertEqual(server['status'], 'ACTIVE')
+        servers = body['servers']
+        # Verify error server in list result
+        self.assertIn(self.s1_id, map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s2_id, map(lambda x: x['id'], servers))
+
+    @attr(type='gate')
     def test_list_servers_by_admin_with_all_tenants(self):
         # Listing servers by admin user with all tenants parameter
         # Here should be listed all servers
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage.py b/tempest/api/compute/admin/test_simple_tenant_usage.py
index a599f06..c416ad2 100644
--- a/tempest/api/compute/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/admin/test_simple_tenant_usage.py
@@ -18,7 +18,6 @@
 import datetime
 
 from tempest.api.compute import base
-from tempest import exceptions
 from tempest.test import attr
 import time
 
@@ -83,33 +82,6 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
-    @attr(type=['negative', 'gate'])
-    def test_get_usage_tenant_with_empty_tenant_id(self):
-        # Get usage for a specific tenant empty
-        params = {'start': self.start,
-                  'end': self.end}
-        self.assertRaises(exceptions.NotFound,
-                          self.adm_client.get_tenant_usage,
-                          '', params)
-
-    @attr(type=['negative', 'gate'])
-    def test_get_usage_tenant_with_invalid_date(self):
-        # Get usage for tenant with invalid date
-        params = {'start': self.end,
-                  'end': self.start}
-        self.assertRaises(exceptions.BadRequest,
-                          self.adm_client.get_tenant_usage,
-                          self.tenant_id, params)
-
-    @attr(type=['negative', 'gate'])
-    def test_list_usage_all_tenants_with_non_admin_user(self):
-        # Get usage for all tenants with non admin user
-        params = {'start': self.start,
-                  'end': self.end,
-                  'detailed': int(bool(True))}
-        self.assertRaises(exceptions.Unauthorized,
-                          self.client.list_tenant_usages, params)
-
 
 class TenantUsagesTestXML(TenantUsagesTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
new file mode 100644
index 0000000..7e5168e
--- /dev/null
+++ b/tempest/api/compute/admin/test_simple_tenant_usage_negative.py
@@ -0,0 +1,76 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 NEC Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import datetime
+
+from tempest.api.compute import base
+from tempest import exceptions
+from tempest.test import attr
+
+
+class TenantUsagesNegativeTestJSON(base.BaseV2ComputeAdminTest):
+
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(TenantUsagesNegativeTestJSON, cls).setUpClass()
+        cls.adm_client = cls.os_adm.tenant_usages_client
+        cls.client = cls.os.tenant_usages_client
+        cls.identity_client = cls._get_identity_admin_client()
+        now = datetime.datetime.now()
+        cls.start = cls._parse_strtime(now - datetime.timedelta(days=1))
+        cls.end = cls._parse_strtime(now + datetime.timedelta(days=1))
+
+    @classmethod
+    def _parse_strtime(cls, at):
+        # Returns formatted datetime
+        return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
+
+    @attr(type=['negative', 'gate'])
+    def test_get_usage_tenant_with_empty_tenant_id(self):
+        # Get usage for a specific tenant empty
+        params = {'start': self.start,
+                  'end': self.end}
+        self.assertRaises(exceptions.NotFound,
+                          self.adm_client.get_tenant_usage,
+                          '', params)
+
+    @attr(type=['negative', 'gate'])
+    def test_get_usage_tenant_with_invalid_date(self):
+        # Get usage for tenant with invalid date
+        params = {'start': self.end,
+                  'end': self.start}
+        resp, tenants = self.identity_client.list_tenants()
+        tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
+                     self.client.tenant_name][0]
+        self.assertRaises(exceptions.BadRequest,
+                          self.adm_client.get_tenant_usage,
+                          tenant_id, params)
+
+    @attr(type=['negative', 'gate'])
+    def test_list_usage_all_tenants_with_non_admin_user(self):
+        # Get usage for all tenants with non admin user
+        params = {'start': self.start,
+                  'end': self.end,
+                  'detailed': int(bool(True))}
+        self.assertRaises(exceptions.Unauthorized,
+                          self.client.list_tenant_usages, params)
+
+
+class TenantUsagesNegativeTestXML(TenantUsagesNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py
index 093754c..311e158 100644
--- a/tempest/api/compute/base.py
+++ b/tempest/api/compute/base.py
@@ -100,9 +100,8 @@
             except exceptions.NotFound:
                 # The image may have already been deleted which is OK.
                 pass
-            except Exception as exc:
-                LOG.info('Exception raised deleting image %s', image_id)
-                LOG.exception(exc)
+            except Exception:
+                LOG.exception('Exception raised deleting image %s' % image_id)
                 pass
 
     @classmethod
@@ -131,12 +130,22 @@
             r, b = cls.servers_client.list_servers()
             servers = [s for s in b['servers'] if s['name'].startswith(name)]
 
-        cls.servers.extend(servers)
-
         if 'wait_until' in kwargs:
             for server in servers:
-                cls.servers_client.wait_for_server_status(
-                    server['id'], kwargs['wait_until'])
+                try:
+                    cls.servers_client.wait_for_server_status(
+                        server['id'], kwargs['wait_until'])
+                except Exception as ex:
+                    if ('preserve_server_on_error' not in kwargs
+                        or kwargs['preserve_server_on_error'] is False):
+                        for server in servers:
+                            try:
+                                cls.servers_client.delete_server(server['id'])
+                            except Exception:
+                                pass
+                    raise ex
+
+        cls.servers.extend(servers)
 
         return resp, body
 
@@ -214,8 +223,8 @@
             try:
                 cls.servers_client.delete_server(server_id)
                 cls.servers_client.wait_for_server_termination(server_id)
-            except Exception as exc:
-                LOG.exception(exc)
+            except Exception:
+                LOG.exception('Failed to delete server %s' % server_id)
                 pass
         resp, server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
         cls.password = server['adminPass']
@@ -300,8 +309,8 @@
         try:
             cls.servers_client.delete_server(server_id)
             cls.servers_client.wait_for_server_termination(server_id)
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('Failed to delete server %s' % server_id)
             pass
         resp, server = cls.create_test_server(wait_until='ACTIVE', **kwargs)
         cls.password = server['admin_password']
diff --git a/tempest/api/compute/floating_ips/test_floating_ips_actions.py b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
index f4ad449..32e7b39 100644
--- a/tempest/api/compute/floating_ips/test_floating_ips_actions.py
+++ b/tempest/api/compute/floating_ips/test_floating_ips_actions.py
@@ -51,17 +51,15 @@
         # Positive test:Allocation of a new floating IP to a project
         # should be successful
         resp, body = self.client.create_floating_ip()
-        self.assertEqual(200, resp.status)
         floating_ip_id_allocated = body['id']
-        try:
-            resp, floating_ip_details = \
-                self.client.get_floating_ip_details(floating_ip_id_allocated)
-            # Checking if the details of allocated IP is in list of floating IP
-            resp, body = self.client.list_floating_ips()
-            self.assertIn(floating_ip_details, body)
-        finally:
-            # Deleting the floating IP which is created in this method
-            self.client.delete_floating_ip(floating_ip_id_allocated)
+        self.addCleanup(self.client.delete_floating_ip,
+                        floating_ip_id_allocated)
+        self.assertEqual(200, resp.status)
+        resp, floating_ip_details = \
+            self.client.get_floating_ip_details(floating_ip_id_allocated)
+        # Checking if the details of allocated IP is in list of floating IP
+        resp, body = self.client.list_floating_ips()
+        self.assertIn(floating_ip_details, body)
 
     @attr(type='gate')
     def test_delete_floating_ip(self):
diff --git a/tempest/api/compute/floating_ips/test_list_floating_ips.py b/tempest/api/compute/floating_ips/test_list_floating_ips.py
index e4d03ae..9238994 100644
--- a/tempest/api/compute/floating_ips/test_list_floating_ips.py
+++ b/tempest/api/compute/floating_ips/test_list_floating_ips.py
@@ -54,25 +54,23 @@
     def test_get_floating_ip_details(self):
         # Positive test:Should be able to GET the details of floatingIP
         # Creating a floating IP for which details are to be checked
-        try:
-            resp, body = self.client.create_floating_ip()
-            floating_ip_instance_id = body['instance_id']
-            floating_ip_ip = body['ip']
-            floating_ip_fixed_ip = body['fixed_ip']
-            floating_ip_id = body['id']
-            resp, body = \
-                self.client.get_floating_ip_details(floating_ip_id)
-            self.assertEqual(200, resp.status)
-            # Comparing the details of floating IP
-            self.assertEqual(floating_ip_instance_id,
-                             body['instance_id'])
-            self.assertEqual(floating_ip_ip, body['ip'])
-            self.assertEqual(floating_ip_fixed_ip,
-                             body['fixed_ip'])
-            self.assertEqual(floating_ip_id, body['id'])
-        # Deleting the floating IP created in this method
-        finally:
-            self.client.delete_floating_ip(floating_ip_id)
+        resp, body = self.client.create_floating_ip()
+        floating_ip_id = body['id']
+        self.addCleanup(self.client.delete_floating_ip,
+                        floating_ip_id)
+        floating_ip_instance_id = body['instance_id']
+        floating_ip_ip = body['ip']
+        floating_ip_fixed_ip = body['fixed_ip']
+        resp, body = \
+            self.client.get_floating_ip_details(floating_ip_id)
+        self.assertEqual(200, resp.status)
+        # Comparing the details of floating IP
+        self.assertEqual(floating_ip_instance_id,
+                         body['instance_id'])
+        self.assertEqual(floating_ip_ip, body['ip'])
+        self.assertEqual(floating_ip_fixed_ip,
+                         body['fixed_ip'])
+        self.assertEqual(floating_ip_id, body['id'])
 
     @attr(type='gate')
     def test_list_floating_ip_pools(self):
diff --git a/tempest/api/compute/images/test_images_oneserver.py b/tempest/api/compute/images/test_images_oneserver.py
index c711bd5..26cc3f6 100644
--- a/tempest/api/compute/images/test_images_oneserver.py
+++ b/tempest/api/compute/images/test_images_oneserver.py
@@ -46,10 +46,11 @@
         try:
             self.servers_client.wait_for_server_status(self.server_id,
                                                        'ACTIVE')
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('server %s timed out to become ACTIVE. rebuilding'
+                          % self.server_id)
             # Rebuild server if cannot reach the ACTIVE state
-            # Usually it means the server had a serius accident
+            # Usually it means the server had a serious accident
             self.__class__.server_id = self.rebuild_server(self.server_id)
 
     @classmethod
diff --git a/tempest/api/compute/images/test_images_oneserver_negative.py b/tempest/api/compute/images/test_images_oneserver_negative.py
index b8a4304..5e235d1 100644
--- a/tempest/api/compute/images/test_images_oneserver_negative.py
+++ b/tempest/api/compute/images/test_images_oneserver_negative.py
@@ -45,10 +45,11 @@
         try:
             self.servers_client.wait_for_server_status(self.server_id,
                                                        'ACTIVE')
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('server %s timed out to become ACTIVE. rebuilding'
+                          % self.server_id)
             # Rebuild server if cannot reach the ACTIVE state
-            # Usually it means the server had a serius accident
+            # Usually it means the server had a serious accident
             self._reset_server()
 
     def _reset_server(self):
diff --git a/tempest/api/compute/images/test_list_image_filters.py b/tempest/api/compute/images/test_list_image_filters.py
index ac2ecba..bfdd8b2 100644
--- a/tempest/api/compute/images/test_list_image_filters.py
+++ b/tempest/api/compute/images/test_list_image_filters.py
@@ -59,8 +59,8 @@
             resp, cls.image2 = cls.create_image_from_server(
                 cls.server1['id'], wait_until='ACTIVE')
             cls.image2_id = cls.image2['id']
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('setUpClass failed')
             cls.tearDownClass()
             raise
 
diff --git a/tempest/api/compute/limits/test_absolute_limits.py b/tempest/api/compute/limits/test_absolute_limits.py
index 2809244..908d537 100644
--- a/tempest/api/compute/limits/test_absolute_limits.py
+++ b/tempest/api/compute/limits/test_absolute_limits.py
@@ -16,8 +16,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class AbsoluteLimitsTestJSON(base.BaseV2ComputeTest):
@@ -27,9 +26,8 @@
     def setUpClass(cls):
         super(AbsoluteLimitsTestJSON, cls).setUpClass()
         cls.client = cls.limits_client
-        cls.server_client = cls.servers_client
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_absLimits_get(self):
         # To check if all limits are present in the response
         resp, absolute_limits = self.client.get_absolute_limits()
@@ -49,25 +47,6 @@
                          "Failed to find element %s in absolute limits list"
                          % ', '.join(ele for ele in missing_elements))
 
-    @attr(type=['negative', 'gate'])
-    def test_max_image_meta_exceed_limit(self):
-        # We should not create vm with image meta over maxImageMeta limit
-        # Get max limit value
-        max_meta = self.client.get_specific_absolute_limit('maxImageMeta')
-
-        # Create server should fail, since we are passing > metadata Limit!
-        max_meta_data = int(max_meta) + 1
-
-        meta_data = {}
-        for xx in range(max_meta_data):
-            meta_data[str(xx)] = str(xx)
-
-        self.assertRaises(exceptions.OverLimit,
-                          self.server_client.create_server,
-                          name='test', meta=meta_data,
-                          flavor_ref=self.flavor_ref,
-                          image_ref=self.image_ref)
-
 
 class AbsoluteLimitsTestXML(AbsoluteLimitsTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/limits/test_absolute_limits_negative.py b/tempest/api/compute/limits/test_absolute_limits_negative.py
new file mode 100644
index 0000000..8547403
--- /dev/null
+++ b/tempest/api/compute/limits/test_absolute_limits_negative.py
@@ -0,0 +1,53 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest import exceptions
+from tempest import test
+
+
+class AbsoluteLimitsNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(AbsoluteLimitsNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.limits_client
+        cls.server_client = cls.servers_client
+
+    @test.attr(type=['negative', 'gate'])
+    def test_max_image_meta_exceed_limit(self):
+        # We should not create vm with image meta over maxImageMeta limit
+        # Get max limit value
+        max_meta = self.client.get_specific_absolute_limit('maxImageMeta')
+
+        # Create server should fail, since we are passing > metadata Limit!
+        max_meta_data = int(max_meta) + 1
+
+        meta_data = {}
+        for xx in range(max_meta_data):
+            meta_data[str(xx)] = str(xx)
+
+        self.assertRaises(exceptions.OverLimit,
+                          self.server_client.create_server,
+                          name='test', meta=meta_data,
+                          flavor_ref=self.flavor_ref,
+                          image_ref=self.image_ref)
+
+
+class AbsoluteLimitsNegativeTestXML(AbsoluteLimitsNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/security_groups/test_security_groups.py b/tempest/api/compute/security_groups/test_security_groups.py
index 95e9171..4ae65be 100644
--- a/tempest/api/compute/security_groups/test_security_groups.py
+++ b/tempest/api/compute/security_groups/test_security_groups.py
@@ -15,17 +15,10 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-import uuid
-
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import config
 from tempest import exceptions
-from tempest.test import attr
-from tempest.test import skip_because
-
-CONF = config.CONF
+from tempest import test
 
 
 class SecurityGroupsTestJSON(base.BaseV2ComputeTest):
@@ -35,13 +28,12 @@
     def setUpClass(cls):
         super(SecurityGroupsTestJSON, cls).setUpClass()
         cls.client = cls.security_groups_client
-        cls.neutron_available = cls.config.service_available.neutron
 
     def _delete_security_group(self, securitygroup_id):
         resp, _ = self.client.delete_security_group(securitygroup_id)
         self.assertEqual(202, resp.status)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_security_groups_create_list_delete(self):
         # Positive test:Should return the list of Security Groups
         # Create 3 Security Groups
@@ -69,7 +61,7 @@
 
     # TODO(afazekas): scheduled for delete,
     # test_security_group_create_get_delete covers it
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_security_group_create_delete(self):
         # Security Group should be created, verified and deleted
         s_name = data_utils.rand_name('securitygroup-')
@@ -88,7 +80,7 @@
                          "The created Security Group name is "
                          "not equal to the requested name")
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_security_group_create_get_delete(self):
         # Security Group should be created, fetched and deleted
         s_name = data_utils.rand_name('securitygroup-')
@@ -112,121 +104,7 @@
                          "The fetched Security Group is different "
                          "from the created Group")
 
-    @attr(type=['negative', 'smoke'])
-    def test_security_group_get_nonexistant_group(self):
-        # Negative test:Should not be able to GET the details
-        # of non-existent Security Group
-        security_group_id = []
-        resp, body = self.client.list_security_groups()
-        for i in range(len(body)):
-            security_group_id.append(body[i]['id'])
-        # Creating a non-existent Security Group id
-        while True:
-            non_exist_id = data_utils.rand_int_id(start=999)
-            if self.neutron_available:
-                non_exist_id = str(uuid.uuid4())
-            if non_exist_id not in security_group_id:
-                break
-        self.assertRaises(exceptions.NotFound, self.client.get_security_group,
-                          non_exist_id)
-
-    @skip_because(bug="1161411",
-                  condition=CONF.service_available.neutron)
-    @attr(type=['negative', 'gate'])
-    def test_security_group_create_with_invalid_group_name(self):
-        # Negative test: Security Group should not be created with group name
-        # as an empty string/with white spaces/chars more than 255
-        s_description = data_utils.rand_name('description-')
-        # Create Security Group with empty string as group name
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, "", s_description)
-        # Create Security Group with white space in group name
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, " ",
-                          s_description)
-        # Create Security Group with group name longer than 255 chars
-        s_name = 'securitygroup-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, s_name,
-                          s_description)
-
-    @skip_because(bug="1161411",
-                  condition=CONF.service_available.neutron)
-    @attr(type=['negative', 'gate'])
-    def test_security_group_create_with_invalid_group_description(self):
-        # Negative test:Security Group should not be created with description
-        # as an empty string/with white spaces/chars more than 255
-        s_name = data_utils.rand_name('securitygroup-')
-        # Create Security Group with empty string as description
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, s_name, "")
-        # Create Security Group with white space in description
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, s_name, " ")
-        # Create Security Group with group description longer than 255 chars
-        s_description = 'description-'.ljust(260, '0')
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, s_name,
-                          s_description)
-
-    @testtools.skipIf(CONF.service_available.neutron,
-                      "Neutron allows duplicate names for security groups")
-    @attr(type=['negative', 'gate'])
-    def test_security_group_create_with_duplicate_name(self):
-        # Negative test:Security Group with duplicate name should not
-        # be created
-        s_name = data_utils.rand_name('securitygroup-')
-        s_description = data_utils.rand_name('description-')
-        resp, security_group =\
-            self.client.create_security_group(s_name, s_description)
-        self.assertEqual(200, resp.status)
-
-        self.addCleanup(self.client.delete_security_group,
-                        security_group['id'])
-        # Now try the Security Group with the same 'Name'
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.create_security_group, s_name,
-                          s_description)
-
-    @attr(type=['negative', 'gate'])
-    def test_delete_the_default_security_group(self):
-        # Negative test:Deletion of the "default" Security Group should Fail
-        default_security_group_id = None
-        resp, body = self.client.list_security_groups()
-        for i in range(len(body)):
-            if body[i]['name'] == 'default':
-                default_security_group_id = body[i]['id']
-                break
-        # Deleting the "default" Security Group
-        self.assertRaises(exceptions.BadRequest,
-                          self.client.delete_security_group,
-                          default_security_group_id)
-
-    @attr(type=['negative', 'smoke'])
-    def test_delete_nonexistant_security_group(self):
-        # Negative test:Deletion of a non-existent Security Group should Fail
-        security_group_id = []
-        resp, body = self.client.list_security_groups()
-        for i in range(len(body)):
-            security_group_id.append(body[i]['id'])
-        # Creating non-existent Security Group
-        while True:
-            non_exist_id = data_utils.rand_int_id(start=999)
-            if self.neutron_available:
-                non_exist_id = str(uuid.uuid4())
-            if non_exist_id not in security_group_id:
-                break
-        self.assertRaises(exceptions.NotFound,
-                          self.client.delete_security_group, non_exist_id)
-
-    @attr(type=['negative', 'gate'])
-    def test_delete_security_group_without_passing_id(self):
-        # Negative test:Deletion of a Security Group with out passing ID
-        # should Fail
-        self.assertRaises(exceptions.NotFound,
-                          self.client.delete_security_group, '')
-
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_server_security_groups(self):
         # Checks that security groups may be added and linked to a server
         # and not deleted if the server is active.
@@ -282,6 +160,33 @@
         self.client.delete_security_group(sg2_id)
         self.assertEqual(202, resp.status)
 
+    @test.attr(type='gate')
+    def test_update_security_groups(self):
+        # Update security group name and description
+        # Create a security group
+        s_name = data_utils.rand_name('sg-')
+        s_description = data_utils.rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        self.assertEqual(200, resp.status)
+        self.assertIn('id', securitygroup)
+        securitygroup_id = securitygroup['id']
+        self.addCleanup(self._delete_security_group,
+                        securitygroup_id)
+        # Update the name and description
+        s_new_name = data_utils.rand_name('sg-hth-')
+        s_new_des = data_utils.rand_name('description-hth-')
+        resp, sg_new = \
+            self.client.update_security_group(securitygroup_id,
+                                              name=s_new_name,
+                                              description=s_new_des)
+        self.assertEqual(200, resp.status)
+        # get the security group
+        resp, fetched_group = \
+            self.client.get_security_group(securitygroup_id)
+        self.assertEqual(s_new_name, fetched_group['name'])
+        self.assertEqual(s_new_des, fetched_group['description'])
+
 
 class SecurityGroupsTestXML(SecurityGroupsTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/security_groups/test_security_groups_negative.py b/tempest/api/compute/security_groups/test_security_groups_negative.py
new file mode 100644
index 0000000..6a8e604
--- /dev/null
+++ b/tempest/api/compute/security_groups/test_security_groups_negative.py
@@ -0,0 +1,216 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Huawei Technologies Co.,LTD.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import testtools
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import config
+from tempest import exceptions
+from tempest import test
+
+CONF = config.CONF
+
+
+class SecurityGroupsNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(SecurityGroupsNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.security_groups_client
+        cls.neutron_available = cls.config.service_available.neutron
+
+    def _delete_security_group(self, securitygroup_id):
+        resp, _ = self.client.delete_security_group(securitygroup_id)
+        self.assertEqual(202, resp.status)
+
+    def _generate_a_non_existent_security_group_id(self):
+        security_group_id = []
+        resp, body = self.client.list_security_groups()
+        for i in range(len(body)):
+            security_group_id.append(body[i]['id'])
+        # Generate a non-existent security group id
+        while True:
+            non_exist_id = data_utils.rand_int_id(start=999)
+            if self.neutron_available:
+                non_exist_id = data_utils.rand_uuid()
+            if non_exist_id not in security_group_id:
+                break
+        return non_exist_id
+
+    @test.attr(type=['negative', 'smoke'])
+    def test_security_group_get_nonexistent_group(self):
+        # Negative test:Should not be able to GET the details
+        # of non-existent Security Group
+        non_exist_id = self._generate_a_non_existent_security_group_id()
+        self.assertRaises(exceptions.NotFound, self.client.get_security_group,
+                          non_exist_id)
+
+    @test.skip_because(bug="1161411",
+                       condition=CONF.service_available.neutron)
+    @test.attr(type=['negative', 'gate'])
+    def test_security_group_create_with_invalid_group_name(self):
+        # Negative test: Security Group should not be created with group name
+        # as an empty string/with white spaces/chars more than 255
+        s_description = data_utils.rand_name('description-')
+        # Create Security Group with empty string as group name
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, "", s_description)
+        # Create Security Group with white space in group name
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, " ",
+                          s_description)
+        # Create Security Group with group name longer than 255 chars
+        s_name = 'securitygroup-'.ljust(260, '0')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, s_name,
+                          s_description)
+
+    @test.skip_because(bug="1161411",
+                       condition=CONF.service_available.neutron)
+    @test.attr(type=['negative', 'gate'])
+    def test_security_group_create_with_invalid_group_description(self):
+        # Negative test:Security Group should not be created with description
+        # as an empty string/with white spaces/chars more than 255
+        s_name = data_utils.rand_name('securitygroup-')
+        # Create Security Group with empty string as description
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, s_name, "")
+        # Create Security Group with white space in description
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, s_name, " ")
+        # Create Security Group with group description longer than 255 chars
+        s_description = 'description-'.ljust(260, '0')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, s_name,
+                          s_description)
+
+    @testtools.skipIf(CONF.service_available.neutron,
+                      "Neutron allows duplicate names for security groups")
+    @test.attr(type=['negative', 'gate'])
+    def test_security_group_create_with_duplicate_name(self):
+        # Negative test:Security Group with duplicate name should not
+        # be created
+        s_name = data_utils.rand_name('securitygroup-')
+        s_description = data_utils.rand_name('description-')
+        resp, security_group =\
+            self.client.create_security_group(s_name, s_description)
+        self.assertEqual(200, resp.status)
+
+        self.addCleanup(self.client.delete_security_group,
+                        security_group['id'])
+        # Now try the Security Group with the same 'Name'
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_security_group, s_name,
+                          s_description)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_delete_the_default_security_group(self):
+        # Negative test:Deletion of the "default" Security Group should Fail
+        default_security_group_id = None
+        resp, body = self.client.list_security_groups()
+        for i in range(len(body)):
+            if body[i]['name'] == 'default':
+                default_security_group_id = body[i]['id']
+                break
+        # Deleting the "default" Security Group
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.delete_security_group,
+                          default_security_group_id)
+
+    @test.attr(type=['negative', 'smoke'])
+    def test_delete_nonexistent_security_group(self):
+        # Negative test:Deletion of a non-existent Security Group should fail
+        non_exist_id = self._generate_a_non_existent_security_group_id()
+        self.assertRaises(exceptions.NotFound,
+                          self.client.delete_security_group, non_exist_id)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_delete_security_group_without_passing_id(self):
+        # Negative test:Deletion of a Security Group with out passing ID
+        # should Fail
+        self.assertRaises(exceptions.NotFound,
+                          self.client.delete_security_group, '')
+
+    @testtools.skipIf(CONF.service_available.neutron,
+                      "Neutron not check the security_group_id")
+    @test.attr(type=['negative', 'gate'])
+    def test_update_security_group_with_invalid_sg_id(self):
+        # Update security_group with invalid sg_id should fail
+        s_name = data_utils.rand_name('sg-')
+        s_description = data_utils.rand_name('description-')
+        # Create a non int sg_id
+        sg_id_invalid = data_utils.rand_name('sg-')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.update_security_group, sg_id_invalid,
+                          name=s_name, description=s_description)
+
+    @testtools.skipIf(CONF.service_available.neutron,
+                      "Neutron not check the security_group_name")
+    @test.attr(type=['negative', 'gate'])
+    def test_update_security_group_with_invalid_sg_name(self):
+        # Update security_group with invalid sg_name should fail
+        s_name = data_utils.rand_name('sg-')
+        s_description = data_utils.rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        self.assertEqual(200, resp.status)
+        self.assertIn('id', securitygroup)
+        securitygroup_id = securitygroup['id']
+        self.addCleanup(self._delete_security_group,
+                        securitygroup_id)
+        # Update Security Group with group name longer than 255 chars
+        s_new_name = 'securitygroup-'.ljust(260, '0')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.update_security_group,
+                          securitygroup_id, name=s_new_name)
+
+    @testtools.skipIf(CONF.service_available.neutron,
+                      "Neutron not check the security_group_description")
+    @test.attr(type=['negative', 'gate'])
+    def test_update_security_group_with_invalid_sg_des(self):
+        # Update security_group with invalid sg_des should fail
+        s_name = data_utils.rand_name('sg-')
+        s_description = data_utils.rand_name('description-')
+        resp, securitygroup = \
+            self.client.create_security_group(s_name, s_description)
+        self.assertEqual(200, resp.status)
+        self.assertIn('id', securitygroup)
+        securitygroup_id = securitygroup['id']
+        self.addCleanup(self._delete_security_group,
+                        securitygroup_id)
+        # Update Security Group with group description longer than 255 chars
+        s_new_des = 'des-'.ljust(260, '0')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.update_security_group,
+                          securitygroup_id, description=s_new_des)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_update_non_existent_security_group(self):
+        # Update a non-existent Security Group should Fail
+        non_exist_id = self._generate_a_non_existent_security_group_id()
+        s_name = data_utils.rand_name('sg-')
+        s_description = data_utils.rand_name('description-')
+        self.assertRaises(exceptions.NotFound,
+                          self.client.update_security_group,
+                          non_exist_id, name=s_name,
+                          description=s_description)
+
+
+class SecurityGroupsNegativeTestXML(SecurityGroupsNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_instance_actions.py b/tempest/api/compute/servers/test_instance_actions.py
index 5019003..5058211 100644
--- a/tempest/api/compute/servers/test_instance_actions.py
+++ b/tempest/api/compute/servers/test_instance_actions.py
@@ -16,8 +16,7 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class InstanceActionsTestJSON(base.BaseV2ComputeTest):
@@ -31,7 +30,7 @@
         cls.request_id = resp['x-compute-request-id']
         cls.server_id = server['id']
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_list_instance_actions(self):
         # List actions of the provided server
         resp, body = self.client.reboot(self.server_id, 'HARD')
@@ -43,7 +42,7 @@
         self.assertTrue(any([i for i in body if i['action'] == 'create']))
         self.assertTrue(any([i for i in body if i['action'] == 'reboot']))
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_get_instance_action(self):
         # Get the action details of the provided server
         resp, body = self.client.get_instance_action(self.server_id,
@@ -52,18 +51,6 @@
         self.assertEqual(self.server_id, body['instance_uuid'])
         self.assertEqual('create', body['action'])
 
-    @attr(type=['negative', 'gate'])
-    def test_list_instance_actions_invalid_server(self):
-        # List actions of the invalid server id
-        self.assertRaises(exceptions.NotFound,
-                          self.client.list_instance_actions, 'server-999')
-
-    @attr(type=['negative', 'gate'])
-    def test_get_instance_action_invalid_request(self):
-        # Get the action details of the provided server with invalid request
-        self.assertRaises(exceptions.NotFound, self.client.get_instance_action,
-                          self.server_id, '999')
-
 
 class InstanceActionsTestXML(InstanceActionsTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_instance_actions_negative.py b/tempest/api/compute/servers/test_instance_actions_negative.py
new file mode 100644
index 0000000..68f2dcb
--- /dev/null
+++ b/tempest/api/compute/servers/test_instance_actions_negative.py
@@ -0,0 +1,50 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 NEC Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest import test
+
+
+class InstanceActionsNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(InstanceActionsNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.servers_client
+        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        cls.server_id = server['id']
+
+    @test.attr(type=['negative', 'gate'])
+    def test_list_instance_actions_non_existent_server(self):
+        # List actions of the non-existent server id
+        non_existent_server_id = data_utils.rand_uuid()
+        self.assertRaises(exceptions.NotFound,
+                          self.client.list_instance_actions,
+                          non_existent_server_id)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_get_instance_action_invalid_request(self):
+        # Get the action details of the provided server with invalid request
+        self.assertRaises(exceptions.NotFound, self.client.get_instance_action,
+                          self.server_id, '999')
+
+
+class InstanceActionsNegativeTestXML(InstanceActionsNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_list_server_filters.py b/tempest/api/compute/servers/test_list_server_filters.py
index 3748e37..f3863b3 100644
--- a/tempest/api/compute/servers/test_list_server_filters.py
+++ b/tempest/api/compute/servers/test_list_server_filters.py
@@ -121,6 +121,23 @@
         self.assertIn(self.s3['id'], map(lambda x: x['id'], servers))
 
     @attr(type='gate')
+    def test_list_servers_filter_by_shutoff_status(self):
+        # Filter the list of servers by server shutoff status
+        params = {'status': 'shutoff'}
+        self.client.stop(self.s1['id'])
+        self.client.wait_for_server_status(self.s1['id'],
+                                           'SHUTOFF')
+        resp, body = self.client.list_servers(params)
+        self.client.start(self.s1['id'])
+        self.client.wait_for_server_status(self.s1['id'],
+                                           'ACTIVE')
+        servers = body['servers']
+
+        self.assertIn(self.s1['id'], map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s2['id'], map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s3['id'], map(lambda x: x['id'], servers))
+
+    @attr(type='gate')
     def test_list_servers_filter_by_limit(self):
         # Verify only the expected number of servers are returned
         params = {'limit': 1}
diff --git a/tempest/api/compute/servers/test_multiple_create.py b/tempest/api/compute/servers/test_multiple_create.py
index 080bd1a..91c350e 100644
--- a/tempest/api/compute/servers/test_multiple_create.py
+++ b/tempest/api/compute/servers/test_multiple_create.py
@@ -17,8 +17,7 @@
 
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
 class MultipleCreateTestJSON(base.BaseV2ComputeTest):
@@ -38,7 +37,7 @@
 
         return resp, body
 
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_multiple_create(self):
         resp, body = self._create_multiple_servers(wait_until='ACTIVE',
                                                    min_count=1,
@@ -49,39 +48,7 @@
         self.assertEqual('202', resp['status'])
         self.assertNotIn('reservation_id', body)
 
-    @attr(type=['negative', 'gate'])
-    def test_min_count_less_than_one(self):
-        invalid_min_count = 0
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
-                          min_count=invalid_min_count)
-
-    @attr(type=['negative', 'gate'])
-    def test_min_count_non_integer(self):
-        invalid_min_count = 2.5
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
-                          min_count=invalid_min_count)
-
-    @attr(type=['negative', 'gate'])
-    def test_max_count_less_than_one(self):
-        invalid_max_count = 0
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
-                          max_count=invalid_max_count)
-
-    @attr(type=['negative', 'gate'])
-    def test_max_count_non_integer(self):
-        invalid_max_count = 2.5
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
-                          max_count=invalid_max_count)
-
-    @attr(type=['negative', 'gate'])
-    def test_max_count_less_than_min_count(self):
-        min_count = 3
-        max_count = 2
-        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
-                          min_count=min_count,
-                          max_count=max_count)
-
-    @attr(type='gate')
+    @test.attr(type='gate')
     def test_multiple_create_with_reservation_return(self):
         resp, body = self._create_multiple_servers(wait_until='ACTIVE',
                                                    min_count=1,
diff --git a/tempest/api/compute/servers/test_multiple_create_negative.py b/tempest/api/compute/servers/test_multiple_create_negative.py
new file mode 100644
index 0000000..a9d9945
--- /dev/null
+++ b/tempest/api/compute/servers/test_multiple_create_negative.py
@@ -0,0 +1,75 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 IBM Corp
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest import test
+
+
+class MultipleCreateNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+    _name = 'multiple-create-test'
+
+    def _generate_name(self):
+        return data_utils.rand_name(self._name)
+
+    def _create_multiple_servers(self, name=None, wait_until=None, **kwargs):
+        """
+        This is the right way to create_multiple servers and manage to get the
+        created servers into the servers list to be cleaned up after all.
+        """
+        kwargs['name'] = kwargs.get('name', self._generate_name())
+        resp, body = self.create_test_server(**kwargs)
+
+        return resp, body
+
+    @test.attr(type=['negative', 'gate'])
+    def test_min_count_less_than_one(self):
+        invalid_min_count = 0
+        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+                          min_count=invalid_min_count)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_min_count_non_integer(self):
+        invalid_min_count = 2.5
+        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+                          min_count=invalid_min_count)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_max_count_less_than_one(self):
+        invalid_max_count = 0
+        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+                          max_count=invalid_max_count)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_max_count_non_integer(self):
+        invalid_max_count = 2.5
+        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+                          max_count=invalid_max_count)
+
+    @test.attr(type=['negative', 'gate'])
+    def test_max_count_less_than_min_count(self):
+        min_count = 3
+        max_count = 2
+        self.assertRaises(exceptions.BadRequest, self._create_multiple_servers,
+                          min_count=min_count,
+                          max_count=max_count)
+
+
+class MultipleCreateNegativeTestXML(MultipleCreateNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_server_actions.py b/tempest/api/compute/servers/test_server_actions.py
index d985d2b..f195562 100644
--- a/tempest/api/compute/servers/test_server_actions.py
+++ b/tempest/api/compute/servers/test_server_actions.py
@@ -287,6 +287,7 @@
         self.addCleanup(self.os.image_client.delete_image, image3_id)
         self.assertEqual(202, resp.status)
         # the first back up should be deleted
+        self.servers_client.wait_for_server_status(self.server_id, 'ACTIVE')
         self.os.image_client.wait_for_resource_deletion(image1_id)
         oldest_backup_exist = False
         resp, image_list = self.os.image_client.image_list_detail(
diff --git a/tempest/api/compute/servers/test_server_addresses.py b/tempest/api/compute/servers/test_server_addresses.py
index 7ca8a52..1e55afb 100644
--- a/tempest/api/compute/servers/test_server_addresses.py
+++ b/tempest/api/compute/servers/test_server_addresses.py
@@ -16,34 +16,20 @@
 #    under the License.
 
 from tempest.api.compute import base
-from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 
-class ServerAddressesTest(base.BaseV2ComputeTest):
+class ServerAddressesTestJSON(base.BaseV2ComputeTest):
     _interface = 'json'
 
     @classmethod
     def setUpClass(cls):
-        super(ServerAddressesTest, cls).setUpClass()
+        super(ServerAddressesTestJSON, cls).setUpClass()
         cls.client = cls.servers_client
 
         resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
 
-    @attr(type=['negative', 'gate'])
-    def test_list_server_addresses_invalid_server_id(self):
-        # List addresses request should fail if server id not in system
-        self.assertRaises(exceptions.NotFound, self.client.list_addresses,
-                          '999')
-
-    @attr(type=['negative', 'gate'])
-    def test_list_server_addresses_by_network_neg(self):
-        # List addresses by network should fail if network name not valid
-        self.assertRaises(exceptions.NotFound,
-                          self.client.list_addresses_by_network,
-                          self.server['id'], 'invalid')
-
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_server_addresses(self):
         # All public and private addresses for
         # a server should be returned
@@ -60,7 +46,7 @@
                 self.assertTrue(address['addr'])
                 self.assertTrue(address['version'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_server_addresses_by_network(self):
         # Providing a network type should filter
         # the addresses return by that type
@@ -80,5 +66,5 @@
                 self.assertTrue(any([a for a in addr if a == address]))
 
 
-class ServerAddressesTestXML(ServerAddressesTest):
+class ServerAddressesTestXML(ServerAddressesTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/servers/test_server_addresses_negative.py b/tempest/api/compute/servers/test_server_addresses_negative.py
new file mode 100644
index 0000000..30aa7d1
--- /dev/null
+++ b/tempest/api/compute/servers/test_server_addresses_negative.py
@@ -0,0 +1,48 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest import exceptions
+from tempest import test
+
+
+class ServerAddressesNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ServerAddressesNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.servers_client
+
+        resp, cls.server = cls.create_test_server(wait_until='ACTIVE')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_list_server_addresses_invalid_server_id(self):
+        # List addresses request should fail if server id not in system
+        self.assertRaises(exceptions.NotFound, self.client.list_addresses,
+                          '999')
+
+    @test.attr(type=['negative', 'gate'])
+    def test_list_server_addresses_by_network_neg(self):
+        # List addresses by network should fail if network name not valid
+        self.assertRaises(exceptions.NotFound,
+                          self.client.list_addresses_by_network,
+                          self.server['id'], 'invalid')
+
+
+class ServerAddressesNegativeTestXML(ServerAddressesNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/test_auth_token.py b/tempest/api/compute/test_auth_token.py
deleted file mode 100644
index e52c415..0000000
--- a/tempest/api/compute/test_auth_token.py
+++ /dev/null
@@ -1,54 +0,0 @@
-# Copyright 2013 IBM Corp
-#
-#   Licensed under the Apache License, Version 2.0 (the "License"); you may
-#   not use this file except in compliance with the License. You may obtain
-#   a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-#   WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-#   License for the specific language governing permissions and limitations
-#   under the License.
-
-
-import testtools
-
-from tempest.api.compute import base
-import tempest.config as config
-
-CONF = config.CONF
-
-
-class AuthTokenTestJSON(base.BaseV2ComputeTest):
-    _interface = 'json'
-
-    @classmethod
-    def setUpClass(cls):
-        super(AuthTokenTestJSON, cls).setUpClass()
-
-        cls.servers_v2 = cls.os.servers_client
-        cls.servers_v3 = cls.os.servers_client_v3_auth
-
-    def test_v2_token(self):
-        # Can get a token using v2 of the identity API and use that to perform
-        # an operation on the compute service.
-
-        # Doesn't matter which compute API is used,
-        # picking list_servers because it's easy.
-        self.servers_v2.list_servers()
-
-    @testtools.skipIf(not CONF.identity.uri_v3,
-                      'v3 auth client not configured')
-    def test_v3_token(self):
-        # Can get a token using v3 of the identity API and use that to perform
-        # an operation on the compute service.
-
-        # Doesn't matter which compute API is used,
-        # picking list_servers because it's easy.
-        self.servers_v3.list_servers()
-
-
-class AuthTokenTestXML(AuthTokenTestJSON):
-    _interface = 'xml'
diff --git a/tempest/api/compute/test_extensions.py b/tempest/api/compute/test_extensions.py
index b0bffc4..f9b44d8 100644
--- a/tempest/api/compute/test_extensions.py
+++ b/tempest/api/compute/test_extensions.py
@@ -17,10 +17,14 @@
 
 
 from tempest.api.compute import base
+from tempest.openstack.common import log as logging
 from tempest import test
 import testtools
 
 
+LOG = logging.getLogger(__name__)
+
+
 class ExtensionsTestJSON(base.BaseV2ComputeTest):
     _interface = 'json'
 
@@ -31,6 +35,9 @@
         # List of all extensions
         resp, extensions = self.extensions_client.list_extensions()
         self.assertIn("extensions", extensions)
+        extension_list = [extension.get('alias')
+                          for extension in extensions.get('extensions', {})]
+        LOG.debug("Nova extensions: %s" % ','.join(extension_list))
         self.assertEqual(200, resp.status)
         self.assertTrue(self.extensions_client.is_enabled("Consoles"))
 
diff --git a/tempest/api/compute/v3/admin/test_servers.py b/tempest/api/compute/v3/admin/test_servers.py
index 66dc8fb..becdd78 100644
--- a/tempest/api/compute/v3/admin/test_servers.py
+++ b/tempest/api/compute/v3/admin/test_servers.py
@@ -44,6 +44,7 @@
         cls.s2_name = data_utils.rand_name('server')
         resp, server = cls.create_test_server(name=cls.s2_name,
                                               wait_until='ACTIVE')
+        cls.s2_id = server['id']
 
     def _get_unused_flavor_id(self):
         flavor_id = data_utils.rand_int_id(start=1000)
@@ -114,6 +115,22 @@
             self.assertIn(key, str(diagnostic.keys()))
 
     @attr(type='gate')
+    def test_list_servers_filter_by_error_status(self):
+        # Filter the list of servers by server error status
+        params = {'status': 'error'}
+        resp, server = self.client.reset_state(self.s1_id, state='error')
+        resp, body = self.non_admin_client.list_servers(params)
+        # Reset server's state to 'active'
+        resp, server = self.client.reset_state(self.s1_id, state='active')
+        # Verify server's state
+        resp, server = self.client.get_server(self.s1_id)
+        self.assertEqual(server['status'], 'ACTIVE')
+        servers = body['servers']
+        # Verify error server in list result
+        self.assertIn(self.s1_id, map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s2_id, map(lambda x: x['id'], servers))
+
+    @attr(type='gate')
     def test_rebuild_server_in_error_state(self):
         # The server in error state should be rebuilt using the provided
         # image and changed to ACTIVE state
diff --git a/tempest/api/compute/v3/admin/test_simple_tenant_usage.py b/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
index 3fc58eb..e08f16a 100644
--- a/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
+++ b/tempest/api/compute/v3/admin/test_simple_tenant_usage.py
@@ -18,7 +18,7 @@
 import datetime
 
 from tempest.api.compute import base
-from tempest import exceptions
+from tempest import test
 from tempest.test import attr
 import time
 
@@ -51,6 +51,7 @@
         # Returns formatted datetime
         return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
 
+    @test.skip_because(bug='1265416')
     @attr(type='gate')
     def test_list_usage_all_tenants(self):
         # Get usage for all tenants
@@ -61,6 +62,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
+    @test.skip_because(bug='1265416')
     @attr(type='gate')
     def test_get_usage_tenant(self):
         # Get usage for a specific tenant
@@ -72,6 +74,7 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
+    @test.skip_because(bug='1265416')
     @attr(type='gate')
     def test_get_usage_tenant_with_non_admin_user(self):
         # Get usage for a specific tenant with non admin user
@@ -83,33 +86,6 @@
         self.assertEqual(200, resp.status)
         self.assertEqual(len(tenant_usage), 8)
 
-    @attr(type=['negative', 'gate'])
-    def test_get_usage_tenant_with_empty_tenant_id(self):
-        # Get usage for a specific tenant empty
-        params = {'start': self.start,
-                  'end': self.end}
-        self.assertRaises(exceptions.NotFound,
-                          self.adm_client.get_tenant_usage,
-                          '', params)
-
-    @attr(type=['negative', 'gate'])
-    def test_get_usage_tenant_with_invalid_date(self):
-        # Get usage for tenant with invalid date
-        params = {'start': self.end,
-                  'end': self.start}
-        self.assertRaises(exceptions.BadRequest,
-                          self.adm_client.get_tenant_usage,
-                          self.tenant_id, params)
-
-    @attr(type=['negative', 'gate'])
-    def test_list_usage_all_tenants_with_non_admin_user(self):
-        # Get usage for all tenants with non admin user
-        params = {'start': self.start,
-                  'end': self.end,
-                  'detailed': int(bool(True))}
-        self.assertRaises(exceptions.Unauthorized,
-                          self.client.list_tenant_usages, params)
-
 
 class TenantUsagesV3TestXML(TenantUsagesV3TestJSON):
     _interface = 'xml'
diff --git a/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py b/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py
new file mode 100644
index 0000000..f9dbe86
--- /dev/null
+++ b/tempest/api/compute/v3/admin/test_simple_tenant_usage_negative.py
@@ -0,0 +1,79 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 NEC Corporation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import datetime
+
+from tempest.api.compute import base
+from tempest import exceptions
+from tempest import test
+from tempest.test import attr
+
+
+class TenantUsagesNegativeV3TestJSON(base.BaseV3ComputeAdminTest):
+
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(TenantUsagesNegativeV3TestJSON, cls).setUpClass()
+        cls.adm_client = cls.os_adm.tenant_usages_client
+        cls.client = cls.os.tenant_usages_client
+        cls.identity_client = cls._get_identity_admin_client()
+        now = datetime.datetime.now()
+        cls.start = cls._parse_strtime(now - datetime.timedelta(days=1))
+        cls.end = cls._parse_strtime(now + datetime.timedelta(days=1))
+
+    @classmethod
+    def _parse_strtime(cls, at):
+        # Returns formatted datetime
+        return at.strftime('%Y-%m-%dT%H:%M:%S.%f')
+
+    @attr(type=['negative', 'gate'])
+    def test_get_usage_tenant_with_empty_tenant_id(self):
+        # Get usage for a specific tenant empty
+        params = {'start': self.start,
+                  'end': self.end}
+        self.assertRaises(exceptions.NotFound,
+                          self.adm_client.get_tenant_usage,
+                          '', params)
+
+    @test.skip_because(bug='1265416')
+    @attr(type=['negative', 'gate'])
+    def test_get_usage_tenant_with_invalid_date(self):
+        # Get usage for tenant with invalid date
+        params = {'start': self.end,
+                  'end': self.start}
+        resp, tenants = self.identity_client.list_tenants()
+        tenant_id = [tnt['id'] for tnt in tenants if tnt['name'] ==
+                     self.client.tenant_name][0]
+        self.assertRaises(exceptions.BadRequest,
+                          self.adm_client.get_tenant_usage,
+                          tenant_id, params)
+
+    @test.skip_because(bug='1265416')
+    @attr(type=['negative', 'gate'])
+    def test_list_usage_all_tenants_with_non_admin_user(self):
+        # Get usage for all tenants with non admin user
+        params = {'start': self.start,
+                  'end': self.end,
+                  'detailed': int(bool(True))}
+        self.assertRaises(exceptions.Unauthorized,
+                          self.client.list_tenant_usages, params)
+
+
+class TenantUsagesNegativeV3TestXML(TenantUsagesNegativeV3TestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/images/test_image_metadata.py b/tempest/api/compute/v3/images/test_image_metadata.py
new file mode 100644
index 0000000..76e0cae
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_image_metadata.py
@@ -0,0 +1,114 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest.test import attr
+
+
+class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesMetadataTestJSON, cls).setUpClass()
+        if not cls.config.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        cls.servers_client = cls.servers_client
+        cls.client = cls.images_client
+
+        resp, server = cls.create_test_server(wait_until='ACTIVE')
+        cls.server_id = server['id']
+
+        # Snapshot the server once to save time
+        name = data_utils.rand_name('image')
+        resp, _ = cls.client.create_image(cls.server_id, name, {})
+        cls.image_id = resp['location'].rsplit('/', 1)[1]
+
+        cls.client.wait_for_image_status(cls.image_id, 'ACTIVE')
+
+    @classmethod
+    def tearDownClass(cls):
+        cls.client.delete_image(cls.image_id)
+        super(ImagesMetadataTestJSON, cls).tearDownClass()
+
+    def setUp(self):
+        super(ImagesMetadataTestJSON, self).setUp()
+        meta = {'key1': 'value1', 'key2': 'value2'}
+        resp, _ = self.client.set_image_metadata(self.image_id, meta)
+        self.assertEqual(resp.status, 200)
+
+    @attr(type='gate')
+    def test_list_image_metadata(self):
+        # All metadata key/value pairs for an image should be returned
+        resp, resp_metadata = self.client.list_image_metadata(self.image_id)
+        expected = {'key1': 'value1', 'key2': 'value2'}
+        self.assertEqual(expected, resp_metadata)
+
+    @attr(type='gate')
+    def test_set_image_metadata(self):
+        # The metadata for the image should match the new values
+        req_metadata = {'meta2': 'value2', 'meta3': 'value3'}
+        resp, body = self.client.set_image_metadata(self.image_id,
+                                                    req_metadata)
+
+        resp, resp_metadata = self.client.list_image_metadata(self.image_id)
+        self.assertEqual(req_metadata, resp_metadata)
+
+    @attr(type='gate')
+    def test_update_image_metadata(self):
+        # The metadata for the image should match the updated values
+        req_metadata = {'key1': 'alt1', 'key3': 'value3'}
+        resp, metadata = self.client.update_image_metadata(self.image_id,
+                                                           req_metadata)
+
+        resp, resp_metadata = self.client.list_image_metadata(self.image_id)
+        expected = {'key1': 'alt1', 'key2': 'value2', 'key3': 'value3'}
+        self.assertEqual(expected, resp_metadata)
+
+    @attr(type='gate')
+    def test_get_image_metadata_item(self):
+        # The value for a specific metadata key should be returned
+        resp, meta = self.client.get_image_metadata_item(self.image_id,
+                                                         'key2')
+        self.assertEqual('value2', meta['key2'])
+
+    @attr(type='gate')
+    def test_set_image_metadata_item(self):
+        # The value provided for the given meta item should be set for
+        # the image
+        meta = {'key1': 'alt'}
+        resp, body = self.client.set_image_metadata_item(self.image_id,
+                                                         'key1', meta)
+        resp, resp_metadata = self.client.list_image_metadata(self.image_id)
+        expected = {'key1': 'alt', 'key2': 'value2'}
+        self.assertEqual(expected, resp_metadata)
+
+    @attr(type='gate')
+    def test_delete_image_metadata_item(self):
+        # The metadata value/key pair should be deleted from the image
+        resp, body = self.client.delete_image_metadata_item(self.image_id,
+                                                            'key1')
+        resp, resp_metadata = self.client.list_image_metadata(self.image_id)
+        expected = {'key2': 'value2'}
+        self.assertEqual(expected, resp_metadata)
+
+
+class ImagesMetadataTestXML(ImagesMetadataTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/images/test_image_metadata_negative.py b/tempest/api/compute/v3/images/test_image_metadata_negative.py
new file mode 100644
index 0000000..1767e5d
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_image_metadata_negative.py
@@ -0,0 +1,81 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest.test import attr
+
+
+class ImagesMetadataTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesMetadataTestJSON, cls).setUpClass()
+        cls.client = cls.images_client
+
+    @attr(type=['negative', 'gate'])
+    def test_list_nonexistent_image_metadata(self):
+        # Negative test: List on nonexistent image
+        # metadata should not happen
+        self.assertRaises(exceptions.NotFound, self.client.list_image_metadata,
+                          data_utils.rand_uuid())
+
+    @attr(type=['negative', 'gate'])
+    def test_update_nonexistent_image_metadata(self):
+        # Negative test:An update should not happen for a non-existent image
+        meta = {'key1': 'alt1', 'key2': 'alt2'}
+        self.assertRaises(exceptions.NotFound,
+                          self.client.update_image_metadata,
+                          data_utils.rand_uuid(), meta)
+
+    @attr(type=['negative', 'gate'])
+    def test_get_nonexistent_image_metadata_item(self):
+        # Negative test: Get on non-existent image should not happen
+        self.assertRaises(exceptions.NotFound,
+                          self.client.get_image_metadata_item,
+                          data_utils.rand_uuid(), 'key2')
+
+    @attr(type=['negative', 'gate'])
+    def test_set_nonexistent_image_metadata(self):
+        # Negative test: Metadata should not be set to a non-existent image
+        meta = {'key1': 'alt1', 'key2': 'alt2'}
+        self.assertRaises(exceptions.NotFound, self.client.set_image_metadata,
+                          data_utils.rand_uuid(), meta)
+
+    @attr(type=['negative', 'gate'])
+    def test_set_nonexistent_image_metadata_item(self):
+        # Negative test: Metadata item should not be set to a
+        # nonexistent image
+        meta = {'key1': 'alt'}
+        self.assertRaises(exceptions.NotFound,
+                          self.client.set_image_metadata_item,
+                          data_utils.rand_uuid(), 'key1',
+                          meta)
+
+    @attr(type=['negative', 'gate'])
+    def test_delete_nonexistent_image_metadata_item(self):
+        # Negative test: Shouldn't be able to delete metadata
+        # item from non-existent image
+        self.assertRaises(exceptions.NotFound,
+                          self.client.delete_image_metadata_item,
+                          data_utils.rand_uuid(), 'key1')
+
+
+class ImagesMetadataTestXML(ImagesMetadataTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/images/test_images_oneserver.py b/tempest/api/compute/v3/images/test_images_oneserver.py
new file mode 100644
index 0000000..26cc3f6
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_images_oneserver.py
@@ -0,0 +1,138 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import testtools
+
+from tempest.api.compute import base
+from tempest import clients
+from tempest.common.utils import data_utils
+from tempest import config
+from tempest.openstack.common import log as logging
+from tempest.test import attr
+
+CONF = config.CONF
+LOG = logging.getLogger(__name__)
+
+
+class ImagesOneServerTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    def tearDown(self):
+        """Terminate test instances created after a test is executed."""
+        for image_id in self.image_ids:
+            self.client.delete_image(image_id)
+            self.image_ids.remove(image_id)
+        super(ImagesOneServerTestJSON, self).tearDown()
+
+    def setUp(self):
+        # NOTE(afazekas): Normally we use the same server with all test cases,
+        # but if it has an issue, we build a new one
+        super(ImagesOneServerTestJSON, self).setUp()
+        # Check if the server is in a clean state after test
+        try:
+            self.servers_client.wait_for_server_status(self.server_id,
+                                                       'ACTIVE')
+        except Exception:
+            LOG.exception('server %s timed out to become ACTIVE. rebuilding'
+                          % self.server_id)
+            # Rebuild server if cannot reach the ACTIVE state
+            # Usually it means the server had a serious accident
+            self.__class__.server_id = self.rebuild_server(self.server_id)
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesOneServerTestJSON, cls).setUpClass()
+        cls.client = cls.images_client
+        if not cls.config.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        try:
+            resp, server = cls.create_test_server(wait_until='ACTIVE')
+            cls.server_id = server['id']
+        except Exception:
+            cls.tearDownClass()
+            raise
+
+        cls.image_ids = []
+
+        if cls.multi_user:
+            if cls.config.compute.allow_tenant_isolation:
+                creds = cls.isolated_creds.get_alt_creds()
+                username, tenant_name, password = creds
+                cls.alt_manager = clients.Manager(username=username,
+                                                  password=password,
+                                                  tenant_name=tenant_name)
+            else:
+                # Use the alt_XXX credentials in the config file
+                cls.alt_manager = clients.AltManager()
+            cls.alt_client = cls.alt_manager.images_client
+
+    def _get_default_flavor_disk_size(self, flavor_id):
+        resp, flavor = self.flavors_client.get_flavor_details(flavor_id)
+        return flavor['disk']
+
+    @testtools.skipUnless(CONF.compute_feature_enabled.create_image,
+                          'Environment unable to create images.')
+    @attr(type='smoke')
+    def test_create_delete_image(self):
+
+        # Create a new image
+        name = data_utils.rand_name('image')
+        meta = {'image_type': 'test'}
+        resp, body = self.client.create_image(self.server_id, name, meta)
+        self.assertEqual(202, resp.status)
+        image_id = data_utils.parse_image_id(resp['location'])
+        self.client.wait_for_image_status(image_id, 'ACTIVE')
+
+        # Verify the image was created correctly
+        resp, image = self.client.get_image(image_id)
+        self.assertEqual(name, image['name'])
+        self.assertEqual('test', image['metadata']['image_type'])
+
+        resp, original_image = self.client.get_image(self.image_ref)
+
+        # Verify minRAM is the same as the original image
+        self.assertEqual(image['minRam'], original_image['minRam'])
+
+        # Verify minDisk is the same as the original image or the flavor size
+        flavor_disk_size = self._get_default_flavor_disk_size(self.flavor_ref)
+        self.assertIn(str(image['minDisk']),
+                      (str(original_image['minDisk']), str(flavor_disk_size)))
+
+        # Verify the image was deleted correctly
+        resp, body = self.client.delete_image(image_id)
+        self.assertEqual('204', resp['status'])
+        self.client.wait_for_resource_deletion(image_id)
+
+    @attr(type=['gate'])
+    def test_create_image_specify_multibyte_character_image_name(self):
+        if self.__class__._interface == "xml":
+            # NOTE(sdague): not entirely accurage, but we'd need a ton of work
+            # in our XML client to make this good
+            raise self.skipException("Not testable in XML")
+        # prefix character is:
+        # http://www.fileformat.info/info/unicode/char/1F4A9/index.htm
+        utf8_name = data_utils.rand_name(u'\xF0\x9F\x92\xA9')
+        resp, body = self.client.create_image(self.server_id, utf8_name)
+        image_id = data_utils.parse_image_id(resp['location'])
+        self.addCleanup(self.client.delete_image, image_id)
+        self.assertEqual('202', resp['status'])
+
+
+class ImagesOneServerTestXML(ImagesOneServerTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/images/test_images_oneserver_negative.py b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
new file mode 100644
index 0000000..5e235d1
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_images_oneserver_negative.py
@@ -0,0 +1,162 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# Copyright 2013 IBM Corp.
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest import clients
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest.openstack.common import log as logging
+from tempest.test import attr
+from tempest.test import skip_because
+
+LOG = logging.getLogger(__name__)
+
+
+class ImagesOneServerNegativeTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    def tearDown(self):
+        """Terminate test instances created after a test is executed."""
+        for image_id in self.image_ids:
+            self.client.delete_image(image_id)
+            self.image_ids.remove(image_id)
+        super(ImagesOneServerNegativeTestJSON, self).tearDown()
+
+    def setUp(self):
+        # NOTE(afazekas): Normally we use the same server with all test cases,
+        # but if it has an issue, we build a new one
+        super(ImagesOneServerNegativeTestJSON, self).setUp()
+        # Check if the server is in a clean state after test
+        try:
+            self.servers_client.wait_for_server_status(self.server_id,
+                                                       'ACTIVE')
+        except Exception:
+            LOG.exception('server %s timed out to become ACTIVE. rebuilding'
+                          % self.server_id)
+            # Rebuild server if cannot reach the ACTIVE state
+            # Usually it means the server had a serious accident
+            self._reset_server()
+
+    def _reset_server(self):
+        self.__class__.server_id = self.rebuild_server(self.server_id)
+
+    @classmethod
+    def setUpClass(cls):
+        super(ImagesOneServerNegativeTestJSON, cls).setUpClass()
+        cls.client = cls.images_client
+        if not cls.config.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+
+        try:
+            resp, server = cls.create_test_server(wait_until='ACTIVE')
+            cls.server_id = server['id']
+        except Exception:
+            cls.tearDownClass()
+            raise
+
+        cls.image_ids = []
+
+        if cls.multi_user:
+            if cls.config.compute.allow_tenant_isolation:
+                creds = cls.isolated_creds.get_alt_creds()
+                username, tenant_name, password = creds
+                cls.alt_manager = clients.Manager(username=username,
+                                                  password=password,
+                                                  tenant_name=tenant_name)
+            else:
+                # Use the alt_XXX credentials in the config file
+                cls.alt_manager = clients.AltManager()
+            cls.alt_client = cls.alt_manager.images_client
+
+    @skip_because(bug="1006725")
+    @attr(type=['negative', 'gate'])
+    def test_create_image_specify_multibyte_character_image_name(self):
+        if self.__class__._interface == "xml":
+            raise self.skipException("Not testable in XML")
+        # invalid multibyte sequence from:
+        # http://stackoverflow.com/questions/1301402/
+        #     example-invalid-utf8-string
+        invalid_name = data_utils.rand_name(u'\xc3\x28')
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.create_image, self.server_id,
+                          invalid_name)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_image_specify_invalid_metadata(self):
+        # Return an error when creating image with invalid metadata
+        snapshot_name = data_utils.rand_name('test-snap-')
+        meta = {'': ''}
+        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+                          self.server_id, snapshot_name, meta)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_image_specify_metadata_over_limits(self):
+        # Return an error when creating image with meta data over 256 chars
+        snapshot_name = data_utils.rand_name('test-snap-')
+        meta = {'a' * 260: 'b' * 260}
+        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+                          self.server_id, snapshot_name, meta)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_second_image_when_first_image_is_being_saved(self):
+        # Disallow creating another image when first image is being saved
+
+        # Create first snapshot
+        snapshot_name = data_utils.rand_name('test-snap-')
+        resp, body = self.client.create_image(self.server_id,
+                                              snapshot_name)
+        self.assertEqual(202, resp.status)
+        image_id = data_utils.parse_image_id(resp['location'])
+        self.image_ids.append(image_id)
+        self.addCleanup(self._reset_server)
+
+        # Create second snapshot
+        alt_snapshot_name = data_utils.rand_name('test-snap-')
+        self.assertRaises(exceptions.Conflict, self.client.create_image,
+                          self.server_id, alt_snapshot_name)
+
+    @attr(type=['negative', 'gate'])
+    def test_create_image_specify_name_over_256_chars(self):
+        # Return an error if snapshot name over 256 characters is passed
+
+        snapshot_name = data_utils.rand_name('a' * 260)
+        self.assertRaises(exceptions.BadRequest, self.client.create_image,
+                          self.server_id, snapshot_name)
+
+    @attr(type=['negative', 'gate'])
+    def test_delete_image_that_is_not_yet_active(self):
+        # Return an error while trying to delete an image what is creating
+
+        snapshot_name = data_utils.rand_name('test-snap-')
+        resp, body = self.client.create_image(self.server_id, snapshot_name)
+        self.assertEqual(202, resp.status)
+        image_id = data_utils.parse_image_id(resp['location'])
+        self.image_ids.append(image_id)
+        self.addCleanup(self._reset_server)
+
+        # Do not wait, attempt to delete the image, ensure it's successful
+        resp, body = self.client.delete_image(image_id)
+        self.assertEqual('204', resp['status'])
+        self.image_ids.remove(image_id)
+
+        self.assertRaises(exceptions.NotFound, self.client.get_image, image_id)
+
+
+class ImagesOneServerNegativeTestXML(ImagesOneServerNegativeTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/images/test_list_image_filters.py b/tempest/api/compute/v3/images/test_list_image_filters.py
new file mode 100644
index 0000000..bfdd8b2
--- /dev/null
+++ b/tempest/api/compute/v3/images/test_list_image_filters.py
@@ -0,0 +1,231 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2012 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.compute import base
+from tempest import exceptions
+from tempest.openstack.common import log as logging
+from tempest.test import attr
+
+
+LOG = logging.getLogger(__name__)
+
+
+class ListImageFiltersTestJSON(base.BaseV2ComputeTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(ListImageFiltersTestJSON, cls).setUpClass()
+        if not cls.config.service_available.glance:
+            skip_msg = ("%s skipped as glance is not available" % cls.__name__)
+            raise cls.skipException(skip_msg)
+        cls.client = cls.images_client
+        cls.image_ids = []
+
+        try:
+            resp, cls.server1 = cls.create_test_server()
+            resp, cls.server2 = cls.create_test_server(wait_until='ACTIVE')
+            # NOTE(sdague) this is faster than doing the sync wait_util on both
+            cls.servers_client.wait_for_server_status(cls.server1['id'],
+                                                      'ACTIVE')
+
+            # Create images to be used in the filter tests
+            resp, cls.image1 = cls.create_image_from_server(
+                cls.server1['id'], wait_until='ACTIVE')
+            cls.image1_id = cls.image1['id']
+
+            # Servers have a hidden property for when they are being imaged
+            # Performing back-to-back create image calls on a single
+            # server will sometimes cause failures
+            resp, cls.image3 = cls.create_image_from_server(
+                cls.server2['id'], wait_until='ACTIVE')
+            cls.image3_id = cls.image3['id']
+
+            # Wait for the server to be active after the image upload
+            resp, cls.image2 = cls.create_image_from_server(
+                cls.server1['id'], wait_until='ACTIVE')
+            cls.image2_id = cls.image2['id']
+        except Exception:
+            LOG.exception('setUpClass failed')
+            cls.tearDownClass()
+            raise
+
+    @attr(type=['negative', 'gate'])
+    def test_get_image_not_existing(self):
+        # Check raises a NotFound
+        self.assertRaises(exceptions.NotFound, self.client.get_image,
+                          "nonexistingimageid")
+
+    @attr(type='gate')
+    def test_list_images_filter_by_status(self):
+        # The list of images should contain only images with the
+        # provided status
+        params = {'status': 'ACTIVE'}
+        resp, images = self.client.list_images(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_filter_by_name(self):
+        # List of all images should contain the expected images filtered
+        # by name
+        params = {'name': self.image1['name']}
+        resp, images = self.client.list_images(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_filter_by_server_id(self):
+        # The images should contain images filtered by server id
+        params = {'server': self.server1['id']}
+        resp, images = self.client.list_images(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]),
+                        "Failed to find image %s in images. Got images %s" %
+                        (self.image1_id, images))
+        self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_filter_by_server_ref(self):
+        # The list of servers should be filtered by server ref
+        server_links = self.server2['links']
+
+        # Try all server link types
+        for link in server_links:
+            params = {'server': link['href']}
+            resp, images = self.client.list_images(params)
+
+            self.assertFalse(any([i for i in images
+                                  if i['id'] == self.image1_id]))
+            self.assertFalse(any([i for i in images
+                                  if i['id'] == self.image2_id]))
+            self.assertTrue(any([i for i in images
+                                 if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_filter_by_type(self):
+        # The list of servers should be filtered by image type
+        params = {'type': 'snapshot'}
+        resp, images = self.client.list_images(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image_ref]))
+
+    @attr(type='gate')
+    def test_list_images_limit_results(self):
+        # Verify only the expected number of results are returned
+        params = {'limit': '1'}
+        resp, images = self.client.list_images(params)
+        # when _interface='xml', one element for images_links in images
+        # ref: Question #224349
+        self.assertEqual(1, len([x for x in images if 'id' in x]))
+
+    @attr(type='gate')
+    def test_list_images_filter_by_changes_since(self):
+        # Verify only updated images are returned in the detailed list
+
+        # Becoming ACTIVE will modify the updated time
+        # Filter by the image's created time
+        params = {'changes-since': self.image3['created']}
+        resp, images = self.client.list_images(params)
+        found = any([i for i in images if i['id'] == self.image3_id])
+        self.assertTrue(found)
+
+    @attr(type='gate')
+    def test_list_images_with_detail_filter_by_status(self):
+        # Detailed list of all images should only contain images
+        # with the provided status
+        params = {'status': 'ACTIVE'}
+        resp, images = self.client.list_images_with_detail(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_with_detail_filter_by_name(self):
+        # Detailed list of all images should contain the expected
+        # images filtered by name
+        params = {'name': self.image1['name']}
+        resp, images = self.client.list_images_with_detail(params)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_with_detail_limit_results(self):
+        # Verify only the expected number of results (with full details)
+        # are returned
+        params = {'limit': '1'}
+        resp, images = self.client.list_images_with_detail(params)
+        self.assertEqual(1, len(images))
+
+    @attr(type='gate')
+    def test_list_images_with_detail_filter_by_server_ref(self):
+        # Detailed list of servers should be filtered by server ref
+        server_links = self.server2['links']
+
+        # Try all server link types
+        for link in server_links:
+            params = {'server': link['href']}
+            resp, images = self.client.list_images_with_detail(params)
+
+            self.assertFalse(any([i for i in images
+                                  if i['id'] == self.image1_id]))
+            self.assertFalse(any([i for i in images
+                                  if i['id'] == self.image2_id]))
+            self.assertTrue(any([i for i in images
+                                 if i['id'] == self.image3_id]))
+
+    @attr(type='gate')
+    def test_list_images_with_detail_filter_by_type(self):
+        # The detailed list of servers should be filtered by image type
+        params = {'type': 'snapshot'}
+        resp, images = self.client.list_images_with_detail(params)
+        resp, image4 = self.client.get_image(self.image_ref)
+
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image2_id]))
+        self.assertTrue(any([i for i in images if i['id'] == self.image3_id]))
+        self.assertFalse(any([i for i in images if i['id'] == self.image_ref]))
+
+    @attr(type='gate')
+    def test_list_images_with_detail_filter_by_changes_since(self):
+        # Verify an update image is returned
+
+        # Becoming ACTIVE will modify the updated time
+        # Filter by the image's created time
+        params = {'changes-since': self.image1['created']}
+        resp, images = self.client.list_images_with_detail(params)
+        self.assertTrue(any([i for i in images if i['id'] == self.image1_id]))
+
+    @attr(type=['negative', 'gate'])
+    def test_get_nonexistant_image(self):
+        # Negative test: GET on non-existent image should fail
+        self.assertRaises(exceptions.NotFound, self.client.get_image, 999)
+
+
+class ListImageFiltersTestXML(ListImageFiltersTestJSON):
+    _interface = 'xml'
diff --git a/tempest/api/compute/v3/servers/test_list_server_filters.py b/tempest/api/compute/v3/servers/test_list_server_filters.py
index 3dd7b0b..140cc2f 100644
--- a/tempest/api/compute/v3/servers/test_list_server_filters.py
+++ b/tempest/api/compute/v3/servers/test_list_server_filters.py
@@ -176,6 +176,23 @@
         self.assertEqual(['ACTIVE'] * 3, [x['status'] for x in servers])
 
     @attr(type='gate')
+    def test_list_servers_filter_by_shutoff_status(self):
+        # Filter the list of servers by server shutoff status
+        params = {'status': 'shutoff'}
+        self.client.stop(self.s1['id'])
+        self.client.wait_for_server_status(self.s1['id'],
+                                           'SHUTOFF')
+        resp, body = self.client.list_servers(params)
+        self.client.start(self.s1['id'])
+        self.client.wait_for_server_status(self.s1['id'],
+                                           'ACTIVE')
+        servers = body['servers']
+
+        self.assertIn(self.s1['id'], map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s2['id'], map(lambda x: x['id'], servers))
+        self.assertNotIn(self.s3['id'], map(lambda x: x['id'], servers))
+
+    @attr(type='gate')
     def test_list_servers_filtered_by_name_wildcard(self):
         # List all servers that contains '-instance' in name
         params = {'name': '-instance'}
diff --git a/tempest/api/compute/v3/servers/test_list_servers_negative.py b/tempest/api/compute/v3/servers/test_list_servers_negative.py
index 3f7f885..b8e3d10 100644
--- a/tempest/api/compute/v3/servers/test_list_servers_negative.py
+++ b/tempest/api/compute/v3/servers/test_list_servers_negative.py
@@ -18,69 +18,18 @@
 import datetime
 
 from tempest.api.compute import base
-from tempest import clients
 from tempest import exceptions
 from tempest.test import attr
 
 
 class ListServersNegativeV3TestJSON(base.BaseV3ComputeTest):
     _interface = 'json'
-
-    @classmethod
-    def _ensure_no_servers(cls, servers, username, tenant_name):
-        """
-        If there are servers and there is tenant isolation then a
-        skipException is raised to skip the test since it requires no servers
-        to already exist for the given user/tenant.
-        If there are servers and there is not tenant isolation then the test
-        blocks while the servers are being deleted.
-        """
-        if len(servers):
-            if not cls.config.compute.allow_tenant_isolation:
-                for srv in servers:
-                    cls.client.wait_for_server_termination(srv['id'],
-                                                           ignore_error=True)
-            else:
-                msg = ("User/tenant %(u)s/%(t)s already have "
-                       "existing server instances. Skipping test." %
-                       {'u': username, 't': tenant_name})
-                raise cls.skipException(msg)
+    force_tenant_isolation = True
 
     @classmethod
     def setUpClass(cls):
         super(ListServersNegativeV3TestJSON, cls).setUpClass()
         cls.client = cls.servers_client
-        cls.servers = []
-
-        if cls.multi_user:
-            if cls.config.compute.allow_tenant_isolation:
-                creds = cls.isolated_creds.get_alt_creds()
-                username, tenant_name, password = creds
-                cls.alt_manager = clients.Manager(username=username,
-                                                  password=password,
-                                                  tenant_name=tenant_name)
-            else:
-                # Use the alt_XXX credentials in the config file
-                cls.alt_manager = clients.AltManager()
-            cls.alt_client = cls.alt_manager.servers_client
-
-        # Under circumstances when there is not a tenant/user
-        # created for the test case, the test case checks
-        # to see if there are existing servers for the
-        # either the normal user/tenant or the alt user/tenant
-        # and if so, the whole test is skipped. We do this
-        # because we assume a baseline of no servers at the
-        # start of the test instead of destroying any existing
-        # servers.
-        resp, body = cls.client.list_servers()
-        cls._ensure_no_servers(body['servers'],
-                               cls.os.username,
-                               cls.os.tenant_name)
-
-        resp, body = cls.alt_client.list_servers()
-        cls._ensure_no_servers(body['servers'],
-                               cls.alt_manager.username,
-                               cls.alt_manager.tenant_name)
 
         # The following servers are created for use
         # by the test methods in this class. These
diff --git a/tempest/api/compute/v3/test_extensions.py b/tempest/api/compute/v3/test_extensions.py
index 2affd86..72dfe14 100644
--- a/tempest/api/compute/v3/test_extensions.py
+++ b/tempest/api/compute/v3/test_extensions.py
@@ -17,9 +17,13 @@
 
 
 from tempest.api.compute import base
+from tempest.openstack.common import log as logging
 from tempest import test
 
 
+LOG = logging.getLogger(__name__)
+
+
 class ExtensionsV3TestJSON(base.BaseV3ComputeTest):
     _interface = 'json'
 
@@ -28,6 +32,9 @@
         # List of all extensions
         resp, extensions = self.extensions_client.list_extensions()
         self.assertIn("extensions", extensions)
+        extension_list = [extension.get('alias')
+                          for extension in extensions.get('extensions', {})]
+        LOG.debug("Nova extensions: %s" % ','.join(extension_list))
         self.assertEqual(200, resp.status)
         self.assertTrue(self.extensions_client.is_enabled("Consoles"))
 
diff --git a/tempest/api/compute/volumes/test_volumes_get.py b/tempest/api/compute/volumes/test_volumes_get.py
index ae6996d..f6fed5b 100644
--- a/tempest/api/compute/volumes/test_volumes_get.py
+++ b/tempest/api/compute/volumes/test_volumes_get.py
@@ -18,6 +18,7 @@
 from tempest.api.compute import base
 from tempest.common.utils import data_utils
 from tempest.test import attr
+from testtools.matchers import ContainsAll
 
 
 class VolumesGetTestJSON(base.BaseV2ComputeTest):
@@ -65,29 +66,10 @@
                          fetched_volume['id'],
                          'The fetched Volume is different '
                          'from the created Volume')
-        self.assertEqual(metadata,
-                         fetched_volume['metadata'],
-                         'The fetched Volume is different '
-                         'from the created Volume')
-
-    @attr(type='gate')
-    def test_volume_get_metadata_none(self):
-        # CREATE, GET empty metadata dict
-        v_name = data_utils.rand_name('Volume-')
-        # Create volume
-        resp, volume = self.client.create_volume(size=1,
-                                                 display_name=v_name,
-                                                 metadata={})
-        self.addCleanup(self._delete_volume, volume)
-        self.assertEqual(200, resp.status)
-        self.assertIn('id', volume)
-        self.assertIn('displayName', volume)
-        # Wait for Volume status to become ACTIVE
-        self.client.wait_for_volume_status(volume['id'], 'available')
-        # GET Volume
-        resp, fetched_volume = self.client.get_volume(volume['id'])
-        self.assertEqual(200, resp.status)
-        self.assertEqual(fetched_volume['metadata'], {})
+        self.assertThat(fetched_volume['metadata'].items(),
+                        ContainsAll(metadata.items()),
+                        'The fetched Volume metadata misses data '
+                        'from the created Volume')
 
     def _delete_volume(self, volume):
         # Delete the Volume created in this method
diff --git a/tempest/api/identity/admin/test_services.py b/tempest/api/identity/admin/test_services.py
index 7fe5171..872adb8 100644
--- a/tempest/api/identity/admin/test_services.py
+++ b/tempest/api/identity/admin/test_services.py
@@ -25,47 +25,47 @@
 class ServicesTestJSON(base.BaseIdentityAdminTest):
     _interface = 'json'
 
+    def _del_service(self, service_id):
+        # Deleting the service created in this method
+        resp, _ = self.client.delete_service(service_id)
+        self.assertEqual(resp['status'], '204')
+        # Checking whether service is deleted successfully
+        self.assertRaises(exceptions.NotFound, self.client.get_service,
+                          service_id)
+
     @attr(type='smoke')
     def test_create_get_delete_service(self):
         # GET Service
-        try:
-            # Creating a Service
-            name = data_utils.rand_name('service-')
-            type = data_utils.rand_name('type--')
-            description = data_utils.rand_name('description-')
-            resp, service_data = self.client.create_service(
-                name, type, description=description)
-            self.assertTrue(resp['status'].startswith('2'))
-            # Verifying response body of create service
-            self.assertIn('id', service_data)
-            self.assertFalse(service_data['id'] is None)
-            self.assertIn('name', service_data)
-            self.assertEqual(name, service_data['name'])
-            self.assertIn('type', service_data)
-            self.assertEqual(type, service_data['type'])
-            self.assertIn('description', service_data)
-            self.assertEqual(description, service_data['description'])
-            # Get service
-            resp, fetched_service = self.client.get_service(service_data['id'])
-            self.assertTrue(resp['status'].startswith('2'))
-            # verifying the existence of service created
-            self.assertIn('id', fetched_service)
-            self.assertEqual(fetched_service['id'], service_data['id'])
-            self.assertIn('name', fetched_service)
-            self.assertEqual(fetched_service['name'], service_data['name'])
-            self.assertIn('type', fetched_service)
-            self.assertEqual(fetched_service['type'], service_data['type'])
-            self.assertIn('description', fetched_service)
-            self.assertEqual(fetched_service['description'],
-                             service_data['description'])
-        finally:
-            if 'service_data' in locals():
-                # Deleting the service created in this method
-                resp, _ = self.client.delete_service(service_data['id'])
-                self.assertEqual(resp['status'], '204')
-                # Checking whether service is deleted successfully
-                self.assertRaises(exceptions.NotFound, self.client.get_service,
-                                  service_data['id'])
+        # Creating a Service
+        name = data_utils.rand_name('service-')
+        type = data_utils.rand_name('type--')
+        description = data_utils.rand_name('description-')
+        resp, service_data = self.client.create_service(
+            name, type, description=description)
+        self.assertFalse(service_data['id'] is None)
+        self.addCleanup(self._del_service, service_data['id'])
+        self.assertTrue(resp['status'].startswith('2'))
+        # Verifying response body of create service
+        self.assertIn('id', service_data)
+        self.assertIn('name', service_data)
+        self.assertEqual(name, service_data['name'])
+        self.assertIn('type', service_data)
+        self.assertEqual(type, service_data['type'])
+        self.assertIn('description', service_data)
+        self.assertEqual(description, service_data['description'])
+        # Get service
+        resp, fetched_service = self.client.get_service(service_data['id'])
+        self.assertTrue(resp['status'].startswith('2'))
+        # verifying the existence of service created
+        self.assertIn('id', fetched_service)
+        self.assertEqual(fetched_service['id'], service_data['id'])
+        self.assertIn('name', fetched_service)
+        self.assertEqual(fetched_service['name'], service_data['name'])
+        self.assertIn('type', fetched_service)
+        self.assertEqual(fetched_service['type'], service_data['type'])
+        self.assertIn('description', fetched_service)
+        self.assertEqual(fetched_service['description'],
+                         service_data['description'])
 
     @attr(type='smoke')
     def test_list_services(self):
diff --git a/tempest/api/identity/admin/v3/test_trusts.py b/tempest/api/identity/admin/v3/test_trusts.py
index 5e13a5a..d316ae1 100644
--- a/tempest/api/identity/admin/v3/test_trusts.py
+++ b/tempest/api/identity/admin/v3/test_trusts.py
@@ -12,10 +12,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import datetime
+import re
 from tempest.api.identity import base
 from tempest import clients
 from tempest.common.utils.data_utils import rand_name
 from tempest import exceptions
+from tempest.openstack.common import timeutils
 from tempest.test import attr
 
 
@@ -25,10 +28,14 @@
         super(BaseTrustsV3Test, self).setUp()
         # Use alt_username as the trustee
         self.trustee_username = self.config.identity.alt_username
-
         self.trust_id = None
-        self.create_trustor_and_roles()
-        self.addCleanup(self.cleanup_trust_user_and_roles)
+
+    def tearDown(self):
+        if self.trust_id:
+            # Do the delete in tearDown not addCleanup - we want the test to
+            # fail in the event there is a bug which causes undeletable trusts
+            self.delete_trust()
+        super(BaseTrustsV3Test, self).tearDown()
 
     def create_trustor_and_roles(self):
         # Get trustor project ID, use the admin project
@@ -40,7 +47,7 @@
         # Create a trustor User
         self.trustor_username = rand_name('user-')
         u_desc = self.trustor_username + 'description'
-        u_email = self.trustor_username + '@testmail.tm'
+        u_email = self.trustor_username + '@testmail.xx'
         self.trustor_password = rand_name('pass-')
         resp, user = self.v3_client.create_user(
             self.trustor_username,
@@ -83,14 +90,7 @@
                              interface=self._interface)
         self.trustor_v3_client = os.identity_v3_client
 
-    def cleanup_trust_user_and_roles(self):
-        if self.trust_id:
-            try:
-                self.trustor_v3_client.delete_trust(self.trust_id)
-            except exceptions.NotFound:
-                pass
-            self.trust_id = None
-
+    def cleanup_user_and_roles(self):
         if self.trustor_user_id:
             self.v3_client.delete_user(self.trustor_user_id)
         if self.delegated_role_id:
@@ -115,7 +115,15 @@
                        summary=False):
         self.assertIsNotNone(trust['id'])
         self.assertEqual(impersonate, trust['impersonation'])
-        self.assertEqual(expires, trust['expires_at'])
+        # FIXME(shardy): ref bug #1246383 we can't check the
+        # microsecond component of the expiry time, because mysql
+        # <5.6.4 doesn't support microseconds.
+        # expected format 2013-12-20T16:08:36.036987Z
+        if expires is not None:
+            expires_nousec = re.sub(r'\.([0-9]){6}Z', '', expires)
+            self.assertTrue(trust['expires_at'].startswith(expires_nousec))
+        else:
+            self.assertIsNone(trust['expires_at'])
         self.assertEqual(self.trustor_user_id, trust['trustor_user_id'])
         self.assertEqual(self.trustee_user_id, trust['trustee_user_id'])
         self.assertIn('v3/OS-TRUST/trusts', trust['links']['self'])
@@ -182,6 +190,7 @@
     def setUp(self):
         super(TrustsV3TestJSON, self).setUp()
         self.create_trustor_and_roles()
+        self.addCleanup(self.cleanup_user_and_roles)
 
     @attr(type='smoke')
     def test_trust_impersonate(self):
@@ -195,8 +204,6 @@
 
         self.check_trust_roles()
 
-        self.delete_trust()
-
     @attr(type='smoke')
     def test_trust_noimpersonate(self):
         # Test case to check we can create, get and delete a trust
@@ -209,7 +216,21 @@
 
         self.check_trust_roles()
 
-        self.delete_trust()
+    @attr(type='smoke')
+    def test_trust_expire(self):
+        # Test case to check we can create, get and delete a trust
+        # with an expiry specified
+        expires_at = timeutils.utcnow() + datetime.timedelta(hours=1)
+        expires_str = timeutils.isotime(at=expires_at, subsecond=True)
+
+        trust = self.create_trust(expires=expires_str)
+        self.validate_trust(trust, expires=expires_str)
+
+        trust_get = self.get_trust()
+
+        self.validate_trust(trust_get, expires=expires_str)
+
+        self.check_trust_roles()
 
     @attr(type='smoke')
     def test_trust_expire_invalid(self):
@@ -220,3 +241,22 @@
         self.assertRaises(exceptions.BadRequest,
                           self.create_trust,
                           expires=expires_str)
+
+    @attr(type='smoke')
+    def test_get_trusts_query(self):
+        self.create_trust()
+        resp, trusts_get = self.trustor_v3_client.get_trusts(
+            trustor_user_id=self.trustor_user_id)
+        self.assertEqual('200', resp['status'])
+        self.assertEqual(1, len(trusts_get))
+        self.validate_trust(trusts_get[0], summary=True)
+
+    @attr(type='smoke')
+    def test_get_trusts_all(self):
+        self.create_trust()
+        resp, trusts_get = self.v3_client.get_trusts()
+        self.assertEqual('200', resp['status'])
+        trusts = [t for t in trusts_get
+                  if t['id'] == self.trust_id]
+        self.assertEqual(1, len(trusts))
+        self.validate_trust(trusts[0], summary=True)
diff --git a/tempest/api/network/admin/test_agent_management.py b/tempest/api/network/admin/test_agent_management.py
index 94659b2..4b36197 100644
--- a/tempest/api/network/admin/test_agent_management.py
+++ b/tempest/api/network/admin/test_agent_management.py
@@ -36,6 +36,12 @@
         agents = body['agents']
         self.assertIn(self.agent, agents)
 
+    @attr(type=['smoke'])
+    def test_list_agents_non_admin(self):
+        resp, body = self.client.list_agents()
+        self.assertEqual('200', resp['status'])
+        self.assertEqual(len(body["agents"]), 0)
+
     @attr(type='smoke')
     def test_show_agent(self):
         resp, body = self.admin_client.show_agent(self.agent['id'])
diff --git a/tempest/api/network/base.py b/tempest/api/network/base.py
index 318d891..dcad101 100644
--- a/tempest/api/network/base.py
+++ b/tempest/api/network/base.py
@@ -66,6 +66,7 @@
         cls.health_monitors = []
         cls.vpnservices = []
         cls.ikepolicies = []
+        cls.floating_ips = []
 
     @classmethod
     def tearDownClass(cls):
@@ -75,6 +76,9 @@
         # Clean up vpn services
         for vpnservice in cls.vpnservices:
             cls.client.delete_vpnservice(vpnservice['id'])
+        # Clean up floating IPs
+        for floating_ip in cls.floating_ips:
+            cls.client.delete_floating_ip(floating_ip['id'])
         # Clean up routers
         for router in cls.routers:
             resp, body = cls.client.list_router_interfaces(router['id'])
@@ -167,6 +171,16 @@
         return router
 
     @classmethod
+    def create_floating_ip(cls, external_network_id, **kwargs):
+        """Wrapper utility that returns a test floating IP."""
+        resp, body = cls.client.create_floating_ip(
+            external_network_id,
+            **kwargs)
+        fip = body['floatingip']
+        cls.floating_ips.append(fip)
+        return fip
+
+    @classmethod
     def create_pool(cls, name, lb_method, protocol, subnet):
         """Wrapper utility that returns a test pool."""
         resp, body = cls.client.create_pool(
diff --git a/tempest/api/network/base_routers.py b/tempest/api/network/base_routers.py
new file mode 100644
index 0000000..9baef04
--- /dev/null
+++ b/tempest/api/network/base_routers.py
@@ -0,0 +1,50 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.network import base
+
+
+class BaseRouterTest(base.BaseAdminNetworkTest):
+    # NOTE(salv-orlando): This class inherits from BaseAdminNetworkTest
+    # as some router operations, such as enabling or disabling SNAT
+    # require admin credentials by default
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseRouterTest, cls).setUpClass()
+
+    def _delete_router(self, router_id):
+        resp, _ = self.client.delete_router(router_id)
+        self.assertEqual(204, resp.status)
+        # Asserting that the router is not found in the list
+        # after deletion
+        resp, list_body = self.client.list_routers()
+        self.assertEqual('200', resp['status'])
+        routers_list = list()
+        for router in list_body['routers']:
+            routers_list.append(router['id'])
+        self.assertNotIn(router_id, routers_list)
+
+    def _remove_router_interface_with_subnet_id(self, router_id, subnet_id):
+        resp, _ = self.client.remove_router_interface_with_subnet_id(
+            router_id, subnet_id)
+        self.assertEqual('200', resp['status'])
+
+    def _remove_router_interface_with_port_id(self, router_id, port_id):
+        resp, _ = self.client.remove_router_interface_with_port_id(
+            router_id, port_id)
+        self.assertEqual('200', resp['status'])
diff --git a/tempest/api/network/test_floating_ips.py b/tempest/api/network/test_floating_ips.py
index 7ce8ca6..6f3fa4b 100644
--- a/tempest/api/network/test_floating_ips.py
+++ b/tempest/api/network/test_floating_ips.py
@@ -32,6 +32,9 @@
         Delete a Floating IP
         List all Floating IPs
         Show Floating IP details
+        Associate a Floating IP with a port and then delete that port
+        Associate a Floating IP with a port and then with a port on another
+        router
 
     v2.0 of the Neutron API is assumed. It is also assumed that the following
     options are defined in the [network] section of etc/tempest.conf:
@@ -55,31 +58,17 @@
         for i in range(2):
             cls.create_port(cls.network)
 
-    def _delete_floating_ip(self, floating_ip_id):
-        # Deletes a floating IP and verifies if it is deleted or not
-        resp, _ = self.client.delete_floatingip(floating_ip_id)
-        self.assertEqual(204, resp.status)
-        # Asserting that the floating_ip is not found in list after deletion
-        resp, floating_ips = self.client.list_floatingips()
-        floatingip_id_list = list()
-        for f in floating_ips['floatingips']:
-            floatingip_id_list.append(f['id'])
-        self.assertNotIn(floating_ip_id, floatingip_id_list)
-
     @attr(type='smoke')
     def test_create_list_show_update_delete_floating_ip(self):
         # Creates a floating IP
-        resp, floating_ip = self.client.create_floating_ip(
+        created_floating_ip = self.create_floating_ip(
             self.ext_net_id, port_id=self.ports[0]['id'])
-        self.assertEqual('201', resp['status'])
-        created_floating_ip = floating_ip['floatingip']
         self.assertIsNotNone(created_floating_ip['id'])
         self.assertIsNotNone(created_floating_ip['tenant_id'])
         self.assertIsNotNone(created_floating_ip['floating_ip_address'])
         self.assertEqual(created_floating_ip['port_id'], self.ports[0]['id'])
         self.assertEqual(created_floating_ip['floating_network_id'],
                          self.ext_net_id)
-        self.addCleanup(self._delete_floating_ip, created_floating_ip['id'])
         # Verifies the details of a floating_ip
         resp, floating_ip = self.client.show_floating_ip(
             created_floating_ip['id'])
@@ -120,6 +109,51 @@
         self.assertIsNone(updated_floating_ip['fixed_ip_address'])
         self.assertIsNone(updated_floating_ip['router_id'])
 
+    @attr(type='smoke')
+    def test_floating_ip_delete_port(self):
+        # Create a floating IP
+        created_floating_ip = self.create_floating_ip(self.ext_net_id)
+        # Create a port
+        resp, port = self.client.create_port(self.network['id'])
+        created_port = port['port']
+        resp, floating_ip = self.client.update_floating_ip(
+            created_floating_ip['id'], port_id=created_port['id'])
+        self.assertEqual('200', resp['status'])
+        # Delete port
+        self.client.delete_port(created_port['id'])
+        # Verifies the details of the floating_ip
+        resp, floating_ip = self.client.show_floating_ip(
+            created_floating_ip['id'])
+        self.assertEqual('200', resp['status'])
+        shown_floating_ip = floating_ip['floatingip']
+        # Confirm the fields are back to None
+        self.assertEqual(shown_floating_ip['id'], created_floating_ip['id'])
+        self.assertIsNone(shown_floating_ip['port_id'])
+        self.assertIsNone(shown_floating_ip['fixed_ip_address'])
+        self.assertIsNone(shown_floating_ip['router_id'])
+
+    @attr(type='smoke')
+    def test_floating_ip_update_different_router(self):
+        # Associate a floating IP to a port on a router
+        created_floating_ip = self.create_floating_ip(
+            self.ext_net_id, port_id=self.ports[1]['id'])
+        self.assertEqual(created_floating_ip['router_id'], self.router['id'])
+        network2 = self.create_network()
+        subnet2 = self.create_subnet(network2)
+        router2 = self.create_router(data_utils.rand_name('router-'),
+                                     external_network_id=self.ext_net_id)
+        self.create_router_interface(router2['id'], subnet2['id'])
+        port_other_router = self.create_port(network2)
+        # Associate floating IP to the other port on another router
+        resp, floating_ip = self.client.update_floating_ip(
+            created_floating_ip['id'], port_id=port_other_router['id'])
+        self.assertEqual('200', resp['status'])
+        updated_floating_ip = floating_ip['floatingip']
+        self.assertEqual(updated_floating_ip['router_id'], router2['id'])
+        self.assertEqual(updated_floating_ip['port_id'],
+                         port_other_router['id'])
+        self.assertIsNotNone(updated_floating_ip['fixed_ip_address'])
+
 
 class FloatingIPTestXML(FloatingIPTestJSON):
     _interface = 'xml'
diff --git a/tempest/api/network/test_load_balancer.py b/tempest/api/network/test_load_balancer.py
index 224c36c..d1ad134 100644
--- a/tempest/api/network/test_load_balancer.py
+++ b/tempest/api/network/test_load_balancer.py
@@ -17,7 +17,7 @@
 
 from tempest.api.network import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class LoadBalancerJSON(base.BaseNetworkTest):
@@ -42,6 +42,9 @@
     @classmethod
     def setUpClass(cls):
         super(LoadBalancerJSON, cls).setUpClass()
+        if not test.is_extension_enabled('lbaas', 'network'):
+            msg = "lbaas extension not enabled."
+            raise cls.skipException(msg)
         cls.network = cls.create_network()
         cls.name = cls.network['name']
         cls.subnet = cls.create_subnet(cls.network)
@@ -53,7 +56,7 @@
         cls.member = cls.create_member(80, cls.pool)
         cls.health_monitor = cls.create_health_monitor(4, 3, "TCP", 1)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_vips(self):
         # Verify the vIP exists in the list of all vIPs
         resp, body = self.client.list_vips()
@@ -100,7 +103,7 @@
         resp, body = self.client.delete_pool(pool['id'])
         self.assertEqual('204', resp['status'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_vip(self):
         # Verifies the details of a vip
         resp, body = self.client.show_vip(self.vip['id'])
@@ -109,7 +112,7 @@
         self.assertEqual(self.vip['id'], vip['id'])
         self.assertEqual(self.vip['name'], vip['name'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_pool(self):
         # Verifies the details of a pool
         resp, body = self.client.show_pool(self.pool['id'])
@@ -118,7 +121,7 @@
         self.assertEqual(self.pool['id'], pool['id'])
         self.assertEqual(self.pool['name'], pool['name'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_pools(self):
         # Verify the pool exists in the list of all pools
         resp, body = self.client.list_pools()
@@ -126,7 +129,7 @@
         pools = body['pools']
         self.assertIn(self.pool['id'], [p['id'] for p in pools])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_members(self):
         # Verify the member exists in the list of all members
         resp, body = self.client.list_members()
@@ -134,7 +137,7 @@
         members = body['members']
         self.assertIn(self.member['id'], [m['id'] for m in members])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_update_delete_member(self):
         # Creates a member
         resp, body = self.client.create_member("10.0.9.47", 80,
@@ -151,7 +154,7 @@
         resp, body = self.client.delete_member(member['id'])
         self.assertEqual('204', resp['status'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_member(self):
         # Verifies the details of a member
         resp, body = self.client.show_member(self.member['id'])
@@ -161,7 +164,7 @@
         self.assertEqual(self.member['admin_state_up'],
                          member['admin_state_up'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_health_monitors(self):
         # Verify the health monitor exists in the list of all health monitors
         resp, body = self.client.list_health_monitors()
@@ -170,7 +173,7 @@
         self.assertIn(self.health_monitor['id'],
                       [h['id'] for h in health_monitors])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_update_delete_health_monitor(self):
         # Creates a health_monitor
         resp, body = self.client.create_health_monitor(4, 3, "TCP", 1)
@@ -187,7 +190,7 @@
         resp, body = self.client.delete_health_monitor(health_monitor['id'])
         self.assertEqual('204', resp['status'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_health_monitor(self):
         # Verifies the details of a health_monitor
         resp, body = self.client.show_health_monitor(self.health_monitor['id'])
@@ -197,7 +200,7 @@
         self.assertEqual(self.health_monitor['admin_state_up'],
                          health_monitor['admin_state_up'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_associate_disassociate_health_monitor_with_pool(self):
         # Verify that a health monitor can be associated with a pool
         resp, body = (self.client.associate_health_monitor_with_pool
diff --git a/tempest/api/network/test_routers.py b/tempest/api/network/test_routers.py
index 21934f2..b6022e8 100644
--- a/tempest/api/network/test_routers.py
+++ b/tempest/api/network/test_routers.py
@@ -17,43 +17,18 @@
 
 import netaddr
 
-from tempest.api.network import base
+from tempest.api.network import base_routers as base
 from tempest.common.utils import data_utils
 from tempest import test
 
 
-class RoutersTest(base.BaseAdminNetworkTest):
-    # NOTE(salv-orlando): This class inherits from BaseAdminNetworkTest
-    # as some router operations, such as enabling or disabling SNAT
-    # require admin credentials by default
+class RoutersTest(base.BaseRouterTest):
     _interface = 'json'
 
     @classmethod
     def setUpClass(cls):
         super(RoutersTest, cls).setUpClass()
 
-    def _delete_router(self, router_id):
-        resp, _ = self.client.delete_router(router_id)
-        self.assertEqual(204, resp.status)
-        # Asserting that the router is not found in the list
-        # after deletion
-        resp, list_body = self.client.list_routers()
-        self.assertEqual('200', resp['status'])
-        routers_list = list()
-        for router in list_body['routers']:
-            routers_list.append(router['id'])
-        self.assertNotIn(router_id, routers_list)
-
-    def _remove_router_interface_with_subnet_id(self, router_id, subnet_id):
-        resp, _ = self.client.remove_router_interface_with_subnet_id(
-            router_id, subnet_id)
-        self.assertEqual('200', resp['status'])
-
-    def _remove_router_interface_with_port_id(self, router_id, port_id):
-        resp, _ = self.client.remove_router_interface_with_port_id(
-            router_id, port_id)
-        self.assertEqual('200', resp['status'])
-
     @test.attr(type='smoke')
     def test_create_show_list_update_delete_router(self):
         # Create a router
diff --git a/tempest/api/network/test_routers_negative.py b/tempest/api/network/test_routers_negative.py
new file mode 100644
index 0000000..520a612
--- /dev/null
+++ b/tempest/api/network/test_routers_negative.py
@@ -0,0 +1,57 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 OpenStack Foundation
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.network import base_routers as base
+from tempest.common.utils import data_utils
+from tempest import exceptions
+from tempest.test import attr
+
+
+class RoutersNegativeTest(base.BaseRouterTest):
+    _interface = 'json'
+
+    @classmethod
+    def setUpClass(cls):
+        super(RoutersNegativeTest, cls).setUpClass()
+        cls.router = cls.create_router(data_utils.rand_name('router-'))
+        cls.network = cls.create_network()
+        cls.subnet = cls.create_subnet(cls.network)
+
+    @attr(type=['negative', 'smoke'])
+    def test_router_add_gateway_invalid_network_returns_404(self):
+        self.assertRaises(exceptions.NotFound,
+                          self.client.update_router,
+                          self.router['id'],
+                          external_gateway_info={
+                              'network_id': self.router['id']})
+
+    @attr(type=['negative', 'smoke'])
+    def test_router_add_gateway_net_not_external_returns_400(self):
+        self.create_subnet(self.network)
+        self.assertRaises(exceptions.BadRequest,
+                          self.client.update_router,
+                          self.router['id'],
+                          external_gateway_info={
+                              'network_id': self.network['id']})
+
+    @attr(type=['negative', 'smoke'])
+    def test_router_remove_interface_in_use_returns_409(self):
+        self.client.add_router_interface_with_subnet_id(
+            self.router['id'], self.subnet['id'])
+        self.assertRaises(exceptions.Conflict,
+                          self.client.delete_router,
+                          self.router['id'])
diff --git a/tempest/api/network/test_vpnaas_extensions.py b/tempest/api/network/test_vpnaas_extensions.py
index fc3b1d9..d196886 100644
--- a/tempest/api/network/test_vpnaas_extensions.py
+++ b/tempest/api/network/test_vpnaas_extensions.py
@@ -17,7 +17,7 @@
 
 from tempest.api.network import base
 from tempest.common.utils import data_utils
-from tempest.test import attr
+from tempest import test
 
 
 class VPNaaSJSON(base.BaseNetworkTest):
@@ -38,6 +38,9 @@
     @classmethod
     def setUpClass(cls):
         super(VPNaaSJSON, cls).setUpClass()
+        if not test.is_extension_enabled('vpnaas', 'network'):
+            msg = "vpnaas extension not enabled."
+            raise cls.skipException(msg)
         cls.network = cls.create_network()
         cls.subnet = cls.create_subnet(cls.network)
         cls.router = cls.create_router(
@@ -65,7 +68,7 @@
                 ike_id_list.append(i['id'])
             self.assertNotIn(ike_policy_id, ike_id_list)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_vpn_services(self):
         # Verify the VPN service exists in the list of all VPN services
         resp, body = self.client.list_vpnservices()
@@ -73,7 +76,7 @@
         vpnservices = body['vpnservices']
         self.assertIn(self.vpnservice['id'], [v['id'] for v in vpnservices])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_update_delete_vpn_service(self):
         # Creates a VPN service
         name = data_utils.rand_name('vpn-service-')
@@ -102,7 +105,7 @@
         vpn_services = [vs['id'] for vs in body['vpnservices']]
         self.assertNotIn(vpnservice['id'], vpn_services)
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_vpn_service(self):
         # Verifies the details of a vpn service
         resp, body = self.client.show_vpnservice(self.vpnservice['id'])
@@ -116,7 +119,7 @@
         self.assertEqual(self.vpnservice['subnet_id'], vpnservice['subnet_id'])
         self.assertEqual(self.vpnservice['tenant_id'], vpnservice['tenant_id'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_list_ike_policies(self):
         # Verify the ike policy exists in the list of all IKE policies
         resp, body = self.client.list_ikepolicies()
@@ -124,7 +127,7 @@
         ikepolicies = body['ikepolicies']
         self.assertIn(self.ikepolicy['id'], [i['id'] for i in ikepolicies])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_create_update_delete_ike_policy(self):
         # Creates a IKE policy
         name = data_utils.rand_name('ike-policy-')
@@ -149,7 +152,7 @@
         resp, body = self.client.delete_ikepolicy(ikepolicy['id'])
         self.assertEqual('204', resp['status'])
 
-    @attr(type='smoke')
+    @test.attr(type='smoke')
     def test_show_ike_policy(self):
         # Verifies the details of a ike policy
         resp, body = self.client.show_ikepolicy(self.ikepolicy['id'])
diff --git a/tempest/api/object_storage/base.py b/tempest/api/object_storage/base.py
index e7cb806..47d8cca 100644
--- a/tempest/api/object_storage/base.py
+++ b/tempest/api/object_storage/base.py
@@ -101,6 +101,7 @@
 
         The containers should be visible from the container_client given.
         Will not throw any error if the containers don't exist.
+        Will not check that object and container deletions succeed.
 
         :param containers: list of container names to remove
         :param container_client: if None, use cls.container_client, this means
diff --git a/tempest/api/object_storage/test_account_quotas.py b/tempest/api/object_storage/test_account_quotas.py
index ac1c7d1..6312f69 100644
--- a/tempest/api/object_storage/test_account_quotas.py
+++ b/tempest/api/object_storage/test_account_quotas.py
@@ -14,21 +14,17 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
-import testtools
-
 from tempest.api.object_storage import base
 from tempest import clients
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
+from tempest import test
 
 CONF = config.CONF
 
 
 class AccountQuotasTest(base.BaseObjectTest):
-    accounts_quotas_available = \
-        CONF.object_storage_feature_enabled.accounts_quotas
 
     @classmethod
     def setUpClass(cls):
@@ -99,9 +95,8 @@
         cls.data.teardown_all()
         super(AccountQuotasTest, cls).tearDownClass()
 
-    @testtools.skipIf(not accounts_quotas_available,
-                      "Account Quotas middleware not available")
-    @attr(type="smoke")
+    @test.attr(type="smoke")
+    @test.requires_ext(extension='account_quotas', service='object')
     def test_upload_valid_object(self):
         object_name = data_utils.rand_name(name="TestObject")
         data = data_utils.arbitrary_string()
@@ -111,9 +106,8 @@
         self.assertEqual(resp["status"], "201")
         self.assertHeaders(resp, 'Object', 'PUT')
 
-    @testtools.skipIf(not accounts_quotas_available,
-                      "Account Quotas middleware not available")
-    @attr(type=["negative", "smoke"])
+    @test.attr(type=["negative", "smoke"])
+    @test.requires_ext(extension='account_quotas', service='object')
     def test_upload_large_object(self):
         object_name = data_utils.rand_name(name="TestObject")
         data = data_utils.arbitrary_string(30)
@@ -121,9 +115,8 @@
                           self.object_client.create_object,
                           self.container_name, object_name, data)
 
-    @testtools.skipIf(not accounts_quotas_available,
-                      "Account Quotas middleware not available")
-    @attr(type=["smoke"])
+    @test.attr(type=["smoke"])
+    @test.requires_ext(extension='account_quotas', service='object')
     def test_admin_modify_quota(self):
         """Test that the ResellerAdmin is able to modify and remove the quota
         on a user's account.
@@ -146,9 +139,8 @@
             self.assertEqual(resp["status"], "204")
             self.assertHeaders(resp, 'Account', 'POST')
 
-    @testtools.skipIf(not accounts_quotas_available,
-                      "Account Quotas middleware not available")
-    @attr(type=["negative", "smoke"])
+    @test.attr(type=["negative", "smoke"])
+    @test.requires_ext(extension='account_quotas', service='object')
     def test_user_modify_quota(self):
         """Test that a user is not able to modify or remove a quota on
         its account.
diff --git a/tempest/api/object_storage/test_container_quotas.py b/tempest/api/object_storage/test_container_quotas.py
index 513d24a..103ee89 100644
--- a/tempest/api/object_storage/test_container_quotas.py
+++ b/tempest/api/object_storage/test_container_quotas.py
@@ -15,25 +15,19 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-import testtools
-
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
-from tempest.test import HTTP_SUCCESS
+from tempest import test
 
 CONF = config.CONF
 QUOTA_BYTES = 10
 QUOTA_COUNT = 3
-SKIP_MSG = "Container quotas middleware not available."
 
 
 class ContainerQuotasTest(base.BaseObjectTest):
     """Attemps to test the perfect behavior of quotas in a container."""
-    container_quotas_available = \
-        CONF.object_storage_feature_enabled.container_quotas
 
     def setUp(self):
         """Creates and sets a container with quotas.
@@ -58,8 +52,8 @@
         self.delete_containers([self.container_name])
         super(ContainerQuotasTest, self).tearDown()
 
-    @testtools.skipIf(not container_quotas_available, SKIP_MSG)
-    @attr(type="smoke")
+    @test.requires_ext(extension='container_quotas', service='object')
+    @test.attr(type="smoke")
     def test_upload_valid_object(self):
         """Attempts to uploads an object smaller than the bytes quota."""
         object_name = data_utils.rand_name(name="TestObject")
@@ -69,14 +63,14 @@
 
         resp, _ = self.object_client.create_object(
             self.container_name, object_name, data)
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Object', 'PUT')
 
         nafter = self._get_bytes_used()
         self.assertEqual(nbefore + len(data), nafter)
 
-    @testtools.skipIf(not container_quotas_available, SKIP_MSG)
-    @attr(type="smoke")
+    @test.requires_ext(extension='container_quotas', service='object')
+    @test.attr(type="smoke")
     def test_upload_large_object(self):
         """Attempts to upload an object lagger than the bytes quota."""
         object_name = data_utils.rand_name(name="TestObject")
@@ -91,8 +85,8 @@
         nafter = self._get_bytes_used()
         self.assertEqual(nbefore, nafter)
 
-    @testtools.skipIf(not container_quotas_available, SKIP_MSG)
-    @attr(type="smoke")
+    @test.requires_ext(extension='container_quotas', service='object')
+    @test.attr(type="smoke")
     def test_upload_too_many_objects(self):
         """Attempts to upload many objects that exceeds the count limit."""
         for _ in range(QUOTA_COUNT):
diff --git a/tempest/api/object_storage/test_container_sync.py b/tempest/api/object_storage/test_container_sync.py
index dcfe219..ec78774 100644
--- a/tempest/api/object_storage/test_container_sync.py
+++ b/tempest/api/object_storage/test_container_sync.py
@@ -16,25 +16,38 @@
 #    under the License.
 
 import time
+import urlparse
 
 from tempest.api.object_storage import base
 from tempest.common.utils import data_utils
 from tempest.test import attr
-from tempest.test import skip_because
+from tempest.test import HTTP_SUCCESS
+
+# This test can be quite long to run due to its
+# dependency on container-sync process running interval.
+# You can obviously reduce the container-sync interval in the
+# container-server configuration.
 
 
 class ContainerSyncTest(base.BaseObjectTest):
+
     @classmethod
     def setUpClass(cls):
         super(ContainerSyncTest, cls).setUpClass()
         cls.containers = []
         cls.objects = []
+
+        # Default container-server config only allows localhost
+        cls.local_ip = '127.0.0.1'
+
+        # Must be configure according to container-sync interval
         container_sync_timeout = \
             int(cls.config.object_storage.container_sync_timeout)
         cls.container_sync_interval = \
             int(cls.config.object_storage.container_sync_interval)
         cls.attempts = \
             int(container_sync_timeout / cls.container_sync_interval)
+
         # define container and object clients
         cls.clients = {}
         cls.clients[data_utils.rand_name(name='TestContainerSync')] = \
@@ -51,8 +64,7 @@
             cls.delete_containers(cls.containers, client[0], client[1])
         super(ContainerSyncTest, cls).tearDownClass()
 
-    @skip_because(bug="1093743")
-    @attr(type='gate')
+    @attr(type='slow')
     def test_container_synchronization(self):
         # container to container synchronization
         # to allow/accept sync requests to/from other accounts
@@ -62,51 +74,53 @@
             cont_client = [self.clients[c][0] for c in cont]
             obj_client = [self.clients[c][1] for c in cont]
             # tell first container to synchronize to a second
+            client_proxy_ip = \
+                urlparse.urlparse(cont_client[1].base_url).netloc.split(':')[0]
+            client_base_url = \
+                cont_client[1].base_url.replace(client_proxy_ip,
+                                                self.local_ip)
             headers = {'X-Container-Sync-Key': 'sync_key',
                        'X-Container-Sync-To': "%s/%s" %
-                       (cont_client[1].base_url, str(cont[1]))}
+                       (client_base_url, str(cont[1]))}
             resp, body = \
                 cont_client[0].put(str(cont[0]), body=None, headers=headers)
-            self.assertIn(resp['status'], ('202', '201'),
-                          'Error installing X-Container-Sync-To '
-                          'for the container "%s"' % (cont[0]))
+            self.assertIn(int(resp['status']), HTTP_SUCCESS)
             # create object in container
             object_name = data_utils.rand_name(name='TestSyncObject')
             data = object_name[::-1]  # data_utils.arbitrary_string()
             resp, _ = obj_client[0].create_object(cont[0], object_name, data)
-            self.assertEqual(resp['status'], '201',
-                             'Error creating the object "%s" in'
-                             'the container "%s"'
-                             % (object_name, cont[0]))
+            self.assertIn(int(resp['status']), HTTP_SUCCESS)
             self.objects.append(object_name)
 
         # wait until container contents list is not empty
         cont_client = [self.clients[c][0] for c in self.containers]
         params = {'format': 'json'}
         while self.attempts > 0:
-            # get first container content
-            resp, object_list_0 = \
-                cont_client[0].\
-                list_container_contents(self.containers[0], params=params)
-            self.assertEqual(resp['status'], '200',
-                             'Error listing the destination container`s'
-                             ' "%s" contents' % (self.containers[0]))
-            object_list_0 = dict((obj['name'], obj) for obj in object_list_0)
-            # get second container content
-            resp, object_list_1 = \
-                cont_client[1].\
-                list_container_contents(self.containers[1], params=params)
-            self.assertEqual(resp['status'], '200',
-                             'Error listing the destination container`s'
-                             ' "%s" contents' % (self.containers[1]))
-            object_list_1 = dict((obj['name'], obj) for obj in object_list_1)
+            object_lists = []
+            for client_index in (0, 1):
+                resp, object_list = \
+                    cont_client[client_index].\
+                    list_container_contents(self.containers[client_index],
+                                            params=params)
+                self.assertIn(int(resp['status']), HTTP_SUCCESS)
+                object_lists.append(dict(
+                    (obj['name'], obj) for obj in object_list))
             # check that containers are not empty and have equal keys()
             # or wait for next attempt
-            if not object_list_0 or not object_list_1 or \
-                    set(object_list_0.keys()) != set(object_list_1.keys()):
+            if not object_lists[0] or not object_lists[1] or \
+                    set(object_lists[0].keys()) != set(object_lists[1].keys()):
                 time.sleep(self.container_sync_interval)
                 self.attempts -= 1
             else:
                 break
-        self.assertEqual(object_list_0, object_list_1,
+
+        self.assertEqual(object_lists[0], object_lists[1],
                          'Different object lists in containers.')
+
+        # Verify object content
+        obj_clients = [(self.clients[c][1], c) for c in self.containers]
+        for obj_client, cont in obj_clients:
+            for obj_name in object_lists[0]:
+                resp, object_content = obj_client.get_object(cont, obj_name)
+                self.assertIn(int(resp['status']), HTTP_SUCCESS)
+                self.assertEqual(object_content, obj_name[::-1])
diff --git a/tempest/api/object_storage/test_crossdomain.py b/tempest/api/object_storage/test_crossdomain.py
index 41430c8..debd432 100644
--- a/tempest/api/object_storage/test_crossdomain.py
+++ b/tempest/api/object_storage/test_crossdomain.py
@@ -19,27 +19,14 @@
 from tempest.api.object_storage import base
 from tempest import clients
 from tempest.common import custom_matchers
-from tempest import config
-from tempest.test import attr
-from tempest.test import HTTP_SUCCESS
-
-CONF = config.CONF
+from tempest import test
 
 
 class CrossdomainTest(base.BaseObjectTest):
-    crossdomain_available = \
-        CONF.object_storage_feature_enabled.crossdomain
 
     @classmethod
     def setUpClass(cls):
         super(CrossdomainTest, cls).setUpClass()
-
-        # skip this test if CORS isn't enabled in the conf file.
-        if not cls.crossdomain_available:
-            skip_msg = ("%s skipped as Crossdomain middleware not available"
-                        % cls.__name__)
-            raise cls.skipException(skip_msg)
-
         # creates a test user. The test user will set its base_url to the Swift
         # endpoint and test the healthcheck feature.
         cls.data.setup_test_user()
@@ -75,12 +62,13 @@
 
         super(CrossdomainTest, self).tearDown()
 
-    @attr('gate')
+    @test.attr('gate')
+    @test.requires_ext(extension='crossdomain', service='object')
     def test_get_crossdomain_policy(self):
         resp, body = self.os_test_user.account_client.get("crossdomain.xml",
                                                           {})
 
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertTrue(body.startswith(self.xml_start) and
                         body.endswith(self.xml_end))
 
diff --git a/tempest/api/object_storage/test_object_expiry.py b/tempest/api/object_storage/test_object_expiry.py
index 4958f70..9c2834d 100644
--- a/tempest/api/object_storage/test_object_expiry.py
+++ b/tempest/api/object_storage/test_object_expiry.py
@@ -21,7 +21,6 @@
 from tempest.common.utils import data_utils
 from tempest import exceptions
 from tempest.test import attr
-from tempest.test import skip_because
 
 
 class ObjectExpiryTest(base.BaseObjectTest):
@@ -33,31 +32,20 @@
 
     @classmethod
     def tearDownClass(cls):
-        """The test script fails in tear down class
-        as the container contains expired objects (LP bug 1069849).
-        But delete action for the expired object is raising
-        NotFound exception and also non empty container cannot be deleted.
-        """
         cls.delete_containers([cls.container_name])
         super(ObjectExpiryTest, cls).tearDownClass()
 
-    @skip_because(bug="1069849")
-    @attr(type='gate')
-    def test_get_object_after_expiry_time(self):
-        # TODO(harika-vakadi): similar test case has to be created for
-        # "X-Delete-At", after this test case works.
-
+    def _test_object_expiry(self, metadata):
         # create object
         object_name = data_utils.rand_name(name='TestObject')
-        data = data_utils.arbitrary_string()
         resp, _ = self.object_client.create_object(self.container_name,
-                                                   object_name, data)
-        # update object metadata with expiry time of 3 seconds
-        metadata = {'X-Delete-After': '3'}
+                                                   object_name, '')
+        # update object metadata
         resp, _ = \
             self.object_client.update_object_metadata(self.container_name,
                                                       object_name, metadata,
                                                       metadata_prefix='')
+        # verify object metadata
         resp, _ = \
             self.object_client.list_object_metadata(self.container_name,
                                                     object_name)
@@ -69,10 +57,20 @@
         self.assertEqual(resp['status'], '200')
         self.assertHeaders(resp, 'Object', 'GET')
         self.assertIn('x-delete-at', resp)
-        # check data
-        self.assertEqual(body, data)
+
         # sleep for over 5 seconds, so that object expires
         time.sleep(5)
+
         # object should not be there anymore
         self.assertRaises(exceptions.NotFound, self.object_client.get_object,
                           self.container_name, object_name)
+
+    @attr(type='gate')
+    def test_get_object_after_expiry_time(self):
+        metadata = {'X-Delete-After': '3'}
+        self._test_object_expiry(metadata)
+
+    @attr(type='gate')
+    def test_get_object_at_expiry_time(self):
+        metadata = {'X-Delete-At': str(int(time.time()) + 3)}
+        self._test_object_expiry(metadata)
diff --git a/tempest/api/object_storage/test_object_temp_url.py b/tempest/api/object_storage/test_object_temp_url.py
index 9d5a1c0..d1b3674 100644
--- a/tempest/api/object_storage/test_object_temp_url.py
+++ b/tempest/api/object_storage/test_object_temp_url.py
@@ -24,42 +24,40 @@
 from tempest.common.utils import data_utils
 from tempest import config
 from tempest import exceptions
-from tempest.test import attr
-from tempest.test import HTTP_SUCCESS
+from tempest import test
 
 CONF = config.CONF
 
 
 class ObjectTempUrlTest(base.BaseObjectTest):
 
-    tempurl_available = \
-        CONF.object_storage_feature_enabled.tempurl
-
     @classmethod
     def setUpClass(cls):
         super(ObjectTempUrlTest, cls).setUpClass()
-
-        # skip this test if CORS isn't enabled in the conf file.
-        if not cls.tempurl_available:
-            skip_msg = ("%s skipped as TempUrl middleware not available"
-                        % cls.__name__)
-            raise cls.skipException(skip_msg)
-
+        # create a container
         cls.container_name = data_utils.rand_name(name='TestContainer')
         cls.container_client.create_container(cls.container_name)
         cls.containers = [cls.container_name]
 
         # update account metadata
         cls.key = 'Meta'
+        cls.metadatas = []
         cls.metadata = {'Temp-URL-Key': cls.key}
+        cls.metadatas.append(cls.metadata)
         cls.account_client.create_account_metadata(metadata=cls.metadata)
-        cls.account_client_metadata, _ = \
-            cls.account_client.list_account_metadata()
+
+        # create an object
+        cls.object_name = data_utils.rand_name(name='ObjectTemp')
+        cls.content = data_utils.arbitrary_string(size=len(cls.object_name),
+                                                  base_text=cls.object_name)
+        cls.object_client.create_object(cls.container_name,
+                                        cls.object_name, cls.content)
 
     @classmethod
     def tearDownClass(cls):
-        resp, _ = cls.account_client.delete_account_metadata(
-            metadata=cls.metadata)
+        for metadata in cls.metadata:
+            cls.account_client.delete_account_metadata(
+                metadata=metadata)
 
         cls.delete_containers(cls.containers)
 
@@ -69,21 +67,16 @@
 
     def setUp(self):
         super(ObjectTempUrlTest, self).setUp()
+
         # make sure the metadata has been set
+        account_client_metadata, _ = \
+            self.account_client.list_account_metadata()
         self.assertIn('x-account-meta-temp-url-key',
-                      self.account_client_metadata)
-
+                      account_client_metadata)
         self.assertEqual(
-            self.account_client_metadata['x-account-meta-temp-url-key'],
+            account_client_metadata['x-account-meta-temp-url-key'],
             self.key)
 
-        # create object
-        self.object_name = data_utils.rand_name(name='ObjectTemp')
-        self.data = data_utils.arbitrary_string(size=len(self.object_name),
-                                                base_text=self.object_name)
-        self.object_client.create_object(self.container_name,
-                                         self.object_name, self.data)
-
     def _get_expiry_date(self, expiration_time=1000):
         return int(time.time() + expiration_time)
 
@@ -104,7 +97,8 @@
 
         return url
 
-    @attr(type='gate')
+    @test.attr(type='gate')
+    @test.requires_ext(extension='tempurl', service='object')
     def test_get_object_using_temp_url(self):
         expires = self._get_expiry_date()
 
@@ -114,38 +108,44 @@
                                  expires, self.key)
 
         # trying to get object using temp url within expiry time
-        resp, body = self.object_client.get_object_using_temp_url(url)
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        resp, body = self.object_client.get(url)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Object', 'GET')
-        self.assertEqual(body, self.data)
+        self.assertEqual(body, self.content)
 
         # Testing a HEAD on this Temp URL
         resp, body = self.object_client.head(url)
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Object', 'HEAD')
 
-    @attr(type='gate')
+    @test.attr(type='gate')
+    @test.requires_ext(extension='tempurl', service='object')
     def test_get_object_using_temp_url_key_2(self):
         key2 = 'Meta2-'
         metadata = {'Temp-URL-Key-2': key2}
         self.account_client.create_account_metadata(metadata=metadata)
+        self.metadatas.append(metadata)
 
-        self.account_client_metadata, _ = \
+        # make sure the metadata has been set
+        account_client_metadata, _ = \
             self.account_client.list_account_metadata()
         self.assertIn('x-account-meta-temp-url-key-2',
-                      self.account_client_metadata)
+                      account_client_metadata)
+        self.assertEqual(
+            account_client_metadata['x-account-meta-temp-url-key-2'],
+            key2)
 
         expires = self._get_expiry_date()
         url = self._get_temp_url(self.container_name,
                                  self.object_name, "GET",
                                  expires, key2)
-        resp, body = self.object_client.get_object_using_temp_url(url)
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
-        self.assertEqual(body, self.data)
+        resp, body = self.object_client.get(url)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertEqual(body, self.content)
 
-    @attr(type='gate')
+    @test.attr(type='gate')
+    @test.requires_ext(extension='tempurl', service='object')
     def test_put_object_using_temp_url(self):
-        # make sure the metadata has been set
         new_data = data_utils.arbitrary_string(
             size=len(self.object_name),
             base_text=data_utils.rand_name(name="random"))
@@ -156,15 +156,13 @@
                                  expires, self.key)
 
         # trying to put random data in the object using temp url
-        resp, body = self.object_client.put_object_using_temp_url(
-            url, new_data)
-
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        resp, body = self.object_client.put(url, new_data, None)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Object', 'PUT')
 
         # Testing a HEAD on this Temp URL
         resp, body = self.object_client.head(url)
-        self.assertIn(int(resp['status']), HTTP_SUCCESS)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
         self.assertHeaders(resp, 'Object', 'HEAD')
 
         # Validate that the content of the object has been modified
@@ -172,10 +170,26 @@
                                  self.object_name, "GET",
                                  expires, self.key)
 
-        _, body = self.object_client.get_object_using_temp_url(url)
+        _, body = self.object_client.get(url)
         self.assertEqual(body, new_data)
 
-    @attr(type=['gate', 'negative'])
+    @test.attr(type='gate')
+    @test.requires_ext(extension='tempurl', service='object')
+    def test_head_object_using_temp_url(self):
+        expires = self._get_expiry_date()
+
+        # get a temp URL for the created object
+        url = self._get_temp_url(self.container_name,
+                                 self.object_name, "HEAD",
+                                 expires, self.key)
+
+        # Testing a HEAD on this Temp URL
+        resp, body = self.object_client.head(url)
+        self.assertIn(int(resp['status']), test.HTTP_SUCCESS)
+        self.assertHeaders(resp, 'Object', 'HEAD')
+
+    @test.attr(type=['gate', 'negative'])
+    @test.requires_ext(extension='tempurl', service='object')
     def test_get_object_after_expiration_time(self):
 
         expires = self._get_expiry_date(1)
@@ -188,5 +202,4 @@
         time.sleep(2)
 
         self.assertRaises(exceptions.Unauthorized,
-                          self.object_client.get_object_using_temp_url,
-                          url)
+                          self.object_client.get, url)
diff --git a/tempest/api/orchestration/stacks/test_non_empty_stack.py b/tempest/api/orchestration/stacks/test_non_empty_stack.py
index eead234..282758c 100644
--- a/tempest/api/orchestration/stacks/test_non_empty_stack.py
+++ b/tempest/api/orchestration/stacks/test_non_empty_stack.py
@@ -112,6 +112,18 @@
         self.assertEqual('fluffy', stack['outputs'][0]['output_key'])
 
     @attr(type='gate')
+    def test_suspend_resume_stack(self):
+        """suspend and resume a stack."""
+        resp, suspend_stack = self.client.suspend_stack(self.stack_identifier)
+        self.assertEqual('200', resp['status'])
+        self.client.wait_for_stack_status(self.stack_identifier,
+                                          'SUSPEND_COMPLETE')
+        resp, resume_stack = self.client.resume_stack(self.stack_identifier)
+        self.assertEqual('200', resp['status'])
+        self.client.wait_for_stack_status(self.stack_identifier,
+                                          'RESUME_COMPLETE')
+
+    @attr(type='gate')
     def test_list_resources(self):
         """Getting list of created resources for the stack should be possible.
         """
diff --git a/tempest/api/telemetry/__init__.py b/tempest/api/telemetry/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/api/telemetry/__init__.py
diff --git a/tempest/api/telemetry/base.py b/tempest/api/telemetry/base.py
new file mode 100644
index 0000000..1f661a6
--- /dev/null
+++ b/tempest/api/telemetry/base.py
@@ -0,0 +1,27 @@
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest import config
+import tempest.test
+
+CONF = config.CONF
+
+
+class BaseTelemetryTest(tempest.test.BaseTestCase):
+
+    """Base test case class for all Telemetry API tests."""
+
+    @classmethod
+    def setUpClass(cls):
+        super(BaseTelemetryTest, cls).setUpClass()
+        if not CONF.service_available.ceilometer:
+            raise cls.skipException("Ceilometer support is required")
diff --git a/tempest/api/volume/base.py b/tempest/api/volume/base.py
index 643d021..9c841cc 100644
--- a/tempest/api/volume/base.py
+++ b/tempest/api/volume/base.py
@@ -16,6 +16,7 @@
 #    under the License.
 
 from tempest import clients
+from tempest.common.utils import data_utils
 from tempest.openstack.common import log as logging
 import tempest.test
 
@@ -71,7 +72,10 @@
     @classmethod
     def create_volume(cls, size=1, **kwargs):
         """Wrapper utility that returns a test volume."""
-        resp, volume = cls.volumes_client.create_volume(size, **kwargs)
+        vol_name = data_utils.rand_name('Volume')
+        resp, volume = cls.volumes_client.create_volume(size,
+                                                        display_name=vol_name,
+                                                        **kwargs)
         assert 200 == resp.status
         cls.volumes.append(volume)
         cls.volumes_client.wait_for_volume_status(volume['id'], 'available')
diff --git a/tempest/api/volume/test_extensions.py b/tempest/api/volume/test_extensions.py
index 90988a2..546c430 100644
--- a/tempest/api/volume/test_extensions.py
+++ b/tempest/api/volume/test_extensions.py
@@ -17,9 +17,13 @@
 
 
 from tempest.api.volume import base
+from tempest.openstack.common import log as logging
 from tempest.test import attr
 
 
+LOG = logging.getLogger(__name__)
+
+
 class ExtensionsTestJSON(base.BaseVolumeTest):
     _interface = 'json'
 
@@ -30,6 +34,8 @@
         self.assertEqual(200, resp.status)
         if len(self.config.volume_feature_enabled.api_extensions) == 0:
             raise self.skipException('There are not any extensions configured')
+        extension_list = [extension.get('alias') for extension in extensions]
+        LOG.debug("Cinder extensions: %s" % ','.join(extension_list))
         ext = self.config.volume_feature_enabled.api_extensions[0]
         if ext == 'all':
             self.assertIn('Hosts', map(lambda x: x['name'], extensions))
diff --git a/tempest/api/volume/test_snapshot_metadata.py b/tempest/api/volume/test_snapshot_metadata.py
new file mode 100644
index 0000000..0326f3c
--- /dev/null
+++ b/tempest/api/volume/test_snapshot_metadata.py
@@ -0,0 +1,119 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Huawei Technologies Co.,LTD
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.volume import base
+from tempest import test
+
+
+class SnapshotMetadataTest(base.BaseVolumeV1Test):
+    _interface = "json"
+
+    @classmethod
+    def setUpClass(cls):
+        super(SnapshotMetadataTest, cls).setUpClass()
+        cls.client = cls.snapshots_client
+        # Create a volume
+        cls.volume = cls.create_volume()
+        # Create a snapshot
+        cls.snapshot = cls.create_snapshot(volume_id=cls.volume['id'])
+        cls.snapshot_id = cls.snapshot['id']
+
+    def tearDown(self):
+        # Update the metadata to {}
+        self.client.update_snapshot_metadata(self.snapshot_id, {})
+        super(SnapshotMetadataTest, self).tearDown()
+
+    @test.attr(type='gate')
+    def test_create_get_delete_snapshot_metadata(self):
+        # Create metadata for the snapshot
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+        expected = {"key2": "value2",
+                    "key3": "value3"}
+        resp, body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                          metadata)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the snapshot
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(metadata, body)
+        # Delete one item metadata of the snapshot
+        resp, body = self.client.delete_snapshot_metadata_item(
+            self.snapshot_id,
+            "key1")
+        self.assertEqual(200, resp.status)
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(expected, body)
+
+    @test.attr(type='gate')
+    def test_update_snapshot_metadata(self):
+        # Update metadata for the snapshot
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+        update = {"key3": "value3_update",
+                  "key4": "value4"}
+        # Create metadata for the snapshot
+        resp, body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                          metadata)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the snapshot
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(metadata, body)
+        # Update metadata item
+        resp, body = self.client.update_snapshot_metadata(
+            self.snapshot_id,
+            update)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the snapshot
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(update, body)
+
+    @test.attr(type='gate')
+    def test_update_snapshot_metadata_item(self):
+        # Update metadata item for the snapshot
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+        update_item = {"key3": "value3_update"}
+        expect = {"key1": "value1",
+                  "key2": "value2",
+                  "key3": "value3_update"}
+        # Create metadata for the snapshot
+        resp, body = self.client.create_snapshot_metadata(self.snapshot_id,
+                                                          metadata)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the snapshot
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(metadata, body)
+        # Update metadata item
+        resp, body = self.client.update_snapshot_metadata_item(
+            self.snapshot_id,
+            "key3",
+            update_item)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the snapshot
+        resp, body = self.client.get_snapshot_metadata(self.snapshot_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(expect, body)
+
+
+class SnapshotMetadataTestXML(SnapshotMetadataTest):
+    _interface = "xml"
diff --git a/tempest/api/volume/test_volume_metadata.py b/tempest/api/volume/test_volume_metadata.py
new file mode 100644
index 0000000..0909ade
--- /dev/null
+++ b/tempest/api/volume/test_volume_metadata.py
@@ -0,0 +1,124 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Huawei Technologies Co.,LTD
+# All Rights Reserved.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.api.volume.base import BaseVolumeTest
+from tempest import test
+
+
+class VolumeMetadataTest(BaseVolumeTest):
+    _interface = "json"
+
+    @classmethod
+    def setUpClass(cls):
+        super(VolumeMetadataTest, cls).setUpClass()
+        # Create a volume
+        cls.volume = cls.create_volume()
+        cls.volume_id = cls.volume['id']
+
+    @classmethod
+    def tearDownClass(cls):
+        super(VolumeMetadataTest, cls).tearDownClass()
+
+    def tearDown(self):
+        # Update the metadata to {}
+        self.volumes_client.update_volume_metadata(self.volume_id, {})
+        super(VolumeMetadataTest, self).tearDown()
+
+    @test.attr(type='gate')
+    def test_create_get_delete_volume_metadata(self):
+        # Create metadata for the volume
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+
+        rsp, body = self.volumes_client.create_volume_metadata(self.volume_id,
+                                                               metadata)
+        self.assertEqual(200, rsp.status)
+        # Get the metadata of the volume
+        resp, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(metadata, body)
+        # Delete one item metadata of the volume
+        rsp, body = self.volumes_client.delete_volume_metadata_item(
+            self.volume_id,
+            "key1")
+        self.assertEqual(200, rsp.status)
+        resp, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        self.assertNotIn("key1", body)
+
+    @test.attr(type='gate')
+    def test_update_volume_metadata(self):
+        # Update metadata for the volume
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+
+        update = {"key4": "value4",
+                  "key1": "value1_update"}
+
+        # Create metadata for the volume
+        resp, body = self.volumes_client.create_volume_metadata(
+            self.volume_id,
+            metadata)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the volume
+        resp, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(metadata, body)
+        # Update metadata
+        resp, body = self.volumes_client.update_volume_metadata(
+            self.volume_id,
+            update)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the volume
+        resp, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(update, body)
+
+    @test.attr(type='gate')
+    def test_update_volume_metadata_item(self):
+        # Update metadata item for the volume
+        metadata = {"key1": "value1",
+                    "key2": "value2",
+                    "key3": "value3"}
+        create_expect = {"key1": "value1",
+                         "key2": "value2",
+                         "key3": "value3"}
+        update_item = {"key3": "value3_update"}
+        expect = {"key1": "value1",
+                  "key2": "value2",
+                  "key3": "value3_update"}
+        # Create metadata for the volume
+        resp, body = self.volumes_client.create_volume_metadata(
+            self.volume_id,
+            metadata)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(create_expect, body)
+        # Update metadata item
+        resp, body = self.volumes_client.update_volume_metadata_item(
+            self.volume_id,
+            "key3",
+            update_item)
+        self.assertEqual(200, resp.status)
+        # Get the metadata of the volume
+        resp, body = self.volumes_client.get_volume_metadata(self.volume_id)
+        self.assertEqual(200, resp.status)
+        self.assertEqual(expect, body)
+
+
+class VolumeMetadataTestXML(VolumeMetadataTest):
+    _interface = "xml"
diff --git a/tempest/api/volume/test_volume_transfers.py b/tempest/api/volume/test_volume_transfers.py
index 71e9f85..34eab00 100644
--- a/tempest/api/volume/test_volume_transfers.py
+++ b/tempest/api/volume/test_volume_transfers.py
@@ -17,7 +17,6 @@
 
 from tempest.api.volume import base
 from tempest import clients
-from tempest.common.utils.data_utils import rand_name
 from tempest.test import attr
 
 
@@ -61,10 +60,7 @@
     @attr(type='gate')
     def test_create_get_list_accept_volume_transfer(self):
         # Create a volume first
-        vol_name = rand_name('-Volume-')
-        _, volume = self.client.create_volume(size=1, display_name=vol_name)
-        self.addCleanup(self.adm_client.delete_volume, volume['id'])
-        self.client.wait_for_volume_status(volume['id'], 'available')
+        volume = self.create_volume()
 
         # Create a volume transfer
         resp, transfer = self.client.create_volume_transfer(volume['id'])
@@ -93,10 +89,7 @@
 
     def test_create_list_delete_volume_transfer(self):
         # Create a volume first
-        vol_name = rand_name('-Volume-')
-        _, volume = self.client.create_volume(size=1, display_name=vol_name)
-        self.addCleanup(self.adm_client.delete_volume, volume['id'])
-        self.client.wait_for_volume_status(volume['id'], 'available')
+        volume = self.create_volume()
 
         # Create a volume transfer
         resp, body = self.client.create_volume_transfer(volume['id'])
diff --git a/tempest/api/volume/test_volumes_actions.py b/tempest/api/volume/test_volumes_actions.py
index 61f1bda..7a7ead6 100644
--- a/tempest/api/volume/test_volumes_actions.py
+++ b/tempest/api/volume/test_volumes_actions.py
@@ -31,24 +31,19 @@
         cls.client = cls.volumes_client
         cls.image_client = cls.os.image_client
 
-        # Create a test shared instance and volume for attach/detach tests
+        # Create a test shared instance
         srv_name = data_utils.rand_name(cls.__name__ + '-Instance-')
-        vol_name = data_utils.rand_name(cls.__name__ + '-Volume-')
         resp, cls.server = cls.servers_client.create_server(srv_name,
                                                             cls.image_ref,
                                                             cls.flavor_ref)
         cls.servers_client.wait_for_server_status(cls.server['id'], 'ACTIVE')
 
-        resp, cls.volume = cls.client.create_volume(size=1,
-                                                    display_name=vol_name)
-        cls.client.wait_for_volume_status(cls.volume['id'], 'available')
+        # Create a test shared volume for attach/detach tests
+        cls.volume = cls.create_volume()
 
     @classmethod
     def tearDownClass(cls):
-        # Delete the test instance and volume
-        cls.client.delete_volume(cls.volume['id'])
-        cls.client.wait_for_resource_deletion(cls.volume['id'])
-
+        # Delete the test instance
         cls.servers_client.delete_server(cls.server['id'])
         cls.client.wait_for_resource_deletion(cls.server['id'])
 
diff --git a/tempest/api/volume/test_volumes_get.py b/tempest/api/volume/test_volumes_get.py
index 6d1c25a..e342563 100644
--- a/tempest/api/volume/test_volumes_get.py
+++ b/tempest/api/volume/test_volumes_get.py
@@ -117,17 +117,10 @@
     @attr(type='gate')
     def test_volume_get_metadata_none(self):
         # Create a volume without passing metadata, get details, and delete
-        volume = {}
-        v_name = data_utils.rand_name('Volume-')
+
         # Create a volume without metadata
-        resp, volume = self.client.create_volume(size=1,
-                                                 display_name=v_name,
-                                                 metadata={})
-        self.assertEqual(200, resp.status)
-        self.assertIn('id', volume)
-        self.addCleanup(self._delete_volume, volume['id'])
-        self.assertIn('display_name', volume)
-        self.client.wait_for_volume_status(volume['id'], 'available')
+        volume = self.create_volume(metadata={})
+
         # GET Volume
         resp, fetched_volume = self.client.get_volume(volume['id'])
         self.assertEqual(200, resp.status)
@@ -145,8 +138,7 @@
 
     @attr(type='gate')
     def test_volume_create_get_update_delete_as_clone(self):
-        origin = self.create_volume(size=1,
-                                    display_name="Volume Origin")
+        origin = self.create_volume()
         self._volume_create_get_update_delete(source_volid=origin['id'])
 
 
diff --git a/tempest/api/volume/test_volumes_list.py b/tempest/api/volume/test_volumes_list.py
index c624a3a..fa3f924 100644
--- a/tempest/api/volume/test_volumes_list.py
+++ b/tempest/api/volume/test_volumes_list.py
@@ -21,6 +21,7 @@
 from tempest.common.utils import data_utils
 from tempest.openstack.common import log as logging
 from tempest.test import attr
+from testtools.matchers import ContainsAll
 
 LOG = logging.getLogger(__name__)
 
@@ -66,17 +67,15 @@
         cls.volume_id_list = []
         cls.metadata = {'Type': 'work'}
         for i in range(3):
-            v_name = data_utils.rand_name('volume')
             try:
-                resp, volume = cls.client.create_volume(size=1,
-                                                        display_name=v_name,
-                                                        metadata=cls.metadata)
-                cls.client.wait_for_volume_status(volume['id'], 'available')
+                volume = cls.create_volume(metadata=cls.metadata)
+
                 resp, volume = cls.client.get_volume(volume['id'])
                 cls.volume_list.append(volume)
                 cls.volume_id_list.append(volume['id'])
-            except Exception as exc:
-                LOG.exception(exc)
+            except Exception:
+                LOG.exception('Failed to create volume. %d volumes were '
+                              'created' % len(cls.volume_id_list))
                 if cls.volume_list:
                     # We could not create all the volumes, though we were able
                     # to create *some* of the volumes. This is typically
@@ -85,7 +84,7 @@
                     for volid in cls.volume_id_list:
                         cls.client.delete_volume(volid)
                         cls.client.wait_for_resource_deletion(volid)
-                raise exc
+                raise
 
     @classmethod
     def tearDownClass(cls):
@@ -112,7 +111,12 @@
             for key in params:
                 msg = "Failed to list volumes %s by %s" % \
                       ('details' if with_detail else '', key)
-                self.assertEqual(params[key], volume[key], msg)
+                if key == 'metadata':
+                    self.assertThat(volume[key].items(),
+                                    ContainsAll(params[key].items()),
+                                    msg)
+                else:
+                    self.assertEqual(params[key], volume[key], msg)
 
     @attr(type='smoke')
     def test_volume_list(self):
diff --git a/tempest/api/volume/test_volumes_negative.py b/tempest/api/volume/test_volumes_negative.py
index 869aedb..f14cfdc 100644
--- a/tempest/api/volume/test_volumes_negative.py
+++ b/tempest/api/volume/test_volumes_negative.py
@@ -32,10 +32,7 @@
         cls.client = cls.volumes_client
 
         # Create a test shared instance and volume for attach/detach tests
-        vol_name = data_utils.rand_name('Volume-')
-
-        cls.volume = cls.create_volume(size=1, display_name=vol_name)
-        cls.client.wait_for_volume_status(cls.volume['id'], 'available')
+        cls.volume = cls.create_volume()
         cls.mountpoint = "/dev/vdc"
 
     @attr(type=['negative', 'gate'])
diff --git a/tempest/cli/__init__.py b/tempest/cli/__init__.py
index ec8b3a1..547d0d0 100644
--- a/tempest/cli/__init__.py
+++ b/tempest/cli/__init__.py
@@ -86,6 +86,12 @@
         return self.cmd_with_auth(
             'ceilometer', action, flags, params, admin, fail_ok)
 
+    def heat(self, action, flags='', params='', admin=True,
+             fail_ok=False):
+        """Executes heat command for the given action."""
+        return self.cmd_with_auth(
+            'heat', action, flags, params, admin, fail_ok)
+
     def cinder(self, action, flags='', params='', admin=True, fail_ok=False):
         """Executes cinder command for the given action."""
         return self.cmd_with_auth(
diff --git a/tempest/cli/simple_read_only/heat_templates/heat_minimal.yaml b/tempest/cli/simple_read_only/heat_templates/heat_minimal.yaml
new file mode 100644
index 0000000..7dcda39
--- /dev/null
+++ b/tempest/cli/simple_read_only/heat_templates/heat_minimal.yaml
@@ -0,0 +1,18 @@
+HeatTemplateFormatVersion: '2012-12-12'
+Description: Minimal template to test validation
+Parameters:
+  InstanceImage:
+    Description: Glance image name
+    Type: String
+  InstanceType:
+    Description: Nova instance type
+    Type: String
+    Default: m1.small
+    AllowedValues: [m1.tiny, m1.small, m1.medium, m1.large, m1.nano, m1.xlarge, m1.micro]
+    ConstraintDescription: must be a valid nova instance type.
+Resources:
+    InstanceResource:
+        Type: OS::Nova::Server
+        Properties:
+          flavor: {Ref: InstanceType}
+          image: {Ref: InstanceImage}
diff --git a/tempest/cli/simple_read_only/heat_templates/heat_minimal_hot.yaml b/tempest/cli/simple_read_only/heat_templates/heat_minimal_hot.yaml
new file mode 100644
index 0000000..6d89b7b
--- /dev/null
+++ b/tempest/cli/simple_read_only/heat_templates/heat_minimal_hot.yaml
@@ -0,0 +1,19 @@
+heat_template_version: 2013-05-23
+description: A minimal HOT test template
+parameters:
+  instance_image:
+    description: Glance image name
+    type: String
+  instance_type:
+    description: Nova instance type
+    type: String
+    default: m1.small
+    constraints:
+        - allowed_values: [m1.small, m1.medium, m1.large]
+          description: instance_type must be one of m1.small, m1.medium or m1.large
+resources:
+    instance:
+        type: OS::Nova::Server
+        properties:
+            image: { get_param: instance_image }
+            flavor: { get_param: instance_type }
diff --git a/tempest/cli/simple_read_only/test_ceilometer.py b/tempest/cli/simple_read_only/test_ceilometer.py
index 8bdd633..f14b35b 100644
--- a/tempest/cli/simple_read_only/test_ceilometer.py
+++ b/tempest/cli/simple_read_only/test_ceilometer.py
@@ -15,17 +15,16 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
-from oslo.config import cfg
-
-import tempest.cli
+from tempest import cli
+from tempest import config
 from tempest.openstack.common import log as logging
 
-CONF = cfg.CONF
+CONF = config.CONF
 
 LOG = logging.getLogger(__name__)
 
 
-class SimpleReadOnlyCeilometerClientTest(tempest.cli.ClientTestBase):
+class SimpleReadOnlyCeilometerClientTest(cli.ClientTestBase):
     """Basic, read-only tests for Ceilometer CLI client.
 
     Checks return values and output of read-only commands.
@@ -36,7 +35,7 @@
     @classmethod
     def setUpClass(cls):
         if (not CONF.service_available.ceilometer):
-            msg = ("Skiping all Ceilometer cli tests because it is"
+            msg = ("Skipping all Ceilometer cli tests because it is "
                    "not available")
             raise cls.skipException(msg)
         super(SimpleReadOnlyCeilometerClientTest, cls).setUpClass()
diff --git a/tempest/cli/simple_read_only/test_heat.py b/tempest/cli/simple_read_only/test_heat.py
new file mode 100644
index 0000000..e2fefe8
--- /dev/null
+++ b/tempest/cli/simple_read_only/test_heat.py
@@ -0,0 +1,98 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import json
+import os
+import yaml
+
+from oslo.config import cfg
+
+import tempest.cli
+from tempest.openstack.common import log as logging
+
+CONF = cfg.CONF
+
+LOG = logging.getLogger(__name__)
+
+
+class SimpleReadOnlyHeatClientTest(tempest.cli.ClientTestBase):
+    """Basic, read-only tests for Heat CLI client.
+
+    Basic smoke test for the heat CLI commands which do not require
+    creating or modifying stacks.
+    """
+
+    @classmethod
+    def setUpClass(cls):
+        if (not CONF.service_available.heat):
+            msg = ("Skipping all Heat cli tests because it is "
+                   "not available")
+            raise cls.skipException(msg)
+        super(SimpleReadOnlyHeatClientTest, cls).setUpClass()
+
+    def test_heat_stack_list(self):
+        self.heat('stack-list')
+
+    def test_heat_stack_list_debug(self):
+        self.heat('stack-list', flags='--debug')
+
+    def test_heat_resource_template_fmt_default(self):
+        ret = self.heat('resource-template OS::Nova::Server')
+        self.assertIn('Type: OS::Nova::Server', ret)
+
+    def test_heat_resource_template_fmt_arg_short_yaml(self):
+        ret = self.heat('resource-template -F yaml OS::Nova::Server')
+        self.assertIn('Type: OS::Nova::Server', ret)
+        self.assertIsInstance(yaml.safe_load(ret), dict)
+
+    def test_heat_resource_template_fmt_arg_long_json(self):
+        ret = self.heat('resource-template --format json OS::Nova::Server')
+        self.assertIn('"Type": "OS::Nova::Server",', ret)
+        self.assertIsInstance(json.loads(ret), dict)
+
+    def test_heat_resource_type_list(self):
+        ret = self.heat('resource-type-list')
+        rsrc_types = self.parser.listing(ret)
+        self.assertTableStruct(rsrc_types, ['resource_type'])
+
+    def test_heat_resource_type_show(self):
+        rsrc_schema = self.heat('resource-type-show OS::Nova::Server')
+        # resource-type-show returns a json resource schema
+        self.assertIsInstance(json.loads(rsrc_schema), dict)
+
+    def test_heat_template_validate_yaml(self):
+        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                'heat_templates/heat_minimal.yaml')
+        ret = self.heat('template-validate -f %s' % filepath)
+        # On success template-validate returns a json representation
+        # of the template parameters
+        self.assertIsInstance(json.loads(ret), dict)
+
+    def test_heat_template_validate_hot(self):
+        filepath = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                                'heat_templates/heat_minimal_hot.yaml')
+        ret = self.heat('template-validate -f %s' % filepath)
+        self.assertIsInstance(json.loads(ret), dict)
+
+    def test_heat_help(self):
+        self.heat('help')
+
+    def test_heat_help_cmd(self):
+        # Check requesting help for a specific command works
+        help_text = self.heat('help resource-template')
+        lines = help_text.split('\n')
+        self.assertFirstLineStartsWith(lines, 'usage: heat resource-template')
+
+    def test_heat_version(self):
+        self.heat('', flags='--version')
diff --git a/tempest/cli/simple_read_only/test_neutron.py b/tempest/cli/simple_read_only/test_neutron.py
index 80376ab..7aa57c0 100644
--- a/tempest/cli/simple_read_only/test_neutron.py
+++ b/tempest/cli/simple_read_only/test_neutron.py
@@ -18,18 +18,17 @@
 import re
 import subprocess
 
-from oslo.config import cfg
-
-import tempest.cli
+from tempest import cli
+from tempest import config
 from tempest.openstack.common import log as logging
 from tempest import test
 
-CONF = cfg.CONF
+CONF = config.CONF
 
 LOG = logging.getLogger(__name__)
 
 
-class SimpleReadOnlyNeutronClientTest(tempest.cli.ClientTestBase):
+class SimpleReadOnlyNeutronClientTest(cli.ClientTestBase):
     """Basic, read-only tests for Neutron CLI client.
 
     Checks return values and output of read-only commands.
@@ -40,7 +39,7 @@
     @classmethod
     def setUpClass(cls):
         if (not CONF.service_available.neutron):
-            msg = "Skiping all Neutron cli tests because it is not available"
+            msg = "Skipping all Neutron cli tests because it is not available"
             raise cls.skipException(msg)
         super(SimpleReadOnlyNeutronClientTest, cls).setUpClass()
 
@@ -76,18 +75,20 @@
 
     @test.skip_because(bug="1240694")
     @test.attr(type='smoke')
+    @test.requires_ext(extension='metering', service='network')
     def test_neutron_meter_label_list(self):
         self.neutron('meter-label-list')
 
     @test.skip_because(bug="1240694")
     @test.attr(type='smoke')
+    @test.requires_ext(extension='metering', service='network')
     def test_neutron_meter_label_rule_list(self):
         self.neutron('meter-label-rule-list')
 
     def _test_neutron_lbaas_command(self, command):
         try:
             self.neutron(command)
-        except tempest.cli.CommandFailed as e:
+        except cli.CommandFailed as e:
             if '404 Not Found' not in e.stderr:
                 self.fail('%s: Unexpected failure.' % command)
 
@@ -154,7 +155,7 @@
                                'router-show', 'agent-update', 'help'))
         self.assertFalse(wanted_commands - commands)
 
-     # Optional arguments:
+    # Optional arguments:
 
     @test.attr(type='smoke')
     def test_neutron_version(self):
diff --git a/tempest/clients.py b/tempest/clients.py
index 83b72c6..519d191 100644
--- a/tempest/clients.py
+++ b/tempest/clients.py
@@ -18,6 +18,8 @@
 from tempest import config
 from tempest import exceptions
 from tempest.openstack.common import log as logging
+from tempest.services.baremetal.v1.client_json import BaremetalClientJSON
+from tempest.services.baremetal.v1.client_xml import BaremetalClientXML
 from tempest.services import botoclients
 from tempest.services.compute.json.aggregates_client import \
     AggregatesClientJSON
@@ -232,6 +234,7 @@
         if interface == 'xml':
             self.certificates_client = CertificatesClientXML(*client_args)
             self.certificates_v3_client = CertificatesV3ClientXML(*client_args)
+            self.baremetal_client = BaremetalClientXML(*client_args)
             self.servers_client = ServersClientXML(*client_args)
             self.servers_v3_client = ServersV3ClientXML(*client_args)
             self.limits_client = LimitsClientXML(*client_args)
@@ -294,6 +297,7 @@
             self.certificates_client = CertificatesClientJSON(*client_args)
             self.certificates_v3_client = CertificatesV3ClientJSON(
                 *client_args)
+            self.baremetal_client = BaremetalClientJSON(*client_args)
             self.servers_client = ServersClientJSON(*client_args)
             self.servers_v3_client = ServersV3ClientJSON(*client_args)
             self.limits_client = LimitsClientJSON(*client_args)
diff --git a/tempest/common/custom_matchers.py b/tempest/common/custom_matchers.py
index 307d5db..81b5153 100644
--- a/tempest/common/custom_matchers.py
+++ b/tempest/common/custom_matchers.py
@@ -125,7 +125,7 @@
             elif key == 'content-type' and not value:
                 return InvalidFormat(key, value)
             elif key == 'x-trans-id' and \
-                not re.match("^tx[0-9a-f]*-[0-9a-f]*$", value):
+                not re.match("^tx[0-9a-f]{21}-[0-9a-f]{10}.*", value):
                 return InvalidFormat(key, value)
             elif key == 'date' and not value:
                 return InvalidFormat(key, value)
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index 4f93e1c..339d22a 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -40,6 +40,21 @@
     return random.randint(start, end)
 
 
+def rand_mac_address():
+    """Generate an Ethernet MAC address."""
+    # NOTE(vish): We would prefer to use 0xfe here to ensure that linux
+    #             bridge mac addresses don't change, but it appears to
+    #             conflict with libvirt, so we use the next highest octet
+    #             that has the unicast and locally administered bits set
+    #             properly: 0xfa.
+    #             Discussion: https://bugs.launchpad.net/nova/+bug/921838
+    mac = [0xfa, 0x16, 0x3e,
+           random.randint(0x00, 0xff),
+           random.randint(0x00, 0xff),
+           random.randint(0x00, 0xff)]
+    return ':'.join(["%02x" % x for x in mac])
+
+
 def build_url(host, port, api_version=None, path=None,
               params=None, use_ssl=False):
     """Build the request URL from given host, port, path and parameters."""
diff --git a/tempest/common/utils/test_utils.py b/tempest/common/utils/test_utils.py
new file mode 100644
index 0000000..4f1e02c
--- /dev/null
+++ b/tempest/common/utils/test_utils.py
@@ -0,0 +1,136 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2013 Hewlett-Packard, Ltd.
+#
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common.utils import misc
+from tempest import config
+from tempest.scenario import manager
+
+import json
+import re
+import string
+import unicodedata
+
+CONF = config.CONF
+
+
+@misc.singleton
+class ImageUtils(object):
+
+    default_ssh_user = 'root'
+
+    def __init__(self):
+        # Load configuration items
+        self.ssh_users = json.loads(CONF.input_scenario.ssh_user_regex)
+        self.non_ssh_image_pattern = \
+            CONF.input_scenario.non_ssh_image_regex
+        # Setup clients
+        ocm = manager.OfficialClientManager(CONF.identity.username,
+                                            CONF.identity.password,
+                                            CONF.identity.tenant_name)
+        self.client = ocm.compute_client
+
+    def ssh_user(self, image_id):
+        _image = self.client.images.get(image_id)
+        for regex, user in self.ssh_users:
+            # First match wins
+            if re.match(regex, _image.name) is not None:
+                return user
+        else:
+            return self.default_ssh_user
+
+    def _is_sshable_image(self, image):
+        return not re.search(pattern=self.non_ssh_image_pattern,
+                             string=str(image.name))
+
+    def is_sshable_image(self, image_id):
+        _image = self.client.images.get(image_id)
+        return self._is_sshable_image(_image)
+
+    def _is_flavor_enough(self, flavor, image):
+        return image.minDisk <= flavor.disk
+
+    def is_flavor_enough(self, flavor_id, image_id):
+        _image = self.client.images.get(image_id)
+        _flavor = self.client.flavors.get(flavor_id)
+        return self._is_flavor_enough(_flavor, _image)
+
+
+@misc.singleton
+class InputScenarioUtils(object):
+
+    """
+    Example usage:
+
+    import testscenarios
+    (...)
+    load_tests = testscenarios.load_tests_apply_scenarios
+
+
+    class TestInputScenario(manager.OfficialClientTest):
+
+        scenario_utils = test_utils.InputScenarioUtils()
+        scenario_flavor = scenario_utils.scenario_flavors
+        scenario_image = scenario_utils.scenario_images
+        scenarios = testscenarios.multiply_scenarios(scenario_image,
+                                                     scenario_flavor)
+
+        def test_create_server_metadata(self):
+            name = rand_name('instance')
+            _ = self.compute_client.servers.create(name=name,
+                                                   flavor=self.flavor_ref,
+                                                   image=self.image_ref)
+    """
+    validchars = "-_.{ascii}{digit}".format(ascii=string.ascii_letters,
+                                            digit=string.digits)
+
+    def __init__(self):
+        ocm = manager.OfficialClientManager(CONF.identity.username,
+                                            CONF.identity.password,
+                                            CONF.identity.tenant_name)
+        self.client = ocm.compute_client
+        self.image_pattern = CONF.input_scenario.image_regex
+        self.flavor_pattern = CONF.input_scenario.flavor_regex
+
+    def _normalize_name(self, name):
+        nname = unicodedata.normalize('NFKD', name).encode('ASCII', 'ignore')
+        nname = ''.join(c for c in nname if c in self.validchars)
+        return nname
+
+    @property
+    def scenario_images(self):
+        """
+        :return: a scenario with name and uuid of images
+        """
+        if not hasattr(self, '_scenario_images'):
+            images = self.client.images.list(detailed=False)
+            self._scenario_images = [
+                (self._normalize_name(i.name), dict(image_ref=i.id))
+                for i in images if re.search(self.image_pattern, str(i.name))
+            ]
+        return self._scenario_images
+
+    @property
+    def scenario_flavors(self):
+        """
+        :return: a scenario with name and uuid of flavors
+        """
+        if not hasattr(self, '_scenario_flavors'):
+            flavors = self.client.flavors.list(detailed=False)
+            self._scenario_flavors = [
+                (self._normalize_name(f.name), dict(flavor_ref=f.id))
+                for f in flavors if re.search(self.flavor_pattern, str(f.name))
+            ]
+        return self._scenario_flavors
diff --git a/tempest/config.py b/tempest/config.py
index bf45b4b..0342380 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -398,11 +398,11 @@
                     "one is used."),
     cfg.IntOpt('container_sync_timeout',
                default=120,
-               help="Number of seconds to time on waiting for a container"
+               help="Number of seconds to time on waiting for a container "
                     "to container synchronization complete."),
     cfg.IntOpt('container_sync_interval',
                default=5,
-               help="Number of seconds to wait while looping to check the"
+               help="Number of seconds to wait while looping to check the "
                     "status of a container to container synchronization"),
     cfg.StrOpt('operator_role',
                default='Member',
@@ -415,19 +415,11 @@
     title='Enabled object-storage features')
 
 ObjectStoreFeaturesGroup = [
-    cfg.BoolOpt('container_quotas',
-                default=True,
-                help="Set to True if the Container Quota middleware "
-                     "is enabled"),
-    cfg.BoolOpt('accounts_quotas',
-                default=True,
-                help="Set to True if the Account Quota middleware is enabled"),
-    cfg.BoolOpt('crossdomain',
-                default=True,
-                help="Set to True if the Crossdomain middleware is enabled"),
-    cfg.BoolOpt('tempurl',
-                default=True,
-                help="Set to True if the TempURL middleware is enabled"),
+    cfg.ListOpt('discoverable_apis',
+                default=['all'],
+                help="A list of the enabled optional discoverable apis. "
+                     "A single entry, all, indicates that all of these "
+                     "features are expected to be enabled"),
 ]
 
 
@@ -473,6 +465,16 @@
 ]
 
 
+telemetry_group = cfg.OptGroup(name='telemetry',
+                               title='Telemetry Service Options')
+
+TelemetryGroup = [
+    cfg.StrOpt('catalog_type',
+               default='metering',
+               help="Catalog type of the Telemetry service."),
+]
+
+
 dashboard_group = cfg.OptGroup(name="dashboard",
                                title="Dashboard options")
 
@@ -634,6 +636,9 @@
     cfg.BoolOpt('savanna',
                 default=False,
                 help="Whether or not Savanna is expected to be available"),
+    cfg.BoolOpt('ironic',
+                default=False,
+                help="Whether or not Ironic is expected to be available"),
 ]
 
 debug_group = cfg.OptGroup(name="debug",
@@ -645,6 +650,37 @@
                 help="Enable diagnostic commands"),
 ]
 
+input_scenario_group = cfg.OptGroup(name="input-scenario",
+                                    title="Filters and values for"
+                                          " input scenarios")
+
+InputScenarioGroup = [
+    cfg.StrOpt('image_regex',
+               default='^cirros-0.3.1-x86_64-uec$',
+               help="Matching images become parameters for scenario tests"),
+    cfg.StrOpt('flavor_regex',
+               default='^m1.(micro|nano|tiny)$',
+               help="Matching flavors become parameters for scenario tests"),
+    cfg.StrOpt('non_ssh_image_regex',
+               default='^.*[Ww]in.*$',
+               help="SSH verification in tests is skipped"
+                    "for matching images"),
+    cfg.StrOpt('ssh_user_regex',
+               default="[[\"^.*[Cc]irros.*$\", \"root\"]]",
+               help="List of user mapped to regex "
+                    "to matching image names."),
+]
+
+
+baremetal_group = cfg.OptGroup(name='baremetal',
+                               title='Baremetal provisioning service options')
+
+BaremetalGroup = [
+    cfg.StrOpt('catalog_type',
+               default='baremetal',
+               help="Catalog type of the baremetal provisioning service."),
+]
+
 
 # this should never be called outside of this class
 class TempestConfigPrivate(object):
@@ -700,6 +736,7 @@
         register_opt_group(cfg.CONF, object_storage_feature_group,
                            ObjectStoreFeaturesGroup)
         register_opt_group(cfg.CONF, orchestration_group, OrchestrationGroup)
+        register_opt_group(cfg.CONF, telemetry_group, TelemetryGroup)
         register_opt_group(cfg.CONF, dashboard_group, DashboardGroup)
         register_opt_group(cfg.CONF, data_processing_group,
                            DataProcessingGroup)
@@ -710,6 +747,8 @@
         register_opt_group(cfg.CONF, service_available_group,
                            ServiceAvailableGroup)
         register_opt_group(cfg.CONF, debug_group, DebugGroup)
+        register_opt_group(cfg.CONF, baremetal_group, BaremetalGroup)
+        register_opt_group(cfg.CONF, input_scenario_group, InputScenarioGroup)
         self.compute = cfg.CONF.compute
         self.compute_feature_enabled = cfg.CONF['compute-feature-enabled']
         self.identity = cfg.CONF.identity
@@ -723,6 +762,7 @@
         self.object_storage_feature_enabled = cfg.CONF[
             'object-storage-feature-enabled']
         self.orchestration = cfg.CONF.orchestration
+        self.telemetry = cfg.CONF.telemetry
         self.dashboard = cfg.CONF.dashboard
         self.data_processing = cfg.CONF.data_processing
         self.boto = cfg.CONF.boto
@@ -731,6 +771,8 @@
         self.scenario = cfg.CONF.scenario
         self.service_available = cfg.CONF.service_available
         self.debug = cfg.CONF.debug
+        self.baremetal = cfg.CONF.baremetal
+        self.input_scenario = cfg.CONF['input-scenario']
         if not self.compute_admin.username:
             self.compute_admin.username = self.identity.admin_username
             self.compute_admin.password = self.identity.admin_password
diff --git a/tempest/openstack/common/config/generator.py b/tempest/openstack/common/config/generator.py
index 373f9a6..eeb5a32 100644
--- a/tempest/openstack/common/config/generator.py
+++ b/tempest/openstack/common/config/generator.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2012 SINA Corporation
 # All Rights Reserved.
 #
@@ -28,6 +26,7 @@
 import textwrap
 
 from oslo.config import cfg
+import six
 
 from tempest.openstack.common import gettextutils
 from tempest.openstack.common import importutils
@@ -78,12 +77,15 @@
     # The options list is a list of (module, options) tuples
     opts_by_group = {'DEFAULT': []}
 
-    for module_name in os.getenv(
-            "OSLO_CONFIG_GENERATOR_EXTRA_MODULES", "").split(','):
-        module = _import_module(module_name)
-        if module:
-            for group, opts in _list_opts(module):
-                opts_by_group.setdefault(group, []).append((module_name, opts))
+    extra_modules = os.getenv("TEMPEST_CONFIG_GENERATOR_EXTRA_MODULES", "")
+    if extra_modules:
+        for module_name in extra_modules.split(','):
+            module_name = module_name.strip()
+            module = _import_module(module_name)
+            if module:
+                for group, opts in _list_opts(module):
+                    opts_by_group.setdefault(group, []).append((module_name,
+                                                                opts))
 
     for pkg_name in pkg_names:
         mods = mods_by_pkg.get(pkg_name)
@@ -100,8 +102,8 @@
                 opts_by_group.setdefault(group, []).append((mod_str, opts))
 
     print_group_opts('DEFAULT', opts_by_group.pop('DEFAULT', []))
-    for group, opts in opts_by_group.items():
-        print_group_opts(group, opts)
+    for group in sorted(opts_by_group.keys()):
+        print_group_opts(group, opts_by_group[group])
 
 
 def _import_module(mod_str):
@@ -111,17 +113,17 @@
             return sys.modules[mod_str[4:]]
         else:
             return importutils.import_module(mod_str)
-    except ImportError as ie:
-        sys.stderr.write("%s\n" % str(ie))
-        return None
-    except Exception:
+    except Exception as e:
+        sys.stderr.write("Error importing module %s: %s\n" % (mod_str, str(e)))
         return None
 
 
 def _is_in_group(opt, group):
     "Check if opt is in group."
     for key, value in group._opts.items():
-        if value['opt'] == opt:
+        # NOTE(llu): Temporary workaround for bug #1262148, wait until
+        # newly released oslo.config support '==' operator.
+        if not(value['opt'] != opt):
             return True
     return False
 
@@ -233,7 +235,7 @@
         if opt_default is None:
             print('#%s=<None>' % opt_name)
         elif opt_type == STROPT:
-            assert(isinstance(opt_default, basestring))
+            assert(isinstance(opt_default, six.string_types))
             print('#%s=%s' % (opt_name, _sanitize_default(opt_name,
                                                           opt_default)))
         elif opt_type == BOOLOPT:
diff --git a/tempest/openstack/common/excutils.py b/tempest/openstack/common/excutils.py
index c7bce72..dc365da 100644
--- a/tempest/openstack/common/excutils.py
+++ b/tempest/openstack/common/excutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # Copyright 2012, Red Hat, Inc.
 #
@@ -26,7 +24,7 @@
 
 import six
 
-from tempest.openstack.common.gettextutils import _  # noqa
+from tempest.openstack.common.gettextutils import _
 
 
 class save_and_reraise_exception(object):
@@ -44,13 +42,13 @@
 
     In some cases the caller may not want to re-raise the exception, and
     for those circumstances this context provides a reraise flag that
-    can be used to suppress the exception.  For example:
+    can be used to suppress the exception.  For example::
 
-    except Exception:
-        with save_and_reraise_exception() as ctxt:
-            decide_if_need_reraise()
-            if not should_be_reraised:
-                ctxt.reraise = False
+      except Exception:
+          with save_and_reraise_exception() as ctxt:
+              decide_if_need_reraise()
+              if not should_be_reraised:
+                  ctxt.reraise = False
     """
     def __init__(self):
         self.reraise = True
diff --git a/tempest/openstack/common/fileutils.py b/tempest/openstack/common/fileutils.py
index 15530af..1845ed2 100644
--- a/tempest/openstack/common/fileutils.py
+++ b/tempest/openstack/common/fileutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
@@ -22,7 +20,7 @@
 import tempfile
 
 from tempest.openstack.common import excutils
-from tempest.openstack.common.gettextutils import _  # noqa
+from tempest.openstack.common.gettextutils import _
 from tempest.openstack.common import log as logging
 
 LOG = logging.getLogger(__name__)
diff --git a/tempest/openstack/common/fixture/config.py b/tempest/openstack/common/fixture/config.py
index 7b044ef..0bf90ff 100644
--- a/tempest/openstack/common/fixture/config.py
+++ b/tempest/openstack/common/fixture/config.py
@@ -1,4 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
 #
 # Copyright 2013 Mirantis, Inc.
 # Copyright 2013 OpenStack Foundation
@@ -30,7 +29,7 @@
     the specified configuration option group.
 
     All overrides are automatically cleared at the end of the current
-    test by the reset() method, which is registred by addCleanup().
+    test by the reset() method, which is registered by addCleanup().
     """
 
     def __init__(self, conf=cfg.CONF):
diff --git a/tempest/openstack/common/fixture/lockutils.py b/tempest/openstack/common/fixture/lockutils.py
index 21b4a48..5936687 100644
--- a/tempest/openstack/common/fixture/lockutils.py
+++ b/tempest/openstack/common/fixture/lockutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
@@ -17,7 +15,7 @@
 
 import fixtures
 
-from tempest.openstack.common.lockutils import lock
+from tempest.openstack.common import lockutils
 
 
 class LockFixture(fixtures.Fixture):
@@ -45,7 +43,7 @@
     test method exits. (either by completing or raising an exception)
     """
     def __init__(self, name, lock_file_prefix=None):
-        self.mgr = lock(name, lock_file_prefix, True)
+        self.mgr = lockutils.lock(name, lock_file_prefix, True)
 
     def setUp(self):
         super(LockFixture, self).setUp()
diff --git a/tempest/openstack/common/fixture/mockpatch.py b/tempest/openstack/common/fixture/mockpatch.py
index cd0d6ca..858e77c 100644
--- a/tempest/openstack/common/fixture/mockpatch.py
+++ b/tempest/openstack/common/fixture/mockpatch.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2010 United States Government as represented by the
 # Administrator of the National Aeronautics and Space Administration.
 # Copyright 2013 Hewlett-Packard Development Company, L.P.
diff --git a/tempest/openstack/common/fixture/moxstubout.py b/tempest/openstack/common/fixture/moxstubout.py
index a0e74fd..e8c031f 100644
--- a/tempest/openstack/common/fixture/moxstubout.py
+++ b/tempest/openstack/common/fixture/moxstubout.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2010 United States Government as represented by the
 # Administrator of the National Aeronautics and Space Administration.
 # Copyright 2013 Hewlett-Packard Development Company, L.P.
diff --git a/tempest/openstack/common/gettextutils.py b/tempest/openstack/common/gettextutils.py
index 2939ed9..825c2e0 100644
--- a/tempest/openstack/common/gettextutils.py
+++ b/tempest/openstack/common/gettextutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2012 Red Hat, Inc.
 # Copyright 2013 IBM Corp.
 # All Rights Reserved.
@@ -317,7 +315,7 @@
     # NOTE(luisg): Babel <1.0 used a function called list(), which was
     # renamed to locale_identifiers() in >=1.0, the requirements master list
     # requires >=0.9.6, uncapped, so defensively work with both. We can remove
-    # this check when the master list updates to >=1.0, and all projects udpate
+    # this check when the master list updates to >=1.0, and update all projects
     list_identifiers = (getattr(localedata, 'list', None) or
                         getattr(localedata, 'locale_identifiers'))
     locale_identifiers = list_identifiers()
diff --git a/tempest/openstack/common/importutils.py b/tempest/openstack/common/importutils.py
index 7a303f9..4fd9ae2 100644
--- a/tempest/openstack/common/importutils.py
+++ b/tempest/openstack/common/importutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
diff --git a/tempest/openstack/common/jsonutils.py b/tempest/openstack/common/jsonutils.py
index b589545..53c0ad4 100644
--- a/tempest/openstack/common/jsonutils.py
+++ b/tempest/openstack/common/jsonutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2010 United States Government as represented by the
 # Administrator of the National Aeronautics and Space Administration.
 # Copyright 2011 Justin Santa Barbara
@@ -41,8 +39,12 @@
 try:
     import xmlrpclib
 except ImportError:
-    # NOTE(jd): xmlrpclib is not shipped with Python 3
-    xmlrpclib = None
+    # NOTE(jaypipes): xmlrpclib was renamed to xmlrpc.client in Python3
+    #                 however the function and object call signatures
+    #                 remained the same. This whole try/except block should
+    #                 be removed and replaced with a call to six.moves once
+    #                 six 1.4.2 is released. See http://bit.ly/1bqrVzu
+    import xmlrpc.client as xmlrpclib
 
 import six
 
@@ -124,14 +126,14 @@
                                       level=level,
                                       max_depth=max_depth)
         if isinstance(value, dict):
-            return dict((k, recursive(v)) for k, v in value.iteritems())
+            return dict((k, recursive(v)) for k, v in six.iteritems(value))
         elif isinstance(value, (list, tuple)):
             return [recursive(lv) for lv in value]
 
         # It's not clear why xmlrpclib created their own DateTime type, but
         # for our purposes, make it a datetime type which is explicitly
         # handled
-        if xmlrpclib and isinstance(value, xmlrpclib.DateTime):
+        if isinstance(value, xmlrpclib.DateTime):
             value = datetime.datetime(*tuple(value.timetuple())[:6])
 
         if convert_datetime and isinstance(value, datetime.datetime):
diff --git a/tempest/openstack/common/local.py b/tempest/openstack/common/local.py
index e82f17d..0819d5b 100644
--- a/tempest/openstack/common/local.py
+++ b/tempest/openstack/common/local.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
diff --git a/tempest/openstack/common/lockutils.py b/tempest/openstack/common/lockutils.py
index 65f3548..53cada1 100644
--- a/tempest/openstack/common/lockutils.py
+++ b/tempest/openstack/common/lockutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
@@ -31,7 +29,7 @@
 from oslo.config import cfg
 
 from tempest.openstack.common import fileutils
-from tempest.openstack.common.gettextutils import _  # noqa
+from tempest.openstack.common.gettextutils import _
 from tempest.openstack.common import local
 from tempest.openstack.common import log as logging
 
@@ -148,16 +146,16 @@
     True, in which case, it'll yield an InterProcessLock instance.
 
     :param lock_file_prefix: The lock_file_prefix argument is used to provide
-    lock files on disk with a meaningful prefix.
+      lock files on disk with a meaningful prefix.
 
     :param external: The external keyword argument denotes whether this lock
-    should work across multiple processes. This means that if two different
-    workers both run a a method decorated with @synchronized('mylock',
-    external=True), only one of them will execute at a time.
+      should work across multiple processes. This means that if two different
+      workers both run a a method decorated with @synchronized('mylock',
+      external=True), only one of them will execute at a time.
 
     :param lock_path: The lock_path keyword argument is used to specify a
-    special location for external lock files to live. If nothing is set, then
-    CONF.lock_path is used as a default.
+      special location for external lock files to live. If nothing is set, then
+      CONF.lock_path is used as a default.
     """
     with _semaphores_lock:
         try:
diff --git a/tempest/openstack/common/log.py b/tempest/openstack/common/log.py
index abb44ef..7bebfdb 100644
--- a/tempest/openstack/common/log.py
+++ b/tempest/openstack/common/log.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # Copyright 2010 United States Government as represented by the
 # Administrator of the National Aeronautics and Space Administration.
@@ -35,6 +33,7 @@
 import logging.config
 import logging.handlers
 import os
+import re
 import sys
 import traceback
 
@@ -42,7 +41,7 @@
 import six
 from six import moves
 
-from tempest.openstack.common.gettextutils import _  # noqa
+from tempest.openstack.common.gettextutils import _
 from tempest.openstack.common import importutils
 from tempest.openstack.common import jsonutils
 from tempest.openstack.common import local
@@ -50,6 +49,24 @@
 
 _DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
 
+_SANITIZE_KEYS = ['adminPass', 'admin_pass', 'password', 'admin_password']
+
+# NOTE(ldbragst): Let's build a list of regex objects using the list of
+# _SANITIZE_KEYS we already have. This way, we only have to add the new key
+# to the list of _SANITIZE_KEYS and we can generate regular expressions
+# for XML and JSON automatically.
+_SANITIZE_PATTERNS = []
+_FORMAT_PATTERNS = [r'(%(key)s\s*[=]\s*[\"\']).*?([\"\'])',
+                    r'(<%(key)s>).*?(</%(key)s>)',
+                    r'([\"\']%(key)s[\"\']\s*:\s*[\"\']).*?([\"\'])',
+                    r'([\'"].*?%(key)s[\'"]\s*:\s*u?[\'"]).*?([\'"])']
+
+for key in _SANITIZE_KEYS:
+    for pattern in _FORMAT_PATTERNS:
+        reg_ex = re.compile(pattern % {'key': key}, re.DOTALL)
+        _SANITIZE_PATTERNS.append(reg_ex)
+
+
 common_cli_opts = [
     cfg.BoolOpt('debug',
                 short='d',
@@ -64,11 +81,13 @@
 ]
 
 logging_cli_opts = [
-    cfg.StrOpt('log-config',
+    cfg.StrOpt('log-config-append',
                metavar='PATH',
-               help='If this option is specified, the logging configuration '
-                    'file specified is used and overrides any other logging '
-                    'options specified. Please see the Python logging module '
+               deprecated_name='log-config',
+               help='The name of logging configuration file. It does not '
+                    'disable existing loggers, but just appends specified '
+                    'logging configuration to any other existing logging '
+                    'options. Please see the Python logging module '
                     'documentation for details on logging configuration '
                     'files.'),
     cfg.StrOpt('log-format',
@@ -111,7 +130,7 @@
 log_opts = [
     cfg.StrOpt('logging_context_format_string',
                default='%(asctime)s.%(msecs)03d %(process)d %(levelname)s '
-                       '%(name)s [%(request_id)s %(user)s %(tenant)s] '
+                       '%(name)s [%(request_id)s %(user_identity)s] '
                        '%(instance)s%(message)s',
                help='format string to use for log messages with context'),
     cfg.StrOpt('logging_default_format_string',
@@ -127,12 +146,13 @@
                help='prefix each line of exception output with this format'),
     cfg.ListOpt('default_log_levels',
                 default=[
+                    'amqp=WARN',
                     'amqplib=WARN',
-                    'sqlalchemy=WARN',
                     'boto=WARN',
+                    'qpid=WARN',
+                    'sqlalchemy=WARN',
                     'suds=INFO',
-                    'keystone=INFO',
-                    'paramiko=INFO'
+                    'iso8601=WARN',
                 ],
                 help='list of logger=LEVEL pairs'),
     cfg.BoolOpt('publish_errors',
@@ -211,6 +231,40 @@
     return None
 
 
+def mask_password(message, secret="***"):
+    """Replace password with 'secret' in message.
+
+    :param message: The string which includes security information.
+    :param secret: value with which to replace passwords.
+    :returns: The unicode value of message with the password fields masked.
+
+    For example:
+
+    >>> mask_password("'adminPass' : 'aaaaa'")
+    "'adminPass' : '***'"
+    >>> mask_password("'admin_pass' : 'aaaaa'")
+    "'admin_pass' : '***'"
+    >>> mask_password('"password" : "aaaaa"')
+    '"password" : "***"'
+    >>> mask_password("'original_password' : 'aaaaa'")
+    "'original_password' : '***'"
+    >>> mask_password("u'original_password' :   u'aaaaa'")
+    "u'original_password' :   u'***'"
+    """
+    message = six.text_type(message)
+
+    # NOTE(ldbragst): Check to see if anything in message contains any key
+    # specified in _SANITIZE_KEYS, if not then just return the message since
+    # we don't have to mask any passwords.
+    if not any(key in message for key in _SANITIZE_KEYS):
+        return message
+
+    secret = r'\g<1>' + secret + r'\g<2>'
+    for pattern in _SANITIZE_PATTERNS:
+        message = re.sub(pattern, secret, message)
+    return message
+
+
 class BaseLoggerAdapter(logging.LoggerAdapter):
 
     def audit(self, msg, *args, **kwargs):
@@ -278,10 +332,12 @@
         elif instance_uuid:
             instance_extra = (CONF.instance_uuid_format
                               % {'uuid': instance_uuid})
-        extra.update({'instance': instance_extra})
+        extra['instance'] = instance_extra
 
-        extra.update({"project": self.project})
-        extra.update({"version": self.version})
+        extra.setdefault('user_identity', kwargs.pop('user_identity', None))
+
+        extra['project'] = self.project
+        extra['version'] = self.version
         extra['extra'] = extra.copy()
         return msg, kwargs
 
@@ -295,7 +351,7 @@
     def formatException(self, ei, strip_newlines=True):
         lines = traceback.format_exception(*ei)
         if strip_newlines:
-            lines = [itertools.ifilter(
+            lines = [moves.filter(
                 lambda x: x,
                 line.rstrip().splitlines()) for line in lines]
             lines = list(itertools.chain(*lines))
@@ -333,10 +389,10 @@
 
 
 def _create_logging_excepthook(product_name):
-    def logging_excepthook(type, value, tb):
+    def logging_excepthook(exc_type, value, tb):
         extra = {}
         if CONF.verbose:
-            extra['exc_info'] = (type, value, tb)
+            extra['exc_info'] = (exc_type, value, tb)
         getLogger(product_name).critical(str(value), **extra)
     return logging_excepthook
 
@@ -354,17 +410,18 @@
                                    err_msg=self.err_msg)
 
 
-def _load_log_config(log_config):
+def _load_log_config(log_config_append):
     try:
-        logging.config.fileConfig(log_config)
+        logging.config.fileConfig(log_config_append,
+                                  disable_existing_loggers=False)
     except moves.configparser.Error as exc:
-        raise LogConfigError(log_config, str(exc))
+        raise LogConfigError(log_config_append, str(exc))
 
 
 def setup(product_name):
     """Setup logging."""
-    if CONF.log_config:
-        _load_log_config(CONF.log_config)
+    if CONF.log_config_append:
+        _load_log_config(CONF.log_config_append)
     else:
         _setup_logging_from_conf()
     sys.excepthook = _create_logging_excepthook(product_name)
@@ -420,7 +477,7 @@
         streamlog = ColorHandler()
         log_root.addHandler(streamlog)
 
-    elif not CONF.log_file:
+    elif not logpath:
         # pass sys.stdout as a positional argument
         # python2.6 calls the argument strm, in 2.7 it's stream
         streamlog = logging.StreamHandler(sys.stdout)
diff --git a/tempest/openstack/common/timeutils.py b/tempest/openstack/common/timeutils.py
index 98d877d..d5ed81d 100644
--- a/tempest/openstack/common/timeutils.py
+++ b/tempest/openstack/common/timeutils.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2011 OpenStack Foundation.
 # All Rights Reserved.
 #
@@ -50,9 +48,9 @@
     try:
         return iso8601.parse_date(timestr)
     except iso8601.ParseError as e:
-        raise ValueError(unicode(e))
+        raise ValueError(six.text_type(e))
     except TypeError as e:
-        raise ValueError(unicode(e))
+        raise ValueError(six.text_type(e))
 
 
 def strtime(at=None, fmt=PERFECT_TIME_FORMAT):
@@ -79,6 +77,9 @@
     """Return True if before is older than seconds."""
     if isinstance(before, six.string_types):
         before = parse_strtime(before).replace(tzinfo=None)
+    else:
+        before = before.replace(tzinfo=None)
+
     return utcnow() - before > datetime.timedelta(seconds=seconds)
 
 
@@ -86,6 +87,9 @@
     """Return True if after is newer than seconds."""
     if isinstance(after, six.string_types):
         after = parse_strtime(after).replace(tzinfo=None)
+    else:
+        after = after.replace(tzinfo=None)
+
     return after - utcnow() > datetime.timedelta(seconds=seconds)
 
 
@@ -178,6 +182,15 @@
     datetime objects (as a float, to microsecond resolution).
     """
     delta = after - before
+    return total_seconds(delta)
+
+
+def total_seconds(delta):
+    """Return the total seconds of datetime.timedelta object.
+
+    Compute total seconds of datetime.timedelta, datetime.timedelta
+    doesn't have method total_seconds in Python2.6, calculate it manually.
+    """
     try:
         return delta.total_seconds()
     except AttributeError:
@@ -188,8 +201,8 @@
 def is_soon(dt, window):
     """Determines if time is going to happen in the next window seconds.
 
-    :params dt: the time
-    :params window: minimum seconds to remain to consider the time not soon
+    :param dt: the time
+    :param window: minimum seconds to remain to consider the time not soon
 
     :return: True if expiration is within the given duration
     """
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index 33dd6c0..52a36e6 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -213,6 +213,11 @@
             name = data_utils.rand_name('server-smoke-%d-' % i)
             self._create_server(name, network)
 
+    def _log_console_output(self):
+        for server, key in self.servers.items():
+            LOG.debug('Console output for %s', server.id)
+            LOG.debug(server.get_console_output())
+
     def _check_tenant_network_connectivity(self):
         if not CONF.network.tenant_networks_reachable:
             msg = 'Tenant networks not configured to be reachable.'
@@ -227,10 +232,11 @@
                     for ip_address in ip_addresses:
                         self._check_vm_connectivity(ip_address, ssh_login,
                                                     key.private_key)
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('Tenant connectivity check failed')
+            self._log_console_output()
             debug.log_ip_ns()
-            raise exc
+            raise
 
     def _wait_for_floating_ip_association(self):
         ip_tracker = FloatingIPCheckTracker(self.compute_client,
@@ -253,6 +259,7 @@
         # The target login is assumed to have been configured for
         # key-based authentication by cloud-init.
         ssh_login = CONF.compute.image_ssh_user
+        LOG.debug('checking network connections')
         try:
             for floating_ip, server in self.floating_ips.iteritems():
                 ip_address = floating_ip.floating_ip_address
@@ -263,10 +270,11 @@
                                             ssh_login,
                                             private_key,
                                             should_connect=should_connect)
-        except Exception as exc:
-            LOG.exception(exc)
+        except Exception:
+            LOG.exception('Public network connectivity check failed')
+            self._log_console_output()
             debug.log_ip_ns()
-            raise exc
+            raise
 
     def _disassociate_floating_ips(self):
         for floating_ip, server in self.floating_ips.iteritems():
diff --git a/tempest/scenario/test_server_basic_ops.py b/tempest/scenario/test_server_basic_ops.py
index 1e1a310..ca3035d 100644
--- a/tempest/scenario/test_server_basic_ops.py
+++ b/tempest/scenario/test_server_basic_ops.py
@@ -16,12 +16,21 @@
 #    under the License.
 
 from tempest.common.utils import data_utils
+from tempest.common.utils import test_utils
 from tempest.openstack.common import log as logging
 from tempest.scenario import manager
 from tempest.test import services
 
+import testscenarios
+
 LOG = logging.getLogger(__name__)
 
+# NOTE(andreaf) - nose does not honour the load_tests protocol
+# however it's test discovery regex will match anything
+# which includes _tests. So nose would require some further
+# investigation to be supported with this
+load_tests = testscenarios.load_tests_apply_scenarios
+
 
 class TestServerBasicOps(manager.OfficialClientTest):
 
@@ -37,6 +46,37 @@
      * Terminate the instance
     """
 
+    scenario_utils = test_utils.InputScenarioUtils()
+    scenario_flavor = scenario_utils.scenario_flavors
+    scenario_image = scenario_utils.scenario_images
+
+    scenarios = testscenarios.multiply_scenarios(scenario_image,
+                                                 scenario_flavor)
+
+    def setUp(self):
+        super(TestServerBasicOps, self).setUp()
+        # Setup image and flavor the test instance
+        # Support both configured and injected values
+        if not hasattr(self, 'image_ref'):
+            self.image_ref = self.config.compute.image_ref
+        if not hasattr(self, 'flavor_ref'):
+            self.flavor_ref = self.config.compute.flavor_ref
+        self.image_utils = test_utils.ImageUtils()
+        if not self.image_utils.is_flavor_enough(self.flavor_ref,
+                                                 self.image_ref):
+            raise self.skipException(
+                '{image} does not fit in {flavor}'.format(
+                    image=self.image_ref, flavor=self.flavor_ref
+                )
+            )
+        self.run_ssh = self.config.compute.run_ssh and \
+            self.image_utils.is_sshable_image(self.image_ref)
+        self.ssh_user = self.image_utils.ssh_user(self.image_ref)
+        LOG.debug('Starting test for i:{image}, f:{flavor}. '
+                  'Run ssh: {ssh}, user: {ssh_user}'.format(
+                      image=self.image_ref, flavor=self.flavor_ref,
+                      ssh=self.run_ssh, ssh_user=self.ssh_user))
+
     def add_keypair(self):
         self.keypair = self.create_keypair()
 
@@ -53,10 +93,13 @@
         self._create_loginable_secgroup_rule_nova(secgroup_id=self.secgroup.id)
 
     def boot_instance(self):
+        # Create server with image and flavor from input scenario
         create_kwargs = {
             'key_name': self.keypair.id
         }
-        instance = self.create_server(create_kwargs=create_kwargs)
+        instance = self.create_server(image=self.image_ref,
+                                      flavor=self.flavor_ref,
+                                      create_kwargs=create_kwargs)
         self.set_resource('instance', instance)
 
     def pause_server(self):
@@ -100,6 +143,19 @@
         instance.delete()
         self.remove_resource('instance')
 
+    def verify_ssh(self):
+        if self.run_ssh:
+            # Obtain a floating IP
+            floating_ip = self.compute_client.floating_ips.create()
+            # Attach a floating IP
+            instance = self.get_resource('instance')
+            instance.add_floating_ip(floating_ip)
+            # Check ssh
+            self.get_remote_client(
+                server_or_ip=floating_ip.ip,
+                username=self.image_utils.ssh_user(self.image_ref),
+                private_key=self.keypair.private)
+
     @services('compute', 'network')
     def test_server_basicops(self):
         self.add_keypair()
@@ -109,4 +165,5 @@
         self.unpause_server()
         self.suspend_server()
         self.resume_server()
+        self.verify_ssh()
         self.terminate_instance()
diff --git a/tempest/services/baremetal/__init__.py b/tempest/services/baremetal/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/baremetal/__init__.py
diff --git a/tempest/services/baremetal/base.py b/tempest/services/baremetal/base.py
new file mode 100644
index 0000000..3d4fa50
--- /dev/null
+++ b/tempest/services/baremetal/base.py
@@ -0,0 +1,197 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import functools
+import json
+
+import six
+
+from tempest.common import rest_client
+
+
+def handle_errors(f):
+    """A decorator that allows to ignore certain types of errors."""
+
+    @functools.wraps(f)
+    def wrapper(*args, **kwargs):
+        param_name = 'ignore_errors'
+        ignored_errors = kwargs.get(param_name, tuple())
+
+        if param_name in kwargs:
+            del kwargs[param_name]
+
+        try:
+            return f(*args, **kwargs)
+        except ignored_errors:
+            # Silently ignore errors
+            pass
+
+    return wrapper
+
+
+class BaremetalClient(rest_client.RestClient):
+    """
+    Base Tempest REST client for Ironic API.
+
+    """
+
+    def __init__(self, config, username, password, auth_url, tenant_name=None):
+        super(BaremetalClient, self).__init__(config, username, password,
+                                              auth_url, tenant_name)
+        self.service = self.config.baremetal.catalog_type
+        self.uri_prefix = ''
+
+    def serialize(self, object_type, object_dict):
+        """Serialize an Ironic object."""
+
+        raise NotImplementedError
+
+    def deserialize(self, object_str):
+        """Deserialize an Ironic object."""
+
+        raise NotImplementedError
+
+    def _get_uri(self, resource_name, uuid=None, permanent=False):
+        """
+        Get URI for a specific resource or object.
+
+        :param resource_name: The name of the REST resource, e.g., 'nodes'.
+        :param uuid: The unique identifier of an object in UUID format.
+        :return: Relative URI for the resource or object.
+
+        """
+        prefix = self.uri_prefix if not permanent else ''
+
+        return '{pref}/{res}{uuid}'.format(pref=prefix,
+                                           res=resource_name,
+                                           uuid='/%s' % uuid if uuid else '')
+
+    def _make_patch(self, allowed_attributes, **kw):
+        """
+        Create a JSON patch according to RFC 6902.
+
+        :param allowed_attributes: An iterable object that contains a set of
+            allowed attributes for an object.
+        :param **kw: Attributes and new values for them.
+        :return: A JSON path that sets values of the specified attributes to
+            the new ones.
+
+        """
+        def get_change(kw, path='/'):
+            for name, value in six.iteritems(kw):
+                if isinstance(value, dict):
+                    for ch in get_change(value, path + '%s/' % name):
+                        yield ch
+                else:
+                    yield {'path': path + name,
+                           'value': value,
+                           'op': 'replace'}
+
+        patch = [ch for ch in get_change(kw)
+                 if ch['path'].lstrip('/') in allowed_attributes]
+
+        return patch
+
+    def _list_request(self, resource, permanent=False):
+        """
+        Get the list of objects of the specified type.
+
+        :param resource: The name of the REST resource, e.g., 'nodes'.
+        :return: A tuple with the server response and deserialized JSON list
+                 of objects
+
+        """
+        uri = self._get_uri(resource, permanent=permanent)
+
+        resp, body = self.get(uri, self.headers)
+
+        return resp, self.deserialize(body)
+
+    def _show_request(self, resource, uuid, permanent=False):
+        """
+        Gets a specific object of the specified type.
+
+        :param uuid: Unique identifier of the object in UUID format.
+        :return: Serialized object as a dictionary.
+
+        """
+        uri = self._get_uri(resource, uuid=uuid, permanent=permanent)
+        resp, body = self.get(uri, self.headers)
+
+        return resp, self.deserialize(body)
+
+    def _create_request(self, resource, object_type, object_dict):
+        """
+        Create an object of the specified type.
+
+        :param resource: The name of the REST resource, e.g., 'nodes'.
+        :param object_dict: A Python dict that represents an object of the
+                            specified type.
+        :return: A tuple with the server response and the deserialized created
+                 object.
+
+        """
+        body = self.serialize(object_type, object_dict)
+        uri = self._get_uri(resource)
+
+        resp, body = self.post(uri, headers=self.headers, body=body)
+
+        return resp, self.deserialize(body)
+
+    def _delete_request(self, resource, uuid):
+        """
+        Delete specified object.
+
+        :param resource: The name of the REST resource, e.g., 'nodes'.
+        :param uuid: The unique identifier of an object in UUID format.
+        :return: A tuple with the server response and the response body.
+
+        """
+        uri = self._get_uri(resource, uuid)
+
+        resp, body = self.delete(uri, self.headers)
+        return resp, body
+
+    def _patch_request(self, resource, uuid, patch_object):
+        """
+        Update specified object with JSON-patch.
+
+        :param resource: The name of the REST resource, e.g., 'nodes'.
+        :param uuid: The unique identifier of an object in UUID format.
+        :return: A tuple with the server response and the serialized patched
+                 object.
+
+        """
+        uri = self._get_uri(resource, uuid)
+        patch_body = json.dumps(patch_object)
+
+        resp, body = self.patch(uri, headers=self.headers, body=patch_body)
+        return resp, self.deserialize(body)
+
+    @handle_errors
+    def get_api_description(self):
+        """Retrieves all versions of the Ironic API."""
+
+        return self._list_request('', permanent=True)
+
+    @handle_errors
+    def get_version_description(self, version='v1'):
+        """
+        Retrieves the desctription of the API.
+
+        :param version: The version of the API. Default: 'v1'.
+        :return: Serialized description of API resources.
+
+        """
+        return self._list_request(version, permanent=True)
diff --git a/tempest/services/baremetal/v1/__init__.py b/tempest/services/baremetal/v1/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest/services/baremetal/v1/__init__.py
diff --git a/tempest/services/baremetal/v1/base_v1.py b/tempest/services/baremetal/v1/base_v1.py
new file mode 100644
index 0000000..5fdf036
--- /dev/null
+++ b/tempest/services/baremetal/v1/base_v1.py
@@ -0,0 +1,209 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.services.baremetal import base
+
+
+class BaremetalClientV1(base.BaremetalClient):
+    """
+    Base Tempest REST client for Ironic API v1.
+
+    Specific implementations must implement serialize and deserialize
+    methods in order to send requests to Ironic.
+
+    """
+    def __init__(self, config, username, password, auth_url, tenant_name=None):
+        super(BaremetalClientV1, self).__init__(config, username, password,
+                                                auth_url, tenant_name)
+        self.version = '1'
+        self.uri_prefix = 'v%s' % self.version
+
+    @base.handle_errors
+    def list_nodes(self):
+        """List all existing nodes."""
+        return self._list_request('nodes')
+
+    @base.handle_errors
+    def list_chassis(self):
+        """List all existing chassis."""
+        return self._list_request('chassis')
+
+    @base.handle_errors
+    def list_ports(self):
+        """List all existing ports."""
+        return self._list_request('ports')
+
+    @base.handle_errors
+    def show_node(self, uuid):
+        """
+        Gets a specific node.
+
+        :param uuid: Unique identifier of the node in UUID format.
+        :return: Serialized node as a dictionary.
+
+        """
+        return self._show_request('nodes', uuid)
+
+    @base.handle_errors
+    def show_chassis(self, uuid):
+        """
+        Gets a specific chassis.
+
+        :param uuid: Unique identifier of the chassis in UUID format.
+        :return: Serialized chassis as a dictionary.
+
+        """
+        return self._show_request('chassis', uuid)
+
+    @base.handle_errors
+    def show_port(self, uuid):
+        """
+        Gets a specific port.
+
+        :param uuid: Unique identifier of the port in UUID format.
+        :return: Serialized port as a dictionary.
+
+        """
+        return self._show_request('ports', uuid)
+
+    @base.handle_errors
+    def create_node(self, chassis_id, **kwargs):
+        """
+        Create a baremetal node with the specified parameters.
+
+        :param cpu_arch: CPU architecture of the node. Default: x86_64.
+        :param cpu_num: Number of CPUs. Default: 8.
+        :param storage: Disk size. Default: 1024.
+        :param memory: Available RAM. Default: 4096.
+        :param driver: Driver name. Default: "fake"
+        :return: A tuple with the server response and the created node.
+
+        """
+        node = {'chassis_uuid': chassis_id,
+                'properties': {'cpu_arch': kwargs.get('cpu_arch', 'x86_64'),
+                               'cpu_num': kwargs.get('cpu_num', 8),
+                               'storage': kwargs.get('storage', 1024),
+                               'memory': kwargs.get('memory', 4096)},
+                'driver': kwargs.get('driver', 'fake')}
+
+        return self._create_request('nodes', 'node', node)
+
+    @base.handle_errors
+    def create_chassis(self, **kwargs):
+        """
+        Create a chassis with the specified parameters.
+
+        :param description: The description of the chassis.
+            Default: test-chassis
+        :return: A tuple with the server response and the created chassis.
+
+        """
+        chassis = {'description': kwargs.get('description', 'test-chassis')}
+
+        return self._create_request('chassis', 'chassis', chassis)
+
+    @base.handle_errors
+    def create_port(self, node_id, **kwargs):
+        """
+        Create a port with the specified parameters.
+
+        :param node_id: The ID of the node which owns the port.
+        :param address: MAC address of the port. Default: 01:23:45:67:89:0A.
+        :return: A tuple with the server response and the created port.
+
+        """
+        port = {'address': kwargs.get('address', '01:23:45:67:89:0A'),
+                'node_uuid': node_id}
+
+        return self._create_request('ports', 'port', port)
+
+    @base.handle_errors
+    def delete_node(self, uuid):
+        """
+        Deletes a node having the specified UUID.
+
+        :param uuid: The unique identifier of the node.
+        :return: A tuple with the server response and the response body.
+
+        """
+        return self._delete_request('nodes', uuid)
+
+    @base.handle_errors
+    def delete_chassis(self, uuid):
+        """
+        Deletes a chassis having the specified UUID.
+
+        :param uuid: The unique identifier of the chassis.
+        :return: A tuple with the server response and the response body.
+
+        """
+        return self._delete_request('chassis', uuid)
+
+    @base.handle_errors
+    def delete_port(self, uuid):
+        """
+        Deletes a port having the specified UUID.
+
+        :param uuid: The unique identifier of the port.
+        :return: A tuple with the server response and the response body.
+
+        """
+        return self._delete_request('ports', uuid)
+
+    @base.handle_errors
+    def update_node(self, uuid, **kwargs):
+        """
+        Update the specified node.
+
+        :param uuid: The unique identifier of the node.
+        :return: A tuple with the server response and the updated node.
+
+        """
+        node_attributes = ('properties/cpu_arch',
+                           'properties/cpu_num',
+                           'properties/storage',
+                           'properties/memory',
+                           'driver')
+
+        patch = self._make_patch(node_attributes, **kwargs)
+
+        return self._patch_request('nodes', uuid, patch)
+
+    @base.handle_errors
+    def update_chassis(self, uuid, **kwargs):
+        """
+        Update the specified chassis.
+
+        :param uuid: The unique identifier of the chassis.
+        :return: A tuple with the server response and the updated chassis.
+
+        """
+        chassis_attributes = ('description',)
+        patch = self._make_patch(chassis_attributes, **kwargs)
+
+        return self._patch_request('chassis', uuid, patch)
+
+    @base.handle_errors
+    def update_port(self, uuid, **kwargs):
+        """
+        Update the specified port.
+
+        :param uuid: The unique identifier of the port.
+        :return: A tuple with the server response and the updated port.
+
+        """
+        port_attributes = ('address',)
+        patch = self._make_patch(port_attributes, **kwargs)
+
+        return self._patch_request('ports', uuid, patch)
diff --git a/tempest/services/baremetal/v1/client_json.py b/tempest/services/baremetal/v1/client_json.py
new file mode 100644
index 0000000..fa7cd67
--- /dev/null
+++ b/tempest/services/baremetal/v1/client_json.py
@@ -0,0 +1,28 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+import json
+
+from tempest.services.baremetal.v1 import base_v1
+
+
+class BaremetalClientJSON(base_v1.BaremetalClientV1):
+    """Tempest REST client for Ironic JSON API v1."""
+
+    def __init__(self, config, username, password, auth_url, tenant_name=None):
+        super(BaremetalClientJSON, self).__init__(config, username, password,
+                                                  auth_url, tenant_name)
+
+        self.serialize = lambda obj_type, obj_body: json.dumps(obj_body)
+        self.deserialize = json.loads
diff --git a/tempest/services/baremetal/v1/client_xml.py b/tempest/services/baremetal/v1/client_xml.py
new file mode 100644
index 0000000..a9b5a77
--- /dev/null
+++ b/tempest/services/baremetal/v1/client_xml.py
@@ -0,0 +1,57 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+#    Licensed under the Apache License, Version 2.0 (the "License"); you may
+#    not use this file except in compliance with the License. You may obtain
+#    a copy of the License at
+#
+#         http://www.apache.org/licenses/LICENSE-2.0
+#
+#    Unless required by applicable law or agreed to in writing, software
+#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+#    License for the specific language governing permissions and limitations
+#    under the License.
+
+from tempest.common import rest_client
+from tempest.services.baremetal.v1 import base_v1 as base
+from tempest.services.compute.xml import common as xml
+
+
+class BaremetalClientXML(rest_client.RestClientXML, base.BaremetalClientV1):
+    """Tempest REST client for Ironic XML API v1."""
+
+    def __init__(self, config, username, password, auth_url, tenant_name=None):
+        super(BaremetalClientXML, self).__init__(config, username, password,
+                                                 auth_url, tenant_name)
+
+        self.serialize = self.json_to_xml
+        self.deserialize = xml.xml_to_json
+
+    def json_to_xml(self, object_type, object_dict):
+        """
+        Brainlessly converts a specification of an object to XML string.
+
+        :param object_type: Kind of the object.
+        :param object_dict: Specification of the object attributes as a dict.
+        :return: An XML string that corresponds to the specification.
+
+        """
+        root = xml.Element(object_type)
+
+        for attr_name, value in object_dict:
+            # Handle nested dictionaries
+            if isinstance(value, dict):
+                value = self.json_to_xml(attr_name, value)
+
+            root.append(xml.Element(attr_name, value))
+
+        return str(xml.Document(root))
+
+    def _patch_request(self, resource_name, uuid, patch_object):
+        """Changes Content-Type header to application/json for jsonpatch."""
+
+        self.headers['Content-Type'] = 'application/json'
+        try:
+            super(self)._patch_request(self, resource_name, uuid, patch_object)
+        finally:
+            self.headers['Content-Type'] = 'application/xml'
diff --git a/tempest/services/compute/json/security_groups_client.py b/tempest/services/compute/json/security_groups_client.py
index 1f01437..361ec36 100644
--- a/tempest/services/compute/json/security_groups_client.py
+++ b/tempest/services/compute/json/security_groups_client.py
@@ -63,6 +63,25 @@
         body = json.loads(body)
         return resp, body['security_group']
 
+    def update_security_group(self, security_group_id, name=None,
+                              description=None):
+        """
+        Update a security group.
+        security_group_id: a security_group to update
+        name: new name of security group
+        description: new description of security group
+        """
+        post_body = {}
+        if name:
+            post_body['name'] = name
+        if description:
+            post_body['description'] = description
+        post_body = json.dumps({'security_group': post_body})
+        resp, body = self.put('os-security-groups/%s' % str(security_group_id),
+                              post_body, self.headers)
+        body = json.loads(body)
+        return resp, body['security_group']
+
     def delete_security_group(self, security_group_id):
         """Deletes the provided Security Group."""
         return self.delete('os-security-groups/%s' % str(security_group_id))
diff --git a/tempest/services/compute/xml/common.py b/tempest/services/compute/xml/common.py
index d2a18a1..76ad1aa 100644
--- a/tempest/services/compute/xml/common.py
+++ b/tempest/services/compute/xml/common.py
@@ -124,9 +124,9 @@
         if tag.startswith("{"):
             ns, tag = tag.split("}", 1)
         if plurals is not None and tag in plurals:
-                json[tag] = parse_array(child)
+                json[tag] = parse_array(child, plurals)
         else:
-            json[tag] = xml_to_json(child)
+            json[tag] = xml_to_json(child, plurals)
     return json
 
 
diff --git a/tempest/services/compute/xml/security_groups_client.py b/tempest/services/compute/xml/security_groups_client.py
index 5d86790..aebeb4d 100644
--- a/tempest/services/compute/xml/security_groups_client.py
+++ b/tempest/services/compute/xml/security_groups_client.py
@@ -79,6 +79,30 @@
         body = self._parse_body(etree.fromstring(body))
         return resp, body
 
+    def update_security_group(self, security_group_id, name=None,
+                              description=None):
+        """
+        Update a security group.
+        security_group_id: a security_group to update
+        name: new name of security group
+        description: new description of security group
+        """
+        security_group = Element("security_group")
+        if name:
+            sg_name = Element("name")
+            sg_name.append(Text(content=name))
+            security_group.append(sg_name)
+        if description:
+            des = Element("description")
+            des.append(Text(content=description))
+            security_group.append(des)
+        resp, body = self.put('os-security-groups/%s' %
+                              str(security_group_id),
+                              str(Document(security_group)),
+                              self.headers)
+        body = self._parse_body(etree.fromstring(body))
+        return resp, body
+
     def delete_security_group(self, security_group_id):
         """Deletes the provided Security Group."""
         return self.delete('os-security-groups/%s' %
diff --git a/tempest/services/object_storage/object_client.py b/tempest/services/object_storage/object_client.py
index 9e0adff..5c86d1f 100644
--- a/tempest/services/object_storage/object_client.py
+++ b/tempest/services/object_storage/object_client.py
@@ -134,14 +134,6 @@
         resp, body = self.put(url, data, self.headers)
         return resp, body
 
-    def get_object_using_temp_url(self, url):
-        """Retrieve object's data using temp URL."""
-        return self.get(url)
-
-    def put_object_using_temp_url(self, url, data):
-        """Put data in an object using temp URL."""
-        return self.put(url, data, None)
-
 
 class ObjectClientCustomizedHeader(RestClient):
 
diff --git a/tempest/services/orchestration/json/orchestration_client.py b/tempest/services/orchestration/json/orchestration_client.py
index e896e0d..d5ae828 100644
--- a/tempest/services/orchestration/json/orchestration_client.py
+++ b/tempest/services/orchestration/json/orchestration_client.py
@@ -102,6 +102,20 @@
         body = json.loads(body)
         return resp, body['stack']
 
+    def suspend_stack(self, stack_identifier):
+        """Suspend a stack."""
+        url = 'stacks/%s/actions' % stack_identifier
+        body = {'suspend': None}
+        resp, body = self.post(url, json.dumps(body), self.headers)
+        return resp, body
+
+    def resume_stack(self, stack_identifier):
+        """Resume a stack."""
+        url = 'stacks/%s/actions' % stack_identifier
+        body = {'resume': None}
+        resp, body = self.post(url, json.dumps(body), self.headers)
+        return resp, body
+
     def list_resources(self, stack_identifier):
         """Returns the details of a single resource."""
         url = "stacks/%s/resources" % stack_identifier
diff --git a/tempest/services/volume/json/snapshots_client.py b/tempest/services/volume/json/snapshots_client.py
index 9435122..c270de8 100644
--- a/tempest/services/volume/json/snapshots_client.py
+++ b/tempest/services/volume/json/snapshots_client.py
@@ -149,3 +149,40 @@
         url = 'snapshots/%s/action' % str(snapshot_id)
         resp, body = self.post(url, post_body, self.headers)
         return resp, body
+
+    def create_snapshot_metadata(self, snapshot_id, metadata):
+        """Create metadata for the snapshot."""
+        put_body = json.dumps({'metadata': metadata})
+        url = "snapshots/%s/metadata" % str(snapshot_id)
+        resp, body = self.post(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def get_snapshot_metadata(self, snapshot_id):
+        """Get metadata of the snapshot."""
+        url = "snapshots/%s/metadata" % str(snapshot_id)
+        resp, body = self.get(url, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def update_snapshot_metadata(self, snapshot_id, metadata):
+        """Update metadata for the snapshot."""
+        put_body = json.dumps({'metadata': metadata})
+        url = "snapshots/%s/metadata" % str(snapshot_id)
+        resp, body = self.put(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def update_snapshot_metadata_item(self, snapshot_id, id, meta_item):
+        """Update metadata item for the snapshot."""
+        put_body = json.dumps({'meta': meta_item})
+        url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
+        resp, body = self.put(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['meta']
+
+    def delete_snapshot_metadata_item(self, snapshot_id, id):
+        """Delete metadata item for the snapshot."""
+        url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
+        resp, body = self.delete(url, self.headers)
+        return resp, body
diff --git a/tempest/services/volume/json/volumes_client.py b/tempest/services/volume/json/volumes_client.py
index 967dc09..afba4b0 100644
--- a/tempest/services/volume/json/volumes_client.py
+++ b/tempest/services/volume/json/volumes_client.py
@@ -263,3 +263,40 @@
         resp, body = self.post('volumes/%s/action' % volume_id, post_body,
                                self.headers)
         return resp, body
+
+    def create_volume_metadata(self, volume_id, metadata):
+        """Create metadata for the volume."""
+        put_body = json.dumps({'metadata': metadata})
+        url = "volumes/%s/metadata" % str(volume_id)
+        resp, body = self.post(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def get_volume_metadata(self, volume_id):
+        """Get metadata of the volume."""
+        url = "volumes/%s/metadata" % str(volume_id)
+        resp, body = self.get(url, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def update_volume_metadata(self, volume_id, metadata):
+        """Update metadata for the volume."""
+        put_body = json.dumps({'metadata': metadata})
+        url = "volumes/%s/metadata" % str(volume_id)
+        resp, body = self.put(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['metadata']
+
+    def update_volume_metadata_item(self, volume_id, id, meta_item):
+        """Update metadata item for the volume."""
+        put_body = json.dumps({'meta': meta_item})
+        url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
+        resp, body = self.put(url, put_body, self.headers)
+        body = json.loads(body)
+        return resp, body['meta']
+
+    def delete_volume_metadata_item(self, volume_id, id):
+        """Delete metadata item for the volume."""
+        url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
+        resp, body = self.delete(url, self.headers)
+        return resp, body
diff --git a/tempest/services/volume/xml/snapshots_client.py b/tempest/services/volume/xml/snapshots_client.py
index 5d59b07..3a70eab 100644
--- a/tempest/services/volume/xml/snapshots_client.py
+++ b/tempest/services/volume/xml/snapshots_client.py
@@ -22,6 +22,7 @@
 from tempest.openstack.common import log as logging
 from tempest.services.compute.xml.common import Document
 from tempest.services.compute.xml.common import Element
+from tempest.services.compute.xml.common import Text
 from tempest.services.compute.xml.common import xml_to_json
 from tempest.services.compute.xml.common import XMLNS_11
 
@@ -170,3 +171,57 @@
         if body:
             body = xml_to_json(etree.fromstring(body))
         return resp, body
+
+    def _metadata_body(self, meta):
+        post_body = Element('metadata')
+        for k, v in meta.items():
+            data = Element('meta', key=k)
+            data.append(Text(v))
+            post_body.append(data)
+        return post_body
+
+    def _parse_key_value(self, node):
+        """Parse <foo key='key'>value</foo> data into {'key': 'value'}."""
+        data = {}
+        for node in node.getchildren():
+            data[node.get('key')] = node.text
+        return data
+
+    def create_snapshot_metadata(self, snapshot_id, metadata):
+        """Create metadata for the snapshot."""
+        post_body = self._metadata_body(metadata)
+        resp, body = self.post('snapshots/%s/metadata' % snapshot_id,
+                               str(Document(post_body)),
+                               self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def get_snapshot_metadata(self, snapshot_id):
+        """Get metadata of the snapshot."""
+        url = "snapshots/%s/metadata" % str(snapshot_id)
+        resp, body = self.get(url, self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def update_snapshot_metadata(self, snapshot_id, metadata):
+        """Update metadata for the snapshot."""
+        put_body = self._metadata_body(metadata)
+        url = "snapshots/%s/metadata" % str(snapshot_id)
+        resp, body = self.put(url, str(Document(put_body)), self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def update_snapshot_metadata_item(self, snapshot_id, id, meta_item):
+        """Update metadata item for the snapshot."""
+        for k, v in meta_item.items():
+            put_body = Element('meta', key=k)
+            put_body.append(Text(v))
+        url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
+        resp, body = self.put(url, str(Document(put_body)), self.headers)
+        body = xml_to_json(etree.fromstring(body))
+        return resp, body
+
+    def delete_snapshot_metadata_item(self, snapshot_id, id):
+        """Delete metadata item for the snapshot."""
+        url = "snapshots/%s/metadata/%s" % (str(snapshot_id), str(id))
+        return self.delete(url)
diff --git a/tempest/services/volume/xml/volumes_client.py b/tempest/services/volume/xml/volumes_client.py
index 1fc63e9..f175138 100644
--- a/tempest/services/volume/xml/volumes_client.py
+++ b/tempest/services/volume/xml/volumes_client.py
@@ -356,3 +356,57 @@
         if body:
             body = xml_to_json(etree.fromstring(body))
         return resp, body
+
+    def _metadata_body(self, meta):
+        post_body = Element('metadata')
+        for k, v in meta.items():
+            data = Element('meta', key=k)
+            data.append(Text(v))
+            post_body.append(data)
+        return post_body
+
+    def _parse_key_value(self, node):
+        """Parse <foo key='key'>value</foo> data into {'key': 'value'}."""
+        data = {}
+        for node in node.getchildren():
+            data[node.get('key')] = node.text
+        return data
+
+    def create_volume_metadata(self, volume_id, metadata):
+        """Create metadata for the volume."""
+        post_body = self._metadata_body(metadata)
+        resp, body = self.post('volumes/%s/metadata' % volume_id,
+                               str(Document(post_body)),
+                               self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def get_volume_metadata(self, volume_id):
+        """Get metadata of the volume."""
+        url = "volumes/%s/metadata" % str(volume_id)
+        resp, body = self.get(url, self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def update_volume_metadata(self, volume_id, metadata):
+        """Update metadata for the volume."""
+        put_body = self._metadata_body(metadata)
+        url = "volumes/%s/metadata" % str(volume_id)
+        resp, body = self.put(url, str(Document(put_body)), self.headers)
+        body = self._parse_key_value(etree.fromstring(body))
+        return resp, body
+
+    def update_volume_metadata_item(self, volume_id, id, meta_item):
+        """Update metadata item for the volume."""
+        for k, v in meta_item.items():
+            put_body = Element('meta', key=k)
+            put_body.append(Text(v))
+        url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
+        resp, body = self.put(url, str(Document(put_body)), self.headers)
+        body = xml_to_json(etree.fromstring(body))
+        return resp, body
+
+    def delete_volume_metadata_item(self, volume_id, id):
+        """Delete metadata item for the volume."""
+        url = "volumes/%s/metadata/%s" % (str(volume_id), str(id))
+        return self.delete(url)
diff --git a/tempest/stress/__init__.py b/tempest/stress/__init__.py
index 1caf74a..e69de29 100644
--- a/tempest/stress/__init__.py
+++ b/tempest/stress/__init__.py
@@ -1,13 +0,0 @@
-# Copyright 2013 Quanta Research Cambridge, Inc.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
diff --git a/tempest/stress/actions/__init__.py b/tempest/stress/actions/__init__.py
index 1caf74a..e69de29 100644
--- a/tempest/stress/actions/__init__.py
+++ b/tempest/stress/actions/__init__.py
@@ -1,13 +0,0 @@
-# Copyright 2013 Quanta Research Cambridge, Inc.
-#
-#    Licensed under the Apache License, Version 2.0 (the "License");
-#    you may not use this file except in compliance with the License.
-#    You may obtain a copy of the License at
-#
-#        http://www.apache.org/licenses/LICENSE-2.0
-#
-#    Unless required by applicable law or agreed to in writing, software
-#    distributed under the License is distributed on an "AS IS" BASIS,
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#    See the License for the specific language governing permissions and
-#    limitations under the License.
diff --git a/tempest/stress/etc/ssh_floating.json b/tempest/stress/etc/ssh_floating.json
index 0cb6776..e03fd4f 100644
--- a/tempest/stress/etc/ssh_floating.json
+++ b/tempest/stress/etc/ssh_floating.json
@@ -8,7 +8,7 @@
              "new_floating": true,
              "verify": ["check_icmp_echo", "check_port_ssh"],
              "check_timeout": 120,
-             "check_inerval": 1,
+             "check_interval": 1,
              "wait_after_vm_create": true,
              "wait_for_disassociate": true,
              "reboot": false}
diff --git a/tempest/test.py b/tempest/test.py
index 342846f..d57ed83 100644
--- a/tempest/test.py
+++ b/tempest/test.py
@@ -163,6 +163,7 @@
         'compute_v3': configs.compute_feature_enabled.api_v3_extensions,
         'volume': configs.volume_feature_enabled.api_extensions,
         'network': configs.network_feature_enabled.api_extensions,
+        'object': configs.object_storage_feature_enabled.discoverable_apis,
     }
     if config_dict[service][0] == 'all':
         return True
diff --git a/tempest/thirdparty/boto/test.py b/tempest/thirdparty/boto/test.py
index 2f7a650..2ce5cce 100644
--- a/tempest/thirdparty/boto/test.py
+++ b/tempest/thirdparty/boto/test.py
@@ -245,20 +245,20 @@
     @classmethod
     def tearDownClass(cls):
         """Calls the callables added by addResourceCleanUp,
-        when you overwire this function dont't forget to call this too.
+        when you overwrite this function don't forget to call this too.
         """
         fail_count = 0
         trash_keys = sorted(cls._resource_trash_bin, reverse=True)
         for key in trash_keys:
             (function, pos_args, kw_args) = cls._resource_trash_bin[key]
             try:
-                LOG.debug("Cleaning up: %s" %
-                          friendly_function_call_str(function, *pos_args,
-                                                     **kw_args))
+                func_name = friendly_function_call_str(function, *pos_args,
+                                                       **kw_args)
+                LOG.debug("Cleaning up: %s" % func_name)
                 function(*pos_args, **kw_args)
-            except BaseException as exc:
+            except BaseException:
                 fail_count += 1
-                LOG.exception(exc)
+                LOG.exception("Cleanup failed %s" % func_name)
             finally:
                 del cls._resource_trash_bin[key]
         super(BotoTestCase, cls).tearDownClass()
@@ -428,12 +428,12 @@
                     try:
                         bucket.delete_key(obj.key)
                         obj.close()
-                    except BaseException as exc:
-                        LOG.exception(exc)
+                    except BaseException:
+                        LOG.exception("Failed to delete key %s " % obj.key)
                         exc_num += 1
             conn.delete_bucket(bucket)
-        except BaseException as exc:
-            LOG.exception(exc)
+        except BaseException:
+            LOG.exception("Failed to destroy bucket %s " % bucket)
             exc_num += 1
         if exc_num:
             raise exceptions.TearDownException(num=exc_num)
@@ -463,8 +463,8 @@
             try:
                 instance.terminate()
                 re_search_wait(_instance_state, "_GONE")
-            except BaseException as exc:
-                LOG.exception(exc)
+            except BaseException:
+                LOG.exception("Failed to terminate instance %s " % instance)
                 exc_num += 1
         if exc_num:
             raise exceptions.TearDownException(num=exc_num)
@@ -497,8 +497,8 @@
             try:
                 if volume.status != "available":
                     volume.detach(force=True)
-            except BaseException as exc:
-                LOG.exception(exc)
+            except BaseException:
+                LOG.exception("Failed to detach volume %s" % volume)
                 # exc_num += 1 "nonlocal" not in python2
             return volume.status
 
@@ -506,8 +506,8 @@
             re_search_wait(_volume_state, "available")  # not validates status
             LOG.info(_volume_state())
             volume.delete()
-        except BaseException as exc:
-            LOG.exception(exc)
+        except BaseException:
+            LOG.exception("Failed to delete volume %s" % volume)
             exc_num += 1
         if exc_num:
             raise exceptions.TearDownException(num=exc_num)
diff --git a/tools/config/generate_sample.sh b/tools/config/generate_sample.sh
index b86e0c2..607fecb 100755
--- a/tools/config/generate_sample.sh
+++ b/tools/config/generate_sample.sh
@@ -91,3 +91,9 @@
 MODULEPATH=${MODULEPATH:-$DEFAULT_MODULEPATH}
 OUTPUTFILE=$OUTPUTDIR/$PACKAGENAME.conf.sample
 python -m $MODULEPATH $FILES > $OUTPUTFILE
+
+# Hook to allow projects to append custom config file snippets
+CONCAT_FILES=$(ls $BASEDIR/tools/config/*.conf.sample 2>/dev/null)
+for CONCAT_FILE in $CONCAT_FILES; do
+    cat $CONCAT_FILE >> $OUTPUTFILE
+done
diff --git a/tools/install_venv_common.py b/tools/install_venv_common.py
index 1bab88a..46822e3 100644
--- a/tools/install_venv_common.py
+++ b/tools/install_venv_common.py
@@ -1,5 +1,3 @@
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
-
 # Copyright 2013 OpenStack Foundation
 # Copyright 2013 IBM Corp.
 #
diff --git a/tox.ini b/tox.ini
index b44b3e0..6d596e3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,13 +4,14 @@
 skipsdist = True
 
 [testenv]
+sitepackages = True
 setenv = VIRTUAL_ENV={envdir}
          LANG=en_US.UTF-8
          LANGUAGE=en_US:en
          LC_ALL=C
          OS_TEST_PATH=./tempest/test_discover
 usedevelop = True
-install_command = pip install -U {opts} {packages}
+install_command = pip install {opts} {packages}
 
 [testenv:py26]
 setenv = OS_TEST_PATH=./tempest/tests
@@ -25,38 +26,32 @@
 commands = python setup.py test --slowest --testr-arg='tempest\.tests {posargs}'
 
 [testenv:all]
-sitepackages = True
 setenv = VIRTUAL_ENV={envdir}
 commands =
   python setup.py testr --slowest --testr-args='{posargs}'
 
 [testenv:full]
-sitepackages = True
 # The regex below is used to select which tests to run and exclude the slow tag:
 # See the testrepostiory bug: https://bugs.launchpad.net/testrepository/+bug/1208610
 commands =
   bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
 
 [testenv:testr-full]
-sitepackages = True
 commands =
   bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario|thirdparty|cli)) {posargs}'
 
 [testenv:heat-slow]
-sitepackages = True
 setenv = OS_TEST_TIMEOUT=1200
 # The regex below is used to select heat api/scenario tests tagged as slow.
 commands =
   bash tools/pretty_tox_serial.sh '(?=.*\[.*\bslow\b.*\])(^tempest\.(api|scenario)\.orchestration) {posargs}'
 
 [testenv:large-ops]
-sitepackages = True
 commands =
   python setup.py testr --slowest --testr-args='tempest.scenario.test_large_ops {posargs}'
 
 
 [testenv:py26-full]
-sitepackages = True
 setenv = VIRTUAL_ENV={envdir}
          NOSE_WITH_OPENSTACK=1
          NOSE_OPENSTACK_COLOR=1
@@ -81,12 +76,10 @@
   nosetests --logging-format '%(asctime)-15s %(message)s' --with-xunit -sv --attr=type=smoke --xunit-file=nosetests-smoke.xml tempest {posargs}
 
 [testenv:smoke]
-sitepackages = True
 commands =
    bash tools/pretty_tox.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
 
 [testenv:smoke-serial]
-sitepackages = True
 # This is still serial because neutron doesn't work with parallel. See:
 # https://bugs.launchpad.net/tempest/+bug/1216076 so the neutron smoke
 # job would fail if we moved it to parallel.
@@ -94,7 +87,6 @@
    bash tools/pretty_tox_serial.sh '(?!.*\[.*\bslow\b.*\])((smoke)|(^tempest\.scenario)) {posargs}'
 
 [testenv:stress]
-sitepackages = True
 commands =
     python -m tempest/stress/run_stress -a -d 3600 -S
 
