AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.128   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/uaclient/api/u/pro/attach/auto/configure_retry_service/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/uaclient/api/u/pro/attach/auto/configure_retry_service/v1.py
from uaclient import system
from uaclient.api.api import APIEndpoint
from uaclient.api.data_types import AdditionalInfo
from uaclient.api.u.pro.attach.auto.full_auto_attach.v1 import (
    FullAutoAttachOptions,
)
from uaclient.config import UAConfig
from uaclient.daemon import retry_auto_attach
from uaclient.data_types import DataObject
from uaclient.files import state_files

ConfigureRetryServiceOptions = FullAutoAttachOptions


class ConfigureRetryServiceResult(DataObject, AdditionalInfo):
    pass


def configure_retry_service(
    options: ConfigureRetryServiceOptions,
) -> ConfigureRetryServiceResult:
    return _configure_retry_service(options, UAConfig())


def _configure_retry_service(
    options: ConfigureRetryServiceOptions, cfg: UAConfig
) -> ConfigureRetryServiceResult:
    state_files.retry_auto_attach_options_file.write(
        state_files.RetryAutoAttachOptions(
            enable=options.enable, enable_beta=options.enable_beta
        )
    )
    system.create_file(retry_auto_attach.FLAG_FILE_PATH)
    return ConfigureRetryServiceResult()


endpoint = APIEndpoint(
    version="v1",
    name="ConfigureRetryService",
    fn=_configure_retry_service,
    options_cls=ConfigureRetryServiceOptions,
)

Anon7 - 2022
AnonSec Team