public class FlavorServiceImpl extends BaseComputeServices implements FlavorService
BaseOpenStackService.Invocation<R>
Constructor and Description |
---|
FlavorServiceImpl() |
Modifier and Type | Method and Description |
---|---|
List<? extends FlavorAccess> |
addTenantAccess(String flavorId,
String tenantId)
Add access to private flavor
|
Flavor |
create(Flavor flavor)
Creates a new Flavor
|
Flavor |
create(String name,
int ram,
int vcpus,
int disk,
int ephemeral,
int swap,
float rxtxFactor,
boolean isPublic)
Creates a new Flavor
|
Map<String,String> |
createAndUpdateExtraSpecs(String flavorId,
Map<String,String> spec)
post a key-value map, if key exist, value will be updated, if not ,new
extra spec created.
|
ActionResponse |
delete(String flavorId)
Deletes a Flavor by it's identifier
|
void |
deleteExtraSpecs(String flavorId,
String key)
delete the extra spec with the key and flavorId
|
Flavor |
get(String flavorId)
Get a Flavor by it's identifier
|
String |
getSpec(String flavorId,
String key)
get the extra spec's value by the key
|
List<? extends Flavor> |
list()
List all Flavors with details
|
List<? extends Flavor> |
list(boolean detail)
list flavors with non filtering parameters
|
List<? extends Flavor> |
list(boolean detail,
Map<String,String> filteringParams)
list flavors
|
List<? extends Flavor> |
list(Map<String,String> filteringParams)
list flavors with detailed
|
Map<String,String> |
listExtraSpecs(String flavorId)
list extra specs
|
List<? extends FlavorAccess> |
listFlavorAccess(String flavorId)
List tenants with access to private flavor
|
List<? extends FlavorAccess> |
removeTenantAccess(String flavorId,
String tenantId)
Delete access from private flavor
|
invokeAction, invokeActionWithResponse
delete, deleteWithResponse, get, getProvider, getServiceVersion, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, request, toList, uri
public List<? extends Flavor> list()
list
in interface FlavorService
public List<? extends Flavor> list(boolean detail)
list
in interface FlavorService
public List<? extends Flavor> list(Map<String,String> filteringParams)
list
in interface FlavorService
public List<? extends Flavor> list(boolean detail, Map<String,String> filteringParams)
list
in interface FlavorService
detail
- is detailedfilteringParams
- parameters affect the response data,availbed are:sort_key,sort_dir,limit,marker,minDisk,minRam,is_publicpublic Flavor get(String flavorId)
get
in interface FlavorService
flavorId
- the flavor identifierpublic ActionResponse delete(String flavorId)
delete
in interface FlavorService
flavorId
- the flavor identifierpublic Flavor create(Flavor flavor)
create
in interface FlavorService
flavor
- the flavor to createpublic Flavor create(String name, int ram, int vcpus, int disk, int ephemeral, int swap, float rxtxFactor, boolean isPublic)
create
in interface FlavorService
name
- the descriptive name of the flavorram
- the Memory in MB for the flavorvcpus
- the Number of VCPUs for the flavordisk
- the size of the local disk in GBswap
- the Swap space in MBrxtxFactor
- the RX/TX factor (default is 1) [OPTIONAL]public Map<String,String> listExtraSpecs(String flavorId)
listExtraSpecs
in interface FlavorService
public Map<String,String> createAndUpdateExtraSpecs(String flavorId, Map<String,String> spec)
createAndUpdateExtraSpecs
in interface FlavorService
public void deleteExtraSpecs(String flavorId, String key)
deleteExtraSpecs
in interface FlavorService
public String getSpec(String flavorId, String key)
getSpec
in interface FlavorService
public List<? extends FlavorAccess> listFlavorAccess(String flavorId)
listFlavorAccess
in interface FlavorService
public List<? extends FlavorAccess> addTenantAccess(String flavorId, String tenantId)
addTenantAccess
in interface FlavorService
public List<? extends FlavorAccess> removeTenantAccess(String flavorId, String tenantId)
removeTenantAccess
in interface FlavorService
Copyright © 2017. All rights reserved.