Class MplsService
- java.lang.Object
-
- com.neotropic.kuwaiba.modules.commercial.mpls.MplsService
-
@Service public class MplsService extends Object
This class implements the functionality corresponding to the MPLS module- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static String
RELATIONSHIP_MPLS_PW_ISRELATEDWITH_PW
Relates two pseudowires that are logical linked inside a MPLS devicestatic String
RELATIONSHIP_MPLS_PW_ISRELATEDWITH_VFI
Relates a pseudowire and its output interface, the output interface is the endpoint of a MPLS link if is a portstatic String
RELATIONSHIP_MPLSENDPOINTA
A side in a tributary linkstatic String
RELATIONSHIP_MPLSENDPOINTB
B side in a tributary linkstatic String
RELATIONSHIP_MPLSLINK
Relates the MPLS link directly with the GenericNetworkElements parents of the end points of the MPLS link, it is used to explore the MPLS links in a MPLS device or the routing between devicesstatic String
VIEW_CLASS
Class to identify all views made using the MPLS module
-
Constructor Summary
Constructors Constructor Description MplsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connectMplsLink(String[] sideAClassNames, String[] sideAIds, String[] linksIds, String[] sideBClassNames, String[] sideBIds, String userName)
Connect MPLS linksString
createMPLSLink(String endpointAClassName, String endpointAId, String endpointBClassName, String endpointBId, HashMap<String,String> attributesToBeSet, String userName)
Creates a MPLS Linkvoid
deleteMPLSLink(String linkId, boolean forceDelete, String userName)
Deletes a MPLS Linkvoid
disconnectMPLSLink(String connectionId, int sideToDisconnect, String userName)
Disconnect a mplsLink from its endpointsMplsConnectionDefinition
getMPLSLinkDetails(String connectionId)
Get the MPLS link details, its output interfaces, pseudowires, tunnelsvoid
relatePortToVlan(String portClassName, String portId, String vlanClassName, String vlanId)
Relates port to a VLAN.void
releasePortFromVlan(String portClassName, String portId, String vlanClassName, String vlanId)
Releases a port from a VLAN.
-
-
-
Field Detail
-
VIEW_CLASS
public static String VIEW_CLASS
Class to identify all views made using the MPLS module
-
RELATIONSHIP_MPLSENDPOINTA
public static String RELATIONSHIP_MPLSENDPOINTA
A side in a tributary link
-
RELATIONSHIP_MPLSENDPOINTB
public static String RELATIONSHIP_MPLSENDPOINTB
B side in a tributary link
-
RELATIONSHIP_MPLS_PW_ISRELATEDWITH_VFI
public static String RELATIONSHIP_MPLS_PW_ISRELATEDWITH_VFI
Relates a pseudowire and its output interface, the output interface is the endpoint of a MPLS link if is a port
-
RELATIONSHIP_MPLS_PW_ISRELATEDWITH_PW
public static String RELATIONSHIP_MPLS_PW_ISRELATEDWITH_PW
Relates two pseudowires that are logical linked inside a MPLS device
-
RELATIONSHIP_MPLSLINK
public static String RELATIONSHIP_MPLSLINK
Relates the MPLS link directly with the GenericNetworkElements parents of the end points of the MPLS link, it is used to explore the MPLS links in a MPLS device or the routing between devices
-
-
Method Detail
-
createMPLSLink
public String createMPLSLink(String endpointAClassName, String endpointAId, String endpointBClassName, String endpointBId, HashMap<String,String> attributesToBeSet, String userName) throws InvalidArgumentException
Creates a MPLS Link- Parameters:
endpointAClassName
- className of the endpoint side AendpointAId
- id of the end point side AendpointBClassName
- className of the endpoint side BendpointBId
- ind of the endpoint side BattributesToBeSet
- attributes for the new MPLS linkuserName
- the user name who is executing the method, to update the activity log- Returns:
- the id of the new MPLS link
- Throws:
InvalidArgumentException
- If the given linkType is no subclass of GenericLogicalConnection If any of the requested objects can't be found If any of the classes provided can not be found If any of the objects involved can't be connected
-
deleteMPLSLink
public void deleteMPLSLink(String linkId, boolean forceDelete, String userName) throws InvalidArgumentException
Deletes a MPLS Link- Parameters:
linkId
- the mplslink idforceDelete
- true deletes the mpls link even if have more relationships, false does not deletes the mpls link if have relationshipsuserName
- the user name who is executing the method, to update the activity log- Throws:
InvalidArgumentException
- If the object can not be found If either the object class or the attribute can not be found If the class could not be found If the object could not be deleted because there's some business rules that avoids it or it has incoming relationships.
-
getMPLSLinkDetails
public MplsConnectionDefinition getMPLSLinkDetails(String connectionId) throws InvalidArgumentException
Get the MPLS link details, its output interfaces, pseudowires, tunnels- Parameters:
connectionId
- MPLS link id- Returns:
- MPLS link endpoints
- Throws:
InvalidArgumentException
-
connectMplsLink
public void connectMplsLink(String[] sideAClassNames, String[] sideAIds, String[] linksIds, String[] sideBClassNames, String[] sideBIds, String userName) throws InvalidArgumentException, MetadataObjectNotFoundException, BusinessObjectNotFoundException, InvalidArgumentException, BusinessRuleException, OperationNotPermittedException
Connect MPLS links- Parameters:
sideAClassNames
- endpoint side A class namessideAIds
- endpoint side A idslinksIds
- MPLS links idssideBClassNames
- endpoint side B class namessideBIds
- endpoint side B idsuserName
- the user who executes this method in order to update the activity log- Throws:
InvalidArgumentException
MetadataObjectNotFoundException
BusinessObjectNotFoundException
BusinessRuleException
OperationNotPermittedException
-
disconnectMPLSLink
public void disconnectMPLSLink(String connectionId, int sideToDisconnect, String userName) throws InvalidArgumentException
Disconnect a mplsLink from its endpoints- Parameters:
connectionId
- MPLS link idsideToDisconnect
- if is side A or side B or both sidesuserName
- the user name who is executing the method, to update the activity log- Throws:
InvalidArgumentException
-
relatePortToVlan
public void relatePortToVlan(String portClassName, String portId, String vlanClassName, String vlanId) throws InvalidArgumentException, MetadataObjectNotFoundException, BusinessObjectNotFoundException, OperationNotPermittedException
Relates port to a VLAN.- Parameters:
portClassName
- The class name of the portportId
- The port idvlanClassName
- The class name of the VLANvlanId
- The VLAN id- Throws:
InvalidArgumentException
- If the a/b Object Id are nullMetadataObjectNotFoundException
- If any of the classes provided can not be foundBusinessObjectNotFoundException
- If any of the objects can't be foundOperationNotPermittedException
- If any of the objects involved can't be connected (i.e. if it's not an inventory object)
-
releasePortFromVlan
public void releasePortFromVlan(String portClassName, String portId, String vlanClassName, String vlanId) throws InvalidArgumentException, MetadataObjectNotFoundException, BusinessObjectNotFoundException, OperationNotPermittedException
Releases a port from a VLAN.- Parameters:
portClassName
- The class name of the portportId
- The port idvlanClassName
- The class name of the VLANvlanId
- The VLAN id- Throws:
InvalidArgumentException
- If the a/b Object Id are nullMetadataObjectNotFoundException
- If any of the classes provided can not be foundBusinessObjectNotFoundException
- If any of the objects can't be foundOperationNotPermittedException
- If any of the objects involved can't be connected (i.e. if it's not an inventory object)
-
-