public class NuageVspApiClientImpl extends Object implements NuageVspApiClient
NuageVspApiClient.ExistingDhcpOptionStrategy| Modifier and Type | Field and Description |
|---|---|
protected NuageVspRestApi |
api |
| Constructor and Description |
|---|
NuageVspApiClientImpl(NuageVspRestApi api,
NuageVspAclClient aclClient) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPermission(NuageVspEntity entityType,
String entityId,
Set<String> groupIds) |
void |
addUserToGroup(String vsdGroupId,
String userId) |
List<NuageVspObject> |
addVMInterfaceToVM(VspNetwork vspNetwork,
VspVm vspVm,
VspNic vspNic,
NetworkDetails attachedNetworkDetails,
NuageVspObject vm,
DhcpOptions dhcpOptions) |
String |
allocateFIPToVPortInVsp(NetworkDetails attachedNetworkDetails,
String vportId,
String vspSharedNetworkId,
String staticNatIp,
String staticNatIpUuid,
String nicSecondaryIp4Address,
String nicSecondaryIpUuid) |
String |
applyStaticNatInVsp(NetworkDetails attachedNetworkDetails,
String vportId,
VspStaticNat vspStaticNat) |
List<NuageVspObject> |
buildVmInterfacesList(VspVm vspVm,
VspNic... vspNics) |
void |
cleanUpDomainAndTemplate(String enterpriseId,
String networkUuid,
String domainTemplateName) |
void |
createDhcpOptions(boolean isCreateDhcpOption,
NuageVspEntity nuageVspEntity,
String nuageVspEntityId,
String nuageVspEntityUuid,
VspNetwork vspNetwork,
DhcpOptions dhcpOptions) |
void |
createDhcpOptions(NuageVspApiClient.ExistingDhcpOptionStrategy existingOptionStrategy,
NetworkDetails attachedNetworkDetails,
VspNetwork vspNetwork,
DhcpOptions dhcpOptions)
Depending on the option strategy new dhcp options get created on the vsd for a subnet
|
void |
createDhcpOptions(NuageVspApiClient.ExistingDhcpOptionStrategy existingOptionStrategy,
NuageVspEntity nuageVspEntity,
String nuageVspEntityUuid,
String nuageVspEntityId,
VspNetwork vspNetwork,
DhcpOptions dhcpOptions)
Depending on the option strategy new dhcp options get created on the vsd for the specified vsd entity (vport or subnet)
|
String |
createEnterpriseInVSP(String enterpriseExternalUuid,
String enterpriseDescription) |
NuageVspObject |
createGroupInEnterprise(String projectOrAccountName,
String projectOrAccountUuid,
String vsdEnterpriseId) |
NetworkRelatedVsdIds |
createIsolatedL2NetworkWithDefaultACLs(VspNetwork vspNetwork) |
NetworkRelatedVsdIds |
createNetworkConfigurationWithDefaultACLs(VspNetwork vspNetwork,
VspDhcpDomainOption vspDhcpOptions) |
String |
createSharedResource(NuageVspConstants.SharedNetworkType resourceType,
String sharedResourceParentId,
String staticNatNetworkUuid,
String staticNatVlanGateway,
String staticNatVlanNetmask,
boolean staticNatVlanUnderlay,
String networkName) |
String |
createUserInEnterprise(String vsdEnterpriseId,
String userNameUuid,
String firstName,
String lastName,
String email,
String password) |
List<NuageVspObject> |
createVMInVSP(VspNetwork vspNetwork,
VspVm vspVm,
VspNic vspNic,
NetworkDetails attachedNetworkDetails,
DhcpOptions dhcpOptions) |
void |
createVportInVsp(VspNic vspNic,
VspNetwork vspNetwork,
List<NuageVspObject> vmInterfaceList,
NetworkDetails attachedNetworkDetails,
DhcpOptions dhcpOptions) |
void |
deleteEnterpriseInVsp(String enterpriseExternalUuid,
String enterpriseDescription) |
void |
deleteQuietly(NuageVspEntity entityType,
String entityId) |
void |
deleteSharedResourceInVSP(NuageVspConstants.SharedNetworkType resourceType,
String staticNatNetworkUuid,
String staticNatVlanGateway,
String staticNatVlanNetmask) |
void |
deleteVM(String vmUuid,
String vmId) |
void |
deleteVmInterface(String vmUuid,
String macAddr,
String vmInterfaceID) |
boolean |
entityExists(NuageVspEntity entityType,
String entityUuid)
Check if an entity exists in the VSD
|
String |
findEntityByExternalUuid(NuageVspEntity entityType,
String entityId,
NuageVspEntity childEntityType,
String externalId) |
String |
findEntityIdByExternalUuid(NuageVspEntity entityType,
String entityId,
NuageVspEntity childEntityType,
String externalId) |
String |
findEntityUsingFilter(NuageVspEntity entityType,
String entityId,
NuageVspEntity childEntityType,
NuageVspAttribute filterAttr,
Object filterAttrValue) |
String |
findEntityUsingFilter(NuageVspEntity entityType,
String entityId,
NuageVspEntity childEntityType,
NuageVspFilter filter) |
<T> T |
findFieldValueByExternalUuid(NuageVspEntity entityType,
String entityId,
NuageVspEntity childEntityType,
String externalId,
NuageVspAttribute fieldName) |
VspNetwork |
findIsolatedL3Network(VspNetwork vspNetwork) |
Pair<Boolean,String> |
findOrCreateSharedResource(boolean findByExternalId,
NuageVspConstants.SharedNetworkType resourceType,
String staticNatNetworkUuid,
String staticNatVlanGateway,
String staticNatVlanNetmask,
boolean staticNatVlanUnderlay,
String networkName) |
String |
findSharedResource(boolean findByExternalId,
NuageVspConstants.SharedNetworkType resourceType,
String staticNatNetworkUuid,
String staticNatVlanGateway,
String staticNatVlanNetmask) |
com.google.common.base.Optional<NuageVspObject> |
findSharedResourceWithFallback(boolean findByExternalId,
NuageVspConstants.SharedNetworkType resourceType,
String staticNatNetworkUuid,
String staticNatVlanGateway,
String staticNatVlanNetmask) |
String |
generateCmsIdForNuageVsp(String cmsName) |
List<NuageVspObject> |
getACLAssociatedToDomain(boolean ingress,
NuageVspEntity domainType,
String domainUuid,
String networkUuid) |
List<NuageVspObject> |
getACLEntriesAssociatedToLocation(String aclNetworkLocationId,
NuageVspEntity aclTemplateType,
String aclTemplateId) |
String |
getEnterprise(String domainUuid) |
String |
getEnterpriseName(String domainName,
String domainPath) |
String |
getEntityId(String jsonString,
NuageVspEntity entityType) |
String |
getIsolatedDomain(boolean throwExceptionWhenNotFound,
String enterpriseId,
NuageVspEntity attachedNetworkType,
String vpcOrSubnetUuid) |
String |
getIsolatedDomain(String enterpriseId,
NuageVspEntity attachedNetworkType,
String vpcOrSubnetUuid) |
Pair<String,String> |
getIsolatedSubNetwork(boolean throwExceptionWhenNotFound,
String enterpriseId,
VspNetwork vspNetwork) |
Pair<String,String> |
getIsolatedSubNetwork(String enterpriseId,
VspNetwork vspNetwork) |
String |
getOrCreateVSPEnterprise(String domainUuid,
String domainName,
String domainPath) |
Pair<String,String> |
getOrCreateVSPEnterpriseAndGroup(String networksDomainName,
String networksDomainPath,
String networksDomainUuid,
String networksAccountName,
String networksAccountUuid,
Optional<String> maybeEnterpriseId) |
NuageVspObject |
getResource(NuageVspEntity nuageEntityType,
String entityId) |
String |
getResources(NuageVspEntity entityType) |
<T> T |
getResources(NuageVspEntity entityType,
Class<T> type) |
String |
getResources(NuageVspEntity enterprise,
NuageVspFilter filter) |
String |
getResources(NuageVspObject parent,
NuageVspEntity childEntityType) |
NuageVspObject |
getVMDetails(String vmUuid) |
boolean |
isExistingResource(NuageVspEntity entity,
String entiyId)
Checks if the entity with the specified entityId is present on the VSD.
|
boolean |
isKnownCmsIdForNuageVsp(String cmsId) |
void |
login()
Login to the Nuage VSP
|
List<NuageVspObject> |
parseJsonString(NuageVspEntity entity,
String json) |
<T> T |
parseJsonString(NuageVspEntity entity,
String json,
Class<T> type) |
void |
releaseFIPFromVsp(NetworkDetails attachedNetworkDetails,
String vportId,
String staticNatIpUuid,
String nicSecondaryIpUuid) |
void |
removeAllDhcpOptionsWithCode(NuageVspEntity nuageVspEntity,
String externalUuid,
String entityId,
Set<Integer> dhcpOptionCodesToRemove)
Removes all specified dhcp options from the specified nic.
|
boolean |
removeCmsIdForNuageVsp(String cmsId) |
void |
updateVPortWithFloatingIPId(String vportId,
String floatingIPId) |
protected final NuageVspRestApi api
public NuageVspApiClientImpl(NuageVspRestApi api, NuageVspAclClient aclClient)
public boolean entityExists(NuageVspEntity entityType, String entityUuid) throws NuageVspException
NuageVspApiCliententityExists in interface NuageVspApiCliententityType - The type of the entityentityUuid - The UUID of the entityNuageVspExceptionpublic List<NuageVspObject> createVMInVSP(VspNetwork vspNetwork, VspVm vspVm, VspNic vspNic, NetworkDetails attachedNetworkDetails, DhcpOptions dhcpOptions) throws NuageVspException
createVMInVSP in interface NuageVspApiClientNuageVspExceptionpublic List<NuageVspObject> addVMInterfaceToVM(VspNetwork vspNetwork, VspVm vspVm, VspNic vspNic, NetworkDetails attachedNetworkDetails, NuageVspObject vm, DhcpOptions dhcpOptions) throws NuageVspException
addVMInterfaceToVM in interface NuageVspApiClientNuageVspExceptionpublic List<NuageVspObject> buildVmInterfacesList(VspVm vspVm, VspNic... vspNics)
buildVmInterfacesList in interface NuageVspApiClientpublic void deleteVmInterface(String vmUuid, String macAddr, String vmInterfaceID) throws NuageVspException
deleteVmInterface in interface NuageVspApiClientNuageVspExceptionpublic void deleteVM(String vmUuid, String vmId)
deleteVM in interface NuageVspApiClientpublic NuageVspObject getVMDetails(String vmUuid) throws NuageVspException
getVMDetails in interface NuageVspApiClientNuageVspExceptionpublic String getOrCreateVSPEnterprise(String domainUuid, String domainName, String domainPath) throws NuageVspException
getOrCreateVSPEnterprise in interface NuageVspApiClientNuageVspExceptionpublic Pair<String,String> getOrCreateVSPEnterpriseAndGroup(String networksDomainName, String networksDomainPath, String networksDomainUuid, String networksAccountName, String networksAccountUuid, Optional<String> maybeEnterpriseId) throws NuageVspException
getOrCreateVSPEnterpriseAndGroup in interface NuageVspApiClientNuageVspExceptionpublic String createEnterpriseInVSP(String enterpriseExternalUuid, String enterpriseDescription) throws NuageVspException
createEnterpriseInVSP in interface NuageVspApiClientNuageVspExceptionpublic void deleteEnterpriseInVsp(String enterpriseExternalUuid, String enterpriseDescription) throws NuageVspException
deleteEnterpriseInVsp in interface NuageVspApiClientNuageVspExceptionpublic String createUserInEnterprise(String vsdEnterpriseId, String userNameUuid, String firstName, String lastName, String email, String password) throws NuageVspException
createUserInEnterprise in interface NuageVspApiClientNuageVspExceptionpublic void addPermission(NuageVspEntity entityType, String entityId, Set<String> groupIds) throws NuageVspException
NuageVspExceptionpublic NuageVspObject createGroupInEnterprise(String projectOrAccountName, String projectOrAccountUuid, String vsdEnterpriseId) throws NuageVspException
createGroupInEnterprise in interface NuageVspApiClientNuageVspExceptionpublic void addUserToGroup(String vsdGroupId, String userId) throws NuageVspException
NuageVspExceptionpublic NetworkRelatedVsdIds createNetworkConfigurationWithDefaultACLs(VspNetwork vspNetwork, VspDhcpDomainOption vspDhcpOptions) throws NuageVspException
createNetworkConfigurationWithDefaultACLs in interface NuageVspApiClientNuageVspExceptionpublic void createDhcpOptions(NuageVspApiClient.ExistingDhcpOptionStrategy existingOptionStrategy, NetworkDetails attachedNetworkDetails, VspNetwork vspNetwork, DhcpOptions dhcpOptions) throws NuageVspException
NuageVspApiClientcreateDhcpOptions in interface NuageVspApiClientexistingOptionStrategy - FETCH, FETCH_AND_DELETE, IGNORENuageVspExceptionpublic void createDhcpOptions(boolean isCreateDhcpOption,
NuageVspEntity nuageVspEntity,
String nuageVspEntityId,
String nuageVspEntityUuid,
VspNetwork vspNetwork,
DhcpOptions dhcpOptions)
throws NuageVspException
NuageVspExceptionpublic void createDhcpOptions(NuageVspApiClient.ExistingDhcpOptionStrategy existingOptionStrategy, NuageVspEntity nuageVspEntity, String nuageVspEntityUuid, String nuageVspEntityId, VspNetwork vspNetwork, DhcpOptions dhcpOptions) throws NuageVspException
NuageVspApiClientcreateDhcpOptions in interface NuageVspApiClientNuageVspExceptionpublic void removeAllDhcpOptionsWithCode(NuageVspEntity nuageVspEntity, String externalUuid, String entityId, Set<Integer> dhcpOptionCodesToRemove) throws NuageVspException
NuageVspApiClientremoveAllDhcpOptionsWithCode in interface NuageVspApiClientNuageVspExceptionpublic VspNetwork findIsolatedL3Network(VspNetwork vspNetwork)
findIsolatedL3Network in interface NuageVspApiClientpublic NetworkRelatedVsdIds createIsolatedL2NetworkWithDefaultACLs(VspNetwork vspNetwork) throws NuageVspException
createIsolatedL2NetworkWithDefaultACLs in interface NuageVspApiClientNuageVspExceptionpublic String getEnterprise(String domainUuid) throws NuageVspException
getEnterprise in interface NuageVspApiClientNuageVspExceptionpublic Pair<String,String> getIsolatedSubNetwork(String enterpriseId, VspNetwork vspNetwork) throws NuageVspException
getIsolatedSubNetwork in interface NuageVspApiClientNuageVspExceptionpublic Pair<String,String> getIsolatedSubNetwork(boolean throwExceptionWhenNotFound, String enterpriseId, VspNetwork vspNetwork) throws NuageVspException
getIsolatedSubNetwork in interface NuageVspApiClientNuageVspExceptionpublic String getIsolatedDomain(String enterpriseId, NuageVspEntity attachedNetworkType, String vpcOrSubnetUuid) throws NuageVspException
getIsolatedDomain in interface NuageVspApiClientNuageVspExceptionpublic String getIsolatedDomain(boolean throwExceptionWhenNotFound, String enterpriseId, NuageVspEntity attachedNetworkType, String vpcOrSubnetUuid) throws NuageVspException
getIsolatedDomain in interface NuageVspApiClientNuageVspExceptionpublic List<NuageVspObject> getACLAssociatedToDomain(boolean ingress, NuageVspEntity domainType, String domainUuid, String networkUuid) throws NuageVspException
NuageVspExceptionpublic List<NuageVspObject> getACLEntriesAssociatedToLocation(String aclNetworkLocationId, NuageVspEntity aclTemplateType, String aclTemplateId) throws NuageVspException
NuageVspExceptionpublic Pair<Boolean,String> findOrCreateSharedResource(boolean findByExternalId, NuageVspConstants.SharedNetworkType resourceType, String staticNatNetworkUuid, String staticNatVlanGateway, String staticNatVlanNetmask, boolean staticNatVlanUnderlay, String networkName) throws NuageVspException
findOrCreateSharedResource in interface NuageVspApiClientNuageVspExceptionpublic com.google.common.base.Optional<NuageVspObject> findSharedResourceWithFallback(boolean findByExternalId, NuageVspConstants.SharedNetworkType resourceType, String staticNatNetworkUuid, String staticNatVlanGateway, String staticNatVlanNetmask) throws NuageVspException
NuageVspExceptionpublic String findSharedResource(boolean findByExternalId, NuageVspConstants.SharedNetworkType resourceType, String staticNatNetworkUuid, String staticNatVlanGateway, String staticNatVlanNetmask) throws NuageVspException
NuageVspExceptionpublic String createSharedResource(NuageVspConstants.SharedNetworkType resourceType, String sharedResourceParentId, String staticNatNetworkUuid, String staticNatVlanGateway, String staticNatVlanNetmask, boolean staticNatVlanUnderlay, String networkName) throws NuageVspException
NuageVspExceptionpublic void deleteSharedResourceInVSP(NuageVspConstants.SharedNetworkType resourceType, String staticNatNetworkUuid, String staticNatVlanGateway, String staticNatVlanNetmask) throws NuageVspException
deleteSharedResourceInVSP in interface NuageVspApiClientNuageVspExceptionpublic String applyStaticNatInVsp(NetworkDetails attachedNetworkDetails, String vportId, VspStaticNat vspStaticNat) throws NuageVspException
applyStaticNatInVsp in interface NuageVspApiClientNuageVspExceptionpublic String allocateFIPToVPortInVsp(NetworkDetails attachedNetworkDetails, String vportId, String vspSharedNetworkId, String staticNatIp, String staticNatIpUuid, String nicSecondaryIp4Address, String nicSecondaryIpUuid) throws NuageVspException
allocateFIPToVPortInVsp in interface NuageVspApiClientNuageVspExceptionpublic void updateVPortWithFloatingIPId(String vportId, String floatingIPId) throws NuageVspException
updateVPortWithFloatingIPId in interface NuageVspApiClientNuageVspExceptionpublic void releaseFIPFromVsp(NetworkDetails attachedNetworkDetails, String vportId, String staticNatIpUuid, String nicSecondaryIpUuid) throws NuageVspException
releaseFIPFromVsp in interface NuageVspApiClientNuageVspExceptionpublic String findEntityUsingFilter(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, NuageVspFilter filter) throws NuageVspException
findEntityUsingFilter in interface NuageVspApiClientNuageVspExceptionpublic String getEnterpriseName(String domainName, String domainPath)
getEnterpriseName in interface NuageVspApiClientpublic String getResources(NuageVspEntity entityType) throws NuageVspException
getResources in interface NuageVspApiClientNuageVspExceptionpublic <T> T getResources(NuageVspEntity entityType, Class<T> type) throws NuageVspException
getResources in interface NuageVspApiClientNuageVspExceptionpublic String findEntityUsingFilter(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, NuageVspAttribute filterAttr, Object filterAttrValue) throws NuageVspException
findEntityUsingFilter in interface NuageVspApiClientNuageVspExceptionpublic String findEntityIdByExternalUuid(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, String externalId) throws NuageVspException
findEntityIdByExternalUuid in interface NuageVspApiClientNuageVspExceptionpublic <T> T findFieldValueByExternalUuid(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, String externalId, NuageVspAttribute fieldName) throws NuageVspException
findFieldValueByExternalUuid in interface NuageVspApiClientNuageVspExceptionpublic String findEntityByExternalUuid(NuageVspEntity entityType, String entityId, NuageVspEntity childEntityType, String externalId) throws NuageVspException
findEntityByExternalUuid in interface NuageVspApiClientNuageVspExceptionpublic String getEntityId(String jsonString, NuageVspEntity entityType) throws NuageVspException
getEntityId in interface NuageVspApiClientNuageVspExceptionpublic void cleanUpDomainAndTemplate(String enterpriseId, String networkUuid, String domainTemplateName) throws NuageVspException
cleanUpDomainAndTemplate in interface NuageVspApiClientNuageVspExceptionpublic void createVportInVsp(VspNic vspNic, VspNetwork vspNetwork, List<NuageVspObject> vmInterfaceList, NetworkDetails attachedNetworkDetails, DhcpOptions dhcpOptions) throws NuageVspException
createVportInVsp in interface NuageVspApiClientNuageVspExceptionpublic String generateCmsIdForNuageVsp(String cmsName) throws NuageVspException
generateCmsIdForNuageVsp in interface NuageVspApiClientNuageVspExceptionpublic boolean removeCmsIdForNuageVsp(String cmsId) throws NuageVspException
removeCmsIdForNuageVsp in interface NuageVspApiClientNuageVspExceptionpublic boolean isKnownCmsIdForNuageVsp(String cmsId) throws NuageVspException
isKnownCmsIdForNuageVsp in interface NuageVspApiClientNuageVspExceptionpublic List<NuageVspObject> parseJsonString(NuageVspEntity entity, String json) throws NuageVspException
parseJsonString in interface NuageVspApiClientNuageVspExceptionpublic <T> T parseJsonString(NuageVspEntity entity, String json, Class<T> type) throws NuageVspException
parseJsonString in interface NuageVspApiClientNuageVspExceptionpublic void deleteQuietly(NuageVspEntity entityType, String entityId)
deleteQuietly in interface NuageVspApiClientpublic void login()
throws NuageVspApiException
NuageVspApiClientlogin in interface NuageVspApiClientNuageVspApiExceptionpublic String getResources(NuageVspEntity enterprise, NuageVspFilter filter) throws NuageVspApiException
getResources in interface NuageVspApiClientNuageVspApiExceptionpublic String getResources(NuageVspObject parent, NuageVspEntity childEntityType) throws NuageVspApiException
getResources in interface NuageVspApiClientNuageVspApiExceptionpublic NuageVspObject getResource(NuageVspEntity nuageEntityType, String entityId) throws NuageVspApiException
getResource in interface NuageVspApiClientNuageVspApiExceptionpublic boolean isExistingResource(NuageVspEntity entity, String entiyId)
NuageVspApiClientisExistingResource in interface NuageVspApiClientCopyright © 2016–2017 Nuage Networks. All rights reserved.