Source code for cgl.plugins.perforce.utils.config


from cgl.core.config.query import AlchemyConfigManager

CFG = AlchemyConfigManager()


[docs] def get_perforce_user_name() -> str: """ function to get the perforce user name defaults to alchemy username """ alchemy_user = CFG.alc_user return alchemy_user
[docs] def get_port(): """ Gets the port being used by the perforce server Args: company: project: Returns: Port specified in the globals """ return 1666
[docs] def get_server_ip(): """ Gets the IP address of the perforce server Return: IP address of the server if found in company globals. False if server IP is not found in globals """ perforce_server = CFG.get_perforce_server() if not perforce_server: print("Error: No Perforce Server Set in Slchemy Config") return None return perforce_server
if __name__ == "__main__": print(get_perforce_user_name())