def createOsh(self, siteDto, containerOsh, credentialId=None):
     osh = modeling.createActiveDirectoryOsh('activedirectorysite',
                                             siteDto.name)
     osh.setContainer(containerOsh)
     if credentialId is not None:
         osh.setAttribute('credentials_id', credentialId)
     return osh
 def createOsh(self, forestDto, containerOsh=None, functionality=None):
     osh = modeling.createActiveDirectoryOsh(self.FOREST_CIT_NAME, forestDto.name)
     if containerOsh:
         osh.setContainer(containerOsh)
     if functionality is not None and str(functionality).isdigit():
         osh.setIntegerAttribute('activedirectoryforest_functionality', int(functionality))
     return osh
 def createOsh(self, domainDto, containerOsh, credentialsId=None):
     osh = modeling.createActiveDirectoryOsh(self.DOMAIN_CIT_NAME, domainDto.name)
     if credentialsId:
         osh.setAttribute('credentials_id', credentialsId)
     osh.setContainer(containerOsh)
     if domainDto.description:
         osh.setAttribute('data_description', domainDto.description)
     return osh
 def createOsh(self, forestDto, containerOsh=None, functionality=None):
     osh = modeling.createActiveDirectoryOsh(self.FOREST_CIT_NAME,
                                             forestDto.name)
     if containerOsh:
         osh.setContainer(containerOsh)
     if functionality is not None and str(functionality).isdigit():
         osh.setIntegerAttribute('activedirectoryforest_functionality',
                                 int(functionality))
     return osh
 def createOsh(self, domainDto, containerOsh, credentialsId=None):
     osh = modeling.createActiveDirectoryOsh(self.DOMAIN_CIT_NAME,
                                             domainDto.name)
     if credentialsId:
         osh.setAttribute('credentials_id', credentialsId)
     osh.setContainer(containerOsh)
     if domainDto.description:
         osh.setAttribute('data_description', domainDto.description)
     return osh
 def createOsh(self, siteLinkDto, containerOsh, credentialId=None):
     citName = 'activedirectorysitelink'
     osh = modeling.createActiveDirectoryOsh(citName, siteLinkDto.name)
     osh.setAttribute("credentials_id", credentialId)
     osh.setAttribute("intersite_transportprotocol", siteLinkDto.replProtocol)
     osh.setContainer(containerOsh)
     if siteLinkDto.cost and str(siteLinkDto.cost).isdigit():
         osh.setAttribute("cost", int(siteLinkDto.cost))
     if siteLinkDto.replInterval and str(siteLinkDto.replInterval).isdigit():
         osh.setAttribute('replication_interval', int(siteLinkDto.replInterval))
     return osh
 def createOsh(self, siteLinkDto, containerOsh, credentialId=None):
     citName = 'activedirectorysitelink'
     osh = modeling.createActiveDirectoryOsh(citName, siteLinkDto.name)
     osh.setAttribute("credentials_id", credentialId)
     osh.setAttribute("intersite_transportprotocol",
                      siteLinkDto.replProtocol)
     osh.setContainer(containerOsh)
     if siteLinkDto.cost and str(siteLinkDto.cost).isdigit():
         osh.setAttribute("cost", int(siteLinkDto.cost))
     if siteLinkDto.replInterval and str(
             siteLinkDto.replInterval).isdigit():
         osh.setAttribute('replication_interval',
                          int(siteLinkDto.replInterval))
     return osh
def createAdSystemOsh():
    return modeling.createActiveDirectoryOsh('activedirectorysystem',
                                             AD_SYSTEM_NAME)
def createAdSystemOsh():
    return modeling.createActiveDirectoryOsh('activedirectorysystem', AD_SYSTEM_NAME)
 def createOsh(self, siteDto, containerOsh, credentialId=None):
     osh = modeling.createActiveDirectoryOsh('activedirectorysite', siteDto.name)
     osh.setContainer(containerOsh)
     if credentialId is not None:
         osh.setAttribute('credentials_id', credentialId)
     return osh