def matchesExistingSubscription(self, phedexDataSvc):
    '\n        _matchesExistingSubscription_\n\n        Check the given phedex data service to verify if a PhEDEx subscription\n        equal to this subscription is already in the system.\n        '
    if ((len(self.datasetPaths) != 1) or (len(self.nodes) != 1)):
        msg = 'matchesExistingSubscription can only run in single node/dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    if (self.level != 'dataset'):
        msg = 'matchesExistingSubscription is only supported by dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    node = next(iter(self.nodes))
    dataset = next(iter(self.datasetPaths))
    existingSubscription = phedexDataSvc.subscriptions(dataset=dataset, node=node)['phedex']['dataset']
    if (len(existingSubscription) < 1):
        return False
    datasetInfo = existingSubscription[0]
    for subscriptionInfo in datasetInfo['subscription']:
        if (node != subscriptionInfo['node']):
            continue
        phedexSub = PhEDExSubscription(self.datasetPaths, self.nodes, self.group, subscriptionInfo['level'], subscriptionInfo['priority'], subscriptionInfo['move'], self.static, subscriptionInfo['custodial'], self.request_only)
        if self.isEqualOptions(phedexSub):
            return True
    return False
_matchesExistingSubscription_

Check the given phedex data service to verify if a PhEDEx subscription
equal to this subscription is already in the system.
def matchesExistingSubscription(self, phedexDataSvc):
    '\n        _matchesExistingSubscription_\n\n        Check the given phedex data service to verify if a PhEDEx subscription\n        equal to this subscription is already in the system.\n        '
    if ((len(self.datasetPaths) != 1) or (len(self.nodes) != 1)):
        msg = 'matchesExistingSubscription can only run in single node/dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    if (self.level != 'dataset'):
        msg = 'matchesExistingSubscription is only supported by dataset subscriptions'
        raise PhEDExSubscriptionException(msg)
    node = next(iter(self.nodes))
    dataset = next(iter(self.datasetPaths))
    existingSubscription = phedexDataSvc.subscriptions(dataset=dataset, node=node)['phedex']['dataset']
    if (len(existingSubscription) < 1):
        return False
    datasetInfo = existingSubscription[0]
    for subscriptionInfo in datasetInfo['subscription']:
        if (node != subscriptionInfo['node']):
            continue
        phedexSub = PhEDExSubscription(self.datasetPaths, self.nodes, self.group, subscriptionInfo['level'], subscriptionInfo['priority'], subscriptionInfo['move'], self.static, subscriptionInfo['custodial'], self.request_only)
        if self.isEqualOptions(phedexSub):
            return True
    return False