Exemple #1
0
    def __init__(self, options):
        # Convert options to context
        if options.upgradeset:
            self.requested_action = 'Activate'
        elif options.preupgradeset:
            self.requested_action = 'Pre-Upgrade'
        elif options.addset:
            self.requested_action = 'Install Add'
        elif options.postupgradeset:
            self.requested_action = 'Post-Upgrade'
        elif options.pkg_state:
            self.requested_action = 'Get-Package'
        elif options.commitset:
            self.requested_action = 'Install Commit'
        if options.repository_path:
            self.server_repository_url = options.repository_path

        self.host = Host()
        if options.device_url:
            self.host_urls = options.device_url[:]
        if options.devices:
            self.host_urls = get_urls_from_txt(options.devices, 1)[:]

        if options.pkg_file and not options.repository_path:
            self.server_repository_url = pkglist.get_repo(options.pkg_file)
        elif options.repository_path:
            self.server_repository_url = options.repository_path
        if options.pkg_file:
            self.software_packages = pkglist.get_pkgs(options.pkg_file)
        self.log_directory = options.logdir
        self.active_cli = None
        self.inactive_cli = None
        self.committed_cli = None
Exemple #2
0
    def __init__(self,options):
        # Convert options to context
        if options.upgradeset :
            self.requested_action = 'Activate'
        elif options.preupgradeset :
            self.requested_action = 'Pre-Upgrade'
        elif options.addset :
            self.requested_action = 'Install Add'
        elif options.postupgradeset :
            self.requested_action = 'Post-Upgrade'
        elif options.pkg_state:
            self.requested_action = 'Get-Package'
        elif options.commitset :
            self.requested_action = 'Install Commit'
        if options.repository_path :
            self.server_repository_url = options.repository_path
       
        self.host = Host()
        if options.device_url :
            self.host_urls = options.device_url[:]
        if options.devices:
            self.host_urls = get_urls_from_txt(options.devices,1)[:]

        if options.pkg_file and not options.repository_path : 
            self.server_repository_url = pkglist.get_repo(options.pkg_file)
        elif options.repository_path :
            self.server_repository_url = options.repository_path
        if options.pkg_file :
            self.software_packages = pkglist.get_pkgs(options.pkg_file)
        self.log_directory = options.logdir
        self.active_cli = None
        self.inactive_cli = None
        self.committed_cli = None
Exemple #3
0
def get_repo_from_file(txtfile):
    return pkglist.get_repo(txtfile)
Exemple #4
0
def get_repo_from_file(txtfile):
    return pkglist.get_repo(txtfile)