def create_topology(self, topologyName, topology):
if not topology or not topology.IsInitialized():<EOL><INDENT>raise_(StateException("<STR_LIT>",<EOL>StateException.EX_TYPE_PROTOBUF_ERROR), sys.exc_info()[<NUM_LIT:2>])<EOL><DEDENT>path = self.get_topology_path(topologyName)<EOL>LOG.info("<STR_LIT>".format(<EOL>topologyName, path))<EOL>topologyString = topology.SerializeToString()<EOL>try:<EOL><INDENT>self.client.create(path, value=topologyString, makepath=True)<EOL>return True<EOL><DEDENT>except NoNodeError:<EOL><INDENT>raise_(StateException("<STR_LIT>",<EOL>StateException.EX_TYPE_NO_NODE_ERROR), sys.exc_info()[<NUM_LIT:2>])<EOL><DEDENT>except NodeExistsError:<EOL><INDENT>raise_(StateException("<STR_LIT>",<EOL>StateException.EX_TYPE_NODE_EXISTS_ERROR), sys.exc_info()[<NUM_LIT:2>])<EOL><DEDENT>except ZookeeperError:<EOL><INDENT>raise_(StateException("<STR_LIT>",<EOL>StateException.EX_TYPE_ZOOKEEPER_ERROR), sys.exc_info()[<NUM_LIT:2>])<EOL><DEDENT>except Exception:<EOL><INDENT>raise<EOL><DEDENT>
crate topology