| 
									
										
										
										
											2014-06-23 12:52:31 +04:00
										 |  |  | @flavor
 | 
					
						
							|  |  |  | Feature: Flavors
 | 
					
						
							| 
									
										
										
										
											2014-06-20 12:59:17 +04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 12:52:31 +04:00
										 |  |  |   @openstack
 | 
					
						
							| 
									
										
										
										
											2014-06-20 12:59:17 +04:00
										 |  |  |   Scenario: Get list of openstack flavors
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/openstack' query
 | 
					
						
							|  |  |  |     Then response should be '200'
 | 
					
						
							|  |  |  |     And the Content-Type header should include 'application/json'
 | 
					
						
							|  |  |  |     And the JSON response should be an array
 | 
					
						
							|  |  |  |     And response array should contains elements like:
 | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     [
 | 
					
						
							|  |  |  |       {
 | 
					
						
							| 
									
										
										
										
											2014-06-20 13:21:42 +04:00
										 |  |  |         "id": "flavor_id",
 | 
					
						
							|  |  |  |         "v_cpus": "v_cpus",
 | 
					
						
							|  |  |  |         "ram": "ram",
 | 
					
						
							|  |  |  |         "disk": "disk"
 | 
					
						
							| 
									
										
										
										
											2014-06-20 12:59:17 +04:00
										 |  |  |       }
 | 
					
						
							|  |  |  |     ]
 | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 12:52:31 +04:00
										 |  |  |   @ec2
 | 
					
						
							| 
									
										
										
										
											2014-06-20 12:59:17 +04:00
										 |  |  |   Scenario: Get list of ec2 flavors
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/ec2' query
 | 
					
						
							|  |  |  |     Then response should be '200'
 | 
					
						
							|  |  |  |     And the Content-Type header should include 'application/json'
 | 
					
						
							|  |  |  |     And the JSON response should be an array
 | 
					
						
							|  |  |  |     And response array should contains elements like:
 | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  |     [
 | 
					
						
							|  |  |  |       {
 | 
					
						
							|  |  |  |         "id": "t1.micro",
 | 
					
						
							|  |  |  |         "cores": 2,
 | 
					
						
							|  |  |  |         "disk": 0,
 | 
					
						
							|  |  |  |         "name": "Micro Instance",
 | 
					
						
							|  |  |  |         "ram": 613
 | 
					
						
							|  |  |  |       }
 | 
					
						
							|  |  |  |     ]
 | 
					
						
							|  |  |  |     """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 12:52:31 +04:00
										 |  |  |   @static
 | 
					
						
							| 
									
										
										
										
											2014-06-20 12:59:17 +04:00
										 |  |  |   Scenario: Get list of static flavors
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/static' query
 | 
					
						
							|  |  |  |     Then response should be '200'
 | 
					
						
							|  |  |  |     And the Content-Type header should include 'application/json'
 | 
					
						
							|  |  |  |     And the JSON response should be an array
 | 
					
						
							|  |  |  |     And response array should be empty
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 13:58:14 +04:00
										 |  |  |   @static
 | 
					
						
							|  |  |  |   Scenario: Get flavors list of static provider without 'Accept' header
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/static' query without headers 'Accept'
 | 
					
						
							|  |  |  |     Then response should be '406'
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 12:52:31 +04:00
										 |  |  |   Scenario: Get flavors list of unknown provider
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/foo' query
 | 
					
						
							|  |  |  |     Then response should be '404'
 | 
					
						
							| 
									
										
										
										
											2014-06-23 13:58:14 +04:00
										 |  |  | 
 | 
					
						
							|  |  |  |   Scenario: Get flavors list of unknown provider without 'Accept' header
 | 
					
						
							|  |  |  |     When I send GET '/v2.0/flavors/foo' query without headers 'Accept'
 | 
					
						
							|  |  |  |     Then response should be '406'
 |