As far as i can tell that text is not considered canonical by Vibbhajavadin schools, schools of analysis, monks who rejected some inessential parts of mainstream doctrine as it was then taught on account of it not being canonical, from which Theravada developed ca 250 BC. 

I think text belongs to schools that were considered heretical by Theravada and would be among Mahayana texts.

Early texts offer little commentary but there is some. 

There is a story in Theravadin Vinaya of a "pandaka" monk who first asked elder monks to attack him, then asked younger monks inb4 asking novices to attack him [a term used for sexual things, masturbation is called 'attacking with hand'] and being refused he wen't on to have sex with lay stable handlers and bad report spread about monks among lay people as a result. 

A rule was made prohibiting pandaka ordination but the definition of a pandaka isn't clear, is very vague and describes some behaviors that have to do with being gratified only by ingesting semen and or other particular deviances based on phases of the moon and whatnot, there is really no word for what is said to be pandaka in Theravadin Vinaya.

Same-sex sexual intercourse is not a cause for disrobing for a nun but is a disrobing offense for a monk. There are some differences here.

There are also mentions of a monk's peculiar fascination with the Buddha, he had to be sent away to train in solitude because he was so fond of seeing Buddha's form that it interferred with his training; but he was never referred to as to any terminology akin to gay, pandaka or anything close and whether it would be considered gay at this point is a moot point. He was one of the chief disciples, foremost in faith.

It is important to note that in the beginning gay people were certainly allowed to become monks as there were little to no rules. It is also unclear whether they were allowed to ordain throughout Buddha's life but nobody was forced to disrobe because of new rules afaik.

It is also clear that they were extremely tolerant in not beating up that monk who went around soliciting novices... Iirc when he asked monks told him 'go away pandaka, what good is that..'

If anything i think pandaka is closer to sexually perverted *degenerate* or a maniac maybe more so than a particular orientation. It's my opinion tho.

There is also a story about a group of monks who were aroused by seeing corpses in course of their training when visiting a charnel ground.

There is more to further analysis but i will leave it here. I think that if one puts it all together it paints a fairly tolerant culture. 

Unfortunately traditionally Buddhist cultures do not generally share these views, try asking a Sri Lankan if a Sotapanna can have sex and they will say yes but if you ask for specifics of what sex they can do, they will probably never talk to you again because of the cognitive dissonance they will there experience.