public class NuageVspRestApi extends Object
| Constructor and Description |
|---|
NuageVspRestApi(VspHost vspHost,
NuageVspStatistics nuageVspStatistics) |
protected VspHost vspHost
public NuageVspRestApi(VspHost vspHost, NuageVspStatistics nuageVspStatistics)
public NuageVspObject createResource(NuageVspObject entity, NuageVspUser proxyUser) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspEntity parentEntityType, String parentEntityId, NuageVspObject childEntity, Boolean checkWarning, NuageVspUser proxyUser, NuageVspConstants.ErrorCode... retryNuageErrorCodes) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspObject entity) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspObject entity, String proxyUserUuid, String proxyUserDomainUuid) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspEntity parentEntityType, String parentEntityId, NuageVspObject childEntity) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspEntity parentEntityType, String parentEntityId, NuageVspObject childEntity, String proxyUserUuid, String proxyUserDomainUuid) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject createResource(NuageVspObject parent, NuageVspObject child, NuageVspConstants.ErrorCode... retryNuageErrorCodes) throws NuageVspApiException
NuageVspApiExceptionpublic String updateResource(NuageVspObject nuageVspObject) throws NuageVspApiException
NuageVspApiExceptionpublic String updateResource(NuageVspEntity parentEntityType, String parentEntityId, NuageVspEntity childEntityType, Object childEntity) throws NuageVspApiException
NuageVspApiExceptionpublic String deleteResource(NuageVspEntity entityType, String entityId) throws NuageVspApiException
NuageVspApiExceptionpublic String deleteResource(NuageVspObject nuageVspObject) throws NuageVspApiException
NuageVspApiExceptionpublic boolean deleteQuietly(NuageVspObject entityToBeCleaned)
public boolean deleteQuietly(NuageVspEntity entityToBeCleaned, String entityIDToBeCleaned)
public String getResources(NuageVspEntity nuageEntityType, NuageVspPaging paging) throws NuageVspApiException
NuageVspApiExceptionpublic String getChildResources(NuageVspEntity parentEntityType, String parentEntityId, NuageVspEntity nuageChildEntityType, NuageVspPaging paging) throws NuageVspApiException
NuageVspApiExceptionpublic String getResource(NuageVspEntity nuageEntityType, String entityId, Boolean checkWarning) throws NuageVspApiException
NuageVspApiExceptionpublic String resourceExists(NuageVspEntity nuageEntityType, String entityId, Boolean checkWarning) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject getResource(NuageVspEntity nuageEntityType, String entityId) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspEntity nuageEntityType, NuageVspFilter filter) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspEntity nuageEntityType) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspObject nuageVspObject, NuageVspEntity nuageChildEntityType) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspObject nuageVspObject, NuageVspEntity nuageChildEntityType, NuageVspFilter filter) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, NuageVspFilter filter) throws NuageVspApiException
NuageVspApiExceptionpublic String getResources(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, NuageVspAttribute filterAttribute, Object filterValue) throws NuageVspApiException
NuageVspApiExceptionprotected boolean saveLinkedEntities(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, Set<String> oldNuageChildEntityIds, Set<String> newNuageChildEntityIds) throws NuageVspApiException
NuageVspApiExceptionpublic void linkRelatedEntity(NuageVspObject nuageVspObject, NuageVspEntity nuageChildEntityType, String nuageChildEntityId) throws NuageVspException
NuageVspExceptionpublic boolean linkRelatedEntity(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, String nuageChildEntityId) throws NuageVspException
NuageVspExceptionpublic boolean unlinkRelatedEntity(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, String nuageChildEntityId) throws NuageVspException
NuageVspExceptionpublic boolean setRelatedEntities(NuageVspObject nuageVspObject, NuageVspEntity nuageChildEntityType, Set<String> nuageChildEntityIds) throws NuageVspException
NuageVspExceptionpublic boolean setRelatedEntities(NuageVspEntity nuageEntityType, String entityId, NuageVspEntity nuageChildEntityType, Set<String> nuageChildEntityIds) throws NuageVspException
NuageVspExceptionprotected static NuageVspFilter createFilter(NuageVspAttribute filterAttr, Object filterAttrValue)
public NuageVspObject getOnlyJsonEntity(NuageVspEntity entityType, String jsonString) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject getFirstJsonEntity(NuageVspEntity entityType, String jsonString) throws NuageVspApiException
NuageVspApiExceptionpublic NuageVspObject getEntityByExternalId(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, String externalId) throws NuageVspApiException
NuageVspApiExceptionpublic String getEntityId(NuageVspEntity entityType, String jsonString) throws NuageVspApiException
NuageVspApiExceptionpublic Pair<String,String> executeNuageApi(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, Object entityDetails, RequestType type, boolean checkWarning, NuageVspPaging paging, NuageVspUser proxyUser, String restRelativePath)
public Pair<String,String> executeNuageApi(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, Object entityDetails, RequestType type, Boolean checkWarning, NuageVspPaging paging, NuageVspUser proxyUser) throws NuageVspApiException
login() for
more detailsentityType - entityId - childEntityType - entityDetails - type - checkWarning - TODO @return List that contains Map of attributes and their corresponding valuesExceptionNuageVspApiExceptionprotected void createHttpClient()
public void login()
throws NuageVspApiException
NuageVspApiExceptionpublic String getJsonString(Object entityDetails) throws NuageJsonParsingException
NuageJsonParsingExceptionpublic List<NuageVspObject> parseJsonString(NuageVspEntity nuageEntity, String jsonResult) throws NuageJsonParsingException, UnsupportedNuageEntityException
public <T> T parseJsonString(NuageVspEntity nuageEntity, String jsonResult, Type type) throws NuageJsonParsingException, UnsupportedNuageEntityException
protected NuageVspObject createNuageVspObject(NuageVspEntity entity)
protected NuageVspObject createNuageVspObject(NuageVspEntity entity, String entityId)
protected static NuageVspApiException handleException(String message, NuageVspException cause, Object... args)
public boolean isExistingResource(NuageVspEntity entity, String entityId)
Copyright © 2016–2017 Nuage Networks. All rights reserved.