예제 #1
0
 def test(self):
     """
     Tests that the account details are correct
     """
     gsxws.connect(sold_to=self.sold_to,
                   user_id=self.user_id,
                   environment=self.environment)
예제 #2
0
 def test(self):
     """
     Tests that the account details are correct
     """
     gsxws.connect(sold_to=self.sold_to,
                   user_id=self.user_id,
                   environment=self.environment)
예제 #3
0
 def fallback(cls):
     """
     Connect to fallback GSX account
     """
     act = cls.get_default_account()
     gsxws.connect(user_id=act.user_id,
                   sold_to=act.sold_to,
                   timezone=act.timezone,
                   environment=act.environment,)
     return act
예제 #4
0
파일: common.py 프로젝트: ipwnosx/Servo
 def fallback(cls):
     """
     Connect to fallback GSX account
     """
     act = cls.get_default_account()
     gsxws.connect(user_id=act.user_id,
                   sold_to=act.sold_to,
                   timezone=act.timezone,
                   environment=act.environment,)
     return act
예제 #5
0
    def connect(self, user, location=None):
        """
        Connects to this GSX Account
        """
        if user.gsx_userid:
            self.user_id = user.gsx_userid

        if location is None:
            timezone = user.location.gsx_tz
        else:
            timezone = location.gsx_tz

        gsxws.connect(user_id=self.user_id,
                      sold_to=self.sold_to,
                      environment=self.environment,
                      timezone=timezone)
        return self
예제 #6
0
    def connect(self, user, location=None):
        """
        Connects to this GSX Account
        """
        if user.gsx_userid:
            self.user_id = user.gsx_userid

        if location is None:
            timezone = user.location.gsx_tz
        else:
            timezone = location.gsx_tz

        gsxws.connect(user_id=self.user_id,
                      sold_to=self.sold_to,
                      environment=self.environment,
                      timezone=timezone)
        return self