President Barack Obama said he will not attend the Sochi Olympics in Russia and named two openly gay athletes to represent the US at opening and closing ceremonies, in an open snub to Russian laws targeting homosexuals.