Add V3 API samples for quota-sets/class-sets,inst-usage-audit-log
Partially implements blueprint v3-api-unittests Change-Id: I6c21e5dffc5669bb6ab2bba091b97725cc19fd69
This commit is contained in:
parent
dacb9a19a5
commit
a87c65d0ee
@ -0,0 +1,17 @@
|
||||
{
|
||||
"instance_usage_audit_log": {
|
||||
"hosts_not_run": [
|
||||
"defac351f91940668301096238d26b47"
|
||||
],
|
||||
"log": {},
|
||||
"num_hosts": 1,
|
||||
"num_hosts_done": 0,
|
||||
"num_hosts_not_run": 1,
|
||||
"num_hosts_running": 0,
|
||||
"overall_status": "0 of 1 hosts done. 0 errors.",
|
||||
"period_beginning": "2013-08-01 00:00:00",
|
||||
"period_ending": "2013-09-01 00:00:00",
|
||||
"total_errors": 0,
|
||||
"total_instances": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<instance_usage_audit_log>
|
||||
<total_errors>0</total_errors>
|
||||
<total_instances>0</total_instances>
|
||||
<log/>
|
||||
<num_hosts_running>0</num_hosts_running>
|
||||
<num_hosts_done>0</num_hosts_done>
|
||||
<num_hosts_not_run>1</num_hosts_not_run>
|
||||
<hosts_not_run>
|
||||
<item>68368b25d745464695a6352a855d8d2e</item>
|
||||
</hosts_not_run>
|
||||
<overall_status>0 of 1 hosts done. 0 errors.</overall_status>
|
||||
<period_ending>2013-09-01 00:00:00</period_ending>
|
||||
<period_beginning>2013-08-01 00:00:00</period_beginning>
|
||||
<num_hosts>1</num_hosts>
|
||||
</instance_usage_audit_log>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"instance_usage_audit_log": {
|
||||
"hosts_not_run": [
|
||||
"ccf86bf6d0104fe69ee658eaa31a7469"
|
||||
],
|
||||
"log": {},
|
||||
"num_hosts": 1,
|
||||
"num_hosts_done": 0,
|
||||
"num_hosts_not_run": 1,
|
||||
"num_hosts_running": 0,
|
||||
"overall_status": "0 of 1 hosts done. 0 errors.",
|
||||
"period_beginning": "2012-06-01 00:00:00",
|
||||
"period_ending": "2012-07-01 00:00:00",
|
||||
"total_errors": 0,
|
||||
"total_instances": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<instance_usage_audit_log>
|
||||
<total_errors>0</total_errors>
|
||||
<total_instances>0</total_instances>
|
||||
<log/>
|
||||
<num_hosts_running>0</num_hosts_running>
|
||||
<num_hosts_done>0</num_hosts_done>
|
||||
<num_hosts_not_run>1</num_hosts_not_run>
|
||||
<hosts_not_run>
|
||||
<item>744e1407f60c44ad832bd9f4ffe2122f</item>
|
||||
</hosts_not_run>
|
||||
<overall_status>0 of 1 hosts done. 0 errors.</overall_status>
|
||||
<period_ending>2012-07-01 00:00:00</period_ending>
|
||||
<period_beginning>2012-06-01 00:00:00</period_beginning>
|
||||
<num_hosts>1</num_hosts>
|
||||
</instance_usage_audit_log>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "test_class",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_class_set id="test_class">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"instances": 50,
|
||||
"cores": 50,
|
||||
"ram": 51200,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"metadata_items": 128,
|
||||
"injected_files": 5,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"security_groups": 10,
|
||||
"security_group_rules": 20,
|
||||
"key_pairs": 100
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<quota_class_set>
|
||||
<cores>50</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>50</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"cores": 50,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "test_class",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 50,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_class_set id="test_class">
|
||||
<cores>50</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>50</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
17
doc/v3/api_samples/os-quota-sets/quotas-show-get-resp.json
Normal file
17
doc/v3/api_samples/os-quota-sets/quotas-show-get-resp.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
15
doc/v3/api_samples/os-quota-sets/quotas-show-get-resp.xml
Normal file
15
doc/v3/api_samples/os-quota-sets/quotas-show-get-resp.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<force>True</force>
|
||||
<instances>45</instances>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>45</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"security_groups": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<security_groups>45</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 45
|
||||
}
|
||||
}
|
15
doc/v3/api_samples/os-quota-sets/quotas-update-post-resp.xml
Normal file
15
doc/v3/api_samples/os-quota-sets/quotas-update-post-resp.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>45</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 9
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<force>True</force>
|
||||
<instances>9</instances>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 9,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>9</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"instance_usage_audit_log": {
|
||||
"hosts_not_run": [
|
||||
"%(hostid)s"
|
||||
],
|
||||
"log": {},
|
||||
"num_hosts": 1,
|
||||
"num_hosts_done": 0,
|
||||
"num_hosts_not_run": 1,
|
||||
"num_hosts_running": 0,
|
||||
"overall_status": "0 of 1 hosts done. 0 errors.",
|
||||
"period_beginning": "%(timestamp)s",
|
||||
"period_ending": "%(timestamp)s",
|
||||
"total_errors": 0,
|
||||
"total_instances": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<instance_usage_audit_log>
|
||||
<total_errors>0</total_errors>
|
||||
<total_instances>0</total_instances>
|
||||
<log/>
|
||||
<num_hosts_running>0</num_hosts_running>
|
||||
<num_hosts_done>0</num_hosts_done>
|
||||
<num_hosts_not_run>1</num_hosts_not_run>
|
||||
<hosts_not_run>
|
||||
<item>%(hostid)s</item>
|
||||
</hosts_not_run>
|
||||
<overall_status>0 of 1 hosts done. 0 errors.</overall_status>
|
||||
<period_ending>%(timestamp)s</period_ending>
|
||||
<period_beginning>%(timestamp)s</period_beginning>
|
||||
<num_hosts>1</num_hosts>
|
||||
</instance_usage_audit_log>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"instance_usage_audit_log": {
|
||||
"hosts_not_run": [
|
||||
"%(hostid)s"
|
||||
],
|
||||
"log": {},
|
||||
"num_hosts": 1,
|
||||
"num_hosts_done": 0,
|
||||
"num_hosts_not_run": 1,
|
||||
"num_hosts_running": 0,
|
||||
"overall_status": "0 of 1 hosts done. 0 errors.",
|
||||
"period_beginning": "%(timestamp)s",
|
||||
"period_ending": "%(timestamp)s",
|
||||
"total_errors": 0,
|
||||
"total_instances": 0
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<instance_usage_audit_log>
|
||||
<total_errors>0</total_errors>
|
||||
<total_instances>0</total_instances>
|
||||
<log/>
|
||||
<num_hosts_running>0</num_hosts_running>
|
||||
<num_hosts_done>0</num_hosts_done>
|
||||
<num_hosts_not_run>1</num_hosts_not_run>
|
||||
<hosts_not_run>
|
||||
<item>%(hostid)s</item>
|
||||
</hosts_not_run>
|
||||
<overall_status>0 of 1 hosts done. 0 errors.</overall_status>
|
||||
<period_ending>%(timestamp)s</period_ending>
|
||||
<period_beginning>%(timestamp)s</period_beginning>
|
||||
<num_hosts>1</num_hosts>
|
||||
</instance_usage_audit_log>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"id": "%(set_id)s",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_class_set id="%(set_id)s">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"instances": 50,
|
||||
"cores": 50,
|
||||
"ram": 51200,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"metadata_items": 128,
|
||||
"injected_files": 5,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"security_groups": 10,
|
||||
"security_group_rules": 20,
|
||||
"key_pairs": 100
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<quota_class_set>
|
||||
<cores>50</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>50</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_class_set": {
|
||||
"cores": 50,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 50,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10,
|
||||
"id": "test_class"
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_class_set id="test_class">
|
||||
<cores>50</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>50</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_class_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<force>True</force>
|
||||
<instances>45</instances>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"fixed_ips": -1,
|
||||
"floating_ips": 10,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<floating_ips>10</floating_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>45</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 45,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10,
|
||||
"id": "fake_tenant"
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>45</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"security_groups": 45
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<security_groups>45</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 45,
|
||||
"id": "fake_tenant"
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>45</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"id": "fake_tenant",
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 10,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>10</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"force": "True",
|
||||
"instances": 9
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set>
|
||||
<force>True</force>
|
||||
<instances>9</instances>
|
||||
</quota_set>
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"quota_set": {
|
||||
"cores": 20,
|
||||
"floating_ips": 10,
|
||||
"fixed_ips": -1,
|
||||
"injected_file_content_bytes": 10240,
|
||||
"injected_file_path_bytes": 255,
|
||||
"injected_files": 5,
|
||||
"instances": 9,
|
||||
"key_pairs": 100,
|
||||
"metadata_items": 128,
|
||||
"ram": 51200,
|
||||
"security_group_rules": 20,
|
||||
"security_groups": 10,
|
||||
"id": "fake_tenant"
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<quota_set id="fake_tenant">
|
||||
<cores>20</cores>
|
||||
<floating_ips>10</floating_ips>
|
||||
<fixed_ips>-1</fixed_ips>
|
||||
<injected_file_content_bytes>10240</injected_file_content_bytes>
|
||||
<injected_file_path_bytes>255</injected_file_path_bytes>
|
||||
<injected_files>5</injected_files>
|
||||
<instances>9</instances>
|
||||
<key_pairs>100</key_pairs>
|
||||
<metadata_items>128</metadata_items>
|
||||
<ram>51200</ram>
|
||||
<security_group_rules>20</security_group_rules>
|
||||
<security_groups>10</security_groups>
|
||||
</quota_set>
|
43
nova/tests/integrated/v3/test_instance_usage_audit_log.py
Normal file
43
nova/tests/integrated/v3/test_instance_usage_audit_log.py
Normal file
@ -0,0 +1,43 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
# Copyright 2012 Nebula, Inc.
|
||||
# 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 urllib
|
||||
|
||||
from nova.tests.integrated.v3 import api_sample_base
|
||||
|
||||
|
||||
class InstanceUsageAuditLogJsonTest(api_sample_base.ApiSampleTestBaseV3):
|
||||
extension_name = "os-instance-usage-audit-log"
|
||||
|
||||
def test_index_instance_usage_audit_log(self):
|
||||
response = self._do_get('os-instance-usage-audit-log')
|
||||
subs = self._get_regexes()
|
||||
subs['hostid'] = '[a-f0-9]+'
|
||||
self._verify_response('inst-usage-audit-log-index-get-resp',
|
||||
subs, response, 200)
|
||||
|
||||
def test_index_instance_usage_audit_log_with_before(self):
|
||||
response = self._do_get('os-instance-usage-audit-log?before=%s' %
|
||||
urllib.quote('2012-07-05 10:00:00'))
|
||||
subs = self._get_regexes()
|
||||
subs['hostid'] = '[a-f0-9]+'
|
||||
self._verify_response(
|
||||
'inst-usage-audit-log-index-with-before-get-resp',
|
||||
subs, response, 200)
|
||||
|
||||
|
||||
class InstanceUsageAuditLogXmlTest(InstanceUsageAuditLogJsonTest):
|
||||
ctype = "xml"
|
41
nova/tests/integrated/v3/test_quota_class_sets.py
Normal file
41
nova/tests/integrated/v3/test_quota_class_sets.py
Normal file
@ -0,0 +1,41 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
# Copyright 2012 Nebula, Inc.
|
||||
# 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.
|
||||
|
||||
from nova.tests.integrated.v3 import api_sample_base
|
||||
|
||||
|
||||
class QuotaClassesSampleJsonTests(api_sample_base.ApiSampleTestBaseV3):
|
||||
extension_name = "os-quota-class-sets"
|
||||
set_id = 'test_class'
|
||||
|
||||
def test_show_quota_classes(self):
|
||||
# Get api sample to show quota classes.
|
||||
response = self._do_get('os-quota-class-sets/%s' % self.set_id)
|
||||
subs = {'set_id': self.set_id}
|
||||
self._verify_response('quota-classes-show-get-resp', subs,
|
||||
response, 200)
|
||||
|
||||
def test_update_quota_classes(self):
|
||||
# Get api sample to update quota classes.
|
||||
response = self._do_put('os-quota-class-sets/%s' % self.set_id,
|
||||
'quota-classes-update-post-req',
|
||||
{})
|
||||
self._verify_response('quota-classes-update-post-resp',
|
||||
{}, response, 200)
|
||||
|
||||
|
||||
class QuotaClassesSampleXmlTests(QuotaClassesSampleJsonTests):
|
||||
ctype = "xml"
|
75
nova/tests/integrated/v3/test_quota_sets.py
Normal file
75
nova/tests/integrated/v3/test_quota_sets.py
Normal file
@ -0,0 +1,75 @@
|
||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||
# Copyright 2012 Nebula, Inc.
|
||||
# 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.
|
||||
|
||||
from nova.tests.integrated.v3 import api_sample_base
|
||||
|
||||
|
||||
class QuotaSetsSampleJsonTests(api_sample_base.ApiSampleTestBaseV3):
|
||||
extension_name = "os-quota-sets"
|
||||
|
||||
def test_show_quotas(self):
|
||||
# Get api sample to show quotas.
|
||||
response = self._do_get('os-quota-sets/fake_tenant')
|
||||
self._verify_response('quotas-show-get-resp', {}, response, 200)
|
||||
|
||||
def test_show_quotas_defaults(self):
|
||||
# Get api sample to show quotas defaults.
|
||||
response = self._do_get('os-quota-sets/fake_tenant/defaults')
|
||||
self._verify_response('quotas-show-defaults-get-resp',
|
||||
{}, response, 200)
|
||||
|
||||
def test_update_quotas(self):
|
||||
# Get api sample to update quotas.
|
||||
response = self._do_put('os-quota-sets/fake_tenant',
|
||||
'quotas-update-post-req',
|
||||
{})
|
||||
self._verify_response('quotas-update-post-resp', {}, response, 200)
|
||||
|
||||
def test_delete_quotas(self):
|
||||
# Get api sample to delete quota.
|
||||
response = self._do_delete('os-quota-sets/fake_tenant')
|
||||
self.assertEqual(response.status, 204)
|
||||
self.assertEqual(response.read(), '')
|
||||
|
||||
def test_update_quotas_force(self):
|
||||
# Get api sample to update quotas.
|
||||
response = self._do_put('os-quota-sets/fake_tenant',
|
||||
'quotas-update-force-post-req',
|
||||
{})
|
||||
return self._verify_response('quotas-update-force-post-resp', {},
|
||||
response, 200)
|
||||
|
||||
def test_show_quotas_for_user(self):
|
||||
# Get api sample to show quotas for user.
|
||||
response = self._do_get('os-quota-sets/fake_tenant?user_id=1')
|
||||
self._verify_response('user-quotas-show-get-resp', {}, response, 200)
|
||||
|
||||
def test_delete_quotas_for_user(self):
|
||||
response = self._do_delete('os-quota-sets/fake_tenant?user_id=1')
|
||||
self.assertEqual(response.status, 204)
|
||||
self.assertEqual(response.read(), '')
|
||||
|
||||
def test_update_quotas_for_user(self):
|
||||
# Get api sample to update quotas for user.
|
||||
response = self._do_put('os-quota-sets/fake_tenant?user_id=1',
|
||||
'user-quotas-update-post-req',
|
||||
{})
|
||||
return self._verify_response('user-quotas-update-post-resp', {},
|
||||
response, 200)
|
||||
|
||||
|
||||
class QuotaSetsSampleXmlTests(QuotaSetsSampleJsonTests):
|
||||
ctype = "xml"
|
Loading…
x
Reference in New Issue
Block a user