def configure(self):
        """Prompt user for config and write to plist

        Uses preferences_file argument from JSSPrefs.__init__ as path
        to write.
        """
        root = ElementTree.Element("dict")
        print ("It seems like you do not have a preferences file configured. "
               "Please answer the following questions to generate a plist at "
               "%s for use with python-jss." % self.preferences_file)

        self.url = _get_user_input(
            "The complete URL to your JSS, with port (e.g. "
            "'https://mycasperserver.org:8443')\nURL: ", "jss_url", root)

        self.user = _get_user_input("API Username: ", "jss_user", root)

        self.password = _get_user_input("API User's Password: ", "jss_pass",
                                        root, getpass.getpass)

        verify_prompt = ("Do you want to verify that traffic is encrypted by "
                         "a certificate that you trust?: (Y|N) ")
        self.verify = _get_user_input(verify_prompt, "verify", root,
                                      loop_until_valid_response)

        self._handle_repos(root)

        self._write_plist(root)
        print "Preferences created.\n"
def configure ( self ) : root = ElementTree . Element ( "dict" ) print ( "It seems like you do not have a preferences file configured. " "Please answer the following questions to generate a plist at " "%s for use with python-jss." % self . preferences_file ) self . url = _get_user_input ( "The complete URL to your JSS, with port (e.g. " "'https://mycasperserver.org:8443')\nURL: " , "jss_url" , root ) self . user = _get_user_input ( "API Username: " , "jss_user" , root ) self . password = _get_user_input ( "API User's Password: " , "jss_pass" , root , getpass . getpass ) verify_prompt = ( "Do you want to verify that traffic is encrypted by " "a certificate that you trust?: (Y|N) " ) self . verify = _get_user_input ( verify_prompt , "verify" , root , loop_until_valid_response ) self . _handle_repos ( root ) self . _write_plist ( root ) print "Preferences created.\n"
Prompt user for config and write to plist

        Uses preferences_file argument from JSSPrefs.__init__ as path
        to write.