Adjust html and js to use new capabilities format

Since the new capabilities files now use 'status' fields
instead of 'core' fields, the static files were adjusted to
account for these changes. The report page will now give the
option to filter by required, advisory, deprecated, and removed
capabilitiy statuses. For now, the new capabilities file is mirrored
in the defcore folder of refstack.

Change-Id: I79a12e94b32a89c08e8046a427553d1c156c1a2d
This commit is contained in:
Paul Van Eck 2015-03-27 16:19:38 -07:00 committed by Sergey Slipushenko
parent 9c729f2ed5
commit 649137a0b0
7 changed files with 584 additions and 40 deletions

520
defcore/2015.03.json Normal file
View File

@ -0,0 +1,520 @@
{
"id": "2015.03",
"schema": "1.1",
"status": "approved",
"replaces": "2014.07",
"releases": ["havana", "icehouse"],
"platform": {
"required": ["compute", "object"],
"advisory": [],
"deprecated": [],
"removed": []
},
"components": {
"compute": {
"required": [
"compute-auth",
"compute-flavors",
"compute-images",
"compute-instance-actions",
"compute-keypairs",
"compute-quotas",
"compute-servers",
"compute-volume",
"images-v2"],
"advisory": [
"auth-token",
"compute-servers-metadata"],
"deprecated": [],
"removed": [
"compute-floating-ips",
"images-v1",
"volume"]
},
"object": {
"required": ["objectstore-object"],
"advisory": [],
"deprecated": [],
"removed": []
}
},
"capabilities": {
"compute-images": {
"achievements": [
"tools",
"clients",
"complete",
"stable",
"discover",
"doc",
"sticky",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Image operations within the Compute API",
"flagged": [],
"name": "compute-images",
"tests": [
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_server_id",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_filter_by_changes_since",
"tempest.api.compute.images.test_images.ImagesTestJSON.test_delete_saving_image",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_filter_by_status",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_type",
"tempest.api.compute.images.test_list_images.ListImagesTestJSON.test_get_image",
"tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_delete_image",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_server_ref",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_name",
"tempest.api.compute.images.test_list_images.ListImagesTestJSON.test_list_images_with_detail",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_filter_by_type",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_status",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_filter_by_server_ref",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_limit_results",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_filter_by_name",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_with_detail_limit_results",
"tempest.api.compute.images.test_list_images.ListImagesTestJSON.test_list_images",
"tempest.api.compute.images.test_images_oneserver.ImagesOneServerTestJSON.test_create_image_specify_multibyte_character_image_name",
"tempest.api.compute.images.test_list_image_filters.ListImageFiltersTestJSON.test_list_images_filter_by_changes_since"
]
},
"compute-flavors": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Flavor operations in the Compute API",
"flagged": [],
"name": "compute-flavors",
"tests": []
},
"compute-floating-ips": {
"achievements": [],
"admin": false,
"status": "removed",
"guidelines": ["2014.07"],
"description": "Manage floating IPs through the Compute API. Not consistently implemented between Nova net and Neutron",
"flagged": [],
"name": "Compute Floating IPs",
"tests": []
},
"compute-auth": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"sticky",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Auth related tests using Compute API",
"flagged": [],
"name": "compute-auth",
"tests": [
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_create_server_with_unauthorized_image",
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_get_metadata_of_alt_account_server_fails",
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_create_server_fails_when_tenant_incorrect",
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_set_metadata_of_alt_account_server_fails"
]
},
"compute-instance-actions": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"foundation",
"atomic"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Basic support Compute API for server actions such as reboot, rebuild, resize",
"flagged": [],
"name": "compute-instance-actions",
"tests": [
"tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON.test_list_instance_actions",
"tempest.api.compute.servers.test_instance_actions.InstanceActionsTestJSON.test_get_instance_action"
]
},
"compute-keypairs": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"atomic"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Generate, import, and delete SSH keys within Compute services",
"flagged": [],
"name": "compute-keypairs",
"tests": [
"tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_specify_keypair",
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_create_keypair_in_analt_user_tenant",
"tempest.api.compute.test_authorization.AuthorizationTestJSON.test_get_keypair_of_alt_account_fails"
]
},
"compute-quotas": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Quotas management in Compute API",
"flagged": [],
"name": "compute-quotas",
"tests": [
"tempest.api.compute.test_quotas.QuotasTestJSON.test_get_default_quotas",
"tempest.api.compute.test_quotas.QuotasTestJSON.test_get_quotas"
]
},
"compute-servers": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Basic server operations in the Compute API",
"flagged": [
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_ip_regex",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_change_server_password"
],
"name": "compute-servers",
"tests": [
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_server_name_length_exceeds_256",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_flavor",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_network_uuid",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_server_metadata_exceeds_length_limit",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_with_invalid_image",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_create_numeric_server_name",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_delete_server_pass_id_exceeding_length_limit",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_delete_server_pass_negative_id",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_delete_a_server_of_another_tenant",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_get_non_existent_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_invalid_ip_v6_address",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_reboot_non_existent_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_rebuild_reboot_deleted_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_rebuild_non_existent_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_resize_server_with_null_flavor",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_resize_server_with_non_existent_flavor",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_server_name_blank",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_stop_non_existent_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_server_of_another_tenant",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_name_of_non_existent_server",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_server_set_empty_name",
"tempest.api.compute.servers.test_servers_negative.ServersNegativeTestJSON.test_update_server_name_length_exceeds_256",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_changes_since_future_date",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_changes_since_invalid_date",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_pass_negative_value",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_pass_string",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_flavor",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_image",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_non_existing_server_name",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_detail_server_is_deleted",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_with_a_deleted_server",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_status_non_existing",
"tempest.api.compute.servers.test_list_servers_negative.ListServersNegativeTestJSON.test_list_servers_by_limits_greater_than_actual_count",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_ip_regex",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_server_name",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_server_status",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_server_status",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_name_wildcard",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_flavor",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_limit_results",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_limit",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_image",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filtered_by_ip",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_filter_by_image",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_server_name",
"tempest.api.compute.servers.test_list_server_filters.ListServerFiltersTestJSON.test_list_servers_detailed_filter_by_flavor",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_resize_server_confirm",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_hard",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_change_server_password",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_stop_start_server",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_rebuild_server",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_resize_server_revert",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_lock_unlock_server",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_reboot_server_soft",
"tempest.api.compute.servers.test_server_actions.ServerActionsTestJSON.test_get_console_output",
"tempest.api.compute.servers.test_servers.ServersTestJSON.test_update_access_server_address",
"tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_with_existing_server_name",
"tempest.api.compute.servers.test_servers.ServersTestJSON.test_create_server_with_admin_password",
"tempest.api.compute.servers.test_servers.ServersTestJSON.test_update_server_name",
"tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_created_server_vcpus",
"tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers",
"tempest.api.compute.servers.test_create_server.ServersTestJSON.test_list_servers_with_detail",
"tempest.api.compute.servers.test_create_server.ServersTestJSON.test_verify_server_details",
"tempest.api.compute.servers.test_create_server.ServersTestJSON.test_host_name_is_same_as_server_name",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_update_server_metadata",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_list_server_metadata",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_delete_server_metadata_item",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_get_server_metadata_item",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_set_server_metadata",
"tempest.api.compute.servers.test_server_metadata.ServerMetadataTestJSON.test_set_server_metadata_item",
"tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_created_server_vcpus",
"tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_host_name_is_same_as_server_name",
"tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_verify_server_details",
"tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers",
"tempest.api.compute.servers.test_create_server.ServersTestManualDisk.test_list_servers_with_detail"
]
},
"compute-volume": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Retrieve volume information through the Compute API",
"flagged": [],
"name": "compute-volume",
"tests": [
"tempest.api.compute.volumes.test_volumes_list.VolumesTestJSON.test_volume_list",
"tempest.api.compute.volumes.test_volumes_list.VolumesTestJSON.test_volume_list_with_details",
"tempest.api.compute.volumes.test_attach_volume.AttachVolumeTestJSON.test_attach_detach_volume",
"tempest.api.compute.volumes.test_volumes_negative.VolumesNegativeTest.test_get_volume_without_passing_volume_id",
"tempest.api.compute.volumes.test_volumes_negative.VolumesNegativeTest.test_get_invalid_volume_id"
]
},
"compute-servers-metadata": {
"achievements": [
"deployed",
"tools",
"clients",
"future",
"complete",
"stable",
"discover",
"doc",
"sticky",
"foundation"
],
"admin": false,
"status": "advisory",
"guidelines": [],
"description": "Manage the access to ip extended attribute for servers through the Compute API",
"flagged": [],
"name": "compute-servers-metadata",
"tests": []
},
"images-v1": {
"achievements": [],
"admin": false,
"status": "removed",
"guidelines": ["2014.07"],
"description": "Basic image management in the Images API v1",
"flagged": [],
"name": "images-v1",
"tests": []
},
"images-v2": {
"achievements": [
"future",
"complete",
"stable",
"discover",
"doc",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "CRUD image operations in Images API v2",
"flagged": [],
"name": "images-v2",
"tests": [
"tempest.api.image.v2.test_images.ListImagesTest.test_index_no_params"
]
},
"objectstore-object": {
"achievements": [
"tools",
"clients",
"future",
"complete",
"stable",
"doc",
"foundation",
"atomic",
"proximity"
],
"admin": false,
"status": "required",
"guidelines": ["2014.07", "2015.03"],
"description": "Basic object operations in Object Storage API",
"flagged": [],
"name": "objectstore-object",
"tests": [
"tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_2d_way",
"tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_in_same_container",
"tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_across_containers",
"tempest.api.object_storage.test_object_services.ObjectTest.test_copy_object_to_itself",
"tempest.api.object_storage.test_object_services.ObjectTest.test_create_object",
"tempest.api.object_storage.test_object_services.ObjectTest.test_delete_object",
"tempest.api.object_storage.test_object_services.ObjectTest.test_get_object",
"tempest.api.object_storage.test_object_services.ObjectTest.test_get_object_if_different",
"tempest.api.object_storage.test_object_services.ObjectTest.test_object_upload_in_segments",
"tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_put_object_using_temp_url",
"tempest.api.object_storage.test_object_temp_url.ObjectTempUrlTest.test_get_object_using_temp_url",
"tempest.api.object_storage.test_object_version.ContainerTest.test_versioned_container",
"tempest.api.object_storage.test_object_expiry.ObjectExpiryTest.test_get_object_after_expiry_time",
"tempest.api.object_storage.test_object_services.PublicObjectTest.test_access_public_object_with_another_user_creds",
"tempest.api.object_storage.test_object_services.PublicObjectTest.test_access_public_container_object_without_using_creds"
]
},
"auth-token": {
"achievements": [],
"admin": false,
"status": "advisory",
"guidelines": [],
"description": "Generate an auth token given an identity endpoint",
"flagged": [],
"name": "auth-token",
"tests": []
}
},
"volume": {
"achievements": [],
"admin": true,
"status": "removed",
"guidelines": ["2014.07"],
"description": "CRUD operations for volumes management in Block Storage API",
"flagged": [],
"name": "volume",
"tests": []
},
"criteria": {
"atomic": {
"Description": "Capabilities is unique and cannot be built out of other must-pass capabilities",
"name": "Atomic",
"weight": 8
},
"clients": {
"Description": "Candidates are widely used capabilities: Should be included if part of common libraries (Fog, Apache jclouds, etc)",
"name": "Used by Clients",
"weight": 8
},
"complete": {
"Description": "Where the code being tested has a designated area of alternate implementation (extension framework) as per the Core Principles, there should be parity in capability tested across extension implementations. This also implies that the capability test is not configuration specific or locked to non-open technology",
"name": "Complete",
"weight": 8
},
"deployed": {
"Description": "Candidates are widely deployed capabilities. We favor capabilities that are supported by multiple public cloud providers and private cloud products",
"name": "Widely Deployed",
"weight": 8
},
"discover": {
"Description": "Capability being tested is Service Discoverable (can be found in Keystone and via service introspection)",
"name": "Discoverable",
"weight": 8
},
"doc": {
"Description": "Should be well documented, particularly the expected behavior. This can be a very subjective measure and we expect to refine this definition over time",
"name": "Documented",
"weight": 8
},
"foundation": {
"Description": "Test capabilities that are required by other must-pass tests and/or depended on by many other capabilities",
"name": "Foundation",
"weight": 8
},
"future": {
"Description": "Should reflect future technical direction (from the project technical teams and the TC) and help manage deprecated capabilities",
"name": "Future Direction",
"weight": 9
},
"proximity": {
"Description": "Sometimes called a Test Cluster, selects for Capabilities that are related to Core Capabilities. This helps ensure that related capabilities are managed together",
"name": "Proximity",
"weight": 8
},
"stable": {
"Description": "Test is required stable for >2 releases because we don't want DefCore capabilities that do not have dependable APIs",
"name": "Stable",
"weight": 9
},
"sticky": {
"Description": "A test that is a must-pass test should stay a must-pass test. This makes DefCore capabilities sticky release per release. Leaving Core is disruptive to the ecosystem",
"name": "Core in Last Release",
"weight": 9
},
"tools": {
"Description": "Candidates are widely used capabilities:Should be included if supported by common tools (RightScale, Scalr, CloudForms, ...)",
"name": "Used by Tools",
"weight": 9
}
}
}

View File

@ -6,7 +6,7 @@
<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.8.1/mustache.min.js"> </script>
<script id="header_template" type="x-tmpl-mustache">
<h1>OpenStack DefCore</h1>
<h2> {{release}} Tracked Capabilities</h2>
<h2> {{id}} Tracked Capabilities</h2>
</script>
<script id="capabilities_template" type="x-tmpl-mustache">
{{#capabilities}}
@ -22,7 +22,7 @@
<li>Description: {{description}}</li>
<li>Achievements (met {{achievements_count}} of {{criteria_count}} total): {{#achievements}} <a href="#{{.}}">{{.}}</a> {{/achievements}}
{{#admin}}<li>Admin rights required</li>{{/admin}}
{{#core}}<li>Core test</li>{{/core}}</li>
<li>Status: {{status}}</li>
<li> <a onclick="toggle_one_item('{{class}}', '{{id}}', 'tests_list');return false;" href="#"> Tests ({{tests_count}}) </a>
<div id="{{id}}_tests_list" class="{{class}}_tests_list" style="display:none;">
<ul>
@ -66,13 +66,20 @@
<div id="header"></div>
<input id="only_core" name="only_core" type="checkbox" checked onclick="render_page()" />
<label for="only_core">Show only core tests</label>
Status Filter:<br />
<select id="status" onchange="render_page()">
<option value="status_all" >All Capabilities</option>
<option value="status_required" >Required Capabilities</option>
<option value="status_advisory">Advisory Capabilities</option>
<option value="status_deprecated">Deprecated Capabilities</option>
<option value="status_removed">Removed Capabilities</option>
</select>
<br>
Admin Filter:<br />
<select id="admin" onchange="render_page()">
<option value="all" >All tests</option>
<option value="admin" >Tests require admin rights</option>
<option value="noadmin">Tests don't require admin rights</option>
<option value="all" >All Capabilities</option>
<option value="admin" >Capabilities requiring admin rights</option>
<option value="noadmin">Capabilities not requiring admin rights</option>
</select>
<div id="capabilities"></div>

View File

@ -109,7 +109,10 @@ var build_caps_list = function (data, filters) {
}
});
caps_dict.capabilities[capability.class].total += 1;
if (filters.only_core === true && (capability.core !== true)) {return; }
if (filters.status_filter === 'status_required' && (capability.status !== 'required')) {return; }
if (filters.status_filter === 'status_advisory' && (capability.status !== 'advisory')) {return; }
if (filters.status_filter === 'status_deprecated' && (capability.status !== 'deprecated')) {return; }
if (filters.status_filter === 'status_removed' && (capability.status !== 'removed')) {return; }
if (filters.admin_filter === 'admin' && (capability.admin !== true)) {return; }
if (filters.admin_filter === 'noadmin' && (capability.admin === true)) {return; }
capability.tests.forEach(function (test) {
@ -134,29 +137,28 @@ var build_caps_list = function (data, filters) {
return caps_list;
};
//Get admin and core filter values
//Get capabilities page filter values
var get_filters_local = function () {
if (document.getElementById('only_core')) {
window.only_core = document.getElementById('only_core').checked;
if (document.getElementById('status')) {
window.status_filter = document.getElementById('status').value;
} else {
window.only_core = true;
window.status_filter = 'status_all';
}
if (document.getElementById('admin')) {
window.admin_filter = document.getElementById('admin').value;
} else {
window.admin_filter = 'all';
}
return {only_core: window.only_core, admin_filter: window.admin_filter};
return {status_filter: window.status_filter, admin_filter: window.admin_filter};
};
//Rendering page header
var render_header = function (data) {
var template = $('#header_template').html();
data.release = capitaliseFirstLetter(data.release);
$("div#header").html(Mustache.render(template, data));
};
//Rendeirng capabilities list
//Rendering capabilities list
var render_caps = function (data) {
var filters = get_filters_local(),
template = $('#capabilities_template').html(),
@ -179,15 +181,16 @@ var render_criteria = function (data) {
//Rendering page
var render_capabilities_page = function () {
$.get('capabilities/havanacore.json').done(function (data) {
$.get('capabilities/2015.03.json').done(function (data) {
render_caps(data);
render_criteria(data);
render_header(data);
});
console.log("Rendered capabilities")
};
//Helper for toggling one item in list
var toggle_one_item = function (klass, id, postfix) {
$('div.' + klass + '_' + postfix + ':not(div#' + id + '_' + postfix + ')').slideUp();
$('div#' + id + '_' + postfix).slideToggle();
};
};

View File

@ -0,0 +1 @@
../../../defcore/2015.03.json

View File

@ -62,7 +62,11 @@ var caps_support = function (text, render) {
var build_report = function (caps_list, test_result) {
var other_tests = test_result.results.slice(0),
result = {
'only_core': $.cookie('only_core_flag') === 'true',
'status_all': $.cookie('status_filter_flag') === 'status_all',
'status_required': $.cookie('status_filter_flag') === 'status_required',
'status_advisory': $.cookie('status_filter_flag') === 'status_advisory',
'status_deprecated': $.cookie('status_filter_flag') === 'status_deprecated',
'status_removed': $.cookie('status_filter_flag') === 'status_removed',
'all': $.cookie('admin_filter_flag') === 'all',
'admin': $.cookie('admin_filter_flag') === 'admin',
'noadmin': $.cookie('admin_filter_flag') === 'noadmin',
@ -233,21 +237,21 @@ var admin_filter_update = function (item) {
window.render_page();
};
// Updating core filter value and render page
var core_filter_update = function (item) {
$.cookie('only_core_flag', item.name === 'true');
// Updating status filter value and render page
var status_filter_update = function (item) {
$.cookie('status_filter_flag', item.name);
window.render_page();
};
// Get filter values (admin and core)
// Get filter values (admin and status)
var get_filters_cookie = function () {
if ($('input#only_core').length === 0) {
if (!$.cookie('only_core_flag')) {$.cookie('only_core_flag', 'true'); }
if ($('div#status_filter').length === 0) {
if (!$.cookie('status_filter_flag')) {$.cookie('status_filter_flag', 'status_all'); }
}
if ($('div#admin_filter').length === 0) {
if (!$.cookie('admin_filter_flag')) {$.cookie('admin_filter_flag', 'all'); }
}
return {only_core: $.cookie('only_core_flag') === 'true', admin_filter: $.cookie('admin_filter_flag')};
return {status_filter: $.cookie('status_filter_flag'), admin_filter: $.cookie('admin_filter_flag')};
};
// Init page spinner
@ -264,7 +268,7 @@ var loading_spin = function () {
var post_processing = function post_processing() {
$('div.cap_shot:odd').addClass('zebra_odd');
$('div.cap_shot:even').addClass('zebra_even');
$('div#core_filter').buttonset();
$('div#status_filter').buttonset();
$('div#admin_filter').buttonset();
$('#schema_selector').selectmenu({change: function () {window.render_page(); } });
@ -280,7 +284,7 @@ var render_defcore_report_page = function () {
window.result_source = 'sample_test_result.json';
}
if (schema_selector.length === 0) {
schema = 'havanacore.json';
schema = '2015.03.json';
} else {
schema = schema_selector[0].value;
}
@ -336,4 +340,4 @@ var render_defcore_diff_report_page = function () {
}));
post_processing();
});
};
};

View File

@ -16,11 +16,21 @@
<div>
<h3>Scope filter</h3>
<div id="core_filter">
<input type="radio" id="core_filter_off" name="false" {{^only_core}}checked="checked"{{/only_core}} onchange="core_filter_update(this)">
<label for="core_filter_off">Don't apply core filter</label>
<input type="radio" id="core_filter_on" name="true" {{#only_core}}checked="checked"{{/only_core}} onchange="core_filter_update(this)">
<label for="core_filter_on">Show only core tests</label>
<div id="status_filter">
<input type="radio" id="status_filter_all" name="status_all" {{#status_all}}checked="checked"{{/status_all}} onchange="status_filter_update(this)">
<label for="status_filter_all">All DefCore Tests</label>
<input type="radio" id="status_filter_required" name="status_required" {{#status_required}}checked="checked"{{/status_required}} onchange="status_filter_update(this)">
<label for="status_filter_required">Required Tests</label>
<input type="radio" id="status_filter_advisory" name="status_advisory" {{#status_advisory}}checked="checked"{{/status_advisory}} onchange="status_filter_update(this)">
<label for="status_filter_advisory">Advisory Tests</label>
<input type="radio" id="status_filter_deprecated" name="status_deprecated" {{#status_deprecated}}checked="checked"{{/status_deprecated}} onchange="status_filter_update(this)">
<label for="status_filter_deprecated">Deprecated Tests</label>
<input type="radio" id="status_filter_removed" name="status_removed" {{#status_removed}}checked="checked"{{/status_removed}} onchange="status_filter_update(this)">
<label for="status_filter_removed">Removed Tests</label>
</div>
<br>
<div id="admin_filter" >
@ -164,4 +174,4 @@ Total passed tests out of scope: {{count}} <a onclick="$('#other_tests_list').s
No other tests!
{{/list}}
</ul>
{{/other_tests}}
{{/other_tests}}

View File

@ -28,14 +28,13 @@
</script>
</head>
<body>
<h1>DefCore test report</h1>
<h1>DefCore Test Report</h1>
<p></p>
<div>
<label for="schema_selector">Capabilities schema: </label>
<label for="schema_selector">Capabilities Schema: </label>
<br>
<select id="schema_selector">
<option selected="selected" value="havanacore.json" >Havana core</option>
<option value="icehouse_mockup.json" >Icehouse autogenerated</option>
<select id="schema_selector" style="width: 125px">
<option selected="selected" value="2015.03.json" >2015.03</option>
</select>
</div>
<p></p>
@ -46,4 +45,4 @@
<p></p>
<div>Copyright OpenStack Foundation, 2014. Apache 2.0 License.</div>
</body>
</html>
</html>