def check(self):
        """Check if it is a valid RADL document."""

        for i in [f for fs in [self.networks, self.ansible_hosts, self.systems, self.deploys,
                               self.configures, [self.contextualize]] for f in fs]:
            i.check(self)

        snames = [s.name for s in self.systems]
        if len(set(snames)) != len(snames):
            raise RADLParseException("Some System name duplicated.")

        nids = [s.id for s in self.networks]
        if len(set(nids)) != len(nids):
            raise RADLParseException("Some Network name duplicated.")

        return True
def check ( self ) : for i in [ f for fs in [ self . networks , self . ansible_hosts , self . systems , self . deploys , self . configures , [ self . contextualize ] ] for f in fs ] : i . check ( self ) snames = [ s . name for s in self . systems ] if len ( set ( snames ) ) != len ( snames ) : raise RADLParseException ( "Some System name duplicated." ) nids = [ s . id for s in self . networks ] if len ( set ( nids ) ) != len ( nids ) : raise RADLParseException ( "Some Network name duplicated." ) return True
Check if it is a valid RADL document.